From bcc517cb3751296d131ed27fa776a0f0ba87eb6f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 17 Aug 2007 14:32:39 +0800 Subject: [PATCH 001/527] BUG#30271 NDB_LE_MemoryUsage.page_size_kb actually returns page size in bytes, not kilobyte ndb/include/mgmapi/ndb_logevent.h: Add page_size_bytes member variable for MemoryUsage. And don't remove page_size_kb member variable at present for the compatibility backward. ndb/src/mgmapi/ndb_logevent.cpp: change the page_size_kb member variable of MemoryUsage to page_size_bytes --- ndb/include/mgmapi/ndb_logevent.h | 8 +++++++- ndb/src/mgmapi/ndb_logevent.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ndb/include/mgmapi/ndb_logevent.h b/ndb/include/mgmapi/ndb_logevent.h index 76e4c31baa2..389004da06b 100644 --- a/ndb/include/mgmapi/ndb_logevent.h +++ b/ndb/include/mgmapi/ndb_logevent.h @@ -551,7 +551,13 @@ extern "C" { /** Log event specific data for for corresponding NDB_LE_ log event */ struct { int gth; - unsigned page_size_kb; + /* union is for compatibility backward. + * page_size_kb member variable should be removed in the future + */ + union { + unsigned page_size_kb; + unsigned page_size_bytes; + }; unsigned pages_used; unsigned pages_total; unsigned block; diff --git a/ndb/src/mgmapi/ndb_logevent.cpp b/ndb/src/mgmapi/ndb_logevent.cpp index 3885bb79536..f0b7c26cf78 100644 --- a/ndb/src/mgmapi/ndb_logevent.cpp +++ b/ndb/src/mgmapi/ndb_logevent.cpp @@ -256,7 +256,7 @@ struct Ndb_logevent_body_row ndb_logevent_body[]= { ROW( ReceiveBytesStatistic, "mean_received_bytes", 2, mean_received_bytes), ROW( MemoryUsage, "gth", 1, gth), - ROW( MemoryUsage, "page_size_kb", 2, page_size_kb), + ROW( MemoryUsage, "page_size_bytes", 2, page_size_bytes), ROW( MemoryUsage, "pages_used", 3, pages_used), ROW( MemoryUsage, "pages_total", 4, pages_total), ROW( MemoryUsage, "block", 5, block), From dfc14639682d573c620b1b4d6d58788274f8f7ad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Sep 2007 22:18:20 +0800 Subject: [PATCH 002/527] BUG#28647 Stop backup if disk full storage/ndb/src/kernel/blocks/backup/Backup.cpp: Close files when disk full storage/ndb/src/ndbapi/ndberror.c: Add error messages for backup failure storage/ndb/test/src/NdbBackup.cpp: Add test case for disk full --- mysql-test/r/bdb_notembedded.result | 35 +++++++++++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++ .../ndb/src/kernel/blocks/backup/Backup.cpp | 59 ++++++++++++++++++- storage/ndb/src/ndbapi/ndberror.c | 2 + storage/ndb/test/src/NdbBackup.cpp | 3 +- 5 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp index 64e2c41aa69..fb234c2afef 100644 --- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp @@ -967,6 +967,7 @@ Backup::checkNodeFail(Signal* signal, ref->backupPtr = ptr.i; ref->backupId = ptr.p->backupId; ref->errorCode = AbortBackupOrd::BackupFailureDueToNodeFail; + ref->nodeId = getOwnNodeId(); gsn= GSN_STOP_BACKUP_REF; len= StopBackupRef::SignalLength; pos= &ref->nodeId - signal->getDataPtr(); @@ -2080,6 +2081,15 @@ Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr) /** * Insert footers */ + //if backup error, we needn't insert footers + if(ptr.p->checkError()) + { + jam(); + closeFiles(signal, ptr); + ptr.p->errorCode = 0; + return; + } + { BackupFilePtr filePtr LINT_SET_PTR; ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr); @@ -4186,6 +4196,37 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr) #if 0 ndbout << "Ptr to data = " << hex << tmp << endl; #endif + BackupRecordPtr ptr LINT_SET_PTR; + c_backupPool.getPtr(ptr, filePtr.p->backupPtr); + + if (ERROR_INSERTED(10036)) + { + jam(); + filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_FILE_THREAD; + filePtr.p->errorCode = 2810; + ptr.p->setErrorCode(2810); + + if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ) + { + jam(); + closeFile(signal, ptr, filePtr); + } + return; + } + + if(filePtr.p->errorCode != 0) + { + jam(); + ptr.p->setErrorCode(filePtr.p->errorCode); + + if(ptr.p->m_gsn == GSN_STOP_BACKUP_REQ) + { + jam(); + closeFile(signal, ptr, filePtr); + } + return; + } + if (!ready_to_write(ready, sz, eof, filePtr.p)) { jam(); @@ -4217,8 +4258,6 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr) ndbrequire(flags & BackupFile::BF_OPEN); ndbrequire(flags & BackupFile::BF_FILE_THREAD); - BackupRecordPtr ptr LINT_SET_PTR; - c_backupPool.getPtr(ptr, filePtr.p->backupPtr); closeFile(signal, ptr, filePtr); } @@ -4581,6 +4620,22 @@ Backup::closeFilesDone(Signal* signal, BackupRecordPtr ptr) jam(); + //error when do insert footer or close file + if(ptr.p->checkError()) + { + StopBackupRef * ref = (StopBackupRef*)signal->getDataPtr(); + ref->backupPtr = ptr.i; + ref->backupId = ptr.p->backupId; + ref->errorCode = ptr.p->errorCode; + ref->nodeId = getOwnNodeId(); + sendSignal(ptr.p->masterRef, GSN_STOP_BACKUP_REF, signal, + StopBackupConf::SignalLength, JBB); + + ptr.p->m_gsn = GSN_STOP_BACKUP_REF; + ptr.p->slaveState.setState(CLEANING); + return; + } + StopBackupConf* conf = (StopBackupConf*)signal->getDataPtrSend(); conf->backupId = ptr.p->backupId; conf->backupPtr = ptr.i; diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index a0417e5b118..e05b9c41b77 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -624,6 +624,8 @@ ErrorBundle ErrorCodes[] = { { 4273, DMEC, IE, "No blob table in dict cache" }, { 4274, DMEC, IE, "Corrupted main table PK in blob operation" }, { 4275, DMEC, AE, "The blob method is incompatible with operation type or lock mode" }, + { 2810, DMEC, TR, "No space left on the device" }, + { 2815, DMEC, TR, "Error in reading files, please check file system" }, { NO_CONTACT_WITH_PROCESS, DMEC, AE, "No contact with the process (dead ?)."}, diff --git a/storage/ndb/test/src/NdbBackup.cpp b/storage/ndb/test/src/NdbBackup.cpp index 42b15885089..3fb4de461f0 100644 --- a/storage/ndb/test/src/NdbBackup.cpp +++ b/storage/ndb/test/src/NdbBackup.cpp @@ -350,7 +350,8 @@ FailS_codes[] = { 10025, 10027, 10033, - 10035 + 10035, + 10036 }; int From bafa5fe8aa6a79ab5f28a9275d71647049709863 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Sep 2007 09:16:41 +0800 Subject: [PATCH 003/527] BUG#29851 TRUNCATE causes error 4350 from cluster in INSERT... ON DUPLICATE KEY UPDATE mysql-test/r/ndb_alter_table2.result: Add test case for BUG#29851 mysql-test/t/ndb_alter_table2.test: Add test case for BUG#29851 sql/ha_ndbcluster.cc: Indexes are dropped also when dropping table in GlobalDictCache --- mysql-test/r/ndb_alter_table2.result | 19 +++++++++++++++++ mysql-test/t/ndb_alter_table2.test | 31 ++++++++++++++++++++++++++++ sql/ha_ndbcluster.cc | 10 ++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ndb_alter_table2.result b/mysql-test/r/ndb_alter_table2.result index 399578dc97b..886c300d53d 100644 --- a/mysql-test/r/ndb_alter_table2.result +++ b/mysql-test/r/ndb_alter_table2.result @@ -40,3 +40,22 @@ a b c select * from t1; a b c drop table t1; +DROP TABLE IF EXISTS truncate_test; +CREATE TABLE truncate_test ( +i INT PRIMARY KEY, +a INT, +b VARCHAR(11), +UNIQUE KEY (a) +) ENGINE = NDB; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +TRUNCATE truncate_test; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; +i a b +1 1 test +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; +i a b +1 1 new +DROP TABLE truncate_test; diff --git a/mysql-test/t/ndb_alter_table2.test b/mysql-test/t/ndb_alter_table2.test index 3861fcc6c9d..99c201f7370 100644 --- a/mysql-test/t/ndb_alter_table2.test +++ b/mysql-test/t/ndb_alter_table2.test @@ -81,3 +81,34 @@ select * from t1; select * from t1; drop table t1; + +#For BUG#29851 TRUNCATE causes error 4350 from cluster in INSERT... ON DUPLICATE KEY UPDATE + +connection con1; + +--disable_warnings +DROP TABLE IF EXISTS truncate_test; +--enable_warnings + +CREATE TABLE truncate_test ( + i INT PRIMARY KEY, + a INT, + b VARCHAR(11), + UNIQUE KEY (a) +) ENGINE = NDB; + +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; + +connection con2; +TRUNCATE truncate_test; + +connection con1; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +connection con2; +INSERT INTO truncate_test VALUES (1, 1, 'test') ON DUPLICATE KEY UPDATE b = 'new'; +SELECT * FROM truncate_test; + +DROP TABLE truncate_test; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 03b6bcf3242..76857900ea2 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -439,7 +439,8 @@ void ha_ndbcluster::no_uncommitted_rows_reset(THD *thd) void ha_ndbcluster::invalidate_dictionary_cache(bool global) { - NDBDICT *dict= get_ndb()->getDictionary(); + Ndb * ndb= get_ndb(); + NDBDICT *dict= ndb->getDictionary(); DBUG_ENTER("invalidate_dictionary_cache"); DBUG_PRINT("info", ("invalidating %s", m_tabname)); @@ -459,6 +460,7 @@ void ha_ndbcluster::invalidate_dictionary_cache(bool global) } else dict->removeCachedTable(m_tabname); + build_index_list(ndb, table, ILBP_OPEN); table->s->version=0L; /* Free when thread is ready */ /* Invalidate indexes */ for (uint i= 0; i < table->s->keys; i++) @@ -470,17 +472,23 @@ void ha_ndbcluster::invalidate_dictionary_cache(bool global) switch (idx_type) { case PRIMARY_KEY_ORDERED_INDEX: case ORDERED_INDEX: + if (!index) + break; if (global) dict->invalidateIndex(index->getName(), m_tabname); else dict->removeCachedIndex(index->getName(), m_tabname); break; case UNIQUE_ORDERED_INDEX: + if (!index) + break; if (global) dict->invalidateIndex(index->getName(), m_tabname); else dict->removeCachedIndex(index->getName(), m_tabname); case UNIQUE_INDEX: + if (!unique_index) + break; if (global) dict->invalidateIndex(unique_index->getName(), m_tabname); else From 3a3e2c796c9a3555b445b940de5670ca683fee2f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Sep 2007 09:49:16 +0800 Subject: [PATCH 004/527] BUG#28298 Node Id larger than MAX_NDB_NODES in config file doesn't generate error ndb/include/kernel/ndb_limits.h: 1) define a macro MAX_DATA_NODE_ID to set the max ID of data nodes to be MAX_NDB_NODES - 1 2) define a macro MAX_NODES_ID to set the max ID of API and MGM to be MAX_NODES -1 ndb/src/mgmsrv/ConfigInfo.cpp: 1) replace MAX_NODES with MAX_DATA_NODE_ID (= MAX_NDB_NODES - 1) when the NodeId represents data nodes. 2) replace MAX_NODES with MAX_NODES_ID (= MAX_NODES -1) when the NodeId represents API or MGM nodes. --- ndb/include/kernel/ndb_limits.h | 11 +++++++++++ ndb/src/mgmsrv/ConfigInfo.cpp | 12 ++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ndb/include/kernel/ndb_limits.h b/ndb/include/kernel/ndb_limits.h index c82288c762a..82fd0bd5d51 100644 --- a/ndb/include/kernel/ndb_limits.h +++ b/ndb/include/kernel/ndb_limits.h @@ -27,6 +27,17 @@ #define MAX_NDB_NODES 49 #define MAX_NODES 64 +/************************************************************************** + * IT SHOULD BE (MAX_NDB_NODES - 1). + * WHEN MAX_NDB_NODE IS CHANGED, IT SHOULD BE CHANGED ALSO + **************************************************************************/ +#define MAX_DATA_NODE_ID 48 +/************************************************************************** + * IT SHOULD BE (MAX_NODES - 1). + * WHEN MAX_NODES IS CHANGED, IT SHOULD BE CHANGED ALSO + **************************************************************************/ +#define MAX_NODES_ID 63 + /** * MAX_API_NODES = MAX_NODES - No of NDB Nodes in use */ diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index 0cf37b5f874..657dccb0d98 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -398,7 +398,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_DATA_NODE_ID) }, { CFG_NODE_ID, @@ -410,7 +410,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_DATA_NODE_ID) }, { KEY_INTERNAL, @@ -1261,7 +1261,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_NODE_ID, @@ -1273,7 +1273,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { KEY_INTERNAL, @@ -1404,7 +1404,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_NODE_ID, @@ -1416,7 +1416,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "1", - STR_VALUE(MAX_NODES) }, + STR_VALUE(MAX_NODES_ID) }, { CFG_LOG_DESTINATION, From 0741a4d1b0fa15865fd7bd1a3e8a785d388dd69b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 1 Oct 2007 15:32:07 +0300 Subject: [PATCH 005/527] Removed extra spaces Added extra debug client/mysql_upgrade.c: Removed extra space client/mysqlcheck.c: Removed extra space client/mysqldump.c: Removed extra space client/mysqlimport.c: Removed extra space client/mysqlshow.c: Removed extra space client/mysqlslap.c: Removed extra space client/mysqltest.c: Removed extra space sql/handler.cc: Added extra debug --- client/mysql_upgrade.c | 2 +- client/mysqlcheck.c | 2 +- client/mysqldump.c | 2 +- client/mysqlimport.c | 2 +- client/mysqlshow.c | 2 +- client/mysqlslap.c | 2 +- client/mysqltest.c | 2 +- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ sql/handler.cc | 3 ++- 10 files changed, 82 insertions(+), 8 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 698cbeaaaa1..b95deb4a121 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -74,7 +74,7 @@ static struct my_option my_long_options[]= {"debug", '#', "Output debug log", (uchar* *) & default_dbug_option, (uchar* *) & default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag, diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 316412d7df9..301048532a3 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -97,7 +97,7 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", diff --git a/client/mysqldump.c b/client/mysqldump.c index 25c11b5e71d..38ed3fc7c05 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -243,7 +243,7 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log", (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", diff --git a/client/mysqlimport.c b/client/mysqlimport.c index afd9454d6be..0a5d320ec5e 100644 --- a/client/mysqlimport.c +++ b/client/mysqlimport.c @@ -87,7 +87,7 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"debug",'#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", diff --git a/client/mysqlshow.c b/client/mysqlshow.c index a7f6cadf450..58973d653d0 100644 --- a/client/mysqlshow.c +++ b/client/mysqlshow.c @@ -178,7 +178,7 @@ static struct my_option my_long_options[] = 0, 0, 0}, {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", diff --git a/client/mysqlslap.c b/client/mysqlslap.c index af29df6e4ba..6c60ee7ccfd 100644 --- a/client/mysqlslap.c +++ b/client/mysqlslap.c @@ -568,7 +568,7 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag, diff --git a/client/mysqltest.c b/client/mysqltest.c index 1c98ea3bf50..9e85a526ffa 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -4489,7 +4489,7 @@ static struct my_option my_long_options[] = {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, #endif - {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", + {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.", (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/handler.cc b/sql/handler.cc index 2cb3c5aa348..d59ef4d037f 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2502,8 +2502,9 @@ int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt) int ha_enable_transaction(THD *thd, bool on) { int error=0; - DBUG_ENTER("ha_enable_transaction"); + DBUG_PRINT("enter", ("on: %d", (int) on)); + thd->transaction.on= on; if (on) { From 272bb6b5856a7f033e6826ba5a96b1ca52aabb12 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Oct 2007 12:46:38 +0500 Subject: [PATCH 006/527] Bug#27580 SPACE() function collation bug? Problem: when character_set_connection=utf8, mixing SPACE() with a non-Unicode column (e.g. for concat) produced "illegal mix of collations" error. Fix: Item_string() corresponding to space character is now created using "ASCII" repertoire. Previously it was incorrectly created using "UNICODE" repertoure, which didn't allow to convert results of SPACE() to a non-Unicode character set. mysql-test/include/ctype_common.inc: - Adding test for bug#27580 - Restoring previous values of character_set_client and character_set_results, because ctype_common.inc now changes them when doing "set names utf8" in the test for bug#27580 mysql-test/r/ctype_big5.result: Adding test mysql-test/r/ctype_cp1250_ch.result: Adding test mysql-test/r/ctype_euckr.result: Adding test mysql-test/r/ctype_gb2312.result: Adding test mysql-test/r/ctype_gbk.result: Adding test mysql-test/r/ctype_uca.result: Adding test mysql-test/r/ctype_ucs.result: Adding test mysql-test/t/ctype_cp1250_ch.test: Adding test mysql-test/t/ctype_ucs.test: Adding test sql/item_create.cc: Item for SQL function SPACE() is now created with ASCII repertoire, to allow automatic conversion from UTF8 to column's character set e.g. for CONCAT(). --- mysql-test/include/ctype_common.inc | 16 +++ mysql-test/r/ctype_big5.result | 19 ++++ mysql-test/r/ctype_cp1250_ch.result | 152 ++++++++++++++++++++++++++++ mysql-test/r/ctype_euckr.result | 19 ++++ mysql-test/r/ctype_gb2312.result | 19 ++++ mysql-test/r/ctype_gbk.result | 19 ++++ mysql-test/r/ctype_uca.result | 19 ++++ mysql-test/r/ctype_ucs.result | 76 ++++++++++++++ mysql-test/t/ctype_cp1250_ch.test | 10 ++ mysql-test/t/ctype_ucs.test | 4 + sql/item_create.cc | 4 +- 11 files changed, 355 insertions(+), 2 deletions(-) diff --git a/mysql-test/include/ctype_common.inc b/mysql-test/include/ctype_common.inc index 202c508a9c9..b9bd7869967 100644 --- a/mysql-test/include/ctype_common.inc +++ b/mysql-test/include/ctype_common.inc @@ -13,6 +13,8 @@ SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -51,8 +53,22 @@ SELECT c1 as want1result from t1 where c1 like 'locatio%'; SELECT c1 as want1result from t1 where c1 like 'location%'; DROP TABLE t1; +# +# Bug#27580 SPACE() function collation bug? +# +set names utf8; +create table t1 ( + name varchar(10), + level smallint unsigned); +show create table t1; +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +drop table t1; + DROP DATABASE d1; # Restore settings USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index 6d318a445f5..75b231dbe60 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -3,6 +3,8 @@ SET @test_character_set= 'big5'; SET @test_collation= 'big5_chinese_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -52,10 +54,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=big5 +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; SET NAMES big5; SET collation_connection='big5_chinese_ci'; create table t1 select repeat('a',4000) a; diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result index 73f415732cd..3f22933e260 100644 --- a/mysql-test/r/ctype_cp1250_ch.result +++ b/mysql-test/r/ctype_cp1250_ch.result @@ -2,6 +2,158 @@ DROP TABLE IF EXISTS t1; SHOW COLLATION LIKE 'cp1250_czech_cs'; Collation Charset Id Default Compiled Sortlen cp1250_czech_cs cp1250 34 Yes 2 +SET @test_character_set= 'cp1250'; +SET @test_collation= 'cp1250_general_ci'; +SET @safe_character_set_server= @@character_set_server; +SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; +SET character_set_server= @test_character_set; +SET collation_server= @test_collation; +CREATE DATABASE d1; +USE d1; +CREATE TABLE t1 (c CHAR(10), KEY(c)); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c char(10) cp1250_general_ci YES MUL NULL +INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa'); +SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%'; +want3results +aaa +aaaa +aaaaa +DROP TABLE t1; +CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2))); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c1 varchar(15) cp1250_general_ci YES MUL NULL +INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab'); +SELECT c1 as want3results from t1 where c1 like 'l%'; +want3results +location +loberge +lotre +SELECT c1 as want3results from t1 where c1 like 'lo%'; +want3results +location +loberge +lotre +SELECT c1 as want1result from t1 where c1 like 'loc%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'loca%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locat%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locati%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locatio%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'location%'; +want1result +location +DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp1250 +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; +DROP DATABASE d1; +USE test; +SET character_set_server= @safe_character_set_server; +SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; +SET @test_character_set= 'cp1250'; +SET @test_collation= 'cp1250_czech_cs'; +SET @safe_character_set_server= @@character_set_server; +SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; +SET character_set_server= @test_character_set; +SET collation_server= @test_collation; +CREATE DATABASE d1; +USE d1; +CREATE TABLE t1 (c CHAR(10), KEY(c)); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c char(10) cp1250_czech_cs YES MUL NULL +INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa'); +SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%'; +want3results +aaa +aaaa +aaaaa +DROP TABLE t1; +CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2))); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c1 varchar(15) cp1250_czech_cs YES MUL NULL +INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab'); +SELECT c1 as want3results from t1 where c1 like 'l%'; +want3results +location +loberge +lotre +SELECT c1 as want3results from t1 where c1 like 'lo%'; +want3results +location +loberge +lotre +SELECT c1 as want1result from t1 where c1 like 'loc%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'loca%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locat%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locati%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locatio%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'location%'; +want1result +location +DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) collate cp1250_czech_cs default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp1250 COLLATE=cp1250_czech_cs +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; +DROP DATABASE d1; +USE test; +SET character_set_server= @safe_character_set_server; +SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; CREATE TABLE t1 (a char(16)) character set cp1250 collate cp1250_czech_cs; INSERT INTO t1 VALUES (''); SELECT a, length(a), a='', a=' ', a=' ' FROM t1; diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result index 57e3e2ed8f8..3409c278847 100644 --- a/mysql-test/r/ctype_euckr.result +++ b/mysql-test/r/ctype_euckr.result @@ -3,6 +3,8 @@ SET @test_character_set= 'euckr'; SET @test_collation= 'euckr_korean_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -52,10 +54,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=euckr +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; SET NAMES euckr; SET collation_connection='euckr_korean_ci'; create table t1 select repeat('a',4000) a; diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result index 314c336bab9..234201f28d0 100644 --- a/mysql-test/r/ctype_gb2312.result +++ b/mysql-test/r/ctype_gb2312.result @@ -3,6 +3,8 @@ SET @test_character_set= 'gb2312'; SET @test_collation= 'gb2312_chinese_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -52,10 +54,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=gb2312 +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; SET NAMES gb2312; SET collation_connection='gb2312_chinese_ci'; create table t1 select repeat('a',4000) a; diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result index 3f5d8b0d8c6..d78e3dd3097 100644 --- a/mysql-test/r/ctype_gbk.result +++ b/mysql-test/r/ctype_gbk.result @@ -3,6 +3,8 @@ SET @test_character_set= 'gbk'; SET @test_collation= 'gbk_chinese_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -52,10 +54,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=gbk +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; SET NAMES gbk; SET collation_connection='gbk_chinese_ci'; create table t1 select repeat('a',4000) a; diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result index 889702e380c..4fe1eb29b19 100644 --- a/mysql-test/r/ctype_uca.result +++ b/mysql-test/r/ctype_uca.result @@ -2538,6 +2538,8 @@ SET @test_character_set= 'utf8'; SET @test_collation= 'utf8_swedish_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -2587,10 +2589,27 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) collate utf8_swedish_ci default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; create table t1 (a varchar(1)) character set utf8 collate utf8_estonian_ci; insert into t1 values ('A'),('B'),('C'),('a'),('b'),('c'); select a, a regexp '[a]' from t1 order by binary a; diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index 023267c227c..2b58aebeafe 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -1,4 +1,80 @@ DROP TABLE IF EXISTS t1; +SET @test_character_set= 'ucs2'; +SET @test_collation= 'ucs2_general_ci'; +SET @safe_character_set_server= @@character_set_server; +SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; +SET character_set_server= @test_character_set; +SET collation_server= @test_collation; +CREATE DATABASE d1; +USE d1; +CREATE TABLE t1 (c CHAR(10), KEY(c)); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c char(10) ucs2_general_ci YES MUL NULL +INSERT INTO t1 VALUES ('aaa'),('aaaa'),('aaaaa'); +SELECT c as want3results FROM t1 WHERE c LIKE 'aaa%'; +want3results +aaa +aaaa +aaaaa +DROP TABLE t1; +CREATE TABLE t1 (c1 varchar(15), KEY c1 (c1(2))); +SHOW FULL COLUMNS FROM t1; +Field Type Collation Null Key Default Extra Privileges Comment +c1 varchar(15) ucs2_general_ci YES MUL NULL +INSERT INTO t1 VALUES ('location'),('loberge'),('lotre'),('boabab'); +SELECT c1 as want3results from t1 where c1 like 'l%'; +want3results +location +loberge +lotre +SELECT c1 as want3results from t1 where c1 like 'lo%'; +want3results +location +loberge +lotre +SELECT c1 as want1result from t1 where c1 like 'loc%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'loca%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locat%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locati%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'locatio%'; +want1result +location +SELECT c1 as want1result from t1 where c1 like 'location%'; +want1result +location +DROP TABLE t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=ucs2 +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; +DROP DATABASE d1; +USE test; +SET character_set_server= @safe_character_set_server; +SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; SET NAMES latin1; SET character_set_connection=ucs2; select 'a' = 'a', 'a' = 'a ', 'a ' = 'a'; diff --git a/mysql-test/t/ctype_cp1250_ch.test b/mysql-test/t/ctype_cp1250_ch.test index 86eb8c31d99..b3daa8a02a2 100644 --- a/mysql-test/t/ctype_cp1250_ch.test +++ b/mysql-test/t/ctype_cp1250_ch.test @@ -6,6 +6,16 @@ DROP TABLE IF EXISTS t1; SHOW COLLATION LIKE 'cp1250_czech_cs'; +SET @test_character_set= 'cp1250'; +SET @test_collation= 'cp1250_general_ci'; +-- source include/ctype_common.inc + +SET @test_character_set= 'cp1250'; +SET @test_collation= 'cp1250_czech_cs'; +-- source include/ctype_common.inc + + + # # Bugs: #8840: Empty string comparison and character set 'cp1250' # diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test index bca3a9c3a96..17d9f71e316 100644 --- a/mysql-test/t/ctype_ucs.test +++ b/mysql-test/t/ctype_ucs.test @@ -4,6 +4,10 @@ DROP TABLE IF EXISTS t1; --enable_warnings +SET @test_character_set= 'ucs2'; +SET @test_collation= 'ucs2_general_ci'; +-- source include/ctype_common.inc + SET NAMES latin1; SET character_set_connection=ucs2; -- source include/endspace.inc diff --git a/sql/item_create.cc b/sql/item_create.cc index 561613032bc..60a17c21521 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -361,13 +361,13 @@ Item *create_func_space(Item *a) if (cs->mbminlen > 1) { uint dummy_errors; - sp= new Item_string("",0,cs); + sp= new Item_string("", 0, cs, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); if (sp) sp->str_value.copy(" ", 1, &my_charset_latin1, cs, &dummy_errors); } else { - sp= new Item_string(" ",1,cs); + sp= new Item_string(" ", 1, cs, DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII); } return sp ? new Item_func_repeat(sp, a) : 0; } From fb84f573adf00de5e606a3b312bec99d24a0f49c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 11 Oct 2007 18:07:40 +0300 Subject: [PATCH 007/527] Moved a lot of old bug fixes and safe cleanups from Maria 5.1 tree to 5.1 - Reserver namespace and place in frm for TABLE_CHECKSUM and PAGE_CHECKSUM create options - Added syncing of directory when creating .frm files - Portability fixes - Added missing cast that could cause bugs - Code cleanups - Made some bit functions inline - Moved things out of myisam.h to my_handler.h to make them more accessable - Renamed some myisam variables and defines to make them more globaly usable (as they are used outside of MyISAM) - Fixed bugs in error conditions - Use compiler time asserts instead of run time - Fixed indentation HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP as the old name was wrong (Added a define for old value to ensure we don't break any old code) Added HA_EXTRA_PREPARE_FOR_RENAME as a signal for rename (before we used a DROP signal which is wrong) - Initialize error messages early to get better errors when mysqld or an engine fails to start - Fix windows bug that query_performance_frequency was not initialized if registry code failed - thread_stack -> my_thread_stack_size BitKeeper/etc/ignore: added libmysqld/scheduler.cc libmysqld/sql_connect.cc libmysqld/sql_tablespace.cc include/Makefile.am: Added my_bit.h include/m_string.h: Added bzero_if_purify() to simplify code include/my_base.h: Reserve options for the future Added HA_OPTION_NULL_FIELDS, HA_OPTION_PAGE_CHECKSUM, HA_CREATE_PAGE_CHECKSUM Added new error message HA_ERR_NEW_FILE Added optional new row type BLOCK_RECORD Renamed HA_EXTRA_PREPARE_FOR_DELETE to HA_EXTRA_PREPARE_FOR_DROP Added HA_EXTRA_PREARE_FOR_RENAME to inform handler we will do a rename (Added define to make things compatible until 6.0) Moved invalidator_by_filename form myisam.h include/my_dbug.h: Poirtablity fix include/my_global.h: Added helper macros STATIC_INLINE and MY_ERRPTR Added NEED_EXPLICIT_SYNC_DIR include/my_handler.h: Added missing casts Moved some constants and macros out from myisam.h to make these generally available Renamed mi_compare_text() to ha_compare_text() as this function is not myisam specific Renamed mi_portable_sizeof_char_ptr to portable_sizeof_char_ptr Added registering of handler messages for better error reporting during startup include/my_sys.h: Added my_sync_dir() and my_sync_dir_by_file() More comments Some indentation fixes Moved bit functions to my_bit.h Added prototype for crc32() include/myisam.h: Moved things from here to my_handler.h to make them more accessable libmysql/Makefile.shared: Added my_sync mysys/array.c: Fixed indentation and spelling errors Split set_dynamic() to two functions Added allocate_dynamic() as a new visiable function (no new code, only refactoring) mysys/mf_iocache.c: More DBUG mysys/mf_keycache.c: More explicite ASSERT Removed some casts Fixed indentation mysys/mf_tempfile.c: Fixed bug with possible dangling file descriptor mysys/my_atomic.c: Use compile time asserts instead of run time mysys/my_bit.c: Make most bit functions inline mysys/my_bitmap.c: Added my_bit.h mysys/my_compress.c: Fixed indentation mysys/my_create.c: Added my_sync_by_dir() mysys/my_delete.c: Added my_sync_by_dir() mysys/my_error.c: init_glob_errs() is now done in my_init() mysys/my_handler.c: mi_compare_text() -> ha_compare_text() as this is not MyISAM specific Added functions to initialize handler error messages Fixed indentation More clear usage of include files mysys/my_init.c: Added my_thread_stack_size to be used by other programs Ensure that global error messages are always initialized Fix windows bug that query_performance_frequency was not initialized if registry code failed mysys/my_open.c: More comments Removed duplicate code mysys/my_pread.c: Ensure that my_errno is set even if errno is 0 mysys/my_realloc.c: Added comment mysys/my_rename.c: Added syncing of directories mysys/my_symlink.c: Added my_sync_by_dir() mysys/my_sync.c: Added my_sync_dir() On recent Mac OS X, fcntl(F_FULLFSYNC) is recommended over fsync() (see "man fsync" on Mac OS X 10.3). my_sync_dir(): to sync a directory after a file creation/deletion/ renaming; can be called directly or via MY_SYNC_DIR in my_create/ my_delete/my_rename(). No-op except on Linux (see "man fsync" on Linux). my_sync_dir_from_file(): same as above, just more practical when the caller has a file name but no directory name ready. Should the #warning even be a #error? I mean do we want to release binaries which don't guarantee any durability? mysys/safemalloc.c: Added sf_malloc_report_allocated() (Debugging aid) sql/gen_lex_hash.cc: Remove inline for big function sql/ha_partition.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP prepare_for_delete -> prepare_for_rename() as this is the the time this function is called sql/ha_partition.h: prepare_for_delete -> prepare_for_rename() as this is the the time this function is called sql/handler.cc: ha_init_errors() is now called at startup before plugins This allows us to get better error messages sql/handler.h: Reserve enum value for Maria Add future proof enum for page checksums sql/item_func.cc: Include my_bit.h sql/lex.h: Added future proof CREATE table options sql/log.cc: Added comment sql/mysql_priv.h: thread_stack moved to mysys sql/mysqld.cc: thread_stack moved to mysys thread_stack -> my_thread_stack_size Initialize myisam key caches before plugins starts Initialize error to allow storage engine to give better error messages if init failes. Fixed indentation Group all MyISAM options together Added new status variable 'Opened_table_definitions' to allow one to monitor if table definition cache is too small Clarified some option help messages sql/opt_range.cc: Removed wrong usage of SAFE_MODE (this disabled key usage for UPDATES, which was never the intention) Removed print if total cost in a place where it didn't have any usable value sql/set_var.cc: thread_stack -> my_thread_stack sql/sql_class.cc: Intialize transaction object properly sql/sql_parse.cc: thread_stack -> my_thread_stack sql/sql_select.cc: Include my_bit.h mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr sql/sql_show.cc: Simplify handling of ha_choice variables Added future safe PAGE_CHECKSUM option Addid missing 'transactional=#' in information schema sql/sql_table.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_FORCE_REOPEN when doing reopen HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_RENAME when doing rename Removed not needed initialization sql/sql_test.cc: thread_stack -> my_thread_stack sql/sql_yacc.yy: Simplify handling of ha_choice variables Added future proof create table options TABLE_CHECKSUM=# & PAGE_CHECKSUM=# sql/table.cc: Save page_checksum in .frm sql/table.h: Added variable to hold create table option PAGE_CHECKSUM sql/unireg.cc: Added syncing of directories storage/myisam/ft_boolean_search.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_eval.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_nlq_search.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_parser.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_stopwords.c: mi_compare_text() -> ha_compare_text() storage/myisam/ft_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/ft_update.c: mi_compare_text() -> ha_compare_text() storage/myisam/ha_myisam.cc: Include my_bit.h storage/myisam/mi_check.c: MI_MAX_POSSIBLE_KEY_BUFF -> HA_MAX_POSSIBLE_KEY_BUFF mi_compare_text() -> ha_compare_text() Added BLOCK_RECORD to avoid compiler warnings storage/myisam/mi_checksum.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_create.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY MI_MAX_KEY_BLOCK_SIZE -> HA_MAX_KEY_BLOCK_SIZE mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_dynrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_extra.c: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP storage/myisam/mi_open.c: MI_MAX_POSSIBLE_KEY -> HA_MAX_POSSIBLE_KEY mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_packrec.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_range.c: mi_compare_text -> ha_compare_text storage/myisam/mi_test1.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_test2.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/mi_unique.c: mi_compare_text() -> ha_compare_text() storage/myisam/mi_write.c: mi_compare_text() -> ha_compare_text() storage/myisam/myisamchk.c: Include my_bit.h storage/myisam/myisamdef.h: Moved store_key_length_inc to handler.h storage/myisam/myisampack.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisam/sp_test.c: mi_portable_sizeof_char_ptr -> portable_sizeof_char_ptr storage/myisammrg/ha_myisammrg.cc: HA_EXTRA_PREPARE_FOR_DELETE -> HA_EXTRA_PREPARE_FOR_DROP include/my_bit.h: New BitKeeper file ``include/my_bit.h'' --- .bzrignore | 4 ++ include/Makefile.am | 2 +- include/m_string.h | 7 +- include/my_base.h | 69 ++++++++++++------- include/my_bit.h | 107 +++++++++++++++++++++++++++++ include/my_dbug.h | 2 +- include/my_global.h | 12 ++++ include/my_handler.h | 56 +++++++++++---- include/my_sys.h | 25 ++++--- include/myisam.h | 26 +++---- libmysql/Makefile.shared | 2 +- mysys/array.c | 90 +++++++++++++++--------- mysys/mf_iocache.c | 1 + mysys/mf_keycache.c | 27 ++++---- mysys/mf_tempfile.c | 1 + mysys/my_atomic.c | 9 ++- mysys/my_bit.c | 100 +++++++++------------------ mysys/my_bitmap.c | 1 + mysys/my_compress.c | 3 +- mysys/my_create.c | 7 ++ mysys/my_delete.c | 3 + mysys/my_error.c | 5 -- mysys/my_handler.c | 90 +++++++++++++++++++++--- mysys/my_init.c | 47 +++++++------ mysys/my_open.c | 82 ++++++++++++---------- mysys/my_pread.c | 6 +- mysys/my_realloc.c | 11 +++ mysys/my_rename.c | 17 ++++- mysys/my_symlink.c | 2 + mysys/my_sync.c | 80 +++++++++++++++++++++ mysys/safemalloc.c | 23 +++++++ sql/gen_lex_hash.cc | 4 +- sql/ha_partition.cc | 20 +++--- sql/ha_partition.h | 2 +- sql/handler.cc | 9 +-- sql/handler.h | 5 ++ sql/item_func.cc | 1 + sql/lex.h | 6 +- sql/log.cc | 5 ++ sql/mysql_priv.h | 2 +- sql/mysqld.cc | 63 +++++++++-------- sql/opt_range.cc | 4 -- sql/set_var.cc | 2 +- sql/sql_class.cc | 1 + sql/sql_parse.cc | 4 +- sql/sql_select.cc | 5 +- sql/sql_show.cc | 24 ++++++- sql/sql_table.cc | 10 +-- sql/sql_test.cc | 4 +- sql/sql_yacc.yy | 28 ++++++-- sql/table.cc | 10 ++- sql/table.h | 1 + sql/unireg.cc | 6 +- storage/myisam/ft_boolean_search.c | 8 +-- storage/myisam/ft_eval.c | 2 +- storage/myisam/ft_nlq_search.c | 2 +- storage/myisam/ft_parser.c | 2 +- storage/myisam/ft_stopwords.c | 2 +- storage/myisam/ft_test1.c | 4 +- storage/myisam/ft_update.c | 4 +- storage/myisam/ha_myisam.cc | 1 + storage/myisam/mi_check.c | 18 +++-- storage/myisam/mi_checksum.c | 4 +- storage/myisam/mi_create.c | 7 +- storage/myisam/mi_dynrec.c | 8 +-- storage/myisam/mi_extra.c | 2 +- storage/myisam/mi_open.c | 6 +- storage/myisam/mi_packrec.c | 2 +- storage/myisam/mi_range.c | 2 +- storage/myisam/mi_test1.c | 4 +- storage/myisam/mi_test2.c | 3 +- storage/myisam/mi_unique.c | 2 +- storage/myisam/mi_write.c | 2 +- storage/myisam/myisamchk.c | 1 + storage/myisam/myisamdef.h | 7 -- storage/myisam/myisampack.c | 6 +- storage/myisam/sp_test.c | 2 +- storage/myisammrg/ha_myisammrg.cc | 2 +- 78 files changed, 847 insertions(+), 389 deletions(-) create mode 100644 include/my_bit.h diff --git a/.bzrignore b/.bzrignore index e1ad5a89015..f6a40871315 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3004,3 +3004,7 @@ win/vs71cache.txt win/vs8cache.txt zlib/*.ds? zlib/*.vcproj +libmysql_r/client_settings.h +libmysqld/scheduler.cc +libmysqld/sql_connect.cc +libmysqld/sql_tablespace.cc diff --git a/include/Makefile.am b/include/Makefile.am index 8335da36e93..bf85409c36f 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -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-netware.h \ +noinst_HEADERS = config-win.h config-netware.h my_bit.h \ heap.h my_bitmap.h my_uctype.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/m_string.h b/include/m_string.h index 00fb4cb0656..036eb8fe4d6 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -67,7 +67,7 @@ # define bcopy(s, d, n) memcpy((d), (s), (n)) # define bcmp(A,B,C) memcmp((A),(B),(C)) # define bzero(A,B) memset((A),0,(B)) -# define bmove_align(A,B,C) memcpy((A),(B),(C)) +# define bmove_align(A,B,C) memcpy((A),(B),(C)) #endif #if defined(__cplusplus) @@ -129,7 +129,10 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len); extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len); #undef bcmp #define bcmp(A,B,C) my_bcmp((A),(B),(C)) -#endif +#define bzero_if_purify(A,B) bzero(A,B) +#else +#define bzero_if_purify(A,B) +#endif /* HAVE_purify */ #ifndef bmove512 extern void bmove512(uchar *dst,const uchar *src,size_t len); diff --git a/include/my_base.h b/include/my_base.h index 339554979a8..acf6920e21d 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -14,7 +14,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ /* This file includes constants used with all databases */ -/* Author: Michael Widenius */ #ifndef _my_base_h #define _my_base_h @@ -48,10 +47,11 @@ #define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */ #define HA_OPEN_FROM_SQL_LAYER 64 #define HA_OPEN_MMAP 128 /* open memory mapped */ +#define HA_OPEN_COPY 256 /* Open copy (for repair) */ /* Internal temp table, used for temporary results */ -#define HA_OPEN_INTERNAL_TABLE 256 +#define HA_OPEN_INTERNAL_TABLE 512 - /* The following is parameter to ha_rkey() how to use key */ +/* The following is parameter to ha_rkey() how to use key */ /* We define a complete-field prefix of a key value as a prefix where @@ -137,7 +137,7 @@ enum ha_extra_function { HA_EXTRA_RESET_STATE, /* Reset positions */ HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/ HA_EXTRA_NO_IGNORE_DUP_KEY, - HA_EXTRA_PREPARE_FOR_DELETE, + HA_EXTRA_PREPARE_FOR_DROP, HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */ HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */ /* @@ -187,9 +187,14 @@ enum ha_extra_function { Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY. */ - HA_EXTRA_INSERT_WITH_UPDATE + HA_EXTRA_INSERT_WITH_UPDATE, + /* Inform handler that we will do a rename */ + HA_EXTRA_PREPARE_FOR_RENAME }; +/* Compatible option, to be deleted in 6.0 */ +#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP + /* The following is parameter to ha_panic() */ enum ha_panic_function { @@ -292,6 +297,8 @@ enum ha_base_keytype { #define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */ #define HA_OPTION_CREATE_FROM_ENGINE 256 #define HA_OPTION_RELIES_ON_SQL_LAYER 512 +#define HA_OPTION_NULL_FIELDS 1024 +#define HA_OPTION_PAGE_CHECKSUM 2048 #define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */ #define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */ @@ -302,6 +309,7 @@ enum ha_base_keytype { #define HA_CREATE_TMP_TABLE 4 #define HA_CREATE_CHECKSUM 8 #define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */ +#define HA_CREATE_PAGE_CHECKSUM 32 #define HA_CREATE_DELAY_KEY_WRITE 64 #define HA_CREATE_RELIES_ON_SQL_LAYER 128 @@ -348,12 +356,15 @@ enum ha_base_keytype { */ #define HA_STATUS_AUTO 64 - /* Errorcodes given by functions */ +/* + Errorcodes given by handler functions + + opt_sum_query() assumes these codes are > 1 + Do not add error numbers before HA_ERR_FIRST. + If necessary to add lower numbers, change HA_ERR_FIRST accordingly. +*/ +#define HA_ERR_FIRST 120 /* Copy of first error nr.*/ -/* opt_sum_query() assumes these codes are > 1 */ -/* Do not add error numbers before HA_ERR_FIRST. */ -/* If necessary to add lower numbers, change HA_ERR_FIRST accordingly. */ -#define HA_ERR_FIRST 120 /*Copy first error nr.*/ #define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */ #define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */ #define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */ @@ -374,7 +385,7 @@ enum ha_base_keytype { #define HA_WRONG_CREATE_OPTION 140 /* Wrong create option */ #define HA_ERR_FOUND_DUPP_UNIQUE 141 /* Dupplicate unique on write */ #define HA_ERR_UNKNOWN_CHARSET 142 /* Can't open charset */ -#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting MyISAM tables in MERGE */ +#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting tables in MERGE */ #define HA_ERR_CRASHED_ON_REPAIR 144 /* Last (automatic?) repair failed */ #define HA_ERR_CRASHED_ON_USAGE 145 /* Table must be repaired */ #define HA_ERR_LOCK_WAIT_TIMEOUT 146 @@ -389,28 +400,33 @@ enum ha_base_keytype { #define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */ #define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */ #define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */ -#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */ +/* NULLs are not supported in spatial index */ +#define HA_ERR_NULL_IN_SPATIAL 158 #define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */ #define HA_ERR_NO_PARTITION_FOUND 160 /* There's no partition in table for given value */ #define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */ -#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr. */ -#define HA_ERR_FOREIGN_DUPLICATE_KEY 163 /* Upholding foreign key constraints - would lead to a duplicate key - error in some other table. */ -#define HA_ERR_TABLE_NEEDS_UPGRADE 164 /* The table changed in storage engine */ -#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */ +#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */ +/* + Upholding foreign key constraints would lead to a duplicate key error + in some other table. +*/ +#define HA_ERR_FOREIGN_DUPLICATE_KEY 163 +/* The table changed in storage engine */ +#define HA_ERR_TABLE_NEEDS_UPGRADE 164 +#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */ #define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */ #define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */ #define HA_ERR_GENERIC 168 /* Generic error */ -#define HA_ERR_RECORD_IS_THE_SAME 169 /* row not actually updated : - new values same as the old values */ +/* row not actually updated: new values same as the old values */ +#define HA_ERR_RECORD_IS_THE_SAME 169 +/* It is not possible to log this statement */ +#define HA_ERR_LOGGING_IMPOSSIBLE 170 +#define HA_ERR_NEW_FILE 171 /* New file format */ +#define HA_ERR_LAST 171 /* Copy of last error nr */ -#define HA_ERR_LOGGING_IMPOSSIBLE 170 /* It is not possible to log this - statement */ -#define HA_ERR_LAST 170 /*Copy last error nr.*/ -/* Add error numbers before HA_ERR_LAST and change it accordingly. */ +/* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) /* Other constants */ @@ -474,7 +490,7 @@ enum en_fieldtype { }; enum data_file_type { - STATIC_RECORD,DYNAMIC_RECORD,COMPRESSED_RECORD + STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD }; /* For key ranges */ @@ -526,4 +542,7 @@ typedef ulong ha_rows; #define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2) +/* invalidator function reference for Query Cache */ +typedef void (* invalidator_by_filename)(const char * filename); + #endif /* _my_base_h */ diff --git a/include/my_bit.h b/include/my_bit.h new file mode 100644 index 00000000000..58e8bb39683 --- /dev/null +++ b/include/my_bit.h @@ -0,0 +1,107 @@ +/* + Some useful bit functions +*/ + +#ifdef HAVE_INLINE + +extern const char _my_bits_nbits[256]; +extern const uchar _my_bits_reverse_table[256]; + +/* + Find smallest X in 2^X >= value + This can be used to divide a number with value by doing a shift instead +*/ + +STATIC_INLINE uint my_bit_log2(ulong value) +{ + uint bit; + for (bit=0 ; value > 1 ; value>>=1, bit++) ; + return bit; +} + +STATIC_INLINE uint my_count_bits(ulonglong v) +{ +#if SIZEOF_LONG_LONG > 4 + /* The following code is a bit faster on 16 bit machines than if we would + only shift v */ + ulong v2=(ulong) (v >> 32); + return (uint) (uchar) (_my_bits_nbits[(uchar) v] + + _my_bits_nbits[(uchar) (v >> 8)] + + _my_bits_nbits[(uchar) (v >> 16)] + + _my_bits_nbits[(uchar) (v >> 24)] + + _my_bits_nbits[(uchar) (v2)] + + _my_bits_nbits[(uchar) (v2 >> 8)] + + _my_bits_nbits[(uchar) (v2 >> 16)] + + _my_bits_nbits[(uchar) (v2 >> 24)]); +#else + return (uint) (uchar) (_my_bits_nbits[(uchar) v] + + _my_bits_nbits[(uchar) (v >> 8)] + + _my_bits_nbits[(uchar) (v >> 16)] + + _my_bits_nbits[(uchar) (v >> 24)]); +#endif +} + +STATIC_INLINE uint my_count_bits_ushort(ushort v) +{ + return _my_bits_nbits[v]; +} + + +/* + Next highest power of two + + SYNOPSIS + my_round_up_to_next_power() + v Value to check + + RETURN + Next or equal power of 2 + Note: 0 will return 0 + + NOTES + Algorithm by Sean Anderson, according to: + http://graphics.stanford.edu/~seander/bithacks.html + (Orignal code public domain) + + Comments shows how this works with 01100000000000000000000000001011 +*/ + +STATIC_INLINE uint32 my_round_up_to_next_power(uint32 v) +{ + v--; /* 01100000000000000000000000001010 */ + v|= v >> 1; /* 01110000000000000000000000001111 */ + v|= v >> 2; /* 01111100000000000000000000001111 */ + v|= v >> 4; /* 01111111110000000000000000001111 */ + v|= v >> 8; /* 01111111111111111100000000001111 */ + v|= v >> 16; /* 01111111111111111111111111111111 */ + return v+1; /* 10000000000000000000000000000000 */ +} + +STATIC_INLINE uint32 my_clear_highest_bit(uint32 v) +{ + uint32 w=v >> 1; + w|= w >> 1; + w|= w >> 2; + w|= w >> 4; + w|= w >> 8; + w|= w >> 16; + return v & w; +} + +STATIC_INLINE uint32 my_reverse_bits(uint32 key) +{ + return + (_my_bits_reverse_table[ key & 255] << 24) | + (_my_bits_reverse_table[(key>> 8) & 255] << 16) | + (_my_bits_reverse_table[(key>>16) & 255] << 8) | + _my_bits_reverse_table[(key>>24) ]; +} + +#else +extern uint my_bit_log2(ulong value); +extern uint32 my_round_up_to_next_power(uint32 v); +uint32 my_clear_highest_bit(uint32 v); +uint32 my_reverse_bits(uint32 key); +extern uint my_count_bits(ulonglong v); +extern uint my_count_bits_ushort(ushort v); +#endif diff --git a/include/my_dbug.h b/include/my_dbug.h index 514cd17099b..a77e439b5db 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -101,7 +101,7 @@ extern FILE *_db_fp_(void); #define DBUG_LONGJMP(a1) longjmp(a1) #define DBUG_DUMP(keyword,a1,a2) #define DBUG_END() -#define DBUG_ASSERT(A) +#define DBUG_ASSERT(A) do { } while(0) #define DBUG_LOCK_FILE #define DBUG_FILE (stderr) #define DBUG_UNLOCK_FILE diff --git a/include/my_global.h b/include/my_global.h index 12129523939..366996618ed 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -242,6 +242,8 @@ #endif #undef inline_test_2 #undef inline_test_1 +/* helper macro for "instantiating" inline functions */ +#define STATIC_INLINE static inline /* The following macros are used to control inlining a bit more than @@ -1015,6 +1017,8 @@ typedef long long intptr; #error sizeof(void *) is neither sizeof(int) nor sizeof(long) nor sizeof(long long) #endif +#define MY_ERRPTR ((void*)(intptr)1) + #ifdef USE_RAID /* The following is done with a if to not get problems with pre-processors @@ -1476,6 +1480,7 @@ do { doubleget_union _tmp; \ #define dlerror() "" #endif + #ifndef __NETWARE__ /* * Include standard definitions of operator new and delete. @@ -1506,6 +1511,13 @@ inline void operator delete[](void*, void*) { /* Do nothing */ } #if !defined(max) #define max(a, b) ((a) > (b) ? (a) : (b)) #define min(a, b) ((a) < (b) ? (a) : (b)) +#endif +/* + Only Linux is known to need an explicit sync of the directory to make sure a + file creation/deletion/renaming in(from,to) this directory durable. +*/ +#ifdef TARGET_OS_LINUX +#define NEED_EXPLICIT_SYNC_DIR 1 #endif #endif /* my_global_h */ diff --git a/include/my_handler.h b/include/my_handler.h index d7cd0567f9c..dabe73bd138 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -18,10 +18,30 @@ #ifndef _my_handler_h #define _my_handler_h -#include "my_base.h" -#include "m_ctype.h" #include "myisampack.h" +/* + There is a hard limit for the maximum number of keys as there are only + 8 bits in the index file header for the number of keys in a table. + This means that 0..255 keys can exist for a table. The idea of + HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on + a MyISAM table for which one has more keys than MyISAM is normally + compiled for. If you don't have this, you will get a core dump when + running myisamchk compiled for 128 keys on a table with 255 keys. +*/ + +#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */ +/* + The following defines can be increased if necessary. + But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH. +*/ + +#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */ +#define HA_MAX_KEY_SEG 16 /* Max segments for key */ + +#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6) +#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8) + typedef struct st_HA_KEYSEG /* Key-portion */ { CHARSET_INFO *charset; @@ -38,33 +58,35 @@ typedef struct st_HA_KEYSEG /* Key-portion */ } HA_KEYSEG; #define get_key_length(length,key) \ -{ if ((uchar) *(key) != 255) \ - length= (uint) (uchar) *((key)++); \ +{ if (*(uchar*) (key) != 255) \ + length= (uint) *(uchar*) ((key)++); \ else \ - { length=mi_uint2korr((key)+1); (key)+=3; } \ + { length= mi_uint2korr((key)+1); (key)+=3; } \ } #define get_key_length_rdonly(length,key) \ -{ if ((uchar) *(key) != 255) \ - length= ((uint) (uchar) *((key))); \ +{ if (*(uchar*) (key) != 255) \ + length= ((uint) *(uchar*) ((key))); \ else \ - { length=mi_uint2korr((key)+1); } \ + { length= mi_uint2korr((key)+1); } \ } #define get_key_pack_length(length,length_pack,key) \ -{ if ((uchar) *(key) != 255) \ - { length= (uint) (uchar) *((key)++); length_pack=1; }\ +{ if (*(uchar*) (key) != 255) \ + { length= (uint) *(uchar*) ((key)++); length_pack= 1; }\ else \ - { length=mi_uint2korr((key)+1); (key)+=3; length_pack=3; } \ + { length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \ } #define store_key_length_inc(key,length) \ { if ((length) < 255) \ - { *(key)++=(length); } \ + { *(key)++= (length); } \ else \ { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \ } +#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3) + #define get_rec_bits(bit_ptr, bit_ofs, bit_len) \ (((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \ ((1 << (bit_len)) - 1)) @@ -81,12 +103,20 @@ typedef struct st_HA_KEYSEG /* Key-portion */ #define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \ set_rec_bits(0, bit_ptr, bit_ofs, bit_len) -extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint , +extern int ha_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint , my_bool, my_bool); extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, register uchar *b, uint key_length, uint nextflag, uint *diff_pos); extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a); +extern void my_handler_error_register(void); +extern void my_handler_error_unregister(void); +/* + Inside an in-memory data record, memory pointers to pieces of the + record (like BLOBs) are stored in their native byte order and in + this amount of bytes. +*/ +#define portable_sizeof_char_ptr 8 #endif /* _my_handler_h */ diff --git a/include/my_sys.h b/include/my_sys.h index 2ce36760032..1b087360ef3 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -51,6 +51,7 @@ extern int NEAR my_errno; /* Last error in mysys */ #define MY_WME 16 /* Write message on error */ #define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */ #define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */ +#define MY_SYNC_DIR 1024 /* my_create/delete/rename: sync directory */ #define MY_RAID 64 /* Support for RAID */ #define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */ #define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */ @@ -212,6 +213,7 @@ extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags); extern int (*fatal_error_handler_hook)(uint my_err, const char *str, myf MyFlags); extern uint my_file_limit; +extern ulong my_thread_stack_size; #ifdef HAVE_LARGE_PAGES extern my_bool my_use_large_pages; @@ -276,7 +278,14 @@ enum cache_type enum flush_type { - FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE + FLUSH_KEEP, /* flush block and keep it in the cache */ + FLUSH_RELEASE, /* flush block and remove it from the cache */ + FLUSH_IGNORE_CHANGED, /* remove block from the cache */ + /* + As my_disable_flush_pagecache_blocks is always 0, the following option + is strictly equivalent to FLUSH_KEEP + */ + FLUSH_FORCE_WRITE }; typedef struct st_record_cache /* Used when cacheing records */ @@ -627,6 +636,8 @@ extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags); extern int my_fclose(FILE *fd,myf MyFlags); extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags); extern int my_sync(File fd, myf my_flags); +extern int my_sync_dir(const char *dir_name, myf my_flags); +extern int my_sync_dir_by_file(const char *file_name, myf my_flags); extern int my_error _VARARGS((int nr,myf MyFlags, ...)); extern int my_printf_error _VARARGS((uint my_err, const char *format, myf MyFlags, ...)) @@ -661,7 +672,7 @@ extern char *my_tmpdir(MY_TMPDIR *tmpdir); extern void free_tmpdir(MY_TMPDIR *tmpdir); extern void my_remember_signal(int signal_number,sig_handler (*func)(int)); -extern size_t dirname_part(char * to, const char *name, size_t *to_res_length); +extern size_t dirname_part(char * to,const char *name, size_t *to_res_length); extern size_t dirname_length(const char *name); #define base_name(A) (A+dirname_length(A)) extern int test_if_hard_path(const char *dir_name); @@ -707,7 +718,7 @@ extern sig_handler sigtstp_handler(int signal_number); extern void handle_recived_signals(void); extern sig_handler my_set_alarm_variable(int signo); -extern void my_string_ptr_sort(uchar *base, uint items, size_t size); +extern void my_string_ptr_sort(uchar *base,uint items,size_t size); extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements, size_t size_of_element,uchar *buffer[]); extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size, @@ -773,6 +784,7 @@ extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,uchar * element); extern uchar *alloc_dynamic(DYNAMIC_ARRAY *array); extern uchar *pop_dynamic(DYNAMIC_ARRAY*); extern my_bool set_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index); +extern my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements); extern void get_dynamic(DYNAMIC_ARRAY *array,uchar * element,uint array_index); extern void delete_dynamic(DYNAMIC_ARRAY *array); extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index); @@ -839,11 +851,8 @@ extern int unpackfrm(uchar **, size_t *, const uchar *); extern ha_checksum my_checksum(ha_checksum crc, const uchar *mem, size_t count); -extern uint my_bit_log2(ulong value); -extern uint32 my_round_up_to_next_power(uint32 v); -extern uint my_count_bits(ulonglong v); -extern uint my_count_bits_ushort(ushort v); extern void my_sleep(ulong m_seconds); +extern ulong crc32(ulong crc, const uchar *buf, uint len); extern uint my_set_max_open_files(uint files); void my_free_open_file_info(void); @@ -861,7 +870,7 @@ extern int my_getncpus(); #ifndef MAP_NOSYNC #define MAP_NOSYNC 0 #endif -#ifndef MAP_NORESERVE +#ifndef MAP_NORESERVE #define MAP_NORESERVE 0 /* For irix and AIX */ #endif diff --git a/include/myisam.h b/include/myisam.h index 6a76a298dee..e49446769dc 100644 --- a/include/myisam.h +++ b/include/myisam.h @@ -34,22 +34,16 @@ extern "C" { #include /* - There is a hard limit for the maximum number of keys as there are only - 8 bits in the index file header for the number of keys in a table. - This means that 0..255 keys can exist for a table. The idea of - MI_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on - a MyISAM table for which one has more keys than MyISAM is normally - compiled for. If you don't have this, you will get a core dump when - running myisamchk compiled for 128 keys on a table with 255 keys. + Limit max keys according to HA_MAX_POSSIBLE_KEY */ -#define MI_MAX_POSSIBLE_KEY 255 /* For myisam_chk */ -#if MAX_INDEXES > MI_MAX_POSSIBLE_KEY -#define MI_MAX_KEY MI_MAX_POSSIBLE_KEY /* Max allowed keys */ + +#if MAX_INDEXES > HA_MAX_POSSIBLE_KEY +#define MI_MAX_KEY HA_MAX_POSSIBLE_KEY /* Max allowed keys */ #else #define MI_MAX_KEY MAX_INDEXES /* Max allowed keys */ #endif -#define MI_MAX_POSSIBLE_KEY_BUFF (1024+6+6) /* For myisam_chk */ +#define MI_MAX_POSSIBLE_KEY_BUFF HA_MAX_POSSIBLE_KEY_BUFF /* The following defines can be increased if necessary. But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and MI_MAX_KEY_LENGTH. @@ -69,8 +63,6 @@ extern "C" { #define MI_MIN_KEY_BLOCK_LENGTH 1024 /* Min key block length */ #define MI_MAX_KEY_BLOCK_LENGTH 16384 -#define mi_portable_sizeof_char_ptr 8 - /* In the following macros '_keyno_' is 0 .. keys-1. If there can be more keys than bits in the key_map, the highest bit @@ -256,8 +248,6 @@ typedef struct st_columndef /* column information */ #endif } MI_COLUMNDEF; -/* invalidator function reference for Query Cache */ -typedef void (* invalidator_by_filename)(const char * filename); extern char * myisam_log_filename; /* Name of logfile */ extern ulong myisam_block_size; @@ -310,7 +300,7 @@ extern int mi_delete_all_rows(struct st_myisam_info *info); extern ulong _mi_calc_blob_length(uint length , const uchar *pos); extern uint mi_get_pointer_length(ulonglong file_length, uint def); -/* this is used to pass to mysql_myisamchk_table -- by Sasha Pachev */ +/* this is used to pass to mysql_myisamchk_table */ #define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */ #define MYISAMCHK_VERIFY 2 /* Verify, run repair if failure */ @@ -431,8 +421,8 @@ typedef struct st_mi_check_param ulonglong unique_count[MI_MAX_KEY_SEG+1]; ulonglong notnull_count[MI_MAX_KEY_SEG+1]; - ha_checksum key_crc[MI_MAX_POSSIBLE_KEY]; - ulong rec_per_key_part[MI_MAX_KEY_SEG*MI_MAX_POSSIBLE_KEY]; + ha_checksum key_crc[HA_MAX_POSSIBLE_KEY]; + ulong rec_per_key_part[MI_MAX_KEY_SEG*HA_MAX_POSSIBLE_KEY]; void *thd; const char *db_name, *table_name; const char *op_name; diff --git a/libmysql/Makefile.shared b/libmysql/Makefile.shared index 3a2559921f9..a4efd5b184f 100644 --- a/libmysql/Makefile.shared +++ b/libmysql/Makefile.shared @@ -68,7 +68,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ mf_iocache2.lo my_seek.lo my_sleep.lo \ my_pread.lo mf_cache.lo md5.lo sha1.lo \ my_getopt.lo my_gethostbyname.lo my_port.lo \ - my_rename.lo my_chsize.lo my_getsystime.lo + my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo sqlobjects = net.lo sql_cmn_objects = pack.lo client.lo my_time.lo diff --git a/mysys/array.c b/mysys/array.c index 8a539f18a20..f11a327232c 100644 --- a/mysys/array.c +++ b/mysys/array.c @@ -63,7 +63,8 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size, array->size_of_element=element_size; if ((array->buffer= init_buffer)) DBUG_RETURN(FALSE); - if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc,MYF(MY_WME)))) + if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc, + MYF(MY_WME)))) { array->max_element=0; DBUG_RETURN(TRUE); @@ -179,7 +180,7 @@ uchar *pop_dynamic(DYNAMIC_ARRAY *array) } /* - Replace elemnent in array with given element and index + Replace element in array with given element and index SYNOPSIS set_dynamic() @@ -200,42 +201,69 @@ my_bool set_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx) { if (idx >= array->elements) { - if (idx >= array->max_element) - { - uint size; - char *new_ptr; - size=(idx+array->alloc_increment)/array->alloc_increment; - size*= array->alloc_increment; - if (array->buffer == (uchar *)(array + 1)) - { - /* - In this senerio, the buffer is statically preallocated, - so we have to create an all-new malloc since we overflowed - */ - if (!(new_ptr= (char *) my_malloc(size * - array->size_of_element, - MYF(MY_WME)))) - return 0; - memcpy(new_ptr, array->buffer, - array->elements * array->size_of_element); - } - else - if (!(new_ptr=(char*) my_realloc(array->buffer,size* - array->size_of_element, - MYF(MY_WME | MY_ALLOW_ZERO_PTR)))) - return TRUE; - array->buffer= (uchar*) new_ptr; - array->max_element=size; - } + if (idx >= array->max_element && allocate_dynamic(array, idx)) + return TRUE; bzero((uchar*) (array->buffer+array->elements*array->size_of_element), - (idx - array->elements)*array->size_of_element); + (idx - array->elements)*array->size_of_element); array->elements=idx+1; } memcpy(array->buffer+(idx * array->size_of_element),element, - (size_t) array->size_of_element); + (size_t) array->size_of_element); return FALSE; } + +/* + Ensure that dynamic array has enough elements + + SYNOPSIS + allocate_dynamic() + array + max_elements Numbers of elements that is needed + + NOTES + Any new allocated element are NOT initialized + + RETURN VALUE + FALSE Ok + TRUE Allocation of new memory failed +*/ + +my_bool allocate_dynamic(DYNAMIC_ARRAY *array, uint max_elements) +{ + if (max_elements >= array->max_element) + { + uint size; + uchar *new_ptr; + size= (max_elements + array->alloc_increment)/array->alloc_increment; + size*= array->alloc_increment; + if (array->buffer == (uchar *)(array + 1)) + { + /* + In this senerio, the buffer is statically preallocated, + so we have to create an all-new malloc since we overflowed + */ + if (!(new_ptr= (uchar *) my_malloc(size * + array->size_of_element, + MYF(MY_WME)))) + return 0; + memcpy(new_ptr, array->buffer, + array->elements * array->size_of_element); + } + else + + + if (!(new_ptr= (uchar*) my_realloc(array->buffer,size* + array->size_of_element, + MYF(MY_WME | MY_ALLOW_ZERO_PTR)))) + return TRUE; + array->buffer= new_ptr; + array->max_element= size; + } + return FALSE; +} + + /* Get an element from array by given index diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index 58650733490..0f49dd22bb9 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -1701,6 +1701,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock) my_bool append_cache; my_off_t pos_in_file; DBUG_ENTER("my_b_flush_io_cache"); + DBUG_PRINT("enter", ("cache: 0x%lx", (long) info)); if (!(append_cache = (info->type == SEQ_READ_APPEND))) need_append_buffer_lock=0; diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index c81da9a469a..bb9a06747b9 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -105,6 +105,7 @@ #include #include "my_static.h" #include +#include #include #include @@ -1262,12 +1263,12 @@ static void unlink_block(KEY_CACHE *keycache, BLOCK_LINK *block) KEYCACHE_THREAD_TRACE("unlink_block"); #if defined(KEYCACHE_DEBUG) + KEYCACHE_DBUG_ASSERT(keycache->blocks_available != 0); keycache->blocks_available--; KEYCACHE_DBUG_PRINT("unlink_block", ("unlinked block %u status=%x #requests=%u #available=%u", BLOCK_NUMBER(block), block->status, block->requests, keycache->blocks_available)); - KEYCACHE_DBUG_ASSERT(keycache->blocks_available >= 0); #endif } @@ -2360,9 +2361,9 @@ restart: (block->hash_link->diskpos == filepos))); *page_st=page_status; KEYCACHE_DBUG_PRINT("find_key_block", - ("fd: %d pos: %lu block->status: %u page_status: %u", + ("fd: %d pos: %lu block->status: %u page_status: %d", file, (ulong) filepos, block->status, - (uint) page_status)); + page_status)); #if !defined(DBUG_OFF) && defined(EXTRA_DEBUG) DBUG_EXECUTE("check_keycache2", @@ -2513,10 +2514,10 @@ static void read_block(KEY_CACHE *keycache, */ uchar *key_cache_read(KEY_CACHE *keycache, - File file, my_off_t filepos, int level, - uchar *buff, uint length, - uint block_length __attribute__((unused)), - int return_buffer __attribute__((unused))) + File file, my_off_t filepos, int level, + uchar *buff, uint length, + uint block_length __attribute__((unused)), + int return_buffer __attribute__((unused))) { my_bool locked_and_incremented= FALSE; int error=0; @@ -2534,12 +2535,12 @@ uchar *key_cache_read(KEY_CACHE *keycache, uint status; int page_st; - /* + /* When the key cache is once initialized, we use the cache_lock to reliably distinguish the cases of normal operation, resizing, and disabled cache. We always increment and decrement 'cnt_for_resize_op' so that a resizer can wait for pending I/O. - */ + */ keycache_pthread_mutex_lock(&keycache->cache_lock); /* Cache resizing has two phases: Flushing and re-initializing. In @@ -2976,9 +2977,10 @@ int key_cache_write(KEY_CACHE *keycache, int error=0; DBUG_ENTER("key_cache_write"); DBUG_PRINT("enter", - ("fd: %u pos: %lu length: %u block_length: %u key_block_length: %u", - (uint) file, (ulong) filepos, length, block_length, - keycache ? keycache->key_cache_block_size : 0)); + ("fd: %u pos: %lu length: %u block_length: %u" + " key_block_length: %u", + (uint) file, (ulong) filepos, length, block_length, + keycache ? keycache->key_cache_block_size : 0)); if (!dont_write) { @@ -3184,7 +3186,6 @@ int key_cache_write(KEY_CACHE *keycache, a flush. */ block->status&= ~BLOCK_FOR_UPDATE; - set_if_smaller(block->offset, offset); set_if_bigger(block->length, read_length+offset); diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 9460f27b104..40016210de4 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -136,6 +136,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, if (org_file >= 0 && file < 0) { int tmp=my_errno; + close(org_file); (void) my_delete(to, MYF(MY_WME | ME_NOINPUT)); my_errno=tmp; } diff --git a/mysys/my_atomic.c b/mysys/my_atomic.c index 6a30267eb80..aa04d55f624 100644 --- a/mysys/my_atomic.c +++ b/mysys/my_atomic.c @@ -17,11 +17,10 @@ #include #ifndef HAVE_INLINE -/* - the following will cause all inline functions to be instantiated -*/ +/* the following will cause all inline functions to be instantiated */ #define HAVE_INLINE -#define static extern +#undef STATIC_INLINE +#define STATIC_INLINE extern #endif #include @@ -35,7 +34,7 @@ */ int my_atomic_initialize() { - DBUG_ASSERT(sizeof(intptr) == sizeof(void *)); + compile_time_assert(sizeof(intptr) == sizeof(void *)); /* currently the only thing worth checking is SMP/UP issue */ #ifdef MY_ATOMIC_MODE_DUMMY return my_getncpus() == 1 ? MY_ATOMIC_OK : MY_ATOMIC_NOT_1CPU; diff --git a/mysys/my_bit.c b/mysys/my_bit.c index 5a9b1187c83..2881eb1ebd2 100644 --- a/mysys/my_bit.c +++ b/mysys/my_bit.c @@ -13,23 +13,18 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Some useful bit functions */ +#include -#include "mysys_priv.h" +#ifndef HAVE_INLINE +/* the following will cause all inline functions to be instantiated */ +#define HAVE_INLINE +#undef STATIC_INLINE +#define STATIC_INLINE extern +#endif -/* - Find smallest X in 2^X >= value - This can be used to divide a number with value by doing a shift instead -*/ +#include -uint my_bit_log2(ulong value) -{ - uint bit; - for (bit=0 ; value > 1 ; value>>=1, bit++) ; - return bit; -} - -static char nbits[256] = { +const char _my_bits_nbits[256] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, @@ -48,60 +43,29 @@ static char nbits[256] = { 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, }; -uint my_count_bits(ulonglong v) -{ -#if SIZEOF_LONG_LONG > 4 - /* The following code is a bit faster on 16 bit machines than if we would - only shift v */ - ulong v2=(ulong) (v >> 32); - return (uint) (uchar) (nbits[(uchar) v] + - nbits[(uchar) (v >> 8)] + - nbits[(uchar) (v >> 16)] + - nbits[(uchar) (v >> 24)] + - nbits[(uchar) (v2)] + - nbits[(uchar) (v2 >> 8)] + - nbits[(uchar) (v2 >> 16)] + - nbits[(uchar) (v2 >> 24)]); -#else - return (uint) (uchar) (nbits[(uchar) v] + - nbits[(uchar) (v >> 8)] + - nbits[(uchar) (v >> 16)] + - nbits[(uchar) (v >> 24)]); -#endif -} - -uint my_count_bits_ushort(ushort v) -{ - return nbits[v]; -} - - /* - Next highest power of two - - SYNOPSIS - my_round_up_to_next_power() - v Value to check - - RETURN - Next or equal power of 2 - Note: 0 will return 0 - - NOTES - Algorithm by Sean Anderson, according to: - http://graphics.stanford.edu/~seander/bithacks.html - (Orignal code public domain) - - Comments shows how this works with 01100000000000000000000000001011 + perl -e 'print map{", 0x".unpack H2,pack B8,unpack b8,chr$_}(0..255)' */ +const uchar _my_bits_reverse_table[256]={ +0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, +0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, +0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, +0xE4, 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, +0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, 0x02, +0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, +0x72, 0xF2, 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, +0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, +0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, +0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, +0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, +0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, +0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, +0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, +0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, +0xC3, 0x23, 0xA3, 0x63, 0xE3, 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, +0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, +0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, +0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, +0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF +}; -uint32 my_round_up_to_next_power(uint32 v) -{ - v--; /* 01100000000000000000000000001010 */ - v|= v >> 1; /* 01110000000000000000000000001111 */ - v|= v >> 2; /* 01111100000000000000000000001111 */ - v|= v >> 4; /* 01111111110000000000000000001111 */ - v|= v >> 8; /* 01111111111111111100000000001111 */ - v|= v >> 16; /* 01111111111111111111111111111111 */ - return v+1; /* 10000000000000000000000000000000 */ -} diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c index 10eff40b9ed..e127b2584ae 100644 --- a/mysys/my_bitmap.c +++ b/mysys/my_bitmap.c @@ -38,6 +38,7 @@ #include "mysys_priv.h" #include #include +#include void create_last_word_mask(MY_BITMAP *map) { diff --git a/mysys/my_compress.c b/mysys/my_compress.c index bc9f8317487..0d076e77c35 100644 --- a/mysys/my_compress.c +++ b/mysys/my_compress.c @@ -181,7 +181,8 @@ int packfrm(uchar *data, size_t len, if (my_compress((uchar*)data, &org_len, &comp_len)) goto err; - DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", (ulong) org_len, (ulong) comp_len)); + DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", (ulong) org_len, + (ulong) comp_len)); DBUG_DUMP("compressed", data, org_len); error= 2; diff --git a/mysys/my_create.c b/mysys/my_create.c index 55878318ead..454ccf6ab7d 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -52,6 +52,13 @@ File my_create(const char *FileName, int CreateFlags, int access_flags, fd = open(FileName, access_flags); #endif + if ((MyFlags & MY_SYNC_DIR) && (fd >=0) && + my_sync_dir_by_file(FileName, MyFlags)) + { + my_close(fd, MyFlags); + fd= -1; + } + DBUG_RETURN(my_register_filename(fd, FileName, FILE_BY_CREATE, EE_CANTCREATEFILE, MyFlags)); } /* my_create */ diff --git a/mysys/my_delete.c b/mysys/my_delete.c index bac3e2513e1..14374fd3fa8 100644 --- a/mysys/my_delete.c +++ b/mysys/my_delete.c @@ -29,6 +29,9 @@ int my_delete(const char *name, myf MyFlags) my_error(EE_DELETE,MYF(ME_BELL+ME_WAITTANG+(MyFlags & ME_NOINPUT)), name,errno); } + else if ((MyFlags & MY_SYNC_DIR) && + my_sync_dir_by_file(name, MyFlags)) + err= -1; DBUG_RETURN(err); } /* my_delete */ diff --git a/mysys/my_error.c b/mysys/my_error.c index e8fd8b938ee..75701536dd3 100644 --- a/mysys/my_error.c +++ b/mysys/my_error.c @@ -84,11 +84,6 @@ int my_error(int nr, myf MyFlags, ...) if (nr <= meh_p->meh_last) break; -#ifdef SHARED_LIBRARY - if ((meh_p == &my_errmsgs_globerrs) && ! globerrs[0]) - init_glob_errs(); -#endif - /* get the error message string. Default, if NULL or empty string (""). */ if (! (format= (meh_p && (nr >= meh_p->meh_first)) ? meh_p->meh_errmsgs[nr - meh_p->meh_first] : NULL) || ! *format) diff --git a/mysys/my_handler.c b/mysys/my_handler.c index 1c3bb20426e..bf75d992f9d 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -16,9 +16,12 @@ MA 02111-1307, USA */ #include -#include "my_handler.h" +#include +#include +#include +#include -int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, +int ha_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) { @@ -174,7 +177,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, next_key_length=key_length-b_length-pack_length; if (piks && - (flag=mi_compare_text(keyseg->charset,a,a_length,b,b_length, + (flag=ha_compare_text(keyseg->charset,a,a_length,b,b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && next_key_length <= 0), (my_bool)!(nextflag & SEARCH_PREFIX)))) @@ -187,7 +190,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, { uint length=(uint) (end-a), a_length=length, b_length=length; if (piks && - (flag= mi_compare_text(keyseg->charset, a, a_length, b, b_length, + (flag= ha_compare_text(keyseg->charset, a, a_length, b, b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && next_key_length <= 0), (my_bool)!(nextflag & SEARCH_PREFIX)))) @@ -235,7 +238,7 @@ int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, next_key_length=key_length-b_length-pack_length; if (piks && - (flag= mi_compare_text(keyseg->charset,a,a_length,b,b_length, + (flag= ha_compare_text(keyseg->charset,a,a_length,b,b_length, (my_bool) ((nextflag & SEARCH_PREFIX) && next_key_length <= 0), (my_bool) ((nextflag & (SEARCH_FIND | @@ -482,12 +485,15 @@ end: DESCRIPTION Find the first NULL value in index-suffix values tuple. - TODO Consider optimizing this fuction or its use so we don't search for - NULL values in completely NOT NULL index suffixes. + + TODO + Consider optimizing this function or its use so we don't search for + NULL values in completely NOT NULL index suffixes. RETURN - First key part that has NULL as value in values tuple, or the last key part - (with keyseg->type==HA_TYPE_END) if values tuple doesn't contain NULLs. + First key part that has NULL as value in values tuple, or the last key + part (with keyseg->type==HA_TYPE_END) if values tuple doesn't contain + NULLs. */ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) @@ -557,3 +563,69 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) } return keyseg; } + + +/* + Errors a handler can give you +*/ + +static const char *handler_error_messages[]= +{ + "Didn't find key on read or update", + "Duplicate key on write or update", + "Undefined handler error 122", + "Someone has changed the row since it was read (while the table was locked to prevent it)", + "Wrong index given to function", + "Undefined handler error 125", + "Index file is crashed", + "Record file is crashed", + "Out of memory in engine", + "Undefined handler error 129", + "Incorrect file format", + "Command not supported by database", + "Old database file", + "No record read before update", + "Record was already deleted (or record file crashed)", + "No more room in record file", + "No more room in index file", + "No more records (read after end of file)", + "Unsupported extension used for table", + "Too big row", + "Wrong create options", + "Duplicate unique key or constraint on write or update", + "Unknown character set used in table", + "Conflicting table definitions in sub-tables of MERGE table", + "Table is crashed and last repair failed", + "Table was marked as crashed and should be repaired", + "Lock timed out; Retry transaction", + "Lock table is full; Restart program with a larger locktable", + "Updates are not allowed under a read only transactions", + "Lock deadlock; Retry transaction", + "Foreign key constraint is incorrectly formed", + "Cannot add a child row", + "Cannot delete a parent row", + "Unknown handler error" +}; + + +/* + Register handler error messages for usage with my_error() + + NOTES + This is safe to call multiple times as my_error_register() + will ignore calls to register already registered error numbers. +*/ + + +void my_handler_error_register(void) +{ + my_error_register(handler_error_messages, HA_ERR_FIRST, + HA_ERR_FIRST+ array_elements(handler_error_messages)-1); +} + + +void my_handler_error_unregister(void) +{ + my_error_unregister(HA_ERR_FIRST, + HA_ERR_FIRST+ array_elements(handler_error_messages)-1); +} diff --git a/mysys/my_init.c b/mysys/my_init.c index b2eefe97ee8..607cba77140 100644 --- a/mysys/my_init.c +++ b/mysys/my_init.c @@ -43,6 +43,7 @@ static void netware_init(); my_bool my_init_done= 0; uint mysys_usage_id= 0; /* Incremented for each my_init() */ +ulong my_thread_stack_size= 65536; static ulong atoi_octal(const char *str) { @@ -76,6 +77,7 @@ my_bool my_init(void) mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ + init_glob_errs(); #if defined(THREAD) && defined(SAFE_MUTEX) safe_mutex_global_init(); /* Must be called early */ #endif @@ -343,6 +345,30 @@ static void my_win_init(void) _tzset(); + /* The following is used by time functions */ +#define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10) +#define MS 10000000 + { + FILETIME ft; + LARGE_INTEGER li, t_cnt; + DBUG_ASSERT(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); + if (QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency) == 0) + query_performance_frequency= 0; + else + { + GetSystemTimeAsFileTime(&ft); + li.LowPart= ft.dwLowDateTime; + li.HighPart= ft.dwHighDateTime; + query_performance_offset= li.QuadPart-OFFSET_TO_EPOC; + QueryPerformanceCounter(&t_cnt); + query_performance_offset-= (t_cnt.QuadPart / + query_performance_frequency * MS + + t_cnt.QuadPart % + query_performance_frequency * MS / + query_performance_frequency); + } + } + /* apre la chiave HKEY_LOCAL_MACHINES\software\MySQL */ if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,(LPCTSTR)targetKey,0, KEY_READ,&hSoftMysql) != ERROR_SUCCESS) @@ -380,27 +406,6 @@ static void my_win_init(void) /* chiude la chiave */ RegCloseKey(hSoftMysql) ; - /* The following is used by time functions */ -#define OFFSET_TO_EPOC ((__int64) 134774 * 24 * 60 * 60 * 1000 * 1000 * 10) -#define MS 10000000 - { - FILETIME ft; - LARGE_INTEGER li, t_cnt; - DBUG_ASSERT(sizeof(LARGE_INTEGER) == sizeof(query_performance_frequency)); - if (QueryPerformanceFrequency((LARGE_INTEGER *)&query_performance_frequency)) - query_performance_frequency= 0; - else - { - GetSystemTimeAsFileTime(&ft); - li.LowPart= ft.dwLowDateTime; - li.HighPart= ft.dwHighDateTime; - query_performance_offset= li.QuadPart-OFFSET_TO_EPOC; - QueryPerformanceCounter(&t_cnt); - query_performance_offset-= (t_cnt.QuadPart / query_performance_frequency * MS + - t_cnt.QuadPart % query_performance_frequency * MS / - query_performance_frequency); - } - } DBUG_VOID_RETURN ; } diff --git a/mysys/my_open.c b/mysys/my_open.c index 938dbc5dde2..fe7f65c450b 100644 --- a/mysys/my_open.c +++ b/mysys/my_open.c @@ -71,6 +71,7 @@ File my_open(const char *FileName, int Flags, myf MyFlags) #else fd = open((char *) FileName, Flags); #endif + DBUG_RETURN(my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags)); } /* my_open */ @@ -124,61 +125,66 @@ int my_close(File fd, myf MyFlags) SYNOPSIS my_register_filename() - fd - FileName - type_file_type + fd File number opened, -1 if error on open + FileName File name + type_file_type How file was created + error_message_number Error message number if caller got error (fd == -1) + MyFlags Flags for my_close() + + RETURN + -1 error + # Filenumber + */ File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { + DBUG_ENTER("my_register_filename"); if ((int) fd >= 0) { if ((uint) fd >= my_file_limit) { #if defined(THREAD) && !defined(HAVE_PREAD) - (void) my_close(fd,MyFlags); - my_errno=EMFILE; - if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) - my_error(EE_OUT_OF_FILERESOURCES, MYF(ME_BELL+ME_WAITTANG), - FileName, my_errno); - return(-1); -#endif + my_errno= EMFILE; +#else thread_safe_increment(my_file_opened,&THR_LOCK_open); - return(fd); /* safeguard */ - } - pthread_mutex_lock(&THR_LOCK_open); - if ((my_file_info[fd].name = (char*) my_strdup(FileName,MyFlags))) - { - my_file_opened++; - my_file_total_opened++; - my_file_info[fd].type = type_of_file; -#if defined(THREAD) && !defined(HAVE_PREAD) - pthread_mutex_init(&my_file_info[fd].mutex,MY_MUTEX_INIT_FAST); + DBUG_RETURN(fd); /* safeguard */ #endif - pthread_mutex_unlock(&THR_LOCK_open); - DBUG_PRINT("exit",("fd: %d",fd)); - return(fd); } - pthread_mutex_unlock(&THR_LOCK_open); + else + { + pthread_mutex_lock(&THR_LOCK_open); + if ((my_file_info[fd].name = (char*) my_strdup(FileName,MyFlags))) + { + my_file_opened++; + my_file_total_opened++; + my_file_info[fd].type = type_of_file; +#if defined(THREAD) && !defined(HAVE_PREAD) + pthread_mutex_init(&my_file_info[fd].mutex,MY_MUTEX_INIT_FAST); +#endif + pthread_mutex_unlock(&THR_LOCK_open); + DBUG_PRINT("exit",("fd: %d",fd)); + DBUG_RETURN(fd); + } + pthread_mutex_unlock(&THR_LOCK_open); + my_errno= ENOMEM; + } (void) my_close(fd, MyFlags); - my_errno=ENOMEM; } else - my_errno=errno; - DBUG_PRINT("error",("Got error %d on open",my_errno)); - if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { - if (my_errno == EMFILE) { - DBUG_PRINT("error",("print err: %d",EE_OUT_OF_FILERESOURCES)); - my_error(EE_OUT_OF_FILERESOURCES, MYF(ME_BELL+ME_WAITTANG), - FileName, my_errno); - } else { - DBUG_PRINT("error",("print err: %d",error_message_number)); - my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG), - FileName, my_errno); - } + my_errno= errno; + + DBUG_PRINT("error",("Got error %d on open", my_errno)); + if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) + { + if (my_errno == EMFILE) + error_message_number= EE_OUT_OF_FILERESOURCES; + DBUG_PRINT("error",("print err: %d",error_message_number)); + my_error(error_message_number, MYF(ME_BELL+ME_WAITTANG), + FileName, my_errno); } - return(fd); + DBUG_RETURN(-1); } #ifdef __WIN__ diff --git a/mysys/my_pread.c b/mysys/my_pread.c index 6e98132db73..de7a2b611ed 100644 --- a/mysys/my_pread.c +++ b/mysys/my_pread.c @@ -63,12 +63,12 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, pthread_mutex_unlock(&my_file_info[Filedes].mutex); #else if ((error= ((readbytes= pread(Filedes, Buffer, Count, offset)) != Count))) - my_errno= errno; + my_errno= errno ? errno : -1; #endif if (error || readbytes != Count) { DBUG_PRINT("warning",("Read only %d bytes off %u from %d, errno: %d", - (int) readbytes, (uint) Count,Filedes,my_errno)); + (int) readbytes, (uint) Count,Filedes,my_errno)); #ifdef THREAD if ((readbytes == 0 || readbytes == (size_t) -1) && errno == EINTR) { @@ -115,7 +115,7 @@ size_t my_pread(File Filedes, uchar *Buffer, size_t Count, my_off_t offset, RETURN (size_t) -1 Error # Number of bytes read - */ +*/ size_t my_pwrite(int Filedes, const uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) diff --git a/mysys/my_realloc.c b/mysys/my_realloc.c index c7cf1323cd4..a55282e03a0 100644 --- a/mysys/my_realloc.c +++ b/mysys/my_realloc.c @@ -22,6 +22,16 @@ /* My memory re allocator */ +/** + @brief wrapper around realloc() + + @param oldpoint pointer to currently allocated area + @param size new size requested, must be >0 + @param my_flags flags + + @note if size==0 realloc() may return NULL; my_realloc() treats this as an + error which is not the intention of realloc() +*/ void* my_realloc(void* oldpoint, size_t size, myf my_flags) { void *point; @@ -29,6 +39,7 @@ void* my_realloc(void* oldpoint, size_t size, myf my_flags) DBUG_PRINT("my",("ptr: 0x%lx size: %lu my_flags: %d", (long) oldpoint, (ulong) size, my_flags)); + DBUG_ASSERT(size > 0); if (!oldpoint && (my_flags & MY_ALLOW_ZERO_PTR)) DBUG_RETURN(my_malloc(size,my_flags)); #ifdef USE_HALLOC diff --git a/mysys/my_rename.c b/mysys/my_rename.c index 6a6aa6a5796..39e6056a9e4 100644 --- a/mysys/my_rename.c +++ b/mysys/my_rename.c @@ -16,8 +16,9 @@ #include "mysys_priv.h" #include #include "mysys_err.h" - +#include "m_string.h" #undef my_rename + /* On unix rename deletes to file if it exists */ int my_rename(const char *from, const char *to, myf MyFlags) @@ -60,5 +61,19 @@ int my_rename(const char *from, const char *to, myf MyFlags) if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_LINK, MYF(ME_BELL+ME_WAITTANG),from,to,my_errno); } + else if (MyFlags & MY_SYNC_DIR) + { +#ifdef NEED_EXPLICIT_SYNC_DIR + /* do only the needed amount of syncs: */ + char dir_from[FN_REFLEN], dir_to[FN_REFLEN]; + size_t dir_from_length, dir_to_length; + dirname_part(dir_from, from, &dir_from_length); + dirname_part(dir_to, to, &dir_to_length); + if (my_sync_dir(dir_from, MyFlags) || + (strcmp(dir_from, dir_to) && + my_sync_dir(dir_to, MyFlags))) + error= -1; +#endif + } DBUG_RETURN(error); } /* my_rename */ diff --git a/mysys/my_symlink.c b/mysys/my_symlink.c index 810c0c72632..98059ccd508 100644 --- a/mysys/my_symlink.c +++ b/mysys/my_symlink.c @@ -84,6 +84,8 @@ int my_symlink(const char *content, const char *linkname, myf MyFlags) if (MyFlags & MY_WME) my_error(EE_CANT_SYMLINK, MYF(0), linkname, content, errno); } + else if ((MyFlags & MY_SYNC_DIR) && my_sync_dir_by_file(linkname, MyFlags)) + result= -1; DBUG_RETURN(result); #endif /* HAVE_READLINK */ } diff --git a/mysys/my_sync.c b/mysys/my_sync.c index 64fce3aac21..ba6964b00d6 100644 --- a/mysys/my_sync.c +++ b/mysys/my_sync.c @@ -48,6 +48,16 @@ int my_sync(File fd, myf my_flags) do { +#if defined(F_FULLFSYNC) + /* + In Mac OS X >= 10.3 this call is safer than fsync() (it forces the + disk's cache and guarantees ordered writes). + */ + if (!(res= fcntl(fd, F_FULLFSYNC, 0))) + break; /* ok */ + /* Some file systems don't support F_FULLFSYNC and fail above: */ + DBUG_PRINT("info",("fcntl(F_FULLFSYNC) failed, falling back")); +#endif #if defined(HAVE_FDATASYNC) res= fdatasync(fd); #elif defined(HAVE_FSYNC) @@ -55,6 +65,7 @@ int my_sync(File fd, myf my_flags) #elif defined(__WIN__) res= _commit(fd); #else +#error Cannot find a way to sync a file, durability in danger res= 0; /* No sync (strange OS) */ #endif } while (res == -1 && errno == EINTR); @@ -66,10 +77,79 @@ int my_sync(File fd, myf my_flags) my_errno= -1; /* Unknown error */ if ((my_flags & MY_IGNORE_BADFD) && (er == EBADF || er == EINVAL || er == EROFS)) + { + DBUG_PRINT("info", ("ignoring errno %d", er)); res= 0; + } else if (my_flags & MY_WME) my_error(EE_SYNC, MYF(ME_BELL+ME_WAITTANG), my_filename(fd), my_errno); } DBUG_RETURN(res); } /* my_sync */ + +static const char cur_dir_name[]= {FN_CURLIB, 0}; +/* + Force directory information to disk. + + SYNOPSIS + my_sync_dir() + dir_name the name of the directory + my_flags flags (MY_WME etc) + + RETURN + 0 if ok, !=0 if error +*/ +int my_sync_dir(const char *dir_name, myf my_flags) +{ +#ifdef NEED_EXPLICIT_SYNC_DIR + DBUG_ENTER("my_sync_dir"); + DBUG_PRINT("my",("Dir: '%s' my_flags: %d", dir_name, my_flags)); + File dir_fd; + int res= 0; + const char *correct_dir_name; + /* Sometimes the path does not contain an explicit directory */ + correct_dir_name= (dir_name[0] == 0) ? cur_dir_name : dir_name; + /* + Syncing a dir may give EINVAL on tmpfs on Linux, which is ok. + EIO on the other hand is very important. Hence MY_IGNORE_BADFD. + */ + if ((dir_fd= my_open(correct_dir_name, O_RDONLY, MYF(my_flags))) >= 0) + { + if (my_sync(dir_fd, MYF(my_flags | MY_IGNORE_BADFD))) + res= 2; + if (my_close(dir_fd, MYF(my_flags))) + res= 3; + } + else + res= 1; + DBUG_RETURN(res); +#else + return 0; +#endif +} + + +/* + Force directory information to disk. + + SYNOPSIS + my_sync_dir_by_file() + file_name the name of a file in the directory + my_flags flags (MY_WME etc) + + RETURN + 0 if ok, !=0 if error +*/ +int my_sync_dir_by_file(const char *file_name, myf my_flags) +{ +#ifdef NEED_EXPLICIT_SYNC_DIR + char dir_name[FN_REFLEN]; + size_t dir_name_length; + dirname_part(dir_name, file_name, &dir_name_length); + return my_sync_dir(dir_name, my_flags); +#else + return 0; +#endif +} + diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 7a2f448b2dc..a7a7bcc9c53 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -430,6 +430,29 @@ void TERMINATE(FILE *file, uint flag) } +/* + Report where a piece of memory was allocated + + This is usefull to call from withing a debugger +*/ + + +void sf_malloc_report_allocated(void *memory) +{ + struct st_irem *irem; + for (irem= sf_malloc_root ; irem ; irem=irem->next) + { + char *data= (((char*) irem) + ALIGN_SIZE(sizeof(struct st_irem)) + + sf_malloc_prehunc); + if (data <= (char*) memory && (char*) memory <= data + irem->datasize) + { + printf("%u bytes at 0x%lx, allocated at line %u in '%s'\n", + irem->datasize, (long) data, irem->linenum, irem->filename); + break; + } + } +} + /* Returns 0 if chunk is ok */ static int _checkchunk(register struct st_irem *irem, const char *filename, diff --git a/sql/gen_lex_hash.cc b/sql/gen_lex_hash.cc index 36b7f30dc64..18f80e11a15 100644 --- a/sql/gen_lex_hash.cc +++ b/sql/gen_lex_hash.cc @@ -481,8 +481,8 @@ int main(int argc,char **argv) printf("\nstatic unsigned int symbols_max_len=%d;\n\n", max_len2); printf("\ -static inline SYMBOL *get_hash_symbol(const char *s,\n\ - unsigned int len,bool function)\n\ +static SYMBOL *get_hash_symbol(const char *s,\n\ + unsigned int len,bool function)\n\ {\n\ register uchar *hash_map;\n\ register const char *cur_str= s;\n\ diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 200e8a97c67..a57f1d24758 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -4701,11 +4701,14 @@ void ha_partition::get_dynamic_partition_info(PARTITION_INFO *stat_info, about this call). We pass this along to all underlying MyISAM handlers and ignore it for the rest. - HA_EXTRA_PREPARE_FOR_DELETE: + HA_EXTRA_PREPARE_FOR_DROP: Only used by MyISAM, called in preparation for a DROP TABLE. It's used mostly by Windows that cannot handle dropping an open file. On other platforms it has the same effect as HA_EXTRA_FORCE_REOPEN. + HA_EXTRA_PREPARE_FOR_RENAME: + Informs the handler we are about to attempt a rename of the table. + HA_EXTRA_READCHECK: HA_EXTRA_NO_READCHECK: Only one call to HA_EXTRA_NO_READCHECK from ha_open where it says that @@ -4831,14 +4834,15 @@ int ha_partition::extra(enum ha_extra_function operation) } /* Category 3), used by MyISAM handlers */ - case HA_EXTRA_PREPARE_FOR_DELETE: - DBUG_RETURN(prepare_for_delete()); + case HA_EXTRA_PREPARE_FOR_RENAME: + DBUG_RETURN(prepare_for_rename()); break; case HA_EXTRA_NORMAL: case HA_EXTRA_QUICK: case HA_EXTRA_NO_READCHECK: case HA_EXTRA_PREPARE_FOR_UPDATE: case HA_EXTRA_FORCE_REOPEN: + case HA_EXTRA_PREPARE_FOR_DROP: case HA_EXTRA_FLUSH_CACHE: { if (m_myisam) @@ -4990,24 +4994,24 @@ void ha_partition::prepare_extra_cache(uint cachesize) 0 Success */ -int ha_partition::prepare_for_delete() +int ha_partition::prepare_for_rename() { int result= 0, tmp; handler **file; - DBUG_ENTER("ha_partition::prepare_for_delete()"); + DBUG_ENTER("ha_partition::prepare_for_rename()"); if (m_new_file != NULL) { for (file= m_new_file; *file; file++) - if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) + if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_RENAME))) result= tmp; for (file= m_reorged_file; *file; file++) - if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_DELETE))) + if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_RENAME))) result= tmp; DBUG_RETURN(result); } - DBUG_RETURN(loop_extra(HA_EXTRA_PREPARE_FOR_DELETE)); + DBUG_RETURN(loop_extra(HA_EXTRA_PREPARE_FOR_RENAME)); } /* diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 9d10aea2b6f..ac00581fae0 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -211,7 +211,7 @@ public: } virtual void change_table_ptr(TABLE *table_arg, TABLE_SHARE *share); private: - int prepare_for_delete(); + int prepare_for_rename(); int copy_partitions(ulonglong *copied, ulonglong *deleted); void cleanup_new_partition(uint part_count); int prepare_new_partition(TABLE *table, HA_CREATE_INFO *create_info, diff --git a/sql/handler.cc b/sql/handler.cc index 9e47baadd4a..5b121ac258a 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -290,7 +290,8 @@ handler *get_ha_partition(partition_info *part_info) 0 OK != 0 Error */ -static int ha_init_errors(void) + +int ha_init_errors(void) { #define SETMSG(nr, msg) errmsgs[(nr) - HA_ERR_FIRST]= (msg) const char **errmsgs; @@ -505,9 +506,6 @@ int ha_init() int error= 0; DBUG_ENTER("ha_init"); - if (ha_init_errors()) - DBUG_RETURN(1); - DBUG_ASSERT(total_ha < MAX_HA); /* Check if there is a transaction-capable storage engine besides the @@ -2505,8 +2503,7 @@ int ha_enable_transaction(THD *thd, bool on) DBUG_ENTER("ha_enable_transaction"); DBUG_PRINT("enter", ("on: %d", (int) on)); - thd->transaction.on= on; - if (on) + if ((thd->transaction.on= on)) { /* Now all storage engines should have transaction handling enabled. diff --git a/sql/handler.h b/sql/handler.h index b91d8a39b88..6b3975351a1 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -20,6 +20,7 @@ #pragma interface /* gcc class implementation */ #endif +#include #include #include @@ -272,6 +273,7 @@ enum legacy_db_type DB_TYPE_TABLE_FUNCTION, DB_TYPE_MEMCACHE, DB_TYPE_FALCON, + DB_TYPE_MARIA, DB_TYPE_FIRST_DYNAMIC=42, DB_TYPE_DEFAULT=127 // Must be last }; @@ -322,6 +324,7 @@ enum enum_binlog_command { #define HA_CREATE_USED_CONNECTION (1L << 18) #define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19) #define HA_CREATE_USED_TRANSACTIONAL (1L << 20) +#define HA_CREATE_USED_PAGE_CHECKSUM (1L << 21) typedef ulonglong my_xid; // this line is the same as in log_event.h #define MYSQL_XID_PREFIX "MySQLXid" @@ -818,6 +821,7 @@ typedef struct st_ha_create_information bool frm_only; /* 1 if no ha_create_table() */ bool varchar; /* 1 if table has a VARCHAR */ enum ha_storage_media storage_media; /* DEFAULT, DISK or MEMORY */ + enum ha_choice page_checksum; /* If we have page_checksums */ } HA_CREATE_INFO; @@ -1851,6 +1855,7 @@ static inline bool ha_storage_engine_is_enabled(const handlerton *db_type) } /* basic stuff */ +int ha_init_errors(void); int ha_init(void); int ha_end(void); int ha_initialize_handlerton(st_plugin_int *plugin); diff --git a/sql/item_func.cc b/sql/item_func.cc index efc42c1b73f..8891838bb2a 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -27,6 +27,7 @@ #include #include #include +#include #include "sp_head.h" #include "sp_rcontext.h" diff --git a/sql/lex.h b/sql/lex.h index e311379120d..aab2182b097 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -380,6 +380,8 @@ static SYMBOL symbols[] = { { "OWNER", SYM(OWNER_SYM)}, { "PACK_KEYS", SYM(PACK_KEYS_SYM)}, { "PARSER", SYM(PARSER_SYM)}, + { "PAGE", SYM(PAGE_SYM)}, + { "PAGE_CHECKSUM", SYM(PAGE_CHECKSUM_SYM)}, { "PARTIAL", SYM(PARTIAL)}, { "PARTITION", SYM(PARTITION_SYM)}, { "PARTITIONING", SYM(PARTITIONING_SYM)}, @@ -512,7 +514,8 @@ static SYMBOL symbols[] = { { "SUSPEND", SYM(SUSPEND_SYM)}, { "TABLE", SYM(TABLE_SYM)}, { "TABLES", SYM(TABLES)}, - { "TABLESPACE", SYM(TABLESPACE)}, + { "TABLESPACE", SYM(TABLESPACE)}, + { "TABLE_CHECKSUM", SYM(TABLE_CHECKSUM_SYM)}, { "TEMPORARY", SYM(TEMPORARY)}, { "TEMPTABLE", SYM(TEMPTABLE_SYM)}, { "TERMINATED", SYM(TERMINATED)}, @@ -529,6 +532,7 @@ static SYMBOL symbols[] = { { "TO", SYM(TO_SYM)}, { "TRAILING", SYM(TRAILING)}, { "TRANSACTION", SYM(TRANSACTION_SYM)}, + { "TRANSACTIONAL", SYM(TRANSACTIONAL_SYM)}, { "TRIGGER", SYM(TRIGGER_SYM)}, { "TRIGGERS", SYM(TRIGGERS_SYM)}, { "TRUE", SYM(TRUE_SYM)}, diff --git a/sql/log.cc b/sql/log.cc index 95204e89d0e..f8c78b03228 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2270,6 +2270,11 @@ bool MYSQL_BIN_LOG::open_index_file(const char *index_file_name_arg, my_seek(index_file_nr,0L,MY_SEEK_END,MYF(0)), 0, MYF(MY_WME | MY_WAIT_IF_FULL))) { + /* + TODO: all operations creating/deleting the index file or a log, should + call my_sync_dir() or my_sync_dir_by_file() to be durable. + TODO: file creation should be done with my_create() not my_open(). + */ if (index_file_nr >= 0) my_close(index_file_nr,MYF(0)); return TRUE; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 47a42354423..4aa574e5d47 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1760,7 +1760,7 @@ extern ulong max_connections,max_connect_errors, connect_timeout; extern ulong slave_net_timeout, slave_trans_retries; extern uint max_user_connections; extern ulong what_to_log,flush_time; -extern ulong query_buff_size, thread_stack; +extern ulong query_buff_size; extern ulong max_prepared_stmt_count, prepared_stmt_count; extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit; extern ulong max_binlog_size, max_relay_log_size; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6ea1cf111bb..c02fdc85d32 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -16,6 +16,7 @@ #include "mysql_priv.h" #include #include +#include #include "slave.h" #include "rpl_mi.h" #include "sql_repl.h" @@ -441,7 +442,7 @@ uint volatile thread_count, thread_running; ulonglong thd_startup_options; ulong back_log, connect_timeout, concurrency, server_id; ulong table_cache_size, table_def_size; -ulong thread_stack, what_to_log; +ulong what_to_log; ulong query_buff_size, slow_launch_time, slave_open_temp_tables; ulong open_files_limit, max_binlog_size, max_relay_log_size; ulong slave_net_timeout, slave_trans_retries; @@ -2194,7 +2195,7 @@ or misconfigured. This error can also be caused by malfunctioning hardware.\n", We will try our best to scrape up some info that will hopefully help diagnose\n\ the problem, but since we have already crashed, something is definitely wrong\n\ and this may fail.\n\n"); - fprintf(stderr, "key_buffer_size=%lu\n", + fprintf(stderr, "key_buffer_size=%lu\n", (ulong) dflt_key_cache->key_cache_mem_size); fprintf(stderr, "read_buffer_size=%ld\n", (long) global_system_variables.read_buff_size); fprintf(stderr, "max_used_connections=%lu\n", max_used_connections); @@ -2226,7 +2227,7 @@ the thread stack. Please read http://www.mysql.com/doc/en/Linux.html\n\n", { fprintf(stderr,"thd: 0x%lx\n",(long) thd); print_stacktrace(thd ? (uchar*) thd->thread_stack : (uchar*) 0, - thread_stack); + my_thread_stack_size); } if (thd) { @@ -2385,9 +2386,9 @@ static void start_signal_handler(void) Peculiar things with ia64 platforms - it seems we only have half the stack size in reality, so we have to double it here */ - pthread_attr_setstacksize(&thr_attr,thread_stack*2); + pthread_attr_setstacksize(&thr_attr,my_thread_stack_size*2); #else - pthread_attr_setstacksize(&thr_attr,thread_stack); + pthread_attr_setstacksize(&thr_attr,my_thread_stack_size); #endif #endif @@ -3397,6 +3398,13 @@ server."); using_update_log=1; } + /* call ha_init_key_cache() on all key caches to init them */ + process_key_caches(&ha_init_key_cache); + + /* Allow storage engine to give real error messages */ + if (ha_init_errors()) + DBUG_RETURN(1); + if (plugin_init(&defaults_argc, defaults_argv, (opt_noacl ? PLUGIN_INIT_SKIP_PLUGIN_TABLE : 0) | (opt_help ? PLUGIN_INIT_SKIP_INITIALIZATION : 0))) @@ -3563,9 +3571,6 @@ server."); if (opt_myisam_log) (void) mi_log(1); - /* call ha_init_key_cache() on all key caches to init them */ - process_key_caches(&ha_init_key_cache); - #if defined(HAVE_MLOCKALL) && defined(MCL_CURRENT) && !defined(EMBEDDED_LIBRARY) if (locked_in_memory && !getuid()) { @@ -3755,9 +3760,9 @@ int main(int argc, char **argv) Peculiar things with ia64 platforms - it seems we only have half the stack size in reality, so we have to double it here */ - pthread_attr_setstacksize(&connection_attrib,thread_stack*2); + pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size*2); #else - pthread_attr_setstacksize(&connection_attrib,thread_stack); + pthread_attr_setstacksize(&connection_attrib,my_thread_stack_size); #endif #ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE { @@ -3768,15 +3773,15 @@ int main(int argc, char **argv) stack_size/= 2; #endif /* We must check if stack_size = 0 as Solaris 2.9 can return 0 here */ - if (stack_size && stack_size < thread_stack) + if (stack_size && stack_size < my_thread_stack_size) { if (global_system_variables.log_warnings) sql_print_warning("Asked for %lu thread stack, but got %ld", - thread_stack, (long) stack_size); + my_thread_stack_size, (long) stack_size); #if defined(__ia64__) || defined(__ia64) - thread_stack= stack_size*2; + my_thread_stack_size= stack_size*2; #else - thread_stack= stack_size; + my_thread_stack_size= stack_size; #endif } } @@ -5022,7 +5027,7 @@ enum options_mysqld OPT_MAX_ERROR_COUNT, OPT_MULTI_RANGE_COUNT, OPT_MYISAM_DATA_POINTER_SIZE, OPT_MYISAM_BLOCK_SIZE, OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE, OPT_MYISAM_MAX_SORT_FILE_SIZE, OPT_MYISAM_SORT_BUFFER_SIZE, - OPT_MYISAM_USE_MMAP, + OPT_MYISAM_USE_MMAP, OPT_MYISAM_REPAIR_THREADS, OPT_MYISAM_STATS_METHOD, OPT_NET_BUFFER_LENGTH, OPT_NET_RETRY_COUNT, OPT_NET_READ_TIMEOUT, OPT_NET_WRITE_TIMEOUT, @@ -5037,7 +5042,7 @@ enum options_mysqld OPT_SORT_BUFFER, OPT_TABLE_OPEN_CACHE, OPT_TABLE_DEF_CACHE, OPT_THREAD_CONCURRENCY, OPT_THREAD_CACHE_SIZE, OPT_TMP_TABLE_SIZE, OPT_THREAD_STACK, - OPT_WAIT_TIMEOUT, OPT_MYISAM_REPAIR_THREADS, + OPT_WAIT_TIMEOUT, OPT_ERROR_LOG_FILE, OPT_DEFAULT_WEEK_FORMAT, OPT_RANGE_ALLOC_BLOCK_SIZE, OPT_ALLOW_SUSPICIOUS_UDFS, @@ -6193,10 +6198,10 @@ The minimum value for this variable is 4096.", (uchar**) &opt_plugin_load, (uchar**) &opt_plugin_load, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"preload_buffer_size", OPT_PRELOAD_BUFFER_SIZE, - "The size of the buffer that is allocated when preloading indexes", - (uchar**) &global_system_variables.preload_buff_size, - (uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG, - REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0}, + "The size of the buffer that is allocated when preloading indexes", + (uchar**) &global_system_variables.preload_buff_size, + (uchar**) &max_system_variables.preload_buff_size, 0, GET_ULONG, + REQUIRED_ARG, 32*1024L, 1024, 1024*1024*1024L, 0, 1, 0}, {"query_alloc_block_size", OPT_QUERY_ALLOC_BLOCK_SIZE, "Allocation block size for query parsing and execution", (uchar**) &global_system_variables.query_alloc_block_size, @@ -6339,8 +6344,8 @@ The minimum value for this variable is 4096.", REQUIRED_ARG, 20, 1, 16384, 0, 1, 0}, #endif {"thread_stack", OPT_THREAD_STACK, - "The stack size for each thread.", (uchar**) &thread_stack, - (uchar**) &thread_stack, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK, + "The stack size for each thread.", (uchar**) &my_thread_stack_size, + (uchar**) &my_thread_stack_size, 0, GET_ULONG, REQUIRED_ARG,DEFAULT_THREAD_STACK, 1024L*128L, ~0L, 0, 1024, 0}, { "time_format", OPT_TIME_FORMAT, "The TIME format (for future).", @@ -6354,12 +6359,12 @@ The minimum value for this variable is 4096.", (uchar**) &max_system_variables.tmp_table_size, 0, GET_ULL, REQUIRED_ARG, 16*1024*1024L, 1024, MAX_MEM_TABLE_SIZE, 0, 1, 0}, {"transaction_alloc_block_size", OPT_TRANS_ALLOC_BLOCK_SIZE, - "Allocation block size for various transaction-related structures", + "Allocation block size for transactions to be stored in binary log", (uchar**) &global_system_variables.trans_alloc_block_size, (uchar**) &max_system_variables.trans_alloc_block_size, 0, GET_ULONG, REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ~0L, 0, 1024, 0}, {"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE, - "Persistent buffer for various transaction-related structures", + "Persistent buffer for transactions to be stored in binary log", (uchar**) &global_system_variables.trans_prealloc_size, (uchar**) &max_system_variables.trans_prealloc_size, 0, GET_ULONG, REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ~0L, 0, 1024, 0}, @@ -6889,6 +6894,7 @@ SHOW_VAR status_vars[]= { {"Open_tables", (char*) &show_open_tables, SHOW_FUNC}, {"Opened_files", (char*) &my_file_total_opened, SHOW_LONG_NOFLUSH}, {"Opened_tables", (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS}, + {"Opened_table_definitions", (char*) offsetof(STATUS_VAR, opened_shares), SHOW_LONG_STATUS}, {"Prepared_stmt_count", (char*) &show_prepared_stmt_count, SHOW_FUNC}, #ifdef HAVE_QUERY_CACHE {"Qcache_free_blocks", (char*) &query_cache.free_memory_blocks, SHOW_LONG_NOFLUSH}, @@ -7112,9 +7118,10 @@ static void mysql_init_variables(void) thread_cache.empty(); key_caches.empty(); if (!(dflt_key_cache= get_or_create_key_cache(default_key_cache_base.str, - default_key_cache_base.length))) + default_key_cache_base.length))) exit(1); - multi_keycache_init(); /* set key_cache_hash.default_value = dflt_key_cache */ + /* set key_cache_hash.default_value = dflt_key_cache */ + multi_keycache_init(); /* Set directory paths */ strmake(language, LANGUAGE, sizeof(language)-1); @@ -7129,7 +7136,7 @@ static void mysql_init_variables(void) master_password= master_host= 0; master_info_file= (char*) "master.info", relay_log_info_file= (char*) "relay-log.info"; - master_ssl_key= master_ssl_cert= master_ssl_ca= + master_ssl_key= master_ssl_cert= master_ssl_ca= master_ssl_capath= master_ssl_cipher= 0; report_user= report_password = report_host= 0; /* TO BE DELETED */ opt_relay_logname= opt_relaylog_index_name= 0; @@ -7782,7 +7789,7 @@ mysql_getopt_value(const char *keyname, uint key_length, } } } - return option->value; + return option->value; } diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 5a772501e48..97d0bcc8707 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -2139,9 +2139,6 @@ int SQL_SELECT::test_quick_select(THD *thd, key_map keys_to_use, quick=0; needed_reg.clear_all(); quick_keys.clear_all(); - if ((specialflag & SPECIAL_SAFE_MODE) && ! force_quick_range || - !limit) - DBUG_RETURN(0); /* purecov: inspected */ if (keys_to_use.is_clear_all()) DBUG_RETURN(0); records= head->file->stats.records; @@ -4308,7 +4305,6 @@ static bool ror_intersect_add(ROR_INTERSECT_INFO *info, } info->out_rows *= selectivity_mult; - DBUG_PRINT("info", ("info->total_cost= %g", info->total_cost)); if (is_cpk_scan) { diff --git a/sql/set_var.cc b/sql/set_var.cc index 697de9cda97..f67ccc02dc7 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -706,7 +706,7 @@ static SHOW_VAR fixed_vars[]= { #ifdef HAVE_THR_SETCONCURRENCY {"thread_concurrency", (char*) &concurrency, SHOW_LONG}, #endif - {"thread_stack", (char*) &thread_stack, SHOW_LONG}, + {"thread_stack", (char*) &my_thread_stack_size, SHOW_LONG}, }; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 66a51d5bb00..afe0383658f 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -440,6 +440,7 @@ THD::THD() cleanup_done= abort_on_warning= no_warnings_for_error= 0; peer_port= 0; // For SHOW PROCESSLIST transaction.m_pending_rows_event= 0; + transaction.on= 1; #ifdef SIGNAL_WITH_VIO_CLOSE active_vio = 0; #endif diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index ae347bebb47..e440aeaa588 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -5120,10 +5120,10 @@ bool check_stack_overrun(THD *thd, long margin, long stack_used; DBUG_ASSERT(thd == current_thd); if ((stack_used=used_stack(thd->thread_stack,(char*) &stack_used)) >= - (long) (thread_stack - margin)) + (long) (my_thread_stack_size - margin)) { sprintf(errbuff[0],ER(ER_STACK_OVERRUN_NEED_MORE), - stack_used,thread_stack,margin); + stack_used,my_thread_stack_size,margin); my_message(ER_STACK_OVERRUN_NEED_MORE,errbuff[0],MYF(0)); thd->fatal_error(); return 1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b77bb719e1e..1f206e2ec17 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -29,6 +29,7 @@ #include "sql_cursor.h" #include +#include #include #include @@ -9580,7 +9581,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List &fields, table->s= share; init_tmp_table_share(share, "", 0, tmpname, tmpname); share->blob_field= blob_field; - share->blob_ptr_size= mi_portable_sizeof_char_ptr; + share->blob_ptr_size= portable_sizeof_char_ptr; share->db_low_byte_first=1; // True for HEAP and MyISAM share->table_charset= param->table_charset; share->primary_key= MAX_KEY; // Indicate no primary key @@ -10145,7 +10146,7 @@ TABLE *create_virtual_tmp_table(THD *thd, List &field_list) table->s= share; share->blob_field= blob_field; share->fields= field_count; - share->blob_ptr_size= mi_portable_sizeof_char_ptr; + share->blob_ptr_size= portable_sizeof_char_ptr; setup_tmp_table_column_bitmaps(table, bitmaps); /* Create all fields and calculate the total length of record */ diff --git a/sql/sql_show.cc b/sql/sql_show.cc index f7813b73089..38db2fe85a5 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -70,6 +70,9 @@ static TYPELIB grant_types = { sizeof(grant_names)/sizeof(char **), grant_names, NULL}; #endif +/* Match the values of enum ha_choice */ +static const char *ha_choice_values[] = {"", "0", "1"}; + static void store_key_options(THD *thd, String *packet, TABLE *table, KEY *key_info); @@ -1182,6 +1185,8 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, key_info= table->key_info; bzero((char*) &create_info, sizeof(create_info)); + /* Allow update_create_info to update row type */ + create_info.row_type= share->row_type; file->update_create_info(&create_info); primary_key= share->primary_key; @@ -1366,19 +1371,25 @@ int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, packet->append(STRING_WITH_LEN(" PACK_KEYS=1")); if (share->db_create_options & HA_OPTION_NO_PACK_KEYS) packet->append(STRING_WITH_LEN(" PACK_KEYS=0")); + /* We use CHECKSUM, instead of TABLE_CHECKSUM, for backward compability */ if (share->db_create_options & HA_OPTION_CHECKSUM) packet->append(STRING_WITH_LEN(" CHECKSUM=1")); + if (share->page_checksum != HA_CHOICE_UNDEF) + { + packet->append(STRING_WITH_LEN(" PAGE_CHECKSUM=")); + packet->append(ha_choice_values[(uint) share->page_checksum], 1); + } if (share->db_create_options & HA_OPTION_DELAY_KEY_WRITE) packet->append(STRING_WITH_LEN(" DELAY_KEY_WRITE=1")); - if (share->row_type != ROW_TYPE_DEFAULT) + if (create_info.row_type != ROW_TYPE_DEFAULT) { packet->append(STRING_WITH_LEN(" ROW_FORMAT=")); - packet->append(ha_row_type[(uint) share->row_type]); + packet->append(ha_row_type[(uint) create_info.row_type]); } if (share->transactional != HA_CHOICE_UNDEF) { packet->append(STRING_WITH_LEN(" TRANSACTIONAL=")); - packet->append(share->transactional == HA_CHOICE_YES ? "1" : "0", 1); + packet->append(ha_choice_values[(uint) share->transactional], 1); } if (table->s->key_block_size) { @@ -3462,8 +3473,12 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, ptr=strmov(ptr," pack_keys=1"); if (share->db_create_options & HA_OPTION_NO_PACK_KEYS) ptr=strmov(ptr," pack_keys=0"); + /* We use CHECKSUM, instead of TABLE_CHECKSUM, for backward compability */ if (share->db_create_options & HA_OPTION_CHECKSUM) ptr=strmov(ptr," checksum=1"); + if (share->page_checksum != HA_CHOICE_UNDEF) + ptr= strxmov(ptr, " page_checksum=", + ha_choice_values[(uint) share->page_checksum], NullS); if (share->db_create_options & HA_OPTION_DELAY_KEY_WRITE) ptr=strmov(ptr," delay_key_write=1"); if (share->row_type != ROW_TYPE_DEFAULT) @@ -3482,6 +3497,9 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, show_table->part_info->no_parts > 0) ptr= strmov(ptr, " partitioned"); #endif + if (share->transactional != HA_CHOICE_UNDEF) + ptr= strxmov(ptr, " transactional=", + ha_choice_values[(uint) share->transactional], NullS); table->field[19]->store(option_buff+1, (ptr == option_buff ? 0 : (uint) (ptr-option_buff)-1), cs); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index cd39623f2b4..5f1f7f9db0e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3678,8 +3678,9 @@ mysql_rename_table(handlerton *base, const char *old_db, wait_while_table_is_used() thd Thread handler table Table to remove from cache - function HA_EXTRA_PREPARE_FOR_DELETE if table is to be deleted - HA_EXTRA_FORCE_REOPEN if table is not be used + function HA_EXTRA_PREPARE_FOR_DROP if table is to be deleted + HA_EXTRA_FORCE_REOPEN if table is not be used + HA_EXTRA_PREPARE_FOR_RENAME if table is to be renamed NOTES When returning, the table will be unusable for other threads until the table is closed. @@ -3729,7 +3730,7 @@ void close_cached_table(THD *thd, TABLE *table) { DBUG_ENTER("close_cached_table"); - wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_DELETE); + wait_while_table_is_used(thd, table, HA_EXTRA_FORCE_REOPEN); /* Close lock if this is not got with LOCK TABLES */ if (thd->lock) { @@ -6488,7 +6489,7 @@ view_err: if (lower_case_table_names) my_casedn_str(files_charset_info, old_name); - wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_DELETE); + wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME); close_data_files_and_morph_locks(thd, db, table_name); error=0; @@ -6946,7 +6947,6 @@ bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list) DBUG_ENTER("mysql_recreate_table"); bzero((char*) &create_info, sizeof(create_info)); - create_info.db_type= 0; create_info.row_type=ROW_TYPE_NOT_USED; create_info.default_table_charset=default_charset_info; /* Force alter table to recreate table */ diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 0fe299d4505..f1d7e4a7312 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -459,7 +459,7 @@ void mysql_print_status() VOID(my_getwd(current_dir, sizeof(current_dir),MYF(0))); printf("Current dir: %s\n", current_dir); printf("Running threads: %d Stack size: %ld\n", thread_count, - (long) thread_stack); + (long) my_thread_stack_size); thr_print_locks(); // Write some debug info #ifndef DBUG_OFF print_cached_tables(); @@ -536,7 +536,7 @@ Estimated memory (with thread stack): %ld\n", (int) info.uordblks, (int) info.fordblks, (int) info.keepcost, - (long) (thread_count * thread_stack + info.hblkhd + info.arena)); + (long) (thread_count * my_thread_stack_size + info.hblkhd + info.arena)); #endif Events::dump_internal_status(); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 68680addc58..560aebcc456 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -487,6 +487,7 @@ Item* handle_sql2003_note184_exception(THD *thd, Item* left, bool equal, enum enum_tx_isolation tx_isolation; enum Cast_target cast_type; enum Item_udftype udf_type; + enum ha_choice choice; CHARSET_INFO *charset; thr_lock_type lock_type; interval_type interval, interval_time_st; @@ -875,6 +876,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token OWNER_SYM %token PACK_KEYS_SYM %token PAGE_SYM +%token PAGE_CHECKSUM_SYM %token PARAM_MARKER %token PARSER_SYM %token PARTIAL /* SQL-2003-N */ @@ -1010,6 +1012,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token TABLESPACE %token TABLE_REF_PRIORITY %token TABLE_SYM /* SQL-2003-R */ +%token TABLE_CHECKSUM_SYM %token TEMPORARY /* SQL-2003-N */ %token TEMPTABLE_SYM %token TERMINATED @@ -1145,6 +1148,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type ulonglong_num real_ulonglong_num size_number +%type choice + %type part_bit_expr @@ -4440,6 +4445,16 @@ create_table_option: Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; } + | TABLE_CHECKSUM_SYM opt_equal ulong_num + { + Lex->create_info.table_options|= $3 ? HA_OPTION_CHECKSUM : HA_OPTION_NO_CHECKSUM; + Lex->create_info.used_fields|= HA_CREATE_USED_CHECKSUM; + } + | PAGE_CHECKSUM_SYM opt_equal choice + { + Lex->create_info.used_fields|= HA_CREATE_USED_PAGE_CHECKSUM; + Lex->create_info.page_checksum= $3; + } | DELAY_KEY_WRITE_SYM opt_equal ulong_num { Lex->create_info.table_options|= $3 ? HA_OPTION_DELAY_KEY_WRITE : HA_OPTION_NO_DELAY_KEY_WRITE; @@ -4499,13 +4514,11 @@ create_table_option: Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE; Lex->create_info.key_block_size= $3; } - | TRANSACTIONAL_SYM opt_equal ulong_num + | TRANSACTIONAL_SYM opt_equal choice { Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL; - Lex->create_info.transactional= ($3 != 0 ? HA_CHOICE_YES : - HA_CHOICE_NO); + Lex->create_info.transactional= $3; } - ; default_charset: @@ -8379,6 +8392,11 @@ dec_num: | FLOAT_NUM ; +choice: + ulong_num { $$= $1 != 0 ? HA_CHOICE_YES : HA_CHOICE_NO; } + | DEFAULT { $$= HA_CHOICE_UNDEF; } + ; + procedure_clause: /* empty */ | PROCEDURE ident /* Procedure name */ @@ -10575,6 +10593,7 @@ keyword_sp: | ONE_SYM {} | PACK_KEYS_SYM {} | PAGE_SYM {} + | PAGE_CHECKSUM_SYM {} | PARTIAL {} | PARTITIONING_SYM {} | PARTITIONS_SYM {} @@ -10638,6 +10657,7 @@ keyword_sp: | SUPER_SYM {} | SUSPEND_SYM {} | TABLES {} + | TABLE_CHECKSUM_SYM {} | TABLESPACE {} | TEMPORARY {} | TEMPTABLE_SYM {} diff --git a/sql/table.cc b/sql/table.cc index c1d8e3abe94..417cd78fe2e 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -705,7 +705,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if (!head[32]) // New frm file in 3.23 { share->avg_row_length= uint4korr(head+34); - share->transactional= (ha_choice) head[39]; + share->transactional= (ha_choice) (head[39] & 3); + share->page_checksum= (ha_choice) ((head[39] >> 2) & 3); share->row_type= (row_type) head[40]; share->table_charset= get_charset((uint) head[38],MYF(0)); share->null_field_first= 1; @@ -2428,7 +2429,9 @@ File create_frm(THD *thd, const char *name, const char *db, int2store(fileinfo+16,reclength); int4store(fileinfo+18,create_info->max_rows); int4store(fileinfo+22,create_info->min_rows); + /* fileinfo[26] is set in mysql_create_frm() */ fileinfo[27]=2; // Use long pack-fields + /* fileinfo[28 & 29] is set to key_info_length in mysql_create_frm() */ create_info->table_options|=HA_OPTION_LONG_BLOB_PTR; // Use portable blob pointers int2store(fileinfo+30,create_info->table_options); fileinfo[32]=0; // No filename anymore @@ -2436,9 +2439,10 @@ File create_frm(THD *thd, const char *name, const char *db, int4store(fileinfo+34,create_info->avg_row_length); fileinfo[38]= (create_info->default_table_charset ? create_info->default_table_charset->number : 0); - fileinfo[39]= (uchar) create_info->transactional; + fileinfo[39]= (uchar) ((uint) create_info->transactional | + ((uint) create_info->page_checksum << 2)); fileinfo[40]= (uchar) create_info->row_type; - /* Next few bytes were for RAID support */ + /* Next few bytes where for RAID support */ fileinfo[41]= 0; fileinfo[42]= 0; fileinfo[43]= 0; diff --git a/sql/table.h b/sql/table.h index 6554b6ed578..b9c15ea2b6d 100644 --- a/sql/table.h +++ b/sql/table.h @@ -311,6 +311,7 @@ typedef struct st_table_share enum row_type row_type; /* How rows are stored */ enum tmp_table_type tmp_table; enum ha_choice transactional; + enum ha_choice page_checksum; uint ref_count; /* How many TABLE objects uses this */ uint open_count; /* Number of tables in open list */ diff --git a/sql/unireg.cc b/sql/unireg.cc index f9e8e54439a..da52889fb2f 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -284,8 +284,10 @@ bool mysql_create_frm(THD *thd, const char *file_name, my_free(keybuff, MYF(0)); if (opt_sync_frm && !(create_info->options & HA_LEX_CREATE_TMP_TABLE) && - my_sync(file, MYF(MY_WME))) - goto err2; + (my_sync(file, MYF(MY_WME)) || + my_sync_dir_by_file(file_name, MYF(MY_WME)))) + goto err2; + if (my_close(file,MYF(MY_WME))) goto err3; diff --git a/storage/myisam/ft_boolean_search.c b/storage/myisam/ft_boolean_search.c index 15f4e1e1d34..a9551a4b4ec 100644 --- a/storage/myisam/ft_boolean_search.c +++ b/storage/myisam/ft_boolean_search.c @@ -162,7 +162,7 @@ static int FTB_WORD_cmp(my_off_t *v, FTB_WORD *a, FTB_WORD *b) static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word DESC, ndepth DESC */ - int i= mi_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, + int i= ha_compare_text(cs, (uchar*) (*b)->word+1,(*b)->len-1, (uchar*) (*a)->word+1,(*a)->len-1,0,0); if (!i) i=CMP_NUM((*b)->ndepth,(*a)->ndepth); @@ -395,7 +395,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) if (!r && !ftbw->off) { - r= mi_compare_text(ftb->charset, + r= ha_compare_text(ftb->charset, info->lastkey+1, info->lastkey_length-extra-1, (uchar*) ftbw->word+1, @@ -868,7 +868,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, for (a= 0, b= ftb->queue.elements, c= (a+b)/2; b-a>1; c= (a+b)/2) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word+1, ftbw->len-1, (my_bool)(ftbw->flags&FTB_FLAG_TRUNC), 0) > 0) b= c; @@ -878,7 +878,7 @@ static int ftb_find_relevance_add_word(MYSQL_FTPARSER_PARAM *param, for (; c >= 0; c--) { ftbw= ftb->list[c]; - if (mi_compare_text(ftb->charset, (uchar*)word, len, + if (ha_compare_text(ftb->charset, (uchar*)word, len, (uchar*)ftbw->word + 1,ftbw->len - 1, (my_bool)(ftbw->flags & FTB_FLAG_TRUNC), 0)) break; diff --git a/storage/myisam/ft_eval.c b/storage/myisam/ft_eval.c index 7eb78861e5e..de01510fdd7 100644 --- a/storage/myisam/ft_eval.c +++ b/storage/myisam/ft_eval.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) recinfo[0].type=FIELD_SKIP_ENDSPACE; recinfo[0].length=docid_length; recinfo[1].type=FIELD_BLOB; - recinfo[1].length= 4+mi_portable_sizeof_char_ptr; + recinfo[1].length= 4+portable_sizeof_char_ptr; /* Define a key over the first column */ keyinfo[0].seg=keyseg; diff --git a/storage/myisam/ft_nlq_search.c b/storage/myisam/ft_nlq_search.c index 282fa6751d8..b3a2e47a382 100644 --- a/storage/myisam/ft_nlq_search.c +++ b/storage/myisam/ft_nlq_search.c @@ -103,7 +103,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio) { if (keylen && - mi_compare_text(aio->charset,info->lastkey+1, + ha_compare_text(aio->charset,info->lastkey+1, info->lastkey_length-extra-1, keybuff+1,keylen-1,0,0)) break; diff --git a/storage/myisam/ft_parser.c b/storage/myisam/ft_parser.c index df2423aa50f..042a999fffa 100644 --- a/storage/myisam/ft_parser.c +++ b/storage/myisam/ft_parser.c @@ -31,7 +31,7 @@ typedef struct st_my_ft_parser_param static int FT_WORD_cmp(CHARSET_INFO* cs, FT_WORD *w1, FT_WORD *w2) { - return mi_compare_text(cs, (uchar*) w1->pos, w1->len, + return ha_compare_text(cs, (uchar*) w1->pos, w1->len, (uchar*) w2->pos, w2->len, 0, 0); } diff --git a/storage/myisam/ft_stopwords.c b/storage/myisam/ft_stopwords.c index 59866d9a351..9838b15af34 100644 --- a/storage/myisam/ft_stopwords.c +++ b/storage/myisam/ft_stopwords.c @@ -29,7 +29,7 @@ static TREE *stopwords3=NULL; static int FT_STOPWORD_cmp(void* cmp_arg __attribute__((unused)), FT_STOPWORD *w1, FT_STOPWORD *w2) { - return mi_compare_text(default_charset_info, + return ha_compare_text(default_charset_info, (uchar *)w1->pos,w1->len, (uchar *)w2->pos,w2->len,0,0); } diff --git a/storage/myisam/ft_test1.c b/storage/myisam/ft_test1.c index e49c47bb268..b37935a0d7a 100644 --- a/storage/myisam/ft_test1.c +++ b/storage/myisam/ft_test1.c @@ -75,12 +75,12 @@ static int run_test(const char *filename) /* First define 2 columns */ recinfo[0].type=extra_field; - recinfo[0].length= (extra_field == FIELD_BLOB ? 4 + mi_portable_sizeof_char_ptr : + recinfo[0].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr : extra_length); if (extra_field == FIELD_VARCHAR) recinfo[0].length+= HA_VARCHAR_PACKLENGTH(extra_length); recinfo[1].type=key_field; - recinfo[1].length= (key_field == FIELD_BLOB ? 4+mi_portable_sizeof_char_ptr : + recinfo[1].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr : key_length); if (key_field == FIELD_VARCHAR) recinfo[1].length+= HA_VARCHAR_PACKLENGTH(key_length); diff --git a/storage/myisam/ft_update.c b/storage/myisam/ft_update.c index e3e4c62158f..d1548e32870 100644 --- a/storage/myisam/ft_update.c +++ b/storage/myisam/ft_update.c @@ -180,7 +180,7 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const uchar *rec1, const uchar *rec2) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || - mi_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, + ha_compare_text(cs, (uchar*) ftsi1.pos,ftsi1.len, (uchar*) ftsi2.pos,ftsi2.len,0,0))) DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT); } @@ -209,7 +209,7 @@ int _mi_ft_update(MI_INFO *info, uint keynr, uchar *keybuf, error=0; while(old_word->pos && new_word->pos) { - cmp= mi_compare_text(cs, (uchar*) old_word->pos,old_word->len, + cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index ca4c40547ee..f3b18c0630c 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -22,6 +22,7 @@ #include "mysql_priv.h" #include #include +#include #include #include "ha_myisam.h" #include diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index fe6b716877c..7e9334d4cf6 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -737,7 +737,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, { int flag; uint used_length,comp_flag,nod_flag,key_length=0; - uchar key[MI_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos; + uchar key[HA_MAX_POSSIBLE_KEY_BUFF],*temp_buff,*keypos,*old_keypos,*endpos; my_off_t next_page,record; char llbuff[22]; uint diff_pos[2]; @@ -944,7 +944,7 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) uchar *record,*to; char llbuff[22],llbuff2[22],llbuff3[22]; ha_checksum intern_record_checksum; - ha_checksum key_checksum[MI_MAX_POSSIBLE_KEY]; + ha_checksum key_checksum[HA_MAX_POSSIBLE_KEY]; my_bool static_row_size; MI_KEYDEF *keyinfo; MI_BLOCK_INFO block_info; @@ -1211,6 +1211,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) param->glob_crc+= mi_checksum(info,record); link_used+= (block_info.filepos - start_recpos); used+= (pos-start_recpos); + case BLOCK_RECORD: + assert(0); /* Impossible */ } /* switch */ if (! got_error) { @@ -1808,7 +1810,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, char * name) reg2 uint key; reg1 MI_KEYDEF *keyinfo; File new_file; - my_off_t index_pos[MI_MAX_POSSIBLE_KEY]; + my_off_t index_pos[HA_MAX_POSSIBLE_KEY]; uint r_locks,w_locks; int old_lock; MYISAM_SHARE *share=info->s; @@ -1908,7 +1910,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, { uint length,nod_flag,used_length, key_length; uchar *buff,*keypos,*endpos; - uchar key[MI_MAX_POSSIBLE_KEY_BUFF]; + uchar key[HA_MAX_POSSIBLE_KEY_BUFF]; my_off_t new_page_pos,next_page; char llbuff[22]; DBUG_ENTER("sort_one_index"); @@ -3522,8 +3524,10 @@ static int sort_get_next_record(MI_SORT_PARAM *sort_param) mi_checksum(info, sort_param->record)); DBUG_RETURN(0); } + case BLOCK_RECORD: + assert(0); /* Impossible */ } - DBUG_RETURN(1); /* Impossible */ + DBUG_RETURN(1); /* Impossible */ } @@ -3633,6 +3637,8 @@ int sort_write_record(MI_SORT_PARAM *sort_param) sort_param->filepos+=reclength+length; info->s->state.split++; break; + case BLOCK_RECORD: + assert(0); /* Impossible */ } } if (sort_param->master) @@ -3804,7 +3810,7 @@ static int sort_ft_key_write(MI_SORT_PARAM *sort_param, const void *a) } get_key_full_length_rdonly(val_off, ft_buf->lastkey); - if (mi_compare_text(sort_param->seg->charset, + if (ha_compare_text(sort_param->seg->charset, ((uchar *)a)+1,a_len-1, ft_buf->lastkey+1,val_off-1, 0, 0)==0) { diff --git a/storage/myisam/mi_checksum.c b/storage/myisam/mi_checksum.c index 4e87de373bd..1aa56e571e3 100644 --- a/storage/myisam/mi_checksum.c +++ b/storage/myisam/mi_checksum.c @@ -31,9 +31,9 @@ ha_checksum mi_checksum(MI_INFO *info, const uchar *buf) case FIELD_BLOB: { length=_mi_calc_blob_length(rec->length- - mi_portable_sizeof_char_ptr, + portable_sizeof_char_ptr, buf); - memcpy((char*) &pos, buf+rec->length- mi_portable_sizeof_char_ptr, + memcpy((char*) &pos, buf+rec->length- portable_sizeof_char_ptr, sizeof(char*)); break; } diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index 0cac5f08b3b..bc4dcf0bdbb 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -17,6 +17,7 @@ #include "ftdefs.h" #include "sp_defs.h" +#include #if defined(MSDOS) || defined(__WIN__) #ifdef __WIN__ @@ -56,7 +57,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, HA_KEYSEG *keyseg,tmp_keyseg; MI_COLUMNDEF *rec; ulong *rec_per_key_part; - my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; + my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; MI_CREATE_INFO tmp_create_info; DBUG_ENTER("mi_create"); DBUG_PRINT("enter", ("keys: %u columns: %u uniques: %u flags: %u", @@ -116,10 +117,10 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, share.base.blobs++; if (pack_reclength != INT_MAX32) { - if (rec->length == 4+mi_portable_sizeof_char_ptr) + if (rec->length == 4+portable_sizeof_char_ptr) pack_reclength= INT_MAX32; else - pack_reclength+=(1 << ((rec->length-mi_portable_sizeof_char_ptr)*8)); /* Max blob length */ + pack_reclength+=(1 << ((rec->length-portable_sizeof_char_ptr)*8)); /* Max blob length */ } } else if (type == FIELD_SKIP_PRESPACE || diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index cdd70abe9ad..f67eba39ff7 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -901,7 +901,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, else { char *temp_pos; - size_t tmp_length=length-mi_portable_sizeof_char_ptr; + size_t tmp_length=length-portable_sizeof_char_ptr; memcpy((uchar*) to,from,tmp_length); memcpy_fixed(&temp_pos,from+tmp_length,sizeof(char*)); memcpy(to+tmp_length,temp_pos,(size_t) blob->length); @@ -1022,11 +1022,11 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, if (type == FIELD_BLOB) { uint blob_length= - _mi_calc_blob_length(length-mi_portable_sizeof_char_ptr,record); + _mi_calc_blob_length(length-portable_sizeof_char_ptr,record); if (!blob_length && !(flag & bit)) goto err; if (blob_length) - to+=length - mi_portable_sizeof_char_ptr+ blob_length; + to+=length - portable_sizeof_char_ptr+ blob_length; } else if (type == FIELD_SKIP_ZERO) { @@ -1209,7 +1209,7 @@ ulong _mi_rec_unpack(register MI_INFO *info, register uchar *to, uchar *from, } else if (type == FIELD_BLOB) { - uint size_length=rec_length- mi_portable_sizeof_char_ptr; + uint size_length=rec_length- portable_sizeof_char_ptr; ulong blob_length=_mi_calc_blob_length(size_length,from); ulong from_left= (ulong) (from_end - from); if (from_left < size_length || diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index 1b4c79d13de..f0ddc15b325 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -256,7 +256,7 @@ int mi_extra(MI_INFO *info, enum ha_extra_function function, void *extra_arg) share->last_version= 0L; /* Impossible version */ pthread_mutex_unlock(&THR_LOCK_myisam); break; - case HA_EXTRA_PREPARE_FOR_DELETE: + case HA_EXTRA_PREPARE_FOR_DROP: pthread_mutex_lock(&THR_LOCK_myisam); share->last_version= 0L; /* Impossible version */ #ifdef __WIN__REMOVE_OBSOLETE_WORKAROUND diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index b848c822f75..40f55e78bca 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -82,8 +82,8 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) uchar *disk_cache, *disk_pos, *end_pos; MI_INFO info,*m_info,*old_info; MYISAM_SHARE share_buff,*share; - ulong rec_per_key_part[MI_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG]; - my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; + ulong rec_per_key_part[HA_MAX_POSSIBLE_KEY*MI_MAX_KEY_SEG]; + my_off_t key_root[HA_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; ulonglong max_key_file_length, max_data_file_length; DBUG_ENTER("mi_open"); @@ -452,7 +452,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) if (share->rec[i].type == (int) FIELD_BLOB) { share->blobs[j].pack_length= - share->rec[i].length-mi_portable_sizeof_char_ptr;; + share->rec[i].length-portable_sizeof_char_ptr; share->blobs[j].offset=offset; j++; } diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c index 305b7e5532c..98c0dcb4dcc 100644 --- a/storage/myisam/mi_packrec.c +++ b/storage/myisam/mi_packrec.c @@ -1036,7 +1036,7 @@ static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, else { ulong length=get_bits(bit_buff,rec->space_length_bits); - uint pack_length=(uint) (end-to)-mi_portable_sizeof_char_ptr; + uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr; if (bit_buff->blob_pos+length > bit_buff->blob_end) { bit_buff->error=1; diff --git a/storage/myisam/mi_range.c b/storage/myisam/mi_range.c index 932a4abd1b3..dc6dc9d62b7 100644 --- a/storage/myisam/mi_range.c +++ b/storage/myisam/mi_range.c @@ -139,7 +139,7 @@ static ha_rows _mi_record_pos(MI_INFO *info, const uchar *key, key_len=USE_WHOLE_KEY; /* - my_handler.c:mi_compare_text() has a flag 'skip_end_space'. + my_handler.c:ha_compare_text() has a flag 'skip_end_space'. This is set in my_handler.c:ha_key_cmp() in dependence on the compare flags 'nextflag' and the column type. diff --git a/storage/myisam/mi_test1.c b/storage/myisam/mi_test1.c index a68bcbed56c..f218bf4e77f 100644 --- a/storage/myisam/mi_test1.c +++ b/storage/myisam/mi_test1.c @@ -71,12 +71,12 @@ static int run_test(const char *filename) /* First define 2 columns */ recinfo[0].type=FIELD_NORMAL; recinfo[0].length=1; /* For NULL bits */ recinfo[1].type=key_field; - recinfo[1].length= (key_field == FIELD_BLOB ? 4+mi_portable_sizeof_char_ptr : + recinfo[1].length= (key_field == FIELD_BLOB ? 4+portable_sizeof_char_ptr : key_length); if (key_field == FIELD_VARCHAR) recinfo[1].length+= HA_VARCHAR_PACKLENGTH(key_length);; recinfo[2].type=extra_field; - recinfo[2].length= (extra_field == FIELD_BLOB ? 4 + mi_portable_sizeof_char_ptr : 24); + recinfo[2].length= (extra_field == FIELD_BLOB ? 4 + portable_sizeof_char_ptr : 24); if (extra_field == FIELD_VARCHAR) recinfo[2].length+= HA_VARCHAR_PACKLENGTH(recinfo[2].length); if (opt_unique) diff --git a/storage/myisam/mi_test2.c b/storage/myisam/mi_test2.c index 902801b5e6e..23c58638166 100644 --- a/storage/myisam/mi_test2.c +++ b/storage/myisam/mi_test2.c @@ -26,6 +26,7 @@ #endif #include "myisamdef.h" #include +#include #define STANDARD_LENGTH 37 #define MYISAM_KEYS 6 @@ -187,7 +188,7 @@ int main(int argc, char *argv[]) if (use_blob) { recinfo[6].type=FIELD_BLOB; - recinfo[6].length=4+mi_portable_sizeof_char_ptr; + recinfo[6].length=4+portable_sizeof_char_ptr; recinfo[6].null_bit=0; recinfo[6].null_pos=0; } diff --git a/storage/myisam/mi_unique.c b/storage/myisam/mi_unique.c index e490fb683e4..02fcd9289dd 100644 --- a/storage/myisam/mi_unique.c +++ b/storage/myisam/mi_unique.c @@ -212,7 +212,7 @@ int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b, if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { - if (mi_compare_text(keyseg->charset, (uchar *) pos_a, a_length, + if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length, (uchar *) pos_b, b_length, 0, 1)) return 1; } diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c index 70ba7a4588a..d34939fdf1b 100644 --- a/storage/myisam/mi_write.c +++ b/storage/myisam/mi_write.c @@ -545,7 +545,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, get_key_length(alen,a); DBUG_ASSERT(info->ft1_to_ft2==0); if (alen == blen && - mi_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0, 0)==0) + ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0, 0)==0) { /* yup. converting */ info->ft1_to_ft2=(DYNAMIC_ARRAY *) diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c index 567e1057e5d..d335954fe08 100644 --- a/storage/myisam/myisamchk.c +++ b/storage/myisam/myisamchk.c @@ -20,6 +20,7 @@ #include #include #include +#include #ifdef HAVE_SYS_VADVICE_H #include #endif diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index 721d6b9f271..d8cb3b6519f 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -400,13 +400,6 @@ typedef struct st_mi_sort_param /* Functions to store length of space packed keys, VARCHAR or BLOB keys */ -#define store_key_length_inc(key,length) \ -{ if ((length) < 255) \ - { *(key)++=(length); } \ - else \ - { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \ -} - #define store_key_length(key,length) \ { if ((length) < 255) \ { *(key)=(length); } \ diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 37428ddd279..cb00264e1db 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -1008,7 +1008,7 @@ static int get_statistic(PACK_MRG_INFO *mrg,HUFF_COUNTS *huff_counts) /* Calculate pos, end_pos, and max_length for variable length fields. */ if (count->field_type == FIELD_BLOB) { - uint field_length=count->field_length -mi_portable_sizeof_char_ptr; + uint field_length=count->field_length -portable_sizeof_char_ptr; ulong blob_length= _mi_calc_blob_length(field_length, start_pos); memcpy_fixed((char*) &pos, start_pos+field_length,sizeof(char*)); end_pos=pos+blob_length; @@ -2650,7 +2650,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts) case FIELD_BLOB: { ulong blob_length=_mi_calc_blob_length(field_length- - mi_portable_sizeof_char_ptr, + portable_sizeof_char_ptr, start_pos); /* Empty blobs are encoded with a single 1 bit. */ if (!blob_length) @@ -2667,7 +2667,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts) DBUG_PRINT("fields", ("FIELD_BLOB %lu bytes, bits: %2u", blob_length, count->length_bits)); write_bits(blob_length,count->length_bits); - memcpy_fixed(&blob,end_pos-mi_portable_sizeof_char_ptr, + memcpy_fixed(&blob,end_pos-portable_sizeof_char_ptr, sizeof(char*)); blob_end=blob+blob_length; /* Encode the blob bytes. */ diff --git a/storage/myisam/sp_test.c b/storage/myisam/sp_test.c index dee32ba423e..f572c7ab19b 100644 --- a/storage/myisam/sp_test.c +++ b/storage/myisam/sp_test.c @@ -79,7 +79,7 @@ int run_test(const char *filename) /* Define spatial column */ recinfo[1].type=FIELD_BLOB; - recinfo[1].length=4 + mi_portable_sizeof_char_ptr; + recinfo[1].length=4 + portable_sizeof_char_ptr; diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc index 8a914e8a2de..dade3d02e2a 100644 --- a/storage/myisammrg/ha_myisammrg.cc +++ b/storage/myisammrg/ha_myisammrg.cc @@ -390,7 +390,7 @@ int ha_myisammrg::extra(enum ha_extra_function operation) /* As this is just a mapping, we don't have to force the underlying tables to be closed */ if (operation == HA_EXTRA_FORCE_REOPEN || - operation == HA_EXTRA_PREPARE_FOR_DELETE) + operation == HA_EXTRA_PREPARE_FOR_DROP) return 0; return myrg_extra(file,operation,0); } From 32d207ca32a92eb593ed8a8586942b20e5cd4a95 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 15 Oct 2007 18:22:19 +0300 Subject: [PATCH 008/527] Fixes to merge between 5.1-main and 5.1-marvel include/my_atomic.h: To avoid compiler problems on some platforms, static inline should be a macro here. include/my_bit.h: To avoid compiler problems on windows and solaris mysys/my_create.c: To avoid compiler problems on windows. mysys/my_delete.c: To avoid compiler problems on windows. --- include/my_atomic.h | 10 +++++----- include/my_bit.h | 6 ++++-- mysys/my_create.c | 1 + mysys/my_delete.c | 1 + 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/my_atomic.h b/include/my_atomic.h index a1347d26401..ed439e5fe87 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -35,7 +35,7 @@ #ifdef HAVE_INLINE #define make_atomic_add(S) \ -static inline int ## S my_atomic_add ## S( \ +STATIC_INLINE int ## S my_atomic_add ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_add_body(S); \ @@ -43,7 +43,7 @@ static inline int ## S my_atomic_add ## S( \ } #define make_atomic_swap(S) \ -static inline int ## S my_atomic_swap ## S( \ +STATIC_INLINE int ## S my_atomic_swap ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_swap_body(S); \ @@ -51,7 +51,7 @@ static inline int ## S my_atomic_swap ## S( \ } #define make_atomic_cas(S) \ -static inline int my_atomic_cas ## S(int ## S volatile *a, \ +STATIC_INLINE int my_atomic_cas ## S(int ## S volatile *a, \ int ## S *cmp, int ## S set) \ { \ int8 ret; \ @@ -60,7 +60,7 @@ static inline int my_atomic_cas ## S(int ## S volatile *a, \ } #define make_atomic_load(S) \ -static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ +STATIC_INLINE int ## S my_atomic_load ## S(int ## S volatile *a) \ { \ int ## S ret; \ make_atomic_load_body(S); \ @@ -68,7 +68,7 @@ static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ } #define make_atomic_store(S) \ -static inline void my_atomic_store ## S( \ +STATIC_INLINE void my_atomic_store ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_store_body(S); \ diff --git a/include/my_bit.h b/include/my_bit.h index 58e8bb39683..2e464e89049 100644 --- a/include/my_bit.h +++ b/include/my_bit.h @@ -2,6 +2,7 @@ Some useful bit functions */ +C_MODE_START #ifdef HAVE_INLINE extern const char _my_bits_nbits[256]; @@ -97,11 +98,12 @@ STATIC_INLINE uint32 my_reverse_bits(uint32 key) _my_bits_reverse_table[(key>>24) ]; } -#else +#else /* HAVE_INLINE */ extern uint my_bit_log2(ulong value); extern uint32 my_round_up_to_next_power(uint32 v); uint32 my_clear_highest_bit(uint32 v); uint32 my_reverse_bits(uint32 key); extern uint my_count_bits(ulonglong v); extern uint my_count_bits_ushort(ushort v); -#endif +#endif /* HAVE_INLINE */ +C_MODE_END diff --git a/mysys/my_create.c b/mysys/my_create.c index 454ccf6ab7d..7c97ef0201a 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -17,6 +17,7 @@ #include #include "mysys_err.h" #include +#include #if defined(__WIN__) #include #endif diff --git a/mysys/my_delete.c b/mysys/my_delete.c index 14374fd3fa8..6487ab4d6b8 100644 --- a/mysys/my_delete.c +++ b/mysys/my_delete.c @@ -15,6 +15,7 @@ #include "mysys_priv.h" #include "mysys_err.h" +#include int my_delete(const char *name, myf MyFlags) { From 7ee391c4da479cd7fcae64c595afbeca1e8b2d9d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Oct 2007 17:59:16 +0300 Subject: [PATCH 009/527] Fixes to merge between 5.1-main and 5.1-marvel include/my_atomic.h: To avoid compiler problems on some platforms, static inline should be a macro here. include/my_bit.h: To avoid compiler problems on windows and solaris libmysql/CMakeLists.txt: Added missing library on Windows. --- include/my_atomic.h | 10 +++++----- include/my_bit.h | 6 ++++-- libmysql/CMakeLists.txt | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/include/my_atomic.h b/include/my_atomic.h index a1347d26401..ed439e5fe87 100644 --- a/include/my_atomic.h +++ b/include/my_atomic.h @@ -35,7 +35,7 @@ #ifdef HAVE_INLINE #define make_atomic_add(S) \ -static inline int ## S my_atomic_add ## S( \ +STATIC_INLINE int ## S my_atomic_add ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_add_body(S); \ @@ -43,7 +43,7 @@ static inline int ## S my_atomic_add ## S( \ } #define make_atomic_swap(S) \ -static inline int ## S my_atomic_swap ## S( \ +STATIC_INLINE int ## S my_atomic_swap ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_swap_body(S); \ @@ -51,7 +51,7 @@ static inline int ## S my_atomic_swap ## S( \ } #define make_atomic_cas(S) \ -static inline int my_atomic_cas ## S(int ## S volatile *a, \ +STATIC_INLINE int my_atomic_cas ## S(int ## S volatile *a, \ int ## S *cmp, int ## S set) \ { \ int8 ret; \ @@ -60,7 +60,7 @@ static inline int my_atomic_cas ## S(int ## S volatile *a, \ } #define make_atomic_load(S) \ -static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ +STATIC_INLINE int ## S my_atomic_load ## S(int ## S volatile *a) \ { \ int ## S ret; \ make_atomic_load_body(S); \ @@ -68,7 +68,7 @@ static inline int ## S my_atomic_load ## S(int ## S volatile *a) \ } #define make_atomic_store(S) \ -static inline void my_atomic_store ## S( \ +STATIC_INLINE void my_atomic_store ## S( \ int ## S volatile *a, int ## S v) \ { \ make_atomic_store_body(S); \ diff --git a/include/my_bit.h b/include/my_bit.h index 58e8bb39683..2e464e89049 100644 --- a/include/my_bit.h +++ b/include/my_bit.h @@ -2,6 +2,7 @@ Some useful bit functions */ +C_MODE_START #ifdef HAVE_INLINE extern const char _my_bits_nbits[256]; @@ -97,11 +98,12 @@ STATIC_INLINE uint32 my_reverse_bits(uint32 key) _my_bits_reverse_table[(key>>24) ]; } -#else +#else /* HAVE_INLINE */ extern uint my_bit_log2(ulong value); extern uint32 my_round_up_to_next_power(uint32 v); uint32 my_clear_highest_bit(uint32 v); uint32 my_reverse_bits(uint32 key); extern uint my_count_bits(ulonglong v); extern uint my_count_bits_ushort(ushort v); -#endif +#endif /* HAVE_INLINE */ +C_MODE_END diff --git a/libmysql/CMakeLists.txt b/libmysql/CMakeLists.txt index 8471bbbd76c..6094390b2e7 100755 --- a/libmysql/CMakeLists.txt +++ b/libmysql/CMakeLists.txt @@ -98,7 +98,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c ../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c ../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c - ../mysys/my_getsystime.c ${LIB_SOURCES}) + ../mysys/my_getsystime.c ../mysys/my_sync.c ${LIB_SOURCES}) # Need to set USE_TLS for building the DLL, since __declspec(thread) # approach to thread local storage does not work properly in DLLs. From 56e0d38d0bbcf72a13fb7cc1b60ac592792f28bf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Oct 2007 18:18:49 +0200 Subject: [PATCH 010/527] Fix for counting query time for Windows. mysys/my_getsystime.c: Fix for counting query time for Windows. Added parenthesis just to make reading code easier. Fixed some comments. --- mysys/my_getsystime.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 43bb6c08af9..9953f4c389d 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -35,9 +35,9 @@ ulonglong my_getsystime() if (query_performance_frequency) { QueryPerformanceCounter(&t_cnt); - return (t_cnt.QuadPart / query_performance_frequency * 10000000+ - t_cnt.QuadPart % query_performance_frequency * 10000000/ - query_performance_frequency+query_performance_offset); + return ((t_cnt.QuadPart / query_performance_frequency * 10000000) + + (t_cnt.QuadPart % query_performance_frequency * 10000000 / + query_performance_frequency) + query_performance_offset); } return 0; #elif defined(__NETWARE__) @@ -108,7 +108,9 @@ ulonglong my_micro_time() if (query_performance_frequency) { QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - newtime/= (query_performance_frequency * 1000000); + return ((new_time / query_performance_frequency * 10000000) + + (new_time % query_performance_frequency * 10000000 / + query_performance_frequency)); } else newtime= (GetTickCount() * 1000); /* GetTickCount only returns milliseconds */ @@ -117,7 +119,9 @@ ulonglong my_micro_time() return gethrtime()/1000; #else struct timeval t; - /* The following loop is here because gettimeofday may fail on some systems */ + /* + The following loop is here because gettimeofday may fail on some systems + */ while (gettimeofday(&t, NULL) != 0) {} newtime= (ulonglong)t.tv_sec * 1000000 + t.tv_usec; @@ -131,18 +135,18 @@ ulonglong my_micro_time() SYNOPSIS my_micro_time_and_time() - time_arg Will be set to seconds since epoch (00:00:00 UTC, January 1, - 1970) + time_arg Will be set to seconds since epoch (00:00:00 UTC, + January 1, 1970) NOTES This function is to be useful when we need both the time and microtime. - For example in MySQL this is used to get the query time start of a query and - to measure the time of a query (for the slow query log) + For example in MySQL this is used to get the query time start of a query + and to measure the time of a query (for the slow query log) IMPLEMENTATION Value of time is as in time() call. - Value of microtime is same as my_micro_time(), which may be totally unrealated - to time() + Value of microtime is same as my_micro_time(), which may be totally + unrealated to time() RETURN Value in microseconds from some undefined point in time @@ -160,13 +164,13 @@ ulonglong my_micro_time_and_time(time_t *time_arg) newtime/= (query_performance_frequency * 1000000); } else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns milliseconds */ + newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec. */ (void) time(time_arg); return newtime; #elif defined(HAVE_GETHRTIME) /* - Solaris has a very slow time() call. We optimize this by using the very fast - gethrtime() call and only calling time() every 1/2 second + Solaris has a very slow time() call. We optimize this by using the very + fast gethrtime() call and only calling time() every 1/2 second */ static hrtime_t prev_gethrtime= 0; static time_t cur_time= 0; @@ -184,7 +188,9 @@ ulonglong my_micro_time_and_time(time_t *time_arg) return cur_gethrtime/1000; #else struct timeval t; - /* The following loop is here because gettimeofday may fail on some systems */ + /* + The following loop is here because gettimeofday may fail on some systems + */ while (gettimeofday(&t, NULL) != 0) {} *time_arg= t.tv_sec; @@ -203,8 +209,8 @@ ulonglong my_micro_time_and_time(time_t *time_arg) NOTES This function returns the current time. The microtime argument is only used - if my_micro_time() uses a function that can safely be converted to the current - time. + if my_micro_time() uses a function that can safely be converted to the + current time. RETURN current time From 0a06b971f7c964b6bbc2453fc3501fe3b3f37fd1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Oct 2007 21:33:30 +0100 Subject: [PATCH 011/527] Bug#30366 NDB fails to start on OS X, PPC, 64 bit - The errno variable should only be used when the previous socket write failed, it should be regarded as undefined at other times storage/ndb/src/common/util/OutputStream.cpp: Only use "errno" after the attempt to write to the socket has failed --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++++++++ storage/ndb/src/common/util/OutputStream.cpp | 4 +-- 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/src/common/util/OutputStream.cpp b/storage/ndb/src/common/util/OutputStream.cpp index 0943e47e33f..cd619380e5a 100644 --- a/storage/ndb/src/common/util/OutputStream.cpp +++ b/storage/ndb/src/common/util/OutputStream.cpp @@ -62,7 +62,7 @@ SocketOutputStream::print(const char * fmt, ...){ if(ret >= 0) m_timeout_remain-=time; - if(errno==ETIMEDOUT || m_timeout_remain<=0) + if((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0) { m_timedout= true; ret= -1; @@ -84,7 +84,7 @@ SocketOutputStream::println(const char * fmt, ...){ if(ret >= 0) m_timeout_remain-=time; - if (errno==ETIMEDOUT || m_timeout_remain<=0) + if ((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0) { m_timedout= true; ret= -1; From 21c1f460d71e392b905b17c86f8414a62ba284e0 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Oct 2007 11:40:08 +0200 Subject: [PATCH 012/527] Fixed a typo. --- mysys/my_getsystime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 9953f4c389d..759e0d302a7 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -108,8 +108,8 @@ ulonglong my_micro_time() if (query_performance_frequency) { QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - return ((new_time / query_performance_frequency * 10000000) + - (new_time % query_performance_frequency * 10000000 / + return ((newtime / query_performance_frequency * 10000000) + + (newtime % query_performance_frequency * 10000000 / query_performance_frequency)); } else From 2cad3bb8dae2fc4dc8e28ccf6ab5db3e9026b0c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 31 Oct 2007 18:44:31 +0100 Subject: [PATCH 013/527] Backport mysqltests "change_user" command --- client/mysqltest.c | 67 ++++++++++++++++++++++++++++++++++- mysql-test/r/mysqltest.result | 3 ++ mysql-test/t/mysqltest.test | 19 ++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index eae3b05f61a..a0674a5edb6 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -277,7 +277,7 @@ enum enum_commands { Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST, Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP, Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES, - Q_SEND_QUIT, + Q_SEND_QUIT, Q_CHANGE_USER, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -366,6 +366,7 @@ const char *command_names[]= "cat_file", "diff_files", "send_quit", + "change_user", 0 }; @@ -3046,6 +3047,69 @@ void do_send_quit(struct st_command *command) } +/* + SYNOPSIS + do_change_user + command called command + + DESCRIPTION + change_user [], [], [] + - user to change to + - user password + - default database + + Changes the user and causes the database specified by db to become + the default (current) database for the the current connection. + +*/ + +void do_change_user(struct st_command *command) +{ + MYSQL *mysql = &cur_con->mysql; + /* static keyword to make the NetWare compiler happy. */ + static DYNAMIC_STRING ds_user, ds_passwd, ds_db; + const struct command_arg change_user_args[] = { + { "user", ARG_STRING, FALSE, &ds_user, "User to connect as" }, + { "password", ARG_STRING, FALSE, &ds_passwd, "Password used when connecting" }, + { "database", ARG_STRING, FALSE, &ds_db, "Database to select after connect" }, + }; + + DBUG_ENTER("do_change_user"); + + check_command_args(command, command->first_argument, + change_user_args, + sizeof(change_user_args)/sizeof(struct command_arg), + ','); + + if (cur_con->stmt) + { + mysql_stmt_close(cur_con->stmt); + cur_con->stmt= NULL; + } + + if (!ds_user.length) + dynstr_set(&ds_user, mysql->user); + + if (!ds_passwd.length) + dynstr_set(&ds_passwd, mysql->passwd); + + if (!ds_db.length) + dynstr_set(&ds_db, mysql->db); + + DBUG_PRINT("info",("connection: '%s' user: '%s' password: '%s' database: '%s'", + cur_con->name, ds_user.str, ds_passwd.str, ds_db.str)); + + if (mysql_change_user(mysql, ds_user.str, ds_passwd.str, ds_db.str)) + die("change user failed: %s", mysql_error(mysql)); + + dynstr_free(&ds_user); + dynstr_free(&ds_passwd); + dynstr_free(&ds_db); + + DBUG_VOID_RETURN; +} + + /* SYNOPSIS do_perl @@ -6852,6 +6916,7 @@ int main(int argc, char **argv) case Q_APPEND_FILE: do_append_file(command); break; case Q_DIFF_FILES: do_diff_files(command); break; case Q_SEND_QUIT: do_send_quit(command); break; + case Q_CHANGE_USER: do_change_user(command); break; case Q_CAT_FILE: do_cat_file(command); break; case Q_COPY_FILE: do_copy_file(command); break; case Q_CHMOD_FILE: do_chmod_file(command); break; diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index d03e21b1bb0..a7df1a523cf 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -722,4 +722,7 @@ a int(11) YES NULL b varchar(255) YES NULL c datetime YES NULL drop table t1; +mysqltest: At line 1: change user failed: Unknown database 'inexistent' +mysqltest: At line 1: change user failed: Access denied for user 'inexistent'@'localhost' (using password: NO) +mysqltest: At line 1: change user failed: Access denied for user 'root'@'localhost' (using password: YES) End of tests diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index ec188af0244..c5ff9cf924a 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -2083,5 +2083,24 @@ eval $show_statement; drop table t1; +# ---------------------------------------------------------------------------- +# Test change_user command +# ---------------------------------------------------------------------------- + +--error 1 +--exec echo "--change_user root,,inexistent" | $MYSQL_TEST 2>&1 + +--error 1 +--exec echo "--change_user inexistent,,test" | $MYSQL_TEST 2>&1 + +--error 1 +--exec echo "--change_user root,inexistent,test" | $MYSQL_TEST 2>&1 + +--change_user +--change_user root +--change_user root,, +--change_user root,,test + + --echo End of tests From 2a415a2f9d92e1b07eb308a42ea8d84e8da1ec3f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Nov 2007 15:42:19 +0100 Subject: [PATCH 014/527] Bug#31004 mysqltest needs a --mkdir command - Add new mysqltest command "mkdir" and "rmdir" client/CMakeLists.txt: Build mysys/my_mkdir.c with mysqltest client/Makefile.am: Build mysys/my_mkdir.c with mysqltest client/mysqltest.c: Add new mysqltest commands "mkdir" and "rmdir" mysql-test/t/mysqltest.test: Add tests for "mkdir" and ""rmdir" --- client/CMakeLists.txt | 3 +- client/Makefile.am | 3 +- client/mysqltest.c | 68 ++++++++++++++++++++++++++++++++++++- mysql-test/t/mysqltest.test | 22 ++++++++++++ 4 files changed, 93 insertions(+), 3 deletions(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 89675138750..a419da5eabf 100755 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -32,7 +32,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c) TARGET_LINK_LIBRARIES(mysql mysqlclient_notls wsock32) -ADD_EXECUTABLE(mysqltest mysqltest.c ../mysys/my_getsystime.c ../mysys/my_copy.c) +ADD_EXECUTABLE(mysqltest mysqltest.c ../mysys/my_getsystime.c + ../mysys/my_copy.c ../mysys/my_mkdir.c) TARGET_LINK_LIBRARIES(mysqltest mysqlclient_notls regex wsock32) ADD_EXECUTABLE(mysqlcheck mysqlcheck.c) diff --git a/client/Makefile.am b/client/Makefile.am index c7663c7da82..672bb2e0c47 100644 --- a/client/Makefile.am +++ b/client/Makefile.am @@ -34,7 +34,8 @@ mysqladmin_SOURCES = mysqladmin.cc mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS) mysqltest_SOURCES= mysqltest.c \ $(top_srcdir)/mysys/my_getsystime.c \ - $(top_srcdir)/mysys/my_copy.c + $(top_srcdir)/mysys/my_copy.c \ + $(top_srcdir)/mysys/my_mkdir.c mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD) mysqlbinlog_SOURCES = mysqlbinlog.cc \ diff --git a/client/mysqltest.c b/client/mysqltest.c index a0674a5edb6..2104f43f6fb 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -277,7 +277,7 @@ enum enum_commands { Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST, Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP, Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES, - Q_SEND_QUIT, Q_CHANGE_USER, + Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR, Q_UNKNOWN, /* Unknown command. */ Q_COMMENT, /* Comments, ignored. */ @@ -367,6 +367,9 @@ const char *command_names[]= "diff_files", "send_quit", "change_user", + "mkdir", + "rmdir", + 0 }; @@ -2742,6 +2745,67 @@ void do_file_exist(struct st_command *command) } +/* + SYNOPSIS + do_mkdir + command called command + + DESCRIPTION + mkdir + Create the directory +*/ + +void do_mkdir(struct st_command *command) +{ + int error; + static DYNAMIC_STRING ds_dirname; + const struct command_arg mkdir_args[] = { + "dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to create" + }; + DBUG_ENTER("do_mkdir"); + + check_command_args(command, command->first_argument, + mkdir_args, sizeof(mkdir_args)/sizeof(struct command_arg), + ' '); + + DBUG_PRINT("info", ("creating directory: %s", ds_dirname.str)); + error= my_mkdir(ds_dirname.str, 0777, MYF(0)) != 0; + handle_command_error(command, error); + dynstr_free(&ds_dirname); + DBUG_VOID_RETURN; +} + +/* + SYNOPSIS + do_rmdir + command called command + + DESCRIPTION + rmdir + Remove the empty directory +*/ + +void do_rmdir(struct st_command *command) +{ + int error; + static DYNAMIC_STRING ds_dirname; + const struct command_arg rmdir_args[] = { + "dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to remove" + }; + DBUG_ENTER("do_rmdir"); + + check_command_args(command, command->first_argument, + rmdir_args, sizeof(rmdir_args)/sizeof(struct command_arg), + ' '); + + DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str)); + error= rmdir(ds_dirname.str) != 0; + handle_command_error(command, error); + dynstr_free(&ds_dirname); + DBUG_VOID_RETURN; +} + + /* Read characters from line buffer or file. This is needed to allow my_ungetc() to buffer MAX_DELIMITER_LENGTH characters for a file @@ -6911,6 +6975,8 @@ int main(int argc, char **argv) case Q_ECHO: do_echo(command); command_executed++; break; case Q_SYSTEM: do_system(command); break; case Q_REMOVE_FILE: do_remove_file(command); break; + case Q_MKDIR: do_mkdir(command); break; + case Q_RMDIR: do_rmdir(command); break; case Q_FILE_EXIST: do_file_exist(command); break; case Q_WRITE_FILE: do_write_file(command); break; case Q_APPEND_FILE: do_append_file(command); break; diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index c5ff9cf924a..5856bfff036 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -2101,6 +2101,28 @@ drop table t1; --change_user root,, --change_user root,,test +# ---------------------------------------------------------------------------- +# Test mkdir and rmdir command +# ---------------------------------------------------------------------------- + +mkdir $MYSQLTEST_VARDIR/tmp/testdir; +rmdir $MYSQLTEST_VARDIR/tmp/testdir; + +# Directory already exist +mkdir $MYSQLTEST_VARDIR/tmp/testdir; +--error 1 +mkdir $MYSQLTEST_VARDIR/tmp/testdir; + +# Remove dir with file inside +write_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt; +hello +EOF +--error 1 +rmdir $MYSQLTEST_VARDIR/tmp/testdir; + +remove_file $MYSQLTEST_VARDIR/tmp/testdir/file1.txt; +rmdir $MYSQLTEST_VARDIR/tmp/testdir; + --echo End of tests From a574ce21fc627642e555b5d234b966a4e4332e48 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 1 Nov 2007 17:09:49 +0100 Subject: [PATCH 015/527] Bug#31004 mysqltest needs a --mkdir command mysql-test/t/upgrade.test: Remove kludge in upgrade.test --- mysql-test/t/upgrade.test | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mysql-test/t/upgrade.test b/mysql-test/t/upgrade.test index 05f430b087b..ce40ec8ed77 100644 --- a/mysql-test/t/upgrade.test +++ b/mysql-test/t/upgrade.test @@ -1,10 +1,5 @@ -- source include/not_embedded.inc -# Temporary disabled on windows, -# because of --exec mkdir -# TODO: implement Bug#31004 and remove this limitation ---source include/not_windows.inc - --disable_warnings drop database if exists `mysqltest1`; drop database if exists `mysqltest-1`; @@ -75,7 +70,7 @@ create table tabc.t1 (a int); FLUSH TABLES; # Manually make a 5.0 database from the template ---exec mkdir $MYSQLTEST_VARDIR/master-data/a-b-c +--mkdir $MYSQLTEST_VARDIR/master-data/a-b-c --copy_file $MYSQLTEST_VARDIR/master-data/tabc/db.opt $MYSQLTEST_VARDIR/master-data/a-b-c/db.opt --copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.frm $MYSQLTEST_VARDIR/master-data/a-b-c/t1.frm --copy_file $MYSQLTEST_VARDIR/master-data/tabc/t1.MYD $MYSQLTEST_VARDIR/master-data/a-b-c/t1.MYD From 385fbabf12cd5fff9bbd31ca3e57994ea43d41d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Nov 2007 09:27:38 +0100 Subject: [PATCH 016/527] Bug#32044 some of the tests (backup, drop, query_cache, etc) will timeout on Windows libmysqld/examples/CMakeLists.txt: Add definition -DEMBEDDED_LIBRARY to all executables in libmysqld/examples --- libmysqld/examples/CMakeLists.txt | 3 +++ mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/libmysqld/examples/CMakeLists.txt b/libmysqld/examples/CMakeLists.txt index ee129ff2df0..a07d089c757 100644 --- a/libmysqld/examples/CMakeLists.txt +++ b/libmysqld/examples/CMakeLists.txt @@ -23,6 +23,9 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include IF(WIN32) ADD_DEFINITIONS(-DUSE_TLS) ENDIF(WIN32) + +ADD_DEFINITIONS(-DEMBEDDED_LIBRARY) + ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc ../../client/mysql.cc ../../client/readline.cc ../../client/sql_string.cc) diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 9fb3f9a8f422c0f9c2b35739f524c38a170c8b9f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 2 Nov 2007 13:07:14 +0100 Subject: [PATCH 017/527] Bug#28170 replicate-ignore-db=mysql should not ignore mysql.ndb_apply_status - Add test case --- Bug#28170 replicate-ignore-db=mysql should not ignore mysql.ndb_apply_status - Add test case mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result: New BitKeeper file ``mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result'' mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt: New BitKeeper file ``mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt'' mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test: New BitKeeper file ``mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test'' --- mysql-test/r/bdb_notembedded.result | 35 +++++++++++++++++ .../rpl_ndb/r/rpl_ndb_apply_status.result | 20 ++++++++++ .../rpl_ndb/t/rpl_ndb_apply_status-master.opt | 1 + .../suite/rpl_ndb/t/rpl_ndb_apply_status.test | 26 +++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests 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 new file mode 100644 index 00000000000..0fcd361da21 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_apply_status.result @@ -0,0 +1,20 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 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; 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 new file mode 100644 index 00000000000..3f4aff8a321 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status-master.opt @@ -0,0 +1 @@ +--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 new file mode 100644 index 00000000000..cc74acc6490 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_apply_status.test @@ -0,0 +1,26 @@ +-- 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; diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 859b6339b07adb399a2bccc41a1dbf32a98a8973 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Nov 2007 13:25:26 +0200 Subject: [PATCH 018/527] Fixed problem in my_micro_time_and_time(). --- mysys/my_getsystime.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 759e0d302a7..4fdd979f4bb 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -17,6 +17,11 @@ /* thus to get the current time we should use the system function with the highest possible resolution */ +/* + TODO: in functions my_micro_time() and my_micro_time_and_time() there + exists some common code that should be merged into a function. +*/ + #include "mysys_priv.h" #include "my_static.h" @@ -113,7 +118,7 @@ ulonglong my_micro_time() query_performance_frequency)); } else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns milliseconds */ + newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec */ return newtime; #elif defined(HAVE_GETHRTIME) return gethrtime()/1000; @@ -161,7 +166,9 @@ ulonglong my_micro_time_and_time(time_t *time_arg) if (query_performance_frequency) { QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - newtime/= (query_performance_frequency * 1000000); + return ((newtime / query_performance_frequency * 10000000) + + (newtime % query_performance_frequency * 10000000 / + query_performance_frequency)); } else newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec. */ From dc7ee1f3cb213c9169e0fd7939d01b8e3fccf095 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Nov 2007 14:53:25 +0000 Subject: [PATCH 019/527] BUG#29186 Return error to client in the following condition: 1: Create a log file which is larger than 4G in 32-bit host. 2: Create a data file (tablespace) which is larger than 4G in 32-bit host. storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp: Add error code for log file too large storage/ndb/src/kernel/blocks/ERROR_codes.txt: Add error insert code in lgman and tsman storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Add error code definination of lgman and tsman storage/ndb/src/kernel/blocks/lgman.cpp: Return REF when log file more than 4G in 32-bits host storage/ndb/src/kernel/blocks/tsman.cpp: return FER when data file larger than 4G in 32-bits host storage/ndb/src/ndbapi/ndberror.c: Add describe of new errorCode storage/ndb/test/ndbapi/testDict.cpp: Add test case for bug29186 --- mysql-test/r/bdb_notembedded.result | 35 ++++ mysql-test/t/bdb_notembedded.test | 38 ++++ .../kernel/signaldata/CreateFilegroupImpl.hpp | 3 +- storage/ndb/src/kernel/blocks/ERROR_codes.txt | 10 ++ .../ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 6 + storage/ndb/src/kernel/blocks/lgman.cpp | 16 ++ storage/ndb/src/kernel/blocks/tsman.cpp | 16 ++ storage/ndb/src/ndbapi/ndberror.c | 1 + storage/ndb/test/ndbapi/testDict.cpp | 166 ++++++++++++++++++ 9 files changed, 290 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp index 6140e78cc5a..bbd3e818681 100644 --- a/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp +++ b/storage/ndb/include/kernel/signaldata/CreateFilegroupImpl.hpp @@ -163,7 +163,8 @@ struct CreateFileImplRef { InvalidFileMetadata = 1510, OutOfMemory = 1511, FileReadError = 1512, - FilegroupNotOnline = 1513 + FilegroupNotOnline = 1513, + FileSizeTooLarge = 1515 }; Uint32 senderData; diff --git a/storage/ndb/src/kernel/blocks/ERROR_codes.txt b/storage/ndb/src/kernel/blocks/ERROR_codes.txt index acfbf649522..5ed4f5b0663 100644 --- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt +++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt @@ -12,6 +12,8 @@ Next BACKUP 10038 Next DBUTIL 11002 Next DBTUX 12008 Next SUMA 13001 +Next LGMAN 15001 +Next TSMAN 16001 TESTING NODE FAILURE, ARBITRATION --------------------------------- @@ -535,3 +537,11 @@ NDBCNTR: 1000: Crash insertion on SystemError::CopyFragRef 1001: Delay sending NODE_FAILREP (to own node), until error is cleared + +LGMAN: +----- +15000: Fail to create log file + +TSMAN: +----- +16000: Fail to create data file diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index 762d4ea5141..d2d989ce5b9 100644 --- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -8286,6 +8286,12 @@ void Dbdih::execDIHNDBTAMPER(Signal* signal) } else if (tuserpointer < 15000) { jam(); tuserblockref = DBDICT_REF; + } else if (tuserpointer < 16000) { + jam(); + tuserblockref = LGMAN_REF; + } else if (tuserpointer < 17000) { + jam(); + tuserblockref = TSMAN_REF; } else if (tuserpointer < 30000) { /*--------------------------------------------------------------------*/ // Ignore errors in the 20000-range. diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp index 23738717580..b5e3b55dba5 100644 --- a/storage/ndb/src/kernel/blocks/lgman.cpp +++ b/storage/ndb/src/kernel/blocks/lgman.cpp @@ -547,6 +547,22 @@ Lgman::execCREATE_FILE_REQ(Signal* signal) break; } + if(ERROR_INSERTED(15000) || + (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF)) + { + jam(); + if(signal->getNoOfSections()) + releaseSections(signal); + + CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr(); + ref->senderData = senderData; + ref->senderRef = reference(); + ref->errorCode = CreateFileImplRef::FileSizeTooLarge; + sendSignal(senderRef, GSN_CREATE_FILE_REF, signal, + CreateFileImplRef::SignalLength, JBB); + return; + } + new (file_ptr.p) Undofile(req, ptr.i); Local_undofile_list tmp(m_file_pool, ptr.p->m_meta_files); diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 8f61ec0cf7b..62d169a0081 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -523,6 +523,22 @@ Tsman::execCREATE_FILE_REQ(Signal* signal){ break; } + if(ERROR_INSERTED(16000) || + (sizeof(void*) == 4 && req->file_size_hi & 0xFFFFFFFF)) + { + jam(); + if(signal->getNoOfSections()) + releaseSections(signal); + + CreateFileImplRef* ref= (CreateFileImplRef*)signal->getDataPtr(); + ref->senderData = senderData; + ref->senderRef = reference(); + ref->errorCode = CreateFileImplRef::FileSizeTooLarge; + sendSignal(senderRef, GSN_CREATE_FILE_REF, signal, + CreateFileImplRef::SignalLength, JBB); + return; + } + new (file_ptr.p) Datafile(req); Local_datafile_list tmp(m_file_pool, ptr.p->m_meta_files); tmp.add(file_ptr); diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index a0417e5b118..d1b77152b00 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -426,6 +426,7 @@ ErrorBundle ErrorCodes[] = { { 1512, DMEC, SE, "File read error" }, { 1513, DMEC, IE, "Filegroup not online" }, { 1514, DMEC, SE, "Currently there is a limit of one logfile group" }, + { 1515, DMEC, SE, "Currently there is a 4G limit of one undo/data-file in 32-bit host" }, { 773, DMEC, SE, "Out of string memory, please modify StringMemory config parameter" }, { 775, DMEC, SE, "Create file is not supported when Diskless=1" }, diff --git a/storage/ndb/test/ndbapi/testDict.cpp b/storage/ndb/test/ndbapi/testDict.cpp index 13c071f968e..22b795a8dba 100644 --- a/storage/ndb/test/ndbapi/testDict.cpp +++ b/storage/ndb/test/ndbapi/testDict.cpp @@ -2357,6 +2357,168 @@ runBug24631(NDBT_Context* ctx, NDBT_Step* step) return NDBT_OK; } +int +runBug29186(NDBT_Context* ctx, NDBT_Step* step) +{ + int lgError = 15000; + int tsError = 16000; + int res; + char lgname[256]; + char ufname[256]; + char tsname[256]; + char dfname[256]; + + NdbRestarter restarter; + + if (restarter.getNumDbNodes() < 2){ + ctx->stopTest(); + return NDBT_OK; + } + + Ndb* pNdb = GETNDB(step); + NdbDictionary::Dictionary* pDict = pNdb->getDictionary(); + NdbDictionary::Dictionary::List list; + + if (pDict->listObjects(list) == -1) + return NDBT_FAILED; + + // 1.create logfile group + const char * lgfound = 0; + + for (Uint32 i = 0; icreateLogfileGroup(lg) != 0) + { + g_err << "Failed to create logfilegroup:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + } + else + { + BaseString::snprintf(lgname, sizeof(lgname), "%s", lgfound); + } + + if(restarter.waitClusterStarted(60)){ + g_err << "waitClusterStarted failed"<< endl; + return NDBT_FAILED; + } + + if(restarter.insertErrorInAllNodes(lgError) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + + g_info << "error inserted" << endl; + g_info << "waiting some before add log file" << endl; + g_info << "starting create log file group" << endl; + + NdbDictionary::Undofile uf; + BaseString::snprintf(ufname, sizeof(ufname), "%s-%u", lgname, rand()); + uf.setPath(ufname); + uf.setSize(2*1024*1024); + uf.setLogfileGroup(lgname); + + if(pDict->createUndofile(uf) == 0) + { + g_err << "Create log file group should fail on error_insertion " << lgError << endl; + return NDBT_FAILED; + } + + //clear lg error + if(restarter.insertErrorInAllNodes(15099) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + NdbSleep_SecSleep(5); + + //lg error has been cleared, so we can add undo file + if(pDict->createUndofile(uf) != 0) + { + g_err << "Failed to create undofile:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + if(restarter.waitClusterStarted(60)){ + g_err << "waitClusterStarted failed"<< endl; + return NDBT_FAILED; + } + + if(restarter.insertErrorInAllNodes(tsError) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + g_info << "error inserted" << endl; + g_info << "waiting some before create table space" << endl; + g_info << "starting create table space" << endl; + + //r = runCreateTablespace(ctx, step); + BaseString::snprintf(tsname, sizeof(tsname), "TS-%u", rand()); + BaseString::snprintf(dfname, sizeof(dfname), "%s-%u-1.dat", tsname, rand()); + + NdbDictionary::Tablespace ts; + ts.setName(tsname); + ts.setExtentSize(1024*1024); + ts.setDefaultLogfileGroup(lgname); + + if(pDict->createTablespace(ts) != 0) + { + g_err << "Failed to create tablespace:" + << endl << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + NdbDictionary::Datafile df; + df.setPath(dfname); + df.setSize(1*1024*1024); + df.setTablespace(tsname); + + if(pDict->createDatafile(df) == 0) + { + g_err << "Create table space should fail on error_insertion " << tsError << endl; + return NDBT_FAILED; + } + //Clear the inserted error + if(restarter.insertErrorInAllNodes(16099) != 0){ + g_err << "failed to set error insert"<< endl; + return NDBT_FAILED; + } + NdbSleep_SecSleep(5); + + if (pDict->dropTablespace(pDict->getTablespace(tsname)) != 0) + { + g_err << "Failed to drop tablespace: " << pDict->getNdbError() << endl; + return NDBT_FAILED; + } + + if (lgfound == 0) + { + if (pDict->dropLogfileGroup(pDict->getLogfileGroup(lgname)) != 0) + return NDBT_FAILED; + } + + return NDBT_OK; +} + struct RandSchemaOp { struct Obj @@ -2864,6 +3026,10 @@ TESTCASE("Bug24631", ""){ INITIALIZER(runBug24631); } +TESTCASE("Bug29186", + ""){ + INITIALIZER(runBug29186); +} NDBT_TESTSUITE_END(testDict); int main(int argc, const char** argv){ From 59d0d43e3af46b88a78606f83218fb871c2a87f0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 14 Nov 2007 17:10:01 +0200 Subject: [PATCH 020/527] Fixed a wrong regexp in mysql-test-run. --- mysql-test/lib/mtr_report.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 7cd6c1362b3..141da89cb90 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -312,9 +312,9 @@ sub mtr_report_stats ($) { /Slave SQL:.*(?:Error_code: \d+|Query:.*)/ or /Sort aborted/ or /Time-out in NDB/ or - /Warning:\s+One can only use the --user.*root/ or - /Warning:\s+Setting lower_case_table_names=2/ or - /Warning:\s+Table:.* on (delete|rename)/ or + /One can only use the --user.*root/ or + /Setting lower_case_table_names=2/ or + /Table:.* on (delete|rename)/ or /You have an error in your SQL syntax/ or /deprecated/ or /description of time zone/ or From 37b188cdffee19d77769ba99a719d436633f6e5b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Nov 2007 19:19:55 +0800 Subject: [PATCH 021/527] BUG#30417 Cluster misbehaves on auto-inc w/o PK. storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp: The check that how many auto_increment columns in table are there should be preceded creating the table. If there are more than one auto_increment columns, the table shouldn't be created. mysql-test/suite/ndb/r/ndb_autoinc.result: Adding test case for auto_increment isn't the default primary key columns mysql-test/suite/ndb/t/ndb_autoinc.test: Adding test case for auto_increment isn't the default primary key columns --- mysql-test/suite/ndb/r/ndb_autoinc.result | 38 +++++++++++++++++ mysql-test/suite/ndb/t/ndb_autoinc.test | 43 ++++++++++++++++++++ storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp | 31 +++++++------- 3 files changed, 97 insertions(+), 15 deletions(-) create mode 100644 mysql-test/suite/ndb/r/ndb_autoinc.result create mode 100644 mysql-test/suite/ndb/t/ndb_autoinc.test diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result new file mode 100644 index 00000000000..7ba5ab8def7 --- /dev/null +++ b/mysql-test/suite/ndb/r/ndb_autoinc.result @@ -0,0 +1,38 @@ +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; +ERROR HY000: Can't create table 'test.#sql-7b9e_3' (errno: 4335) +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/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test new file mode 100644 index 00000000000..3e7ba7bdf6a --- /dev/null +++ b/mysql-test/suite/ndb/t/ndb_autoinc.test @@ -0,0 +1,43 @@ +-- 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; + +--error 1005 +ALTER TABLE t3 +ENGINE NDBCLUSTER; + +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/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp index ab6d90ad59e..953cfffd73b 100644 --- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -2340,6 +2340,22 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t) { DBUG_ENTER("NdbDictionaryImpl::createTable"); + + bool autoIncrement = false; + Uint64 initialValue = 0; + for (Uint32 i = 0; i < t.m_columns.size(); i++) { + const NdbColumnImpl* c = t.m_columns[i]; + assert(c != NULL); + if (c->m_autoIncrement) { + if (autoIncrement) { + m_error.code = 4335; + DBUG_RETURN(-1); + } + autoIncrement = true; + initialValue = c->m_autoIncrementInitialValue; + } + } + // if the new name has not been set, use the copied name if (t.m_newExternalName.empty()) { @@ -2377,21 +2393,6 @@ NdbDictionaryImpl::createTable(NdbTableImpl &t) // auto-increment - use "t" because initial value is not in DICT { - bool autoIncrement = false; - Uint64 initialValue = 0; - for (Uint32 i = 0; i < t.m_columns.size(); i++) { - const NdbColumnImpl* c = t.m_columns[i]; - assert(c != NULL); - if (c->m_autoIncrement) { - if (autoIncrement) { - m_error.code = 4335; - delete t2; - DBUG_RETURN(-1); - } - autoIncrement = true; - initialValue = c->m_autoIncrementInitialValue; - } - } if (autoIncrement) { // XXX unlikely race condition - t.m_id may no longer be same table // the tuple id range is not used on input From 93af2d9dc144f87ee6cb09e738a417d88f591d8c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Nov 2007 09:56:04 +0800 Subject: [PATCH 022/527] BUG#31245 Stress test fails on NDB:"Unknow prepared statement handler" mysql-test/suite/stress/t/ddl_ndb.test: The default connection should be "default connection". If there is no this statement added, the default connection is server1. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++ mysql-test/suite/stress/t/ddl_ndb.test | 2 ++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/suite/stress/t/ddl_ndb.test b/mysql-test/suite/stress/t/ddl_ndb.test index 7eb45da8739..1e0a3680f8a 100644 --- a/mysql-test/suite/stress/t/ddl_ndb.test +++ b/mysql-test/suite/stress/t/ddl_ndb.test @@ -10,6 +10,8 @@ # Storage engine to be used in CREATE TABLE --source include/have_ndb.inc +connection default; + let $engine_type= NDB; diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests From 224837d1e08b61e5d8849d4bcd5180ec8dee3f33 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Dec 2007 16:43:44 +0100 Subject: [PATCH 023/527] Remove disabling of ctype_big5, bug#26711 has nothing to do with it --- mysql-test/t/disabled.def | 2 -- 1 file changed, 2 deletions(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index a39de913659..ab50548499f 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -12,6 +12,4 @@ user_limits : Bug#23921 random failure of user_limits.test concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences -ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper - federated_transactions : Bug#29523 Transactions do not work From 510bda4bed61e3fc96249e693532874e21b1f274 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Dec 2007 17:40:42 +0400 Subject: [PATCH 024/527] BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is silently ignored When symbolic links are disabled by command line option or NO_DIR_IN_CREATE sql mode, CREATE TABLE silently ignores DATA/INDEX DIRECTORY options. With this fix a warning is issued when symbolic links are disabled. mysql-test/r/symlink.result: A test case for BUG#25677. mysql-test/t/symlink.test: A test case for BUG#25677. sql/sql_parse.cc: Moved handling of situation when mysqld is compiled without HAVE_READLINK to mysql_create_table_no_lock(). sql/sql_table.cc: Issue a warning in case DATA/INDEX DIRECTORY is specified and: - server is compiled without HAVE_READLINK; - using symbolic links is disabled by command line option; - using symbolic links is disabled by NO_DIR_IN_CREATE sql mode. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/r/symlink.result | 8 ++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ mysql-test/t/symlink.test | 12 +++++++++ sql/sql_parse.cc | 10 +------- sql/sql_table.cc | 12 ++++++++- 6 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 4eece9d5b5a..7599d80588a 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -162,3 +162,11 @@ DROP DATABASE db1; DROP DATABASE db2; USE test; End of 5.0 tests +SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; +CREATE TABLE t1(a INT) DATA DIRECTORY='MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='MYSQLTEST_VARDIR/tmp'; +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +DROP TABLE t1; +SET @@SQL_MODE=@OLD_SQL_MODE; +End of 5.1 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index f339b29c83a..eaad45d7d5d 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -226,3 +226,15 @@ USE test; --echo End of 5.0 tests + +# +# BUG#25677 - With --skip-symbolic-links option on, DATA DIRECTORY clause is +# silently ignored +# +SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE='NO_DIR_IN_CREATE'; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +DROP TABLE t1; +SET @@SQL_MODE=@OLD_SQL_MODE; + +--echo End of 5.1 tests diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8ed658df90d..e5f96a96a00 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2237,15 +2237,7 @@ mysql_execute_command(THD *thd) /* Might have been updated in create_table_precheck */ create_info.alias= create_table->alias; -#ifndef HAVE_READLINK - if (create_info.data_file_name) - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "DATA DIRECTORY option ignored"); - if (create_info.index_file_name) - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, - "INDEX DIRECTORY option ignored"); - create_info.data_file_name= create_info.index_file_name= NULL; -#else +#ifdef HAVE_READLINK /* Fix names if symlinked tables */ if (append_file_to_dir(thd, &create_info.data_file_name, create_table->table_name) || diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 91acd8d20a3..4236028c9d8 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3437,8 +3437,18 @@ bool mysql_create_table_no_lock(THD *thd, thd->proc_info="creating table"; create_info->table_existed= 0; // Mark that table is created - if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) +#ifdef HAVE_READLINK + if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) +#endif + { + if (create_info->data_file_name) + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, + "DATA DIRECTORY option ignored"); + if (create_info->index_file_name) + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, + "INDEX DIRECTORY option ignored"); create_info->data_file_name= create_info->index_file_name= 0; + } create_info->table_options=db_options; path[path_length - reg_ext_length]= '\0'; // Remove .frm extension From c9b46d56eb0304e6d9d58545ddb6a192eebbb795 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Dec 2007 17:16:59 +0400 Subject: [PATCH 025/527] BUG#26978 - s->z_err not assigned a value? azio didn't handle situation when my_read() returns error. Added handling of situation when my_read() returns error. No test case for this fix. storage/archive/azio.c: Added handling of situation when my_read() returns error. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ storage/archive/azio.c | 10 ++++++-- 3 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/archive/azio.c b/storage/archive/azio.c index cada6c57918..59fbe2182ee 100644 --- a/storage/archive/azio.c +++ b/storage/archive/azio.c @@ -225,11 +225,17 @@ int get_byte(s) if (s->stream.avail_in == 0) { errno = 0; - s->stream.avail_in = my_read(s->file, (uchar *)s->inbuf, AZ_BUFSIZE_READ, MYF(0)); + s->stream.avail_in= (uInt) my_read(s->file, (uchar *)s->inbuf, + AZ_BUFSIZE_READ, MYF(0)); if (s->stream.avail_in == 0) { s->z_eof = 1; - /* if (ferror(s->file)) s->z_err = Z_ERRNO; */ + return EOF; + } + else if (s->stream.avail_in == (uInt) -1) + { + s->z_eof= 1; + s->z_err= Z_ERRNO; return EOF; } s->stream.next_in = s->inbuf; From 6c4500517dc32805efcef75e478eb1c0f7e34284 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 13:43:48 +0100 Subject: [PATCH 026/527] Bug #33237 NDB_MGM 'eat' 99% cpu utilization --- mysql-test/r/bdb_notembedded.result | 35 ---------------------- mysql-test/t/bdb_notembedded.test | 38 ------------------------ ndb/src/mgmclient/CommandInterpreter.cpp | 17 +++++++---- 3 files changed, 11 insertions(+), 79 deletions(-) delete mode 100644 mysql-test/r/bdb_notembedded.result delete mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result deleted file mode 100644 index 14cb5fad915..00000000000 --- a/mysql-test/r/bdb_notembedded.result +++ /dev/null @@ -1,35 +0,0 @@ -set autocommit=1; -reset master; -create table bug16206 (a int); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 -f n Query 1 n use `test`; create table bug16206 (a int) -f n Query 1 n use `test`; insert into bug16206 values(1) -f n Query 1 n use `test`; insert into bug16206 values(2) -drop table bug16206; -reset master; -create table bug16206 (a int) engine= bdb; -insert into bug16206 values(0); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; -insert into bug16206 values(3); -show binlog events; -Log_name Pos Event_type Server_id End_log_pos Info -f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 -f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb -f n Query 1 n use `test`; insert into bug16206 values(0) -f n Query 1 n use `test`; insert into bug16206 values(1) -f n Query 1 n use `test`; BEGIN -f n Query 1 n use `test`; insert into bug16206 values(2) -f n Query 1 n use `test`; COMMIT -f n Query 1 n use `test`; insert into bug16206 values(3) -drop table bug16206; -set autocommit=0; -End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test deleted file mode 100644 index 24e64ebbfb2..00000000000 --- a/mysql-test/t/bdb_notembedded.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/not_embedded.inc --- source include/have_bdb.inc - -# -# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode -# -set autocommit=1; - -let $VERSION=`select version()`; - -reset master; -create table bug16206 (a int); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; ---replace_result $VERSION VERSION ---replace_column 1 f 2 n 5 n -show binlog events; -drop table bug16206; - -reset master; -create table bug16206 (a int) engine= bdb; -insert into bug16206 values(0); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; -insert into bug16206 values(3); ---replace_result $VERSION VERSION ---replace_column 1 f 2 n 5 n -show binlog events; -drop table bug16206; - -set autocommit=0; - - ---echo End of 5.0 tests diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 1036461d404..b72f7b12f9b 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -921,10 +921,14 @@ event_thread_run(void* p) { do_event_thread= 1; do { - if (ndb_logevent_get_next(log_handle, &log_event, 2000) <= 0) - continue; - Guard g(printmutex); - printLogEvent(&log_event); + int res= ndb_logevent_get_next(log_handle, &log_event, 2000); + if (res > 0) + { + Guard g(printmutex); + printLogEvent(&log_event); + } + else if (res < 0) + break; } while(do_event_thread); ndb_mgm_destroy_logevent_handle(&log_handle); } @@ -2722,8 +2726,9 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) { int count = 0; int retry = 0; + int res; do { - if (ndb_logevent_get_next(log_handle, &log_event, 60000) > 0) + if ((res= ndb_logevent_get_next(log_handle, &log_event, 60000)) > 0) { int print = 0; switch (log_event.type) { @@ -2753,7 +2758,7 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) { retry++; } - } while(count < 2 && retry < 3); + } while(res >= 0 && count < 2 && retry < 3); if (retry >= 3) ndbout << "get backup event failed for " << retry << " times" << endl; From 647fe5b3a12324918ebb1e75ff5619eec137efed Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 17:05:27 +0400 Subject: [PATCH 027/527] BUG#22708 - Error message doesn't refer to storage engine unsupported When openning a table with unsupported (disabled or not compiled) storage engine, confusing error message is returned. Return better error message when we're attempting to open a table that uses unsupported engine. sql/table.cc: Return better error message when we're attempting to open a table that uses unsupported engine. --- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++++++++++++++ sql/table.cc | 41 +++++++++++++++++------------ 3 files changed, 97 insertions(+), 17 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/table.cc b/sql/table.cc index c3ddb809b9e..493a940fd2e 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -886,26 +886,31 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, ha_legacy_type(share->db_type()))); } #ifdef WITH_PARTITION_STORAGE_ENGINE - else + else if (str_db_type_length == 9 && + !strncmp((char *) next_chunk + 2, "partition", 9)) { - LEX_STRING pname= { C_STRING_WITH_LEN( "partition" ) }; - if (str_db_type_length == pname.length && - !strncmp((char *) next_chunk + 2, pname.str, pname.length)) - { - /* - Use partition handler - tmp_plugin is locked with a local lock. - we unlock the old value of share->db_plugin before - replacing it with a globally locked version of tmp_plugin - */ - plugin_unlock(NULL, share->db_plugin); - share->db_plugin= ha_lock_engine(NULL, partition_hton); - DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)", - str_db_type_length, next_chunk + 2, - ha_legacy_type(share->db_type()))); - } + /* + Use partition handler + tmp_plugin is locked with a local lock. + we unlock the old value of share->db_plugin before + replacing it with a globally locked version of tmp_plugin + */ + plugin_unlock(NULL, share->db_plugin); + share->db_plugin= ha_lock_engine(NULL, partition_hton); + DBUG_PRINT("info", ("setting dbtype to '%.*s' (%d)", + str_db_type_length, next_chunk + 2, + ha_legacy_type(share->db_type()))); } #endif + else if (!tmp_plugin) + { + /* purecov: begin inspected */ + error= 8; + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), name.str); + my_free(buff, MYF(0)); + goto err; + /* purecov: end */ + } next_chunk+= str_db_type_length + 2; } if (next_chunk + 5 < buff_end) @@ -2188,6 +2193,8 @@ void open_table_error(TABLE_SHARE *share, int error, int db_errno, int errarg) "of MySQL and cannot be read", MYF(0), buff); break; + case 8: + break; default: /* Better wrong error than none */ case 4: strxmov(buff, share->normalized_path.str, reg_ext, NullS); From 763c1132c3a2b6352cd199ad17e1a121672c5740 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Dec 2007 15:21:37 +0200 Subject: [PATCH 028/527] Bug #31326: No compile check of order of initializations fixed -Wreorder warnings BUILD/SETUP.sh: Bug #31326: enabled the -Wreorder warnings sql/rpl_mi.cc: Bug #31326: fixed -Wreorder warnings storage/heap/ha_heap.cc: Bug #31326: fixed -Wreorder warnings storage/ndb/src/kernel/blocks/backup/Backup.hpp: Bug #31326: fixed -Wreorder warnings storage/ndb/src/kernel/blocks/pgman.cpp: Bug #31326: fixed -Wreorder warnings --- BUILD/SETUP.sh | 6 ++- mysql-test/r/bdb_notembedded.result | 35 +++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++ sql/rpl_mi.cc | 4 +- storage/heap/ha_heap.cc | 4 +- .../ndb/src/kernel/blocks/backup/Backup.hpp | 3 +- storage/ndb/src/kernel/blocks/pgman.cpp | 4 +- 7 files changed, 85 insertions(+), 9 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh index e940f7a3371..ef8aefca710 100755 --- a/BUILD/SETUP.sh +++ b/BUILD/SETUP.sh @@ -100,8 +100,10 @@ if [ "x$warning_mode" != "xpedantic" ]; then # C warnings c_warnings="$warnings -Wunused-parameter" # C++ warnings - cxx_warnings="$warnings -Woverloaded-virtual -Wsign-promo -Wreorder" - cxx_warnings="$warnings -Wctor-dtor-privacy -Wnon-virtual-dtor" + cxx_warnings="$warnings" +# cxx_warnings="$cxx_warnings -Woverloaded-virtual -Wsign-promo" + cxx_warnings="$cxx_warnings -Wreorder" + cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor" # Added unless --with-debug=full debug_extra_cflags="-O1 -Wuninitialized" else diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index 1165164fd88..5e46837e948 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -29,9 +29,9 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, Master_info::Master_info() :Slave_reporting_capability("I/O"), - ssl(0), fd(-1), io_thd(0), inited(0), + ssl(0), ssl_verify_server_cert(0), fd(-1), io_thd(0), inited(0), abort_slave(0),slave_running(0), - ssl_verify_server_cert(0), slave_run_id(0) + slave_run_id(0) { host[0] = 0; user[0] = 0; password[0] = 0; ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0; diff --git a/storage/heap/ha_heap.cc b/storage/heap/ha_heap.cc index 601d4612dda..be2914adac4 100644 --- a/storage/heap/ha_heap.cc +++ b/storage/heap/ha_heap.cc @@ -61,8 +61,8 @@ static handler *heap_create_handler(handlerton *hton, *****************************************************************************/ ha_heap::ha_heap(handlerton *hton, TABLE_SHARE *table_arg) - :handler(hton, table_arg), file(0), records_changed(0), internal_table(0), - key_stat_version(0) + :handler(hton, table_arg), file(0), records_changed(0), key_stat_version(0), + internal_table(0) {} diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.hpp b/storage/ndb/src/kernel/blocks/backup/Backup.hpp index 3fd9b2967fd..a84462cd900 100644 --- a/storage/ndb/src/kernel/blocks/backup/Backup.hpp +++ b/storage/ndb/src/kernel/blocks/backup/Backup.hpp @@ -425,8 +425,9 @@ public: ArrayPool & trp) : slaveState(b, validSlaveTransitions, validSlaveTransitionsCount,1) , tables(tp), triggers(trp), files(bp) - , masterData(b), backup(b) , ctlFilePtr(RNIL), logFilePtr(RNIL), dataFilePtr(RNIL) + , masterData(b), backup(b) + { } diff --git a/storage/ndb/src/kernel/blocks/pgman.cpp b/storage/ndb/src/kernel/blocks/pgman.cpp index aa1f04c720c..21295944eab 100644 --- a/storage/ndb/src/kernel/blocks/pgman.cpp +++ b/storage/ndb/src/kernel/blocks/pgman.cpp @@ -259,14 +259,14 @@ Pgman::execCONTINUEB(Signal* signal) // page entry Pgman::Page_entry::Page_entry(Uint32 file_no, Uint32 page_no) : - m_state(0), m_file_no(file_no), + m_state(0), m_page_no(page_no), m_real_page_i(RNIL), - m_copy_page_i(RNIL), m_lsn(0), m_last_lcp(0), m_dirty_count(0), + m_copy_page_i(RNIL), m_busy_count(0), m_requests() { From 1f92b717b12d7fe9c12e5ebda9c625266722507a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2007 11:54:19 +0100 Subject: [PATCH 029/527] search for clone several step in the path name --- mysql-test/mysql-test-run.pl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 18633d095b0..6d133c4c435 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -409,13 +409,20 @@ sub main () { { # use default and add any extra_suites as defined $opt_suites= $opt_suites_default; - my $ddd= basename(dirname($glob_mysql_test_dir)); - foreach my $extra_suite (@extra_suites) + my $ccc= dirname($glob_mysql_test_dir); + my $found= 0; + while (!$found and !($ccc eq "/") and !($ccc eq "")) { - if ($extra_suite->[0] eq "$ddd") + my $ddd= basename($ccc); + foreach my $extra_suite (@extra_suites) { - $opt_suites= "$extra_suite->[1],$opt_suites"; + if ($extra_suite->[0] eq "$ddd") + { + $opt_suites= "$extra_suite->[1],$opt_suites"; + $found= 1; + } } + $ccc= dirname($ccc); } } From 53f762abfd26e432477016f00cd984e2c6c9e2d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2007 12:29:50 +0100 Subject: [PATCH 030/527] Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Inserting strings with a common prefix into a table with characterset UCS2 corrupted the table. An efficient search method was used, which compares end space with ASCII blank. This doesn't work for character sets like UCS2, which do not encode blank like ASCII does. Use the less efficient search method _mi_seq_search() for charsets with mbminlen > 1. myisam/mi_open.c: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Use _mi_seq_search() for charsets with mbminlen > 1. mysql-test/r/myisam.result: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Added test result. mysql-test/t/myisam.test: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Added test. --- myisam/mi_open.c | 11 ++++++++++- mysql-test/r/myisam.result | 10 ++++++++++ mysql-test/t/myisam.test | 13 +++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index ec169ac8785..5314d6a9a6c 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -791,8 +791,17 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo) keyinfo->get_key= _mi_get_pack_key; if (keyinfo->seg[0].flag & HA_PACK_KEY) { /* Prefix compression */ + /* + _mi_prefix_search() compares end-space against ASCII blank (' '). + It cannot be used for character sets, that do not encode the + blank character like ASCII does. UCS2 is an example. All + character sets with a fixed width > 1 or a mimimum width > 1 + cannot represent blank like ASCII does. In these cases we have + to use _mi_seq_search() for the search. + */ if (!keyinfo->seg->charset || use_strnxfrm(keyinfo->seg->charset) || - (keyinfo->seg->flag & HA_NULL_PART)) + (keyinfo->seg->flag & HA_NULL_PART) || + (keyinfo->seg->charset->mbminlen > 1)) keyinfo->bin_search=_mi_seq_search; else keyinfo->bin_search=_mi_prefix_search; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 56933f45fbf..4ff7441c02e 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1839,4 +1839,14 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, +KEY(c1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('marshall\'s'); +INSERT INTO t1 VALUES ('marsh'); +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index 80c7a92c12f..b182c35514c 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1193,4 +1193,17 @@ SET @@myisam_repair_threads=1; CHECK TABLE t1 EXTENDED; DROP TABLE t1; +# +# Bug#32705 - myisam corruption: Key in wrong position +# at page 1024 with ucs2_bin +# +CREATE TABLE t1 ( + c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, + KEY(c1) + ) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('marshall\'s'); +INSERT INTO t1 VALUES ('marsh'); +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; + --echo End of 5.0 tests From c7dc182db9e7295224f6ca9b0238969962d78375 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Dec 2007 13:40:35 +0100 Subject: [PATCH 031/527] Bug #33061: ORDER BY DESC becomes ASC in NDB partition pruning to one partition When partition pruning resulted in an ordered index scan spanning only one partition, any descending flag for the scan was wrongly discarded, turning ORDER BY DESC into ORDER BY ASC, and similar problems. Fixed by correctly passing descending flag in SCAN_TABREQ signal sent to data nodes. mysql-test/suite/ndb/r/ndb_partition_key.result: Test case. mysql-test/suite/ndb/r/ndb_partition_range.result: Test case. mysql-test/suite/ndb/t/ndb_partition_key.test: Test case. mysql-test/suite/ndb/t/ndb_partition_range.test: Test case. storage/ndb/src/ndbapi/NdbScanOperation.cpp: Even if ordered scan not requested (no need to merge-sorts scans of each partition), we still need to honor the descending flag. --- .../suite/ndb/r/ndb_partition_key.result | 17 ++++++++ .../suite/ndb/r/ndb_partition_range.result | 8 ++++ mysql-test/suite/ndb/t/ndb_partition_key.test | 4 ++ .../suite/ndb/t/ndb_partition_range.test | 5 +++ storage/ndb/src/ndbapi/NdbScanOperation.cpp | 42 ++++++++++++------- 5 files changed, 61 insertions(+), 15 deletions(-) diff --git a/mysql-test/suite/ndb/r/ndb_partition_key.result b/mysql-test/suite/ndb/r/ndb_partition_key.result index 60e96ce03b6..d87b59d6c0e 100644 --- a/mysql-test/suite/ndb/r/ndb_partition_key.result +++ b/mysql-test/suite/ndb/r/ndb_partition_key.result @@ -38,6 +38,23 @@ a b c 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) diff --git a/mysql-test/suite/ndb/r/ndb_partition_range.result b/mysql-test/suite/ndb/r/ndb_partition_range.result index 0c717ed55e9..198898879df 100644 --- a/mysql-test/suite/ndb/r/ndb_partition_range.result +++ b/mysql-test/suite/ndb/r/ndb_partition_range.result @@ -46,6 +46,14 @@ 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, diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test index 78e2c9d15c2..df351ea42c7 100644 --- a/mysql-test/suite/ndb/t/ndb_partition_key.test +++ b/mysql-test/suite/ndb/t/ndb_partition_key.test @@ -38,6 +38,10 @@ insert into t1 values 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; # diff --git a/mysql-test/suite/ndb/t/ndb_partition_range.test b/mysql-test/suite/ndb/t/ndb_partition_range.test index 7952ba502d2..778e552c6d8 100644 --- a/mysql-test/suite/ndb/t/ndb_partition_range.test +++ b/mysql-test/suite/ndb/t/ndb_partition_range.test @@ -48,6 +48,11 @@ 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; # diff --git a/storage/ndb/src/ndbapi/NdbScanOperation.cpp b/storage/ndb/src/ndbapi/NdbScanOperation.cpp index afbec070ac8..96a3ce4332e 100644 --- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp @@ -1340,29 +1340,41 @@ NdbIndexScanOperation::readTuples(LockMode lm, if(insertATTRINFO(word) == -1) res = -1; } - if(!res && order_by){ - m_ordered = true; + if (!res) + { + /** + * Note that it is valid to have order_desc true and order_by false. + * + * This means that there will be no merge sort among partitions, but + * each partition will still be returned in descending sort order. + * + * This is useful eg. if it is known that the scan spans only one + * partition. + */ if (order_desc) { m_descending = true; ScanTabReq * req = CAST_PTR(ScanTabReq, theSCAN_TABREQ->getDataPtrSend()); ScanTabReq::setDescendingFlag(req->requestInfo, true); } - Uint32 cnt = m_accessTable->getNoOfColumns() - 1; - m_sort_columns = cnt; // -1 for NDB$NODE - m_current_api_receiver = m_sent_receivers_count; - m_api_receivers_count = m_sent_receivers_count; + if (order_by) { + m_ordered = true; + Uint32 cnt = m_accessTable->getNoOfColumns() - 1; + m_sort_columns = cnt; // -1 for NDB$NODE + m_current_api_receiver = m_sent_receivers_count; + m_api_receivers_count = m_sent_receivers_count; - m_sort_columns = cnt; - for(Uint32 i = 0; im_index->m_columns[i]; - const NdbColumnImpl* col = m_currentTable->getColumn(key->m_keyInfoPos); - NdbRecAttr* tmp = NdbScanOperation::getValue_impl(col, (char*)-1); - UintPtr newVal = UintPtr(tmp); - theTupleKeyDefined[i][0] = FAKE_PTR; - theTupleKeyDefined[i][1] = (newVal & 0xFFFFFFFF); + m_sort_columns = cnt; + for(Uint32 i = 0; im_index->m_columns[i]; + const NdbColumnImpl* col = m_currentTable->getColumn(key->m_keyInfoPos); + NdbRecAttr* tmp = NdbScanOperation::getValue_impl(col, (char*)-1); + UintPtr newVal = UintPtr(tmp); + theTupleKeyDefined[i][0] = FAKE_PTR; + theTupleKeyDefined[i][1] = (newVal & 0xFFFFFFFF); #if (SIZEOF_CHARP == 8) - theTupleKeyDefined[i][2] = (newVal >> 32); + theTupleKeyDefined[i][2] = (newVal >> 32); #endif + } } } m_this_bound_start = 0; From 46359f4d3059c96425883f2737a333149070522d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Dec 2007 10:13:13 +0200 Subject: [PATCH 032/527] Mutex protection added for loading plugins. (BUG#33345) sql/sql_plugin.cc: Mutex protection added for loading plugins. --- sql/sql_plugin.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index ef4c63381e2..401e544d4e4 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1421,6 +1421,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, #endif case ';': name.str[name.length]= '\0'; + pthread_mutex_lock(&LOCK_plugin); if (str != &dl) // load all plugins in named module { dl= name; @@ -1444,6 +1445,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) goto error; } + pthread_mutex_unlock(&LOCK_plugin); name.length= dl.length= 0; dl.str= NULL; name.str= p= buffer; str= &name; @@ -1463,6 +1465,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, } DBUG_RETURN(FALSE); error: + pthread_mutex_unlock(&LOCK_plugin); sql_print_error("Couldn't load plugin named '%s' with soname '%s'.", name.str, dl.str); DBUG_RETURN(TRUE); From 2b688f62013ed5c47eb6ea90bd312223b9d7c406 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Dec 2007 12:58:56 +0100 Subject: [PATCH 033/527] Improve error message when file fails to open --- client/mysqltest.c | 8 ++++---- mysql-test/r/mysqltest.result | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index eae3b05f61a..d938a09df07 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -2203,7 +2203,7 @@ int open_file(const char *name) if (!(cur_file->file = my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) { cur_file--; - die("Could not open file '%s'", buff); + die("Could not open '%s' for reading", buff); } cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno=1; @@ -5112,7 +5112,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), DBUG_ASSERT(cur_file == file_stack && cur_file->file == 0); if (!(cur_file->file= my_fopen(buff, O_RDONLY | FILE_BINARY, MYF(0)))) - die("Could not open %s: errno = %d", buff, errno); + die("Could not open '%s' for reading: errno = %d", buff, errno); cur_file->file_name= my_strdup(buff, MYF(MY_FAE)); cur_file->lineno= 1; break; @@ -5225,9 +5225,9 @@ void str_to_file2(const char *fname, char *str, int size, my_bool append) flags|= O_TRUNC; if ((fd= my_open(buff, flags, MYF(MY_WME | MY_FFNF))) < 0) - die("Could not open %s: errno = %d", buff, errno); + die("Could not open '%s' for writing: errno = %d", buff, errno); if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR) - die("Could not find end of file %s: errno = %d", buff, errno); + die("Could not find end of file '%s': errno = %d", buff, errno); if (my_write(fd, (byte*)str, size, MYF(MY_WME|MY_FNABP))) die("write failed"); my_close(fd, MYF(0)); diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index d03e21b1bb0..031e4a30db9 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -293,7 +293,7 @@ var5 from query that returns no row failing query in let mysqltest: At line 1: Error running query 'failing query': 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing query' at line 1 mysqltest: At line 1: Missing required argument 'filename' to command 'source' -mysqltest: At line 1: Could not open file './non_existingFile' +mysqltest: At line 1: Could not open './non_existingFile' for reading mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql": At line 1: Source directives are nesting too deep mysqltest: In included file "MYSQLTEST_VARDIR/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You 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 1 @@ -443,7 +443,7 @@ ERROR 3D000: No database selected Output from mysqltest-x.inc Output from mysqltest-x.inc Output from mysqltest-x.inc -mysqltest: Could not open ./non_existing_file.inc: errno = 2 +mysqltest: Could not open './non_existing_file.inc' for reading: errno = 2 failing_statement; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing_statement' at line 1 failing_statement; From 92e31e96a2c6f2f98e77217534fcc3712e7b4fa5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Dec 2007 13:24:43 +0000 Subject: [PATCH 034/527] Add new pkgplugindir handling to seperate plugins from libraries, and allow override for binary distributions. Extend mysql_config to print compiled-in plugin location for third-party plugins to use. Resolves bug#31736. libmysqld/Makefile.am: Use pkgplugindir. plugin/daemon_example/Makefile.am: Use pkgplugindir. plugin/fulltext/Makefile.am: Use pkgplugindir. scripts/Makefile.am: Add pkgplugindir. scripts/make_binary_distribution.sh: Add pkgplugindir. scripts/mysql_config.sh: Add pkgplugindir. sql/Makefile.am: Use pkgplugindir. sql/mysqld.cc: Use PLUGINDIR, derived from pkgplugindir, instead of LIBDIR for plugins. sql/unireg.h: Use PLUGINDIR instead of LIBDIR, and define to be the default setting of pkgplugindir. storage/innobase/Makefile.am: Use pkgplugindir. storage/archive/Makefile.am: Use pkgplugindir. storage/blackhole/Makefile.am: Use pkgplugindir. storage/example/Makefile.am: Use pkgplugindir. storage/federated/Makefile.am: Use pkgplugindir. --- libmysqld/Makefile.am | 3 ++- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ plugin/daemon_example/Makefile.am | 5 ++-- plugin/fulltext/Makefile.am | 6 ++--- scripts/Makefile.am | 3 +++ scripts/make_binary_distribution.sh | 3 +++ scripts/mysql_config.sh | 4 +++ sql/Makefile.am | 3 ++- sql/mysqld.cc | 2 +- sql/unireg.h | 4 +-- storage/archive/Makefile.am | 5 ++-- storage/blackhole/Makefile.am | 5 ++-- storage/example/Makefile.am | 5 ++-- storage/federated/Makefile.am | 5 ++-- storage/innobase/Makefile.am | 3 ++- 16 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index c0784447216..117f8752629 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -21,13 +21,14 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(libdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin EXTRA_DIST = libmysqld.def CMakeLists.txt DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ - -DLIBDIR="\"$(MYSQLLIBdir)\"" + -DPLUGINDIR="\"$(pkgplugindir)\"" INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_builddir)/sql -I$(top_srcdir)/sql \ -I$(top_srcdir)/sql/examples \ diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am index 92b1ab040fb..4256fecd873 100644 --- a/plugin/daemon_example/Makefile.am +++ b/plugin/daemon_example/Makefile.am @@ -18,14 +18,15 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ -I$(srcdir) @ZLIB_INCLUDES@ EXTRA_LTLIBRARIES = libdaemon_example.la -pkglib_LTLIBRARIES = @plugin_daemon_example_shared_target@ -libdaemon_example_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_daemon_example_shared_target@ +libdaemon_example_la_LDFLAGS = -module -rpath $(pkgplugindir) libdaemon_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN libdaemon_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN libdaemon_example_la_SOURCES = daemon_example.cc diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am index ec033018a00..2b9d075bae0 100644 --- a/plugin/fulltext/Makefile.am +++ b/plugin/fulltext/Makefile.am @@ -15,12 +15,12 @@ #Makefile.am example for a plugin -pkglibdir=$(libdir)/mysql +pkgplugindir=$(libdir)/@PACKAGE@/plugin INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include #noinst_LTLIBRARIES= mypluglib.la -pkglib_LTLIBRARIES= mypluglib.la +pkgplugin_LTLIBRARIES= mypluglib.la mypluglib_la_SOURCES= plugin_example.c -mypluglib_la_LDFLAGS= -module -rpath $(pkglibdir) +mypluglib_la_LDFLAGS= -module -rpath $(pkgplugindir) mypluglib_la_CFLAGS= -DMYSQL_DYNAMIC_PLUGIN # Don't update the files from bitkeeper diff --git a/scripts/Makefile.am b/scripts/Makefile.am index fc4359fd872..8669e075959 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -90,6 +90,8 @@ CLEANFILES = @server_scripts@ \ mysql_tableinfo \ mysqld_multi +pkgplugindir = $(libdir)/@PACKAGE@/plugin + # Default same as 'pkgdatadir', but we can override it pkgsuppdir = $(datadir)/@PACKAGE@ @@ -137,6 +139,7 @@ SUFFIXES = .sh -e 's!@''pkglibdir''@!$(pkglibdir)!g' \ -e 's!@''pkgincludedir''@!$(pkgincludedir)!g' \ -e 's!@''pkgdatadir''@!$(pkgdatadir)!g' \ + -e 's!@''pkgplugindir''@!$(pkgplugindir)!g' \ -e 's!@''pkgsuppdir''@!$(pkgsuppdir)!g' \ -e 's!@''sysconfdir''@!$(sysconfdir)!g' \ -e 's!@''mandir''@!$(mandir)!g' \ diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 8d3e2133a45..88397052815 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -30,6 +30,8 @@ # "pkglibdir" is set to the same as "libdir" # "pkgincludedir" is set to the same as "includedir" # "pkgdatadir" is set to the same as "datadir" +# "pkgplugindir" is set to "@prefix@/lib/plugin", +# normally "$libdir/plugin" # "pkgsuppdir" is set to "@prefix@/support-files", # normally the same as "datadir" # @@ -204,6 +206,7 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; then pkglibdir=@pkglibdir@ \ pkgincludedir=@pkgincludedir@ \ pkgdatadir=@pkgdatadir@ \ + pkgplugindir=@pkgplugindir@ \ pkgsuppdir=@pkgsuppdir@ \ mandir=@mandir@ \ infodir=@infodir@ diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index ae58655ed0f..110c425ea5b 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -87,6 +87,8 @@ pkglibdir='@pkglibdir@' pkglibdir_rel=`echo $pkglibdir | sed -e "s;^$basedir/;;"` fix_path pkglibdir $pkglibdir_rel lib/mysql lib +plugindir='@pkgplugindir@' + pkgincludedir='@pkgincludedir@' fix_path pkgincludedir include/mysql include @@ -147,6 +149,7 @@ Options: --include [$include] --libs [$libs] --libs_r [$libs_r] + --plugindir [$plugindir] --socket [$socket] --port [$port] --version [$version] @@ -163,6 +166,7 @@ while test $# -gt 0; do --include) echo "$include" ;; --libs) echo "$libs" ;; --libs_r) echo "$libs_r" ;; + --plugindir) echo "$plugindir" ;; --socket) echo "$socket" ;; --port) echo "$port" ;; --version) echo "$version" ;; diff --git a/sql/Makefile.am b/sql/Makefile.am index 0081417d492..02a92dee7a7 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = @ZLIB_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes) @@ -136,7 +137,7 @@ DEFS = -DMYSQL_SERVER \ -DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \ -DSHAREDIR="\"$(MYSQLSHAREdir)\"" \ - -DLIBDIR="\"$(MYSQLLIBdir)\"" \ + -DPLUGINDIR="\"$(pkgplugindir)\"" \ @DEFS@ BUILT_MAINT_SRC = sql_yacc.cc sql_yacc.h diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 2f264482d94..48e486f8d02 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -8032,7 +8032,7 @@ static void fix_paths(void) (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home); (void) my_load_path(pidfile_name,pidfile_name,mysql_real_data_home); (void) my_load_path(opt_plugin_dir, opt_plugin_dir_ptr ? opt_plugin_dir_ptr : - get_relative_path(LIBDIR), mysql_home); + get_relative_path(PLUGINDIR), mysql_home); opt_plugin_dir_ptr= opt_plugin_dir; char *sharedir=get_relative_path(SHAREDIR); diff --git a/sql/unireg.h b/sql/unireg.h index f0b4a88c7f8..d6a72e6589f 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -35,8 +35,8 @@ #ifndef SHAREDIR #define SHAREDIR "share/" #endif -#ifndef LIBDIR -#define LIBDIR "lib/" +#ifndef PLUGINDIR +#define PLUGINDIR "lib/plugin" #endif #define ER(X) errmesg[(X) - ER_ERROR_FIRST] diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am index 4920527e0e9..55f2380ec31 100644 --- a/storage/archive/Makefile.am +++ b/storage/archive/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -33,8 +34,8 @@ noinst_HEADERS = ha_archive.h azlib.h noinst_PROGRAMS = archive_test archive_reader EXTRA_LTLIBRARIES = ha_archive.la -pkglib_LTLIBRARIES = @plugin_archive_shared_target@ -ha_archive_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_archive_shared_target@ +ha_archive_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_archive_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_archive_la_SOURCES = ha_archive.cc azio.c diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am index 9dd533dd4fa..9810dff5866 100644 --- a/storage/blackhole/Makefile.am +++ b/storage/blackhole/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_blackhole.h EXTRA_LTLIBRARIES = ha_blackhole.la -pkglib_LTLIBRARIES = @plugin_blackhole_shared_target@ -ha_blackhole_la_LDFLAGS=-module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_blackhole_shared_target@ +ha_blackhole_la_LDFLAGS=-module -rpath $(pkgplugindir) ha_blackhole_la_CXXFLAGS=$(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_CFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_blackhole_la_SOURCES=ha_blackhole.cc diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am index 73016d24b57..bf121e70f29 100644 --- a/storage/example/Makefile.am +++ b/storage/example/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/libdir INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_example.h EXTRA_LTLIBRARIES = ha_example.la -pkglib_LTLIBRARIES = @plugin_example_shared_target@ -ha_example_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_example_shared_target@ +ha_example_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_example_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_example_la_SOURCES = ha_example.cc diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index 287b2cb1696..d2ee37c402a 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ @@ -32,8 +33,8 @@ DEFS = @DEFS@ noinst_HEADERS = ha_federated.h EXTRA_LTLIBRARIES = ha_federated.la -pkglib_LTLIBRARIES = @plugin_federated_shared_target@ -ha_federated_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +pkgplugin_LTLIBRARIES = @plugin_federated_shared_target@ +ha_federated_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_federated_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_federated_la_SOURCES = ha_federated.cc diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index 30e056d68fb..8a5ce6d8a4b 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -19,6 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) +pkgplugindir = $(libdir)/@PACKAGE@/libdir INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/storage/innobase/include \ @@ -160,7 +161,7 @@ libinnobase_a_CFLAGS = $(AM_CFLAGS) EXTRA_LTLIBRARIES = ha_innodb.la pkglib_LTLIBRARIES = @plugin_innobase_shared_target@ -ha_innodb_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) +ha_innodb_la_LDFLAGS = -module -rpath $(pkgplugindir) ha_innodb_la_CXXFLAGS= $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_innodb_la_CFLAGS = $(AM_CFLAGS) -DMYSQL_DYNAMIC_PLUGIN ha_innodb_la_SOURCES = $(libinnobase_a_SOURCES) From d687f1b45dde8e7d1e8a49836242054e5721e17b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Dec 2007 18:42:49 +0100 Subject: [PATCH 035/527] Bug #33375 all_set corrupted on table object - make sure to reset the read and write sets --- sql/handler.cc | 2 ++ sql/log_event.cc | 20 ++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index a4926071598..3b1667b0d59 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3710,6 +3710,8 @@ int handler::ha_reset() DBUG_ASSERT(inited == NONE); /* Free cache used by filesort */ free_io_cache(table); + /* reset the bitmaps to point to defaults */ + table->default_column_bitmaps(); DBUG_RETURN(reset()); } diff --git a/sql/log_event.cc b/sql/log_event.cc index 00e3dc89f6b..182b270ab4d 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -7837,7 +7837,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) { DBUG_PRINT("info",("ha_index_init returns error %d",error)); table->file->print_error(error, MYF(0)); - DBUG_RETURN(error); + goto err; } /* Fill key data for the row */ @@ -7870,7 +7870,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) DBUG_PRINT("info",("no record matching the key found in the table")); table->file->print_error(error, MYF(0)); table->file->ha_index_end(); - DBUG_RETURN(error); + goto err; } /* @@ -7898,7 +7898,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) if (table->key_info->flags & HA_NOSAME) { table->file->ha_index_end(); - DBUG_RETURN(0); + goto ok; } /* @@ -7930,7 +7930,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) DBUG_PRINT("info",("no record matching the given row found")); table->file->print_error(error, MYF(0)); table->file->ha_index_end(); - DBUG_RETURN(error); + goto err; } } @@ -7951,7 +7951,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) DBUG_PRINT("info",("error initializing table scan" " (ha_rnd_init returns %d)",error)); table->file->print_error(error, MYF(0)); - DBUG_RETURN(error); + goto err; } /* Continue until we find the right record or have made a full loop */ @@ -7975,7 +7975,7 @@ int Rows_log_event::find_row(const Relay_log_info *rli) " (rnd_next returns %d)",error)); table->file->print_error(error, MYF(0)); table->file->ha_rnd_end(); - DBUG_RETURN(error); + goto err; } } while (restart_count < 2 && record_compare(table)); @@ -7995,10 +7995,14 @@ int Rows_log_event::find_row(const Relay_log_info *rli) table->file->ha_rnd_end(); DBUG_ASSERT(error == HA_ERR_END_OF_FILE || error == HA_ERR_RECORD_DELETED || error == 0); - DBUG_RETURN(error); + goto err; } - +ok: + table->default_column_bitmaps(); DBUG_RETURN(0); +err: + table->default_column_bitmaps(); + DBUG_RETURN(error); } #endif From ecaeffade1e224a4e52096ca21659c19a8312c4c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Dec 2007 21:06:52 +0100 Subject: [PATCH 036/527] DbUtil.cpp: Rename: storage/ndb/test/src/dbutil.cpp -> storage/ndb/test/src/DbUtil.cpp DbUtil.hpp, DbUtil.cpp: Many changes based off a review from Magnus DbUtil.hpp: Rename: storage/ndb/test/include/dbutil.hpp -> storage/ndb/test/include/DbUtil.hpp storage/ndb/test/src/DbUtil.cpp: Many changes based off a review from Magnus storage/ndb/test/include/DbUtil.hpp: Many changes based off a review from Magnus --- mysql-test/r/bdb_notembedded.result | 35 ++++ mysql-test/t/bdb_notembedded.test | 38 ++++ storage/ndb/test/include/DbUtil.hpp | 129 +++++++++++++ storage/ndb/test/include/dbutil.hpp | 97 ---------- storage/ndb/test/src/DbUtil.cpp | 285 ++++++++++++++++++++++++++++ storage/ndb/test/src/dbutil.cpp | 176 ----------------- 6 files changed, 487 insertions(+), 273 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test create mode 100755 storage/ndb/test/include/DbUtil.hpp delete mode 100755 storage/ndb/test/include/dbutil.hpp create mode 100755 storage/ndb/test/src/DbUtil.cpp delete mode 100755 storage/ndb/test/src/dbutil.cpp diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp new file mode 100755 index 00000000000..9c885531ee7 --- /dev/null +++ b/storage/ndb/test/include/DbUtil.hpp @@ -0,0 +1,129 @@ +/* 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 */ + +// dbutil.h: interface for the database utilities class. +// Supplies a database to the test application + +#ifndef DBUTIL_HPP +#define DBUTIL_HPP + +#if _MSC_VER > 1000 +#pragma once +#endif // _MSC_VER > 1000 +#include +#include +#include +#include +//include "rand.h" +#include +#include "BaseString.hpp" +#include "NDBT.hpp" + +//#define DEBUG +#define DIE_UNLESS(expr) \ + ((void) ((expr) ? 0 : (Die(__FILE__, __LINE__, #expr), 0))) +#define DIE(expr) \ + Die(__FILE__, __LINE__, #expr) +#define myerror(msg) printError(msg) +#define mysterror(stmt, msg) printStError(stmt, msg) +#define CheckStmt(stmt) \ +{ \ +if ( stmt == 0) \ + myerror(NULL); \ +DIE_UNLESS(stmt != 0); \ +} + +#define check_execute(stmt, r) \ +{ \ +if (r) \ + mysterror(stmt, NULL); \ +DIE_UNLESS(r == 0);\ +} + +#define DBU_TRUE 1 +#define DBU_FALSE 0 +#define DBU_FAILED 1 +#define DBU_OK 0 + +class DbUtil +{ +public: + + /* Deprecated, see DbUtil(dbname, suffix) */ + DbUtil(const char * databaseName); + DbUtil(const char* dbname, const char* suffix = NULL); + ~DbUtil(); + + /* Deprecated, see connect() */ + void databaseLogin(const char * system, + const char * usr, + const char * password, + unsigned int portIn, + const char * sockIn, + bool transactional); + + const char * getDbName() {return m_dbname.c_str();}; + const char * getUser() {return m_user.c_str();}; + const char * getPassword(){return m_pass.c_str();}; + const char * getHost() {return m_host.c_str();}; + const char * getSocket() {return m_socket.c_str();}; + const char * getServerType(){return mysql_get_server_info(mysql);}; + const char * getError(); + + MYSQL * getMysql(){return mysql;}; + MYSQL_STMT * STDCALL mysqlSimplePrepare(const char *query); + + void databaseLogout(); + void mysqlCloseStmHandle(MYSQL_STMT *my_stmt); + + int connect(); + int select_DB(); + int doQuery(char * stm); + int doQuery(const char * stm); + int getErrorNumber(); + + unsigned long selectCountTable(const char * table); + +private: + + bool m_connected; + + BaseString m_host; // Computer to connect to + BaseString m_user; // MySQL User + BaseString m_pass; // MySQL User Password + BaseString m_dbname; // Database to use + BaseString m_socket; // MySQL Server Unix Socket + BaseString default_file; + BaseString default_group; + + unsigned int m_port; // MySQL Server port + + MYSQL * mysql; + MYSQL_RES * m_result; + MYSQL_ROW m_row; + + void setDbName(const char * name){m_dbname.assign(name);}; + void setUser(const char * user_name){m_user.assign(user_name);}; + void setPassword(const char * password){m_pass.assign(password);}; + void setHost(const char * system){m_host.assign(system);}; + void setPort(unsigned int portIn){m_port=portIn;}; + void setSocket(const char * sockIn){m_socket.assign(sockIn);}; + void printError(const char *msg); + void printStError(MYSQL_STMT *stmt, const char *msg); + void die(const char *file, int line, const char *expr); // stop program + +}; +#endif + diff --git a/storage/ndb/test/include/dbutil.hpp b/storage/ndb/test/include/dbutil.hpp deleted file mode 100755 index 2b36965715f..00000000000 --- a/storage/ndb/test/include/dbutil.hpp +++ /dev/null @@ -1,97 +0,0 @@ -// dbutil.h: interface for the database utilities class. -////////////////////////////////////////////////////////////////////// -// Supplies a database to the test application -////////////////////////////////////////////////////////////////////// - -#ifndef DBUTIL_HPP -#define DBUTIL_HPP - -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 -#include -#include -#include -#include -//include "rand.h" -#include - -//#define DEBUG -#define DIE_UNLESS(expr) \ - ((void) ((expr) ? 0 : (Die(__FILE__, __LINE__, #expr), 0))) -#define DIE(expr) \ - Die(__FILE__, __LINE__, #expr) -#define myerror(msg) PrintError(msg) -#define mysterror(stmt, msg) PrintStError(stmt, msg) -#define CheckStmt(stmt) \ -{ \ -if ( stmt == 0) \ - myerror(NULL); \ -DIE_UNLESS(stmt != 0); \ -} - -#define check_execute(stmt, r) \ -{ \ -if (r) \ - mysterror(stmt, NULL); \ -DIE_UNLESS(r == 0);\ -} - -#define TRUE 1 -#define FALSE 0 - - -class dbutil -{ -public: - - dbutil(const char * databaseName); - ~dbutil(); - - void DatabaseLogin(const char * system, - const char * usr, - const char * password, - unsigned int portIn, - const char * sockIn, - bool transactional); - char * GetDbName(){return dbs;}; - char * GetUser(){return user;}; - char * GetPassword(){return pass;}; - char * GetHost(){return host;}; - char * GetSocket(){return socket;}; - const char * GetServerType(){return mysql_get_server_info(myDbHandel);}; - MYSQL* GetDbHandel(){return myDbHandel;}; - MYSQL_STMT *STDCALL MysqlSimplePrepare(const char *query); - int Select_DB(); - int Do_Query(char * stm); - const char * GetError(); - int GetErrorNumber(); - unsigned long SelectCountTable(const char * table); - -private: - - //Connect variables - char * databaseName; //hold results file name - char host[256]; // Computer to connect to - char user[256]; // MySQL User - char pass[256]; // MySQL User Password - char dbs[256]; // Database to use (TPCB) - unsigned int port; // MySQL Server port - char socket[256]; // MySQL Server Unix Socket - MYSQL *myDbHandel; - - void DatabaseLogout(); - - void SetDbName(const char * name){strcpy((char *)dbs, name);}; - void SetUser(const char * userName){strcpy((char *)user, userName);}; - void SetPassword(const char * password){strcpy((char *)pass,password);}; - void SetHost(const char * system){strcpy((char*)host, system);}; - void SetPort(unsigned int portIn){port=portIn;}; - void SetSocket(const char * sockIn){strcpy((char *)socket, sockIn);}; - void PrintError(const char *msg); - void PrintStError(MYSQL_STMT *stmt, const char *msg); - void Die(const char *file, int line, const char *expr); // stop program - -}; -#endif - diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp new file mode 100755 index 00000000000..0611fb2ad4a --- /dev/null +++ b/storage/ndb/test/src/DbUtil.cpp @@ -0,0 +1,285 @@ +/* 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 */ + +/* DbUtil.cpp: implementation of the database utilities class.*/ + +#include "DbUtil.hpp" + +/* Constructors */ + +DbUtil::DbUtil(const char * dbname) +{ + m_port = 0; + m_connected = false; + this->setDbName(dbname); +} + +DbUtil::DbUtil(const char * dbname, const char* suffix) +{ + this->setDbName(dbname); + m_connected = false; + + const char* env= getenv("MYSQL_HOME"); + if (env && strlen(env)) + { + default_file.assfmt("%s/my.cnf", env); + } + + if (suffix != NULL){ + default_group.assfmt("client%s", suffix); + } + else { + default_group.assign("client.1.master"); + } + + ndbout << "default_file: " << default_file.c_str() << endl; + ndbout << "default_group: " << default_group.c_str() << endl; +} + +/* Destructor*/ + +DbUtil::~DbUtil() +{ + this->databaseLogout(); +} + +/* Database Login */ + +void +DbUtil::databaseLogin(const char* system, const char* usr, + const char* password, unsigned int portIn, + const char* sockIn, bool transactional) +{ + if (!(mysql = mysql_init(NULL))) + { + myerror("DB Login-> mysql_init() failed"); + exit(DBU_FAILED); + } + this->setUser(usr); + this->setHost(system); + this->setPassword(password); + this->setPort(portIn); + this->setSocket(sockIn); + + if (!(mysql_real_connect(mysql, + m_host.c_str(), + m_user.c_str(), + m_pass.c_str(), + "test", + m_port, + m_socket.c_str(), 0))) + { + myerror("connection failed"); + mysql_close(mysql); + exit(DBU_FAILED); + } + + mysql->reconnect = DBU_TRUE; + + /* set AUTOCOMMIT */ + if(!transactional) + mysql_autocommit(mysql, DBU_TRUE); + else + mysql_autocommit(mysql, DBU_FALSE); + + #ifdef DEBUG + printf("\n\tConnected to MySQL server version: %s (%lu)\n\n", + mysql_get_server_info(mysql), + (unsigned long) mysql_get_server_version(mysql)); + #endif +} + +/* Database Connect */ + +int +DbUtil::connect() +{ + if (!(mysql = mysql_init(NULL))) + { + myerror("DB connect-> mysql_init() failed"); + return DBU_FAILED; + } + + /* Load connection parameters file and group */ + if (mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, default_file.c_str()) || + mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, default_group.c_str())) + { + myerror("DB Connect -> mysql_options failed"); + return DBU_FAILED; + } + + /* + Connect, read settings from my.cnf + NOTE! user and password can be stored there as well + */ + + if (mysql_real_connect(mysql, NULL, "root","", m_dbname.c_str(), + 0, NULL, 0) == NULL) + { + myerror("connection failed"); + mysql_close(mysql); + return DBU_FAILED; + } + + m_connected = true; + return DBU_OK; +} + + +/* Database Logout */ + +void +DbUtil::databaseLogout() +{ + if (mysql){ + #ifdef DEBUG + printf("\n\tClosing the MySQL database connection ...\n\n"); + #endif + mysql_close(mysql); + } +} + +/* Prepare MySQL Statements Cont */ + +MYSQL_STMT *STDCALL +DbUtil::mysqlSimplePrepare(const char *query) +{ + #ifdef DEBUG + printf("Inside DbUtil::mysqlSimplePrepare\n"); + #endif + int m_res = DBU_OK; + + MYSQL_STMT *my_stmt= mysql_stmt_init(this->getMysql()); + if (my_stmt && (m_res = mysql_stmt_prepare(my_stmt, query, strlen(query)))){ + this->printStError(my_stmt,"Prepare Statement Failed"); + mysql_stmt_close(my_stmt); + exit(DBU_FAILED); + } + return my_stmt; +} + +/* Close MySQL Statements Handle */ + +void +DbUtil::mysqlCloseStmHandle(MYSQL_STMT *my_stmt) +{ + mysql_stmt_close(my_stmt); +} + +/* Error Printing */ + +void +DbUtil::printError(const char *msg) +{ + if (this->getMysql() && mysql_errno(this->getMysql())) + { + if (this->getMysql()->server_version) + printf("\n [MySQL-%s]", this->getMysql()->server_version); + else + printf("\n [MySQL]"); + printf("[%d] %s\n", this->getErrorNumber(), this->getError()); + } + else if (msg) + printf(" [MySQL] %s\n", msg); +} + +void +DbUtil::printStError(MYSQL_STMT *stmt, const char *msg) +{ + if (stmt && mysql_stmt_errno(stmt)) + { + if (this->getMysql() && this->getMysql()->server_version) + printf("\n [MySQL-%s]", this->getMysql()->server_version); + else + printf("\n [MySQL]"); + + printf("[%d] %s\n", mysql_stmt_errno(stmt), + mysql_stmt_error(stmt)); + } + else if (msg) + printf("[MySQL] %s\n", msg); +} + +/* Select which database to use */ + +int +DbUtil::select_DB() +{ + return mysql_select_db(this->getMysql(), this->getDbName()); +} + +/* Run Simple Queries */ + +int +DbUtil::doQuery(char * stm) +{ + return mysql_query(this->getMysql(), stm); +} + +int +DbUtil::doQuery(const char * stm) +{ + return mysql_query(this->getMysql(), stm); +} + +/* Return MySQL Error String */ + +const char * +DbUtil::getError() +{ + return mysql_error(this->getMysql()); +} + +/* Retrun MySQL Error Number */ + +int +DbUtil::getErrorNumber() +{ + return mysql_errno(this->getMysql()); +} + +/* Count Table Rows */ + +unsigned long +DbUtil::selectCountTable(const char * table) +{ + unsigned long m_count = 0; + BaseString m_query; + + m_query.assfmt("select count(*) from %s", table); + if (mysql_query(this->getMysql(),m_query.c_str()) || + !(m_result=mysql_store_result(this->getMysql()))) + { + this->printError("selectCountTable\n"); + return DBU_FAILED; + } + m_row = mysql_fetch_row(m_result); + m_count = (ulong) strtoull(m_row[0], (char**) 0, 10); + mysql_free_result(m_result); + + return m_count; +} + +/* DIE */ + +void +DbUtil::die(const char *file, int line, const char *expr) +{ + printf("%s:%d: check failed: '%s'\n", file, line, expr); + abort(); +} + +/* EOF */ + diff --git a/storage/ndb/test/src/dbutil.cpp b/storage/ndb/test/src/dbutil.cpp deleted file mode 100755 index 0c936f53182..00000000000 --- a/storage/ndb/test/src/dbutil.cpp +++ /dev/null @@ -1,176 +0,0 @@ -// dbutil.cpp: implementation of the database utilities class. -// -////////////////////////////////////////////////////////////////////// - -#include "dbutil.hpp" - -////////////////////////////////////////////////////////////////////// -// Construction/Destruction -////////////////////////////////////////////////////////////////////// -dbutil::dbutil(const char * dbname) -{ - memset(host,' ',sizeof(host)); - memset(user,' ',sizeof(pass)); - memset(dbs,' ',sizeof(dbs)); - port = 0; - memset(socket,' ',sizeof(socket)); - this->SetDbName(dbname); -} - -dbutil::~dbutil() -{ - this->DatabaseLogout(); -} - -////////////////////////////////////////////////////////////////////// -// Database Login -////////////////////////////////////////////////////////////////////// -void dbutil::DatabaseLogin(const char* system, - const char* usr, - const char* password, - unsigned int portIn, - const char* sockIn, - bool transactional - ){ - if (!(myDbHandel = mysql_init(NULL))){ - myerror("mysql_init() failed"); - exit(1); - } - this->SetUser(usr); - this->SetHost(system); - this->SetPassword(password); - this->SetPort(portIn); - this->SetSocket(sockIn); - - if (!(mysql_real_connect(myDbHandel, host, user, pass, "test", port, socket, 0))){ - myerror("connection failed"); - mysql_close(myDbHandel); - fprintf(stdout, "\n Check the connection options using --help or -?\n"); - exit(1); - } - - myDbHandel->reconnect= 1; - - /* set AUTOCOMMIT */ - if(!transactional){ - mysql_autocommit(myDbHandel, TRUE); - } - else{ - mysql_autocommit(myDbHandel, FALSE); - } - - fprintf(stdout, "\n\tConnected to MySQL server version: %s (%lu)\n\n", - mysql_get_server_info(myDbHandel), - (unsigned long) mysql_get_server_version(myDbHandel)); -} - -////////////////////////////////////////////////////////////////////// -// Database Logout -////////////////////////////////////////////////////////////////////// -void dbutil::DatabaseLogout(){ - if (myDbHandel){ - fprintf(stdout, "\n\tClosing the MySQL database connection ...\n\n"); - mysql_close(myDbHandel); - } -} - -////////////////////////////////////////////////////////////////////// -// Prepare MySQL Statements Cont -////////////////////////////////////////////////////////////////////// -MYSQL_STMT *STDCALL dbutil::MysqlSimplePrepare(const char *query){ -#ifdef DEBUG -printf("Inside dbutil::MysqlSimplePrepare\n"); -#endif -int result = 0; - MYSQL_STMT *my_stmt= mysql_stmt_init(this->GetDbHandel()); - if (my_stmt && (result = mysql_stmt_prepare(my_stmt, query, strlen(query)))){ - printf("res = %s\n",mysql_stmt_error(my_stmt)); - mysql_stmt_close(my_stmt); - return 0; - } - return my_stmt; -} -////////////////////////////////////////////////////////////////////// -// Error Printing -////////////////////////////////////////////////////////////////////// -void dbutil::PrintError(const char *msg){ - if (this->GetDbHandel() - && mysql_errno(this->GetDbHandel())){ - if (this->GetDbHandel()->server_version){ - fprintf(stdout, "\n [MySQL-%s]", - this->GetDbHandel()->server_version); - } - else - fprintf(stdout, "\n [MySQL]"); - fprintf(stdout, "[%d] %s\n", - mysql_errno(this->GetDbHandel()), - mysql_error(this->GetDbHandel())); - } - else if (msg) - fprintf(stderr, " [MySQL] %s\n", msg); -} - -void dbutil::PrintStError(MYSQL_STMT *stmt, const char *msg) -{ - if (stmt && mysql_stmt_errno(stmt)) - { - if (this->GetDbHandel() - && this->GetDbHandel()->server_version) - fprintf(stdout, "\n [MySQL-%s]", - this->GetDbHandel()->server_version); - else - fprintf(stdout, "\n [MySQL]"); - - fprintf(stdout, "[%d] %s\n", mysql_stmt_errno(stmt), - mysql_stmt_error(stmt)); - } - else if (msg) - fprintf(stderr, " [MySQL] %s\n", msg); -} -///////////////////////////////////////////////////// -int dbutil::Select_DB() -{ - return mysql_select_db(this->GetDbHandel(), - this->GetDbName()); -} -//////////////////////////////////////////////////// -int dbutil::Do_Query(char * stm) -{ - return mysql_query(this->GetDbHandel(), stm); -} -//////////////////////////////////////////////////// -const char * dbutil::GetError() -{ - return mysql_error(this->GetDbHandel()); -} -//////////////////////////////////////////////////// -int dbutil::GetErrorNumber() -{ - return mysql_errno(this->GetDbHandel()); -} -//////////////////////////////////////////////////// -unsigned long dbutil::SelectCountTable(const char * table) -{ - unsigned long count = 0; - MYSQL_RES *result; - char query[1024]; - MYSQL_ROW row; - - sprintf(query,"select count(*) from `%s`", table); - if (mysql_query(this->GetDbHandel(),query) || !(result=mysql_store_result(this->GetDbHandel()))) - { - printf("error\n"); - return 1; - } - row= mysql_fetch_row(result); - count= (ulong) strtoull(row[0], (char**) 0, 10); - mysql_free_result(result); - - return count; -} -void dbutil::Die(const char *file, int line, const char *expr){ - fprintf(stderr, "%s:%d: check failed: '%s'\n", file, line, expr); - abort(); -} - - From 471437fd47bc10ce89b290c46ffcbb260aaa12f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Dec 2007 01:02:28 +0100 Subject: [PATCH 037/527] make_win_bin_dist CMakeLists.txt resolveip.c Makefile.am: Better Windows support in the scripts directory mysql_config.pl.in, mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows Many files in scripts directory: Use default Perl location "#!/usr/bin/perl" instead of the build host path extra/CMakeLists.txt: Added target for executable "resolveip" extra/resolveip.c: Exclude Unix specific headers when compiling on Windows scripts/CMakeLists.txt: On Windows, filter Perl scripts and change name from ".sh" to ".pl" mysql_convert_table_format.sh mysql_explain_log.sh mysql_secure_installation.sh mysql_tableinfo.sh mysqld_multi.sh mysqldumpslow.sh mysqlhotcopy.sh Do the same for the new Windows specific Perl versions of shell scripts mysql_config.pl.in mysql_install_db.pl.in In CMake, set reasonable values for 'CFLAGS', 'prefix', 'datadir' and so on. scripts/Makefile.am: Include "mysql_config.pl.in" and "mysql_install_db.pl.in" in the source TAR scripts/make_win_bin_dist: Only include explicitly listed scripts from the "scripts" directory scripts/mysql_convert_table_format.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_explain_log.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_tableinfo.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqld_multi.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqldumpslow.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysqlhotcopy.sh: Use default Perl location "#!/usr/bin/perl" instead of the build host path scripts/mysql_config.pl.in: New Perl version of Unix shell script, mainly for Windows scripts/mysql_install_db.pl.in: New Perl version of Unix shell script, mainly for Windows --- extra/CMakeLists.txt | 3 + extra/resolveip.c | 14 +- scripts/CMakeLists.txt | 41 ++ scripts/Makefile.am | 2 + scripts/make_win_bin_dist | 35 +- scripts/mysql_config.pl.in | 285 ++++++++++++ scripts/mysql_convert_table_format.sh | 2 +- scripts/mysql_explain_log.sh | 2 +- scripts/mysql_install_db.pl.in | 612 ++++++++++++++++++++++++++ scripts/mysql_tableinfo.sh | 2 +- scripts/mysqld_multi.sh | 2 +- scripts/mysqldumpslow.sh | 2 +- scripts/mysqlhotcopy.sh | 2 +- 13 files changed, 974 insertions(+), 30 deletions(-) create mode 100644 scripts/mysql_config.pl.in create mode 100644 scripts/mysql_install_db.pl.in diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt index a909bc93820..c1477e41a81 100755 --- a/extra/CMakeLists.txt +++ b/extra/CMakeLists.txt @@ -44,6 +44,9 @@ TARGET_LINK_LIBRARIES(my_print_defaults strings mysys debug dbug taocrypt wsock3 ADD_EXECUTABLE(perror perror.c) TARGET_LINK_LIBRARIES(perror strings mysys debug dbug wsock32) +ADD_EXECUTABLE(resolveip resolveip.c) +TARGET_LINK_LIBRARIES(resolveip strings mysys debug dbug wsock32) + ADD_EXECUTABLE(replace replace.c) TARGET_LINK_LIBRARIES(replace strings mysys debug dbug wsock32) diff --git a/extra/resolveip.c b/extra/resolveip.c index 1061cafe380..b48a782c9c9 100644 --- a/extra/resolveip.c +++ b/extra/resolveip.c @@ -21,13 +21,15 @@ #include #include #include -#include -#include -#ifndef HAVE_BROKEN_NETINET_INCLUDES -#include +#ifndef WIN32 +# include +# include +# ifndef HAVE_BROKEN_NETINET_INCLUDES +# include +# endif +# include +# include #endif -#include -#include #include #include diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 6fbfcab72d4..8d369a6ab22 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -40,3 +40,44 @@ ADD_CUSTOM_COMMAND(OUTPUT ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tabl ADD_CUSTOM_TARGET(GenFixPrivs ALL DEPENDS ${PROJECT_SOURCE_DIR}/scripts/mysql_fix_privilege_tables_sql.c) + +# ---------------------------------------------------------------------- +# Replace some variables @foo@ in the .in/.sh file, and write the new script +# ---------------------------------------------------------------------- + +SET(CFLAGS "-D_WINDOWS ${CMAKE_C_FLAGS_RELWITHDEBINFO}") +SET(prefix "${CMAKE_INSTALL_PREFIX}/MySQL Server ${MYSQL_BASE_VERSION}") +SET(sysconfdir ${prefix}) +SET(bindir ${prefix}/bin) +SET(libexecdir ${prefix}/bin) +SET(scriptdir ${prefix}/bin) +SET(datadir ${prefix}/share) +SET(pkgdatadir ${prefix}/share) +SET(localstatedir ${prefix}/data) + +CONFIGURE_FILE(mysql_config.pl.in + scripts/mysql_config.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysql_convert_table_format.sh + scripts/mysql_convert_table_format.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysql_explain_log.sh + scripts/mysql_explain_log.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysql_install_db.pl.in + scripts/mysql_install_db.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysql_secure_installation.sh + scripts/mysql_secure_installation.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysql_tableinfo.sh + scripts/mysql_tableinfo.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysqld_multi.sh + scripts/mysqld_multi.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysqldumpslow.sh + scripts/mysqldumpslow.pl ESCAPE_QUOTES @ONLY) + +CONFIGURE_FILE(mysqlhotcopy.sh + scripts/mysqlhotcopy.pl ESCAPE_QUOTES @ONLY) diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 5db5fdd550f..769c0f5fdba 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -48,9 +48,11 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \ make_win_src_distribution_old.sh \ msql2mysql.sh \ mysql_config.sh \ + mysql_config.pl.in \ mysql_fix_privilege_tables.sh \ mysql_fix_extensions.sh \ mysql_install_db.sh \ + mysql_install_db.pl.in \ mysql_setpermission.sh \ mysql_secure_installation.sh \ mysql_zap.sh \ diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index d065e171bb0..b9a0842473b 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -327,27 +327,26 @@ if [ -d mysql-test/extra ] ; then fi # ---------------------------------------------------------------------- -# Copy what could be usable in the "scripts" directory. Currently -# only SQL files, others are Bourne shell scripts or Perl scripts -# not really usable on Windows. -# -# But to be nice to the few Cygwin users we might have in 5.0 we -# continue to copy the stuff, but don't include it in the WiX install. +# Copy what could be usable in the "scripts" directory # ---------------------------------------------------------------------- +mysql_scripts="\ +mysql_config.pl \ +mysql_convert_table_format.pl \ +mysql_explain_log.pl \ +mysql_install_db.pl \ +mysql_secure_installation.pl \ +mysql_tableinfo.pl \ +mysqld_multi.pl \ +mysqldumpslow.pl \ +mysqlhotcopy.pl \ +" + mkdir -p $DESTDIR/scripts -# Uncomment and remove the for loop in 5.1 -#cp scripts/*.sql $DESTDIR/scripts/ - -for i in `cd scripts && ls`; do \ - if echo $i | grep -q '\.sh'; then \ - cp scripts/$i $DESTDIR/scripts/`echo $i | sed -e 's/\.sh$//'`; \ - elif [ -d scripts/$i -o $i = Makefile.am -o $i = Makefile.in -o -e scripts/$i.sh ] ; then \ - : ; \ - else \ - cp scripts/$i $DESTDIR/scripts/$i; \ - fi; \ +for i in $mysql_scripts +do + cp scripts/$i $DESTDIR/scripts/$i done cp -pR sql/share $DESTDIR/ @@ -355,7 +354,7 @@ cp -pR sql-bench $DESTDIR/ rm -f $DESTDIR/sql-bench/*.sh $DESTDIR/sql-bench/Makefile* # The SQL initialisation code is really expected to be in "share" -mv $DESTDIR/scripts/*.sql $DESTDIR/share/ || true +mv $DESTDIR/scripts/*.sql $DESTDIR/share/ # ---------------------------------------------------------------------- # Clean up from possibly copied SCCS directories diff --git a/scripts/mysql_config.pl.in b/scripts/mysql_config.pl.in new file mode 100644 index 00000000000..3ae8baf7db0 --- /dev/null +++ b/scripts/mysql_config.pl.in @@ -0,0 +1,285 @@ +#!/usr/bin/perl +# -*- cperl -*- +# +# 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 script reports various configuration settings that may be needed +# when using the MySQL client library. +# +# This script try to match the shell script version as close as possible, +# but in addition being compatible with ActiveState Perl on Windows. +# +# All unrecognized arguments to this script are passed to mysqld. +# +# NOTE: This script will only be used on Windows until solved how to +# handle @LIBS@ and other strings inserted that might contain +# several arguments, possibly with spaces in them. +# +# NOTE: This script was deliberately written to be as close to the shell +# script as possible, to make the maintenance of both in parallel +# easier. +# +############################################################################## + +use File::Basename; +use Getopt::Long; +use Cwd; +use strict; + +my @exclude_cflags = + qw/DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX + DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS + DEXTRA_DEBUG DHAVE_purify O O[0-9] xO[0-9] W[-A-Za-z]* + Xa xstrconst xc99=none + unroll2 ip mp restrict/; + +my @exclude_libs = qw/lmtmalloc static-libcxa i-static static-intel/; + +my $cwd = cwd(); +my $basedir; + +my $socket = '@MYSQL_UNIX_ADDR@'; +my $version = '@VERSION@'; + +sub which +{ + my $file = shift; + + my $IFS = $^O eq "MSWin32" ? ";" : ":"; + + foreach my $dir ( split($IFS, $ENV{PATH}) ) + { + if ( -f "$dir/$file" or -f "$dir/$file.exe" ) + { + return "$dir/$file"; + } + } + print STDERR "which: no $file in ($ENV{PATH})\n"; + exit 1; +} + +# ---------------------------------------------------------------------- +# If we can find the given directory relatively to where mysql_config is +# we should use this instead of the incompiled one. +# This is to ensure that this script also works with the binary MySQL +# version +# ---------------------------------------------------------------------- + +sub fix_path +{ + my $default = shift; + my @dirs = @_; + + foreach my $dirname ( @dirs ) + { + my $path = "$basedir/$dirname"; + if ( -d $path ) + { + return $path; + } + } + return $default; +} + +sub get_full_path +{ + my $file = shift; + + # if the file is a symlink, try to resolve it + if ( $^O ne "MSWin32" and -l $file ) + { + $file = readlink($file); + } + + if ( $file =~ m,^/, ) + { + # Do nothing, absolute path + } + elsif ( $file =~ m,/, ) + { + # Make absolute, and remove "/./" in path + $file = "$cwd/$file"; + $file =~ s,/\./,/,g; + } + else + { + # Find in PATH + $file = which($file); + } + + return $file; +} + +############################################################################## +# +# Form a command line that can handle spaces in paths and arguments +# +############################################################################## + +sub quote_options { + my @cmd; + foreach my $opt ( @_ ) + { + next unless $opt; # If undefined or empty, just skip + push(@cmd, "\"$opt\""); # Quote argument + } + return join(" ", @cmd); +} + +############################################################################## +# +# Main program +# +############################################################################## + +my $me = get_full_path($0); +$basedir = dirname(dirname($me)); # Remove "/bin/mysql_config" part + +my $ldata = '@localstatedir@'; +my $execdir = '@libexecdir@'; +my $bindir = '@bindir@'; + +# ---------------------------------------------------------------------- +# If installed, search for the compiled in directory first (might be "lib64") +# ---------------------------------------------------------------------- + +my $pkglibdir = fix_path('@pkglibdir@',"libmysql/relwithdebinfo", + "libmysql/release","libmysql/debug","lib/mysql","lib"); + +my $pkgincludedir = fix_path('@pkgincludedir@', "include/mysql", "include"); + +# Assume no argument with space in it +my @ldflags = split(" ",'@LDFLAGS@'); + +my $port; +if ( '@MYSQL_TCP_PORT_DEFAULT@' == 0 ) { + $port = 0; +} else { + $port = '@MYSQL_TCP_PORT@'; +} + +# ---------------------------------------------------------------------- +# Create options +# We intentionally add a space to the beginning and end of lib strings, simplifies replace later +# ---------------------------------------------------------------------- + +my (@lib_opts,@lib_r_opts,@lib_e_opts); +if ( $^O eq "MSWin32" ) +{ + my $linkpath = "$pkglibdir"; + # user32 is only needed for debug or embedded + my @winlibs = ("wsock32.lib","advapi32.lib","user32.lib"); + @lib_opts = ("$linkpath/mysqlclient.lib",@winlibs); + @lib_r_opts = @lib_opts; + @lib_e_opts = ("$linkpath/mysqlserver.lib",@winlibs); +} +else +{ + my $linkpath = "-L$pkglibdir"; + @lib_opts = ($linkpath,"-lmysqlclient"); + @lib_r_opts = ($linkpath,"-lmysqlclient_r"); + @lib_e_opts = ($linkpath,"-lmysqld"); +} + +my $flags; +$flags->{libs} = + [@ldflags,@lib_opts,'@ZLIB_DEPS@','@NON_THREADED_LIBS@','@openssl_libs@','@STATIC_NSS_FLAGS@']; +$flags->{libs_r} = + [@ldflags,@lib_r_opts,'@ZLIB_DEPS@','@LIBS@','@openssl_libs@']; +$flags->{embedded_libs} = + [@ldflags,@lib_e_opts,'@ZLIB_DEPS@','@LIBS@','@WRAPLIBS@','@innodb_system_libs@','@openssl_libs@']; + +$flags->{include} = ["-I$pkgincludedir"]; +$flags->{cflags} = [@{$flags->{include}},split(" ",'@CFLAGS@')]; + +# ---------------------------------------------------------------------- +# Remove some options that a client doesn't have to care about +# FIXME until we have a --cxxflags, we need to remove -Xa +# and -xstrconst to make --cflags usable for Sun Forte C++ +# ---------------------------------------------------------------------- + +my $filter = join("|", @exclude_cflags); +my @tmp = @{$flags->{cflags}}; # Copy the flag list +$flags->{cflags} = []; # Clear it +foreach my $cflag ( @tmp ) +{ + push(@{$flags->{cflags}}, $cflag) unless $cflag =~ m/^($filter)$/o; +} + +# Same for --libs(_r) +$filter = join("|", @exclude_libs); +foreach my $lib_type ( "libs","libs_r","embedded_libs" ) +{ + my @tmp = @{$flags->{$lib_type}}; # Copy the flag list + $flags->{$lib_type} = []; # Clear it + foreach my $lib ( @tmp ) + { + push(@{$flags->{$lib_type}}, $lib) unless $lib =~ m/^($filter)$/o; + } +} + +my $include = quote_options(@{$flags->{include}}); +my $cflags = quote_options(@{$flags->{cflags}}); +my $libs = quote_options(@{$flags->{libs}}); +my $libs_r = quote_options(@{$flags->{libs_r}}); +my $embedded_libs = quote_options(@{$flags->{embedded_libs}}); + +############################################################################## +# +# Usage information, output if no option is given +# +############################################################################## + +sub usage +{ + print < sub { print "$cflags\n" }, + "include" => sub { print "$include\n" }, + "libs" => sub { print "$libs\n" }, + "libs_r" => sub { print "$libs_r\n" }, + "socket" => sub { print "$socket\n" }, + "port" => sub { print "$port\n" }, + "version" => sub { print "$version\n" }, + "embedded-libs|embedded|libmysqld-libs" => + sub { print "$embedded_libs\n" }, + ) or usage(); + +exit 0 diff --git a/scripts/mysql_convert_table_format.sh b/scripts/mysql_convert_table_format.sh index 0c9ce3a67e0..833b5bf5f11 100644 --- a/scripts/mysql_convert_table_format.sh +++ b/scripts/mysql_convert_table_format.sh @@ -1,4 +1,4 @@ -#!@PERL@ +#!/usr/bin/perl # Copyright (C) 2000-2002 MySQL AB # # This program is free software; you can redistribute it and/or modify diff --git a/scripts/mysql_explain_log.sh b/scripts/mysql_explain_log.sh index a549817db5a..f3c7a4b04fa 100644 --- a/scripts/mysql_explain_log.sh +++ b/scripts/mysql_explain_log.sh @@ -1,4 +1,4 @@ -#!@PERL@ +#!/usr/bin/perl # Copyright (C) 2001-2003, 2006 MySQL AB # # This program is free software; you can redistribute it and/or modify diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in new file mode 100644 index 00000000000..18bd713c041 --- /dev/null +++ b/scripts/mysql_install_db.pl.in @@ -0,0 +1,612 @@ +#!/usr/bin/perl +# -*- cperl -*- +# +# 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +############################################################################## +# +# This scripts creates the MySQL Server system tables. +# +# This script try to match the shell script version as close as possible, +# but in addition being compatible with ActiveState Perl on Windows. +# +# All unrecognized arguments to this script are passed to mysqld. +# +# NOTE: This script in 5.0 doesn't really match the shell script +# version 100%, it is more close to the 5.1 version. +# +# NOTE: This script was deliberately written to be as close to the shell +# script as possible, to make the maintenance of both in parallel +# easier. +# +############################################################################## + +use File::Basename; +use Getopt::Long; +use Sys::Hostname; +use Data::Dumper; +use strict; + +Getopt::Long::Configure("pass_through"); + +my @args; # Argument list filled in + +############################################################################## +# +# Usage information +# +############################################################################## + +sub usage +{ + print <{help}; + + @args = @ARGV if $pick_args; + + @ARGV = @saved_ARGV; # Set back ARGV +} + +############################################################################## +# +# Try to find a specific file within --basedir which can either be a binary +# release or installed source directory and return the path. +# +############################################################################## + +sub find_in_basedir +{ + my $opt = shift; + my $mode = shift; # "dir" or "file" + my $files = shift; + + foreach my $file ( @{ref($files) ? $files : [$files]} ) + { + foreach my $dir ( @_ ) + { + foreach my $part ( "$file","$file.exe","release/$file.exe", + "debug/$file.exe","relwithdebinfo/$file.exe" ) + { + my $path = "$opt->{basedir}/$dir/$part"; + if ( -f $path ) + { + return $mode eq "dir" ? dirname($path) : $path; + } + } + } + } +} + +############################################################################## +# +# Just a function to write out an error report +# +############################################################################## + +sub cannot_find_file +{ + my $file = shift; + + print "FATAL ERROR: Could not find $file\n"; + print "\n"; + print "If you compiled from source, you need to run 'make install' to\n"; + print "copy the software into the correct location ready for operation.\n"; + print "\n"; + print "If you are using a binary release, you must either be at the top\n"; + print "level of the extracted archive, or pass the --basedir option\n"; + print "pointing to that location.\n"; + print "\n"; + + exit 1; +} + +############################################################################## +# +# Form a command line that can handle spaces in paths and arguments +# +############################################################################## + +# FIXME this backslash escaping needed if using '"..."' ? +# This regexp makes sure that any special chars are quoted, +# so the arg gets passed exactly to the server. +# XXX: This is broken; true fix requires using eval and proper +# quoting of every single arg ($opt->{basedir}, $opt->{ldata}, etc.) +# join(" ", map {s/([^\w\_\.\-])/\\$1/g} + +sub quote_options { + my @cmd; + foreach my $opt ( @_ ) + { + next unless $opt; # If undefined or empty, just skip + push(@cmd, "\"$opt\""); # Quote argument + } + return join(" ", @cmd); +} + +############################################################################## +# +# Ok, let's go. We first need to parse arguments which are required by +# my_print_defaults so that we can execute it first, then later re-parse +# the command line to add any extra bits that we need. +# +############################################################################## + +my $opt = {}; +parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV); + +# ---------------------------------------------------------------------- +# We can now find my_print_defaults. This script supports: +# +# --srcdir=path pointing to compiled source tree +# --basedir=path pointing to installed binary location +# +# or default to compiled-in locations. +# ---------------------------------------------------------------------- + +my $print_defaults; + +if ( $opt->{srcdir} and $opt->{basedir} ) +{ + error("Specify either --basedir or --srcdir, not both"); +} +if ( $opt->{srcdir} ) +{ + $opt->{builddir} = $opt->{srcdir} unless $opt->{builddir}; + $print_defaults = "$opt->{builddir}/extra/my_print_defaults"; +} +elsif ( $opt->{basedir} ) +{ + $print_defaults = find_in_basedir($opt,"file","my_print_defaults","bin","extra"); +} +else +{ + $print_defaults='@bindir@/my_print_defaults'; +} + +-x $print_defaults or -f "$print_defaults.exe" + or cannot_find_file($print_defaults); + +# ---------------------------------------------------------------------- +# Now we can get arguments from the groups [mysqld] and [mysql_install_db] +# in the my.cfg file, then re-run to merge with command line arguments. +# ---------------------------------------------------------------------- + +my @default_options; +my $cmd = quote_options($print_defaults,$opt->{'defaults-file'}, + "mysqld","mysql_install_db"); +open(PIPE, "$cmd |") or error($opt,"can't run $cmd: $!"); +while ( ) +{ + chomp; + next unless /\S/; + push(@default_options, $_); +} +close PIPE; +$opt = {}; # Reset the arguments FIXME ? +parse_arguments($opt, @default_options); +parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV); + +# ---------------------------------------------------------------------- +# Configure paths to support files +# ---------------------------------------------------------------------- + +# FIXME $extra_bindir is not used +my ($bindir,$extra_bindir,$mysqld,$pkgdatadir,$mysqld_opt,$scriptdir); + +if ( $opt->{srcdir} ) +{ + $opt->{basedir} = $opt->{builddir}; + $bindir = "$opt->{basedir}/client"; + $extra_bindir = "$opt->{basedir}/extra"; + $mysqld = "$opt->{basedir}/sql/mysqld"; + $mysqld_opt = "--language=$opt->{srcdir}/sql/share/english"; + $pkgdatadir = "$opt->{srcdir}/scripts"; + $scriptdir = "$opt->{srcdir}/scripts"; +} +elsif ( $opt->{basedir} ) +{ + $bindir = "$opt->{basedir}/bin"; + $extra_bindir = $bindir; + $mysqld = find_in_basedir($opt,"file",["mysqld-nt","mysqld"], + "libexec","sbin","bin") || # ,"sql" + find_in_basedir($opt,"file","mysqld-nt", + "bin"); # ,"sql" + $pkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql", + "share","share/mysql"); # ,"scripts" + $scriptdir = "$opt->{basedir}/scripts"; +} +else +{ + $opt->{basedir} = '@prefix@'; + $bindir = '@bindir@'; + $extra_bindir = $bindir; + $mysqld = '@libexecdir@/mysqld'; + $pkgdatadir = '@pkgdatadir@'; + $scriptdir = '@scriptdir@'; +} + +unless ( $opt->{ldata} ) +{ + $opt->{ldata} = '@localstatedir@'; +} + +if ( $opt->{srcdir} ) +{ + $pkgdatadir = "$opt->{srcdir}/scripts"; +} + +# ---------------------------------------------------------------------- +# Set up paths to SQL scripts required for bootstrap +# ---------------------------------------------------------------------- + +my $fill_help_tables = "$pkgdatadir/fill_help_tables.sql"; +my $create_system_tables = "$pkgdatadir/mysql_system_tables.sql"; +my $fill_system_tables = "$pkgdatadir/mysql_system_tables_data.sql"; + +foreach my $f ( $fill_help_tables,$create_system_tables,$fill_system_tables ) +{ + -f $f or cannot_find_file($f); +} + +-x $mysqld or -f "$mysqld.exe" or cannot_find_file($mysqld); +# Try to determine the hostname +my $hostname = hostname(); + +# ---------------------------------------------------------------------- +# Check if hostname is valid +# ---------------------------------------------------------------------- + +my $resolved; +if ( !$opt->{'cross-bootstrap'} and !$opt->{rpm} and !$opt->{force} ) +{ + my $resolveip; + + $resolved = `$resolveip $hostname 2>&1`; + if ( $? != 0 ) + { + $resolved=`$resolveip localhost 2>&1`; + if ( $? != 0 ) + { + error($opt, + "Neither host '$hostname' nor 'localhost' could be looked up with", + "$bindir/resolveip", + "Please configure the 'hostname' command to return a correct", + "hostname.", + "If you want to solve this at a later stage, restart this script", + "with the --force option"); + } + warning($opt, + "The host '$hostname' could not be looked up with resolveip.", + "This probably means that your libc libraries are not 100 % compatible", + "with this binary MySQL version. The MySQL daemon, mysqld, should work", + "normally with the exception that host name resolving will not work.", + "This means that you should use IP addresses instead of hostnames", + "when specifying MySQL privileges !"); + } +} + +# FIXME what does this really mean.... +if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ ) +{ + $hostname = (split(' ', $resolved))[5]; +} + +# ---------------------------------------------------------------------- +# Create database directories mysql & test +# ---------------------------------------------------------------------- + +foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" ) +{ + # FIXME not really the same as original "mkdir -p", but ok? + mkdir($dir, 0700) unless -d $dir; + chown($opt->{user}, $dir) if -w "/" and !$opt->{user}; +} + +push(@args, "--user=$opt->{user}") if $opt->{user}; + +# ---------------------------------------------------------------------- +# Configure mysqld command line +# ---------------------------------------------------------------------- + +# FIXME use --init-file instead of --bootstrap ?! + +my $mysqld_bootstrap = $ENV{MYSQLD_BOOTSTRAP} || $mysqld; +my $mysqld_install_cmd_line = quote_options($mysqld_bootstrap, + $opt->{'defaults-file'}, + $mysqld_opt, + "--bootstrap", + "--basedir=$opt->{basedir}", + "--datadir=$opt->{ldata}", + "--skip-innodb", + "--skip-bdb", + "--skip-ndbcluster", + "--max_allowed_packet=8M", + "--net_buffer_length=16K", + @args, + ); + +# ---------------------------------------------------------------------- +# Create the system and help tables by passing them to "mysqld --bootstrap" +# ---------------------------------------------------------------------- + +report_verbose_wait($opt,"Installing MySQL system tables..."); + +open(SQL, $create_system_tables) + or error($opt,"can't open $create_system_tables for reading: $!"); +# FIXME > /dev/null ? +if ( open(PIPE, "| $mysqld_install_cmd_line") ) +{ + print PIPE "use mysql;\n"; + while ( ) + { + # When doing a "cross bootstrap" install, no reference to the current + # host should be added to the system tables. So we filter out any + # lines which contain the current host name. + next if $opt->{'cross-bootstrap'} and /\@current_hostname/; + + print PIPE $_; + } + close PIPE; + close SQL; + + report_verbose($opt,"OK"); + + # ---------------------------------------------------------------------- + # Pipe fill_help_tables.sql to "mysqld --bootstrap" + # ---------------------------------------------------------------------- + + report_verbose_wait($opt,"Filling help tables..."); + open(SQL, $fill_help_tables) + or error($opt,"can't open $fill_help_tables for reading: $!"); + # FIXME > /dev/null ? + if ( open(PIPE, "| $mysqld_install_cmd_line") ) + { + print PIPE "use mysql;\n"; + while ( ) + { + print PIPE $_; + } + close PIPE; + close SQL; + + report_verbose($opt,"OK"); + } + else + { + warning($opt,"HELP FILES ARE NOT COMPLETELY INSTALLED!", + "The \"HELP\" command might not work properly"); + } + + report_verbose($opt,"To start mysqld at boot time you have to copy", + "support-files/mysql.server to the right place " . + "for your system"); + + if ( !$opt->{'cross-bootstrap'} ) + { + # This is not a true installation on a running system. The end user must + # set a password after installing the data files on the real host system. + # At this point, there is no end user, so it does not make sense to print + # this reminder. + report($opt, + "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !", + "To do so, start the server, then issue the following commands:", + "", + " $bindir/mysqladmin -u root password 'new-password'", + " $bindir/mysqladmin -u root -h $hostname password 'new-password'", + "", + "Alternatively you can run:", + "", + " $bindir/mysql_secure_installation", + "", + "which will also give you the option of removing the test", + "databases and anonymous user created by default. This is", + "strongly recommended for production servers.", + "", + "See the manual for more instructions."); + + if ( !$opt->{rpm} ) + { + report($opt, + "You can start the MySQL daemon with:", + "", + " cd " . '@prefix@' . " ; $bindir/mysqld_safe &", + "", + "You can test the MySQL daemon with mysql-test-run.pl", + "", + " cd mysql-test ; perl mysql-test-run.pl"); + } + report($opt, + "Please report any problems with the " . '@scriptdir@' . "/mysqlbug script!", + "", + "The latest information about MySQL is available on the web at", + "", + " http://www.mysql.com", + "", + "Support MySQL by buying support/licenses at http://shop.mysql.com"); + } + exit 0 +} +else +{ + error($opt, + "Installation of system tables failed!", + "", + "Examine the logs in $opt->{ldata} for more information.", + "You can try to start the mysqld daemon with:", + "$mysqld --skip-grant &", + "and use the command line tool", + "$bindir/mysql to connect to the mysql", + "database and look at the grant tables:", + "", + "shell> $bindir/mysql -u root mysql", + "mysql> show tables", + "", + "Try 'mysqld --help' if you have problems with paths. Using --log", + "gives you a log in $opt->{ldata} that may be helpful.", + "", + "The latest information about MySQL is available on the web at", + "http://www.mysql.com", + "Please consult the MySQL manual section: 'Problems running mysql_install_db',", + "and the manual section that describes problems on your OS.", + "Another information source is the MySQL email archive.", + "Please check all of the above before mailing us!", + "And if you do mail us, you MUST use the " . '@scriptdir@' . "/mysqlbug script!") +} + +############################################################################## +# +# Misc +# +############################################################################## + +sub report_verbose +{ + my $opt = shift; + my $text = shift; + + report_verbose_wait($opt, $text, @_); + print "\n\n"; +} + +sub report_verbose_wait +{ + my $opt = shift; + my $text = shift; + + if ( $opt->{verbose} or (!$opt->{rpm} and !$opt->{'cross-bootstrap'}) ) + { + print "$text"; + map {print "\n$_"} @_; + } +} + +sub report +{ + my $opt = shift; + my $text = shift; + + print "$text\n"; + map {print "$_\n"} @_; + print "\n"; +} + +sub error +{ + my $opt = shift; + my $text = shift; + + print "FATAL ERROR: $text\n"; + map {print "$_\n"} @_; + exit 1; +} + +sub warning +{ + my $opt = shift; + my $text = shift; + + print "WARNING: $text\n"; + map {print "$_\n"} @_; + print "\n"; +} diff --git a/scripts/mysql_tableinfo.sh b/scripts/mysql_tableinfo.sh index 2ed7e381fa3..c90c410ca78 100644 --- a/scripts/mysql_tableinfo.sh +++ b/scripts/mysql_tableinfo.sh @@ -1,4 +1,4 @@ -#!@PERL@ -w +#!/usr/bin/perl use strict; use Getopt::Long; diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 92cfbe3ef22..3cb4665eb1c 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -1,4 +1,4 @@ -#!@PERL@ +#!/usr/bin/perl use Getopt::Long; use POSIX qw(strftime); diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh index ff82a35ec3f..f05761bb837 100644 --- a/scripts/mysqldumpslow.sh +++ b/scripts/mysqldumpslow.sh @@ -1,4 +1,4 @@ -#!@PERL@ +#!/usr/bin/perl # 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 6ad5c77b954..bad0761cd80 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -1,4 +1,4 @@ -#!@PERL@ -w +#!/usr/bin/perl use strict; use Getopt::Long; From 7e656539834bcb41107f05d84929f875939f64f5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Dec 2007 22:58:54 +0100 Subject: [PATCH 038/527] Makefile.am, CMakeLists.txt, mysql_secure_installation.pl.in: Added Perl version of script "mysql_secure_installation" make_win_bin_dist: Corrected copy of SQL files to "share" directory scripts/mysql_secure_installation.pl.in: Added Perl version of script "mysql_secure_installation" scripts/CMakeLists.txt: Added Perl version of script "mysql_secure_installation" scripts/Makefile.am: Added Perl version of script "mysql_secure_installation" scripts/make_win_bin_dist: Corrected copy of SQL files to "share" directory --- scripts/CMakeLists.txt | 2 +- scripts/Makefile.am | 1 + scripts/make_win_bin_dist | 4 +- scripts/mysql_secure_installation.pl.in | 352 ++++++++++++++++++++++++ 4 files changed, 356 insertions(+), 3 deletions(-) create mode 100755 scripts/mysql_secure_installation.pl.in diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 8d369a6ab22..d7bcb8fd4e7 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -67,7 +67,7 @@ CONFIGURE_FILE(mysql_explain_log.sh CONFIGURE_FILE(mysql_install_db.pl.in scripts/mysql_install_db.pl ESCAPE_QUOTES @ONLY) -CONFIGURE_FILE(mysql_secure_installation.sh +CONFIGURE_FILE(mysql_secure_installation.pl.in scripts/mysql_secure_installation.pl ESCAPE_QUOTES @ONLY) CONFIGURE_FILE(mysql_tableinfo.sh diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 769c0f5fdba..87170b46675 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -55,6 +55,7 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \ mysql_install_db.pl.in \ mysql_setpermission.sh \ mysql_secure_installation.sh \ + mysql_secure_installation.pl.in \ mysql_zap.sh \ mysqlaccess.sh \ mysqlbug.sh \ diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index b9a0842473b..56510dc857b 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -353,8 +353,8 @@ cp -pR sql/share $DESTDIR/ cp -pR sql-bench $DESTDIR/ rm -f $DESTDIR/sql-bench/*.sh $DESTDIR/sql-bench/Makefile* -# The SQL initialisation code is really expected to be in "share" -mv $DESTDIR/scripts/*.sql $DESTDIR/share/ +# The SQL initialisation code is to be in "share" +cp scripts/*.sql $DESTDIR/share/ # ---------------------------------------------------------------------- # Clean up from possibly copied SCCS directories diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in new file mode 100755 index 00000000000..4eeb50e6d2f --- /dev/null +++ b/scripts/mysql_secure_installation.pl.in @@ -0,0 +1,352 @@ +#!/usr/bin/perl +# -*- cperl -*- +# +# Copyright (C) 2002 MySQL AB and Jeremy Cole +# +# This program is free software; 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 Fcntl; +use strict; + +my $config = ".my.cnf.$$"; +my $command = ".mysql.$$"; +my $hadpass = 0; + +# FIXME +# trap "interrupt" 2 + +my $rootpass = ""; + +sub echo_on { + if ($^O eq 'MSWin32') { + ReadMode('normal'); + } else { + system("stty echo"); + } +} + +sub echo_off { + if ($^O eq 'MSWin32') { + ReadMode('noecho'); + } else { + system("stty -echo"); + } +} + +sub write_file { + my $file = shift; + -f $file or die "ERROR: file is missing \"$file\": $!"; + open(FILE, ">$file") or die "ERROR: can't write to file \"$file\": $!"; + foreach my $line ( @_ ) { + print FILE $line, "\n"; # Add EOL char + } + close FILE; +} + +sub prepare { + foreach my $file ( $config, $command ) { + next if -f $file; # Already exists + local *FILE; + sysopen(FILE, $file, O_CREAT, 0600) + or die "ERROR: can't create $file: $!"; + close FILE; + } +} + +sub do_query { + my $query = shift; + write_file($command, $query); + system("mysql --defaults-file=$config < $command"); + return $?; +} + +sub make_config { + my $password = shift; + + write_file($config, + "# mysql_secure_installation config file", + "[mysql]", + "user=root", + "password=$rootpass"); +} + +sub get_root_password { + my $status = 1; + while ( $status == 1 ) { + echo_off(); + print "Enter current password for root (enter for none): "; + my $password = ; + echo_on(); + if ( $password ) { + $hadpass = 1; + } else { + $hadpass = 0; + } + $rootpass = $password; + make_config($rootpass); + do_query(""); + $status = $?; + } + print "OK, successfully used password, moving on...\n\n"; +} + +sub set_root_password { + echo_off(); + print "New password: "; + my $password1 = ; + print "\nRe-enter new password: "; + my $password2 = ; + print "\n"; + echo_on(); + + if ( $password1 eq $password2 ) { + print "Sorry, passwords do not match.\n\n"; + return 1; + } + + if ( !$password1 ) { + print "Sorry, you can't use an empty password here.\n\n"; + return 1; + } + + do_query("UPDATE mysql.user SET Password=PASSWORD('$password1') WHERE User='root';"); + if ( $? == 0 ) { + print "Password updated successfully!\n"; + print "Reloading privilege tables..\n"; + if ( !reload_privilege_tables() ) { + exit 1; + } + print "\n"; + $rootpass = $password1; + make_config($rootpass); + } else { + print "Password update failed!\n"; + exit 1; + } + + return 0; +} + +sub remove_anonymous_users { + do_query("DELETE FROM mysql.user WHERE User='';"); + if ( $? == 0 ) { + print " ... Success!\n"; + } else { + print " ... Failed!\n"; + exit 1; + } + + return 0; +} + +sub remove_remote_root { + do_query("DELETE FROM mysql.user WHERE User='root' AND Host!='localhost';"); + if ( $? == 0 ) { + print " ... Success!\n"; + } else { + print " ... Failed!\n"; + } +} + +sub remove_test_database { + print " - Dropping test database...\n"; + do_query("DROP DATABASE test;"); + if ( $? == 0 ) { + print " ... Success!\n"; + } else { + print " ... Failed! Not critical, keep moving...\n"; + } + + print " - Removing privileges on test database...\n"; + do_query("DELETE FROM mysql.db WHERE Db='test' OR Db='test\\_%'"); + if ( $? == 0 ) { + print " ... Success!\n"; + } else { + print " ... Failed! Not critical, keep moving...\n"; + } + + return 0; +} + +sub reload_privilege_tables { + do_query("FLUSH PRIVILEGES;"); + if ( $? == 0 ) { + print " ... Success!\n"; + return 0; + } else { + print " ... Failed!\n"; + return 1; + } +} + +sub interrupt { + print "\nAborting!\n\n"; + cleanup(); + echo_on(); + exit 1; +} + +sub cleanup { + print "Cleaning up...\n"; + unlink($config,$command); +} + + +# The actual script starts here + +prepare(); + +print <; +if ( $reply =~ /n/i ) { + print " ... skipping.\n"; +} else { + my $status = 1; + while ( $status == 1 ) { + set_root_password(); + $status = $?; + } +} +print "\n"; + + +# +# Remove anonymous users +# + +print <; +if ( $reply =~ /n/i ) { + print " ... skipping.\n"; +} else { + remove_anonymous_users(); +} +print "\n"; + + +# +# Disallow remote root login +# + +print <; +if ( $reply =~ /n/i ) { + print " ... skipping.\n"; +} else { + remove_remote_root(); +} +print "\n"; + + +# +# Remove test database +# + +print <; +if ( $reply =~ /n/i ) { + print " ... skipping.\n"; +} else { + remove_test_database(); +} +print "\n"; + + +# +# Reload privilege tables +# + +print <; +if ( $reply =~ /n/i ) { + print " ... skipping.\n"; +} else { + reload_privilege_tables(); +} +print "\n"; + +cleanup(); + +print < Date: Wed, 2 Jan 2008 13:00:46 +0000 Subject: [PATCH 039/527] Use pkglibdir to simplify pkgplugindir, and fix the path in a couple of Makefiles. Continuation of the fix for bug#31736. libmysqld/Makefile.am: Use pkglibdir plugin/daemon_example/Makefile.am: Use pkglibdir plugin/fulltext/Makefile.am: Use pkglibdir scripts/Makefile.am: Use pkglibdir scripts/make_binary_distribution.sh: Update comment sql/Makefile.am: Use pkglibdir storage/archive/Makefile.am: Use pkglibdir storage/blackhole/Makefile.am: Use pkglibdir storage/example/Makefile.am: Use pkglibdir, fix pkgplugindir storage/federated/Makefile.am: Use pkglibdir storage/innobase/Makefile.am: Use pkglibdir, fix pkgplugindir --- libmysqld/Makefile.am | 2 +- plugin/daemon_example/Makefile.am | 2 +- plugin/fulltext/Makefile.am | 2 +- scripts/Makefile.am | 2 +- scripts/make_binary_distribution.sh | 3 +-- sql/Makefile.am | 2 +- storage/archive/Makefile.am | 2 +- storage/blackhole/Makefile.am | 2 +- storage/example/Makefile.am | 2 +- storage/federated/Makefile.am | 2 +- storage/innobase/Makefile.am | 2 +- 11 files changed, 11 insertions(+), 12 deletions(-) diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index 117f8752629..446f2bf7f91 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -21,7 +21,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(libdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin EXTRA_DIST = libmysqld.def CMakeLists.txt DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ diff --git a/plugin/daemon_example/Makefile.am b/plugin/daemon_example/Makefile.am index 4256fecd873..c5414cd46c7 100644 --- a/plugin/daemon_example/Makefile.am +++ b/plugin/daemon_example/Makefile.am @@ -18,7 +18,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ diff --git a/plugin/fulltext/Makefile.am b/plugin/fulltext/Makefile.am index 2b9d075bae0..343416072dd 100644 --- a/plugin/fulltext/Makefile.am +++ b/plugin/fulltext/Makefile.am @@ -15,7 +15,7 @@ #Makefile.am example for a plugin -pkgplugindir=$(libdir)/@PACKAGE@/plugin +pkgplugindir=$(pkglibdir)/plugin INCLUDES= -I$(top_builddir)/include -I$(top_srcdir)/include #noinst_LTLIBRARIES= mypluglib.la pkgplugin_LTLIBRARIES= mypluglib.la diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 8669e075959..73c22031990 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -90,7 +90,7 @@ CLEANFILES = @server_scripts@ \ mysql_tableinfo \ mysqld_multi -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin # Default same as 'pkgdatadir', but we can override it pkgsuppdir = $(datadir)/@PACKAGE@ diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 88397052815..864e78657b0 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -30,8 +30,7 @@ # "pkglibdir" is set to the same as "libdir" # "pkgincludedir" is set to the same as "includedir" # "pkgdatadir" is set to the same as "datadir" -# "pkgplugindir" is set to "@prefix@/lib/plugin", -# normally "$libdir/plugin" +# "pkgplugindir" is set to "$pkglibdir/plugin" # "pkgsuppdir" is set to "@prefix@/support-files", # normally the same as "datadir" # diff --git a/sql/Makefile.am b/sql/Makefile.am index 02a92dee7a7..92ae7a05df7 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin INCLUDES = @ZLIB_INCLUDES@ \ -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/regex -I$(srcdir) $(openssl_includes) diff --git a/storage/archive/Makefile.am b/storage/archive/Makefile.am index 55f2380ec31..d092f091798 100644 --- a/storage/archive/Makefile.am +++ b/storage/archive/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ diff --git a/storage/blackhole/Makefile.am b/storage/blackhole/Makefile.am index 9810dff5866..db4f67cf847 100644 --- a/storage/blackhole/Makefile.am +++ b/storage/blackhole/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ diff --git a/storage/example/Makefile.am b/storage/example/Makefile.am index bf121e70f29..4b2f165377c 100644 --- a/storage/example/Makefile.am +++ b/storage/example/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/libdir +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ diff --git a/storage/federated/Makefile.am b/storage/federated/Makefile.am index d2ee37c402a..64ea0207017 100644 --- a/storage/federated/Makefile.am +++ b/storage/federated/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/plugin +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql \ diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index 8a5ce6d8a4b..563522cd032 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -19,7 +19,7 @@ MYSQLDATAdir = $(localstatedir) MYSQLSHAREdir = $(pkgdatadir) MYSQLBASEdir= $(prefix) MYSQLLIBdir= $(pkglibdir) -pkgplugindir = $(libdir)/@PACKAGE@/libdir +pkgplugindir = $(pkglibdir)/plugin INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include \ -I$(top_srcdir)/regex \ -I$(top_srcdir)/storage/innobase/include \ From 32e6ba224e712696967cf83728085374f906d0e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jan 2008 14:26:41 +0100 Subject: [PATCH 040/527] use correct config_readline.h file --- cmd-line-utils/readline/bind.c | 2 +- cmd-line-utils/readline/callback.c | 2 +- cmd-line-utils/readline/compat.c | 2 +- cmd-line-utils/readline/complete.c | 2 +- cmd-line-utils/readline/display.c | 2 +- cmd-line-utils/readline/funmap.c | 2 +- cmd-line-utils/readline/histexpand.c | 2 +- cmd-line-utils/readline/histfile.c | 2 +- cmd-line-utils/readline/history.c | 2 +- cmd-line-utils/readline/histsearch.c | 2 +- cmd-line-utils/readline/input.c | 2 +- cmd-line-utils/readline/isearch.c | 2 +- cmd-line-utils/readline/keymaps.c | 2 +- cmd-line-utils/readline/kill.c | 2 +- cmd-line-utils/readline/macro.c | 2 +- cmd-line-utils/readline/mbutil.c | 2 +- cmd-line-utils/readline/misc.c | 2 +- cmd-line-utils/readline/nls.c | 2 +- cmd-line-utils/readline/parens.c | 2 +- cmd-line-utils/readline/readline.c | 2 +- cmd-line-utils/readline/rldefs.h | 2 +- cmd-line-utils/readline/rltty.c | 2 +- cmd-line-utils/readline/rlwinsize.h | 2 +- cmd-line-utils/readline/savestring.c | 2 +- cmd-line-utils/readline/search.c | 2 +- cmd-line-utils/readline/shell.c | 2 +- cmd-line-utils/readline/signals.c | 2 +- cmd-line-utils/readline/tcap.h | 2 +- cmd-line-utils/readline/terminal.c | 2 +- cmd-line-utils/readline/text.c | 2 +- cmd-line-utils/readline/tilde.c | 2 +- cmd-line-utils/readline/undo.c | 2 +- cmd-line-utils/readline/util.c | 2 +- cmd-line-utils/readline/vi_mode.c | 2 +- cmd-line-utils/readline/xmalloc.c | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/cmd-line-utils/readline/bind.c b/cmd-line-utils/readline/bind.c index 08c906bfcc3..baed1dfad49 100644 --- a/cmd-line-utils/readline/bind.c +++ b/cmd-line-utils/readline/bind.c @@ -27,7 +27,7 @@ #endif #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/callback.c b/cmd-line-utils/readline/callback.c index ada04d8593b..2f7e4b78057 100644 --- a/cmd-line-utils/readline/callback.c +++ b/cmd-line-utils/readline/callback.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include "rlconf.h" diff --git a/cmd-line-utils/readline/compat.c b/cmd-line-utils/readline/compat.c index a66d210fd2e..3949bf6a16b 100644 --- a/cmd-line-utils/readline/compat.c +++ b/cmd-line-utils/readline/compat.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/complete.c b/cmd-line-utils/readline/complete.c index 73f834a68a7..d0c9e772f0f 100644 --- a/cmd-line-utils/readline/complete.c +++ b/cmd-line-utils/readline/complete.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/display.c b/cmd-line-utils/readline/display.c index 47ff0615974..6f63faa9738 100644 --- a/cmd-line-utils/readline/display.c +++ b/cmd-line-utils/readline/display.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/funmap.c b/cmd-line-utils/readline/funmap.c index 9c760cc3475..2d2a35ed0c8 100644 --- a/cmd-line-utils/readline/funmap.c +++ b/cmd-line-utils/readline/funmap.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #if !defined (BUFSIZ) diff --git a/cmd-line-utils/readline/histexpand.c b/cmd-line-utils/readline/histexpand.c index f46c0b2a45d..45377fc3b5e 100644 --- a/cmd-line-utils/readline/histexpand.c +++ b/cmd-line-utils/readline/histexpand.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/histfile.c b/cmd-line-utils/readline/histfile.c index 2f051a32563..d98293d933c 100644 --- a/cmd-line-utils/readline/histfile.c +++ b/cmd-line-utils/readline/histfile.c @@ -31,7 +31,7 @@ #endif #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/history.c b/cmd-line-utils/readline/history.c index 1ccf4db786c..5cd5788d1da 100644 --- a/cmd-line-utils/readline/history.c +++ b/cmd-line-utils/readline/history.c @@ -26,7 +26,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/histsearch.c b/cmd-line-utils/readline/histsearch.c index 1cc5875a4b4..b71965135cc 100644 --- a/cmd-line-utils/readline/histsearch.c +++ b/cmd-line-utils/readline/histsearch.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/input.c b/cmd-line-utils/readline/input.c index da5d771c481..62c0443d890 100644 --- a/cmd-line-utils/readline/input.c +++ b/cmd-line-utils/readline/input.c @@ -26,7 +26,7 @@ #endif #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/isearch.c b/cmd-line-utils/readline/isearch.c index 9f67bfc0801..8060adb97cd 100644 --- a/cmd-line-utils/readline/isearch.c +++ b/cmd-line-utils/readline/isearch.c @@ -27,7 +27,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/keymaps.c b/cmd-line-utils/readline/keymaps.c index 70d0cc08d3f..562c22d7558 100644 --- a/cmd-line-utils/readline/keymaps.c +++ b/cmd-line-utils/readline/keymaps.c @@ -21,7 +21,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #if defined (HAVE_STDLIB_H) diff --git a/cmd-line-utils/readline/kill.c b/cmd-line-utils/readline/kill.c index 031ddf47c5b..42c53948689 100644 --- a/cmd-line-utils/readline/kill.c +++ b/cmd-line-utils/readline/kill.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/macro.c b/cmd-line-utils/readline/macro.c index 00cd58d628c..3473f705335 100644 --- a/cmd-line-utils/readline/macro.c +++ b/cmd-line-utils/readline/macro.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/mbutil.c b/cmd-line-utils/readline/mbutil.c index 17dde53ed7b..e21708fb748 100644 --- a/cmd-line-utils/readline/mbutil.c +++ b/cmd-line-utils/readline/mbutil.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/misc.c b/cmd-line-utils/readline/misc.c index 94ecb25900a..e0e6893c60e 100644 --- a/cmd-line-utils/readline/misc.c +++ b/cmd-line-utils/readline/misc.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #if defined (HAVE_UNISTD_H) diff --git a/cmd-line-utils/readline/nls.c b/cmd-line-utils/readline/nls.c index bcee87561aa..6ec685ed9ea 100644 --- a/cmd-line-utils/readline/nls.c +++ b/cmd-line-utils/readline/nls.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/parens.c b/cmd-line-utils/readline/parens.c index 737f7675e93..fe1578ed3e2 100644 --- a/cmd-line-utils/readline/parens.c +++ b/cmd-line-utils/readline/parens.c @@ -28,7 +28,7 @@ #include "rlconf.h" #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/readline.c b/cmd-line-utils/readline/readline.c index c2b74006b05..8c3cad52d36 100644 --- a/cmd-line-utils/readline/readline.c +++ b/cmd-line-utils/readline/readline.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/rldefs.h b/cmd-line-utils/readline/rldefs.h index 0f6c87446dd..dcdfc49fbbc 100644 --- a/cmd-line-utils/readline/rldefs.h +++ b/cmd-line-utils/readline/rldefs.h @@ -27,7 +27,7 @@ #define _RLDEFS_H_ #if defined (HAVE_CONFIG_H) -# include "config.h" +# include "config_readline.h" #endif #include "rlstdc.h" diff --git a/cmd-line-utils/readline/rltty.c b/cmd-line-utils/readline/rltty.c index 0a570f85840..b5bc5d367a5 100644 --- a/cmd-line-utils/readline/rltty.c +++ b/cmd-line-utils/readline/rltty.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/rlwinsize.h b/cmd-line-utils/readline/rlwinsize.h index 7838154d023..60729b0f549 100644 --- a/cmd-line-utils/readline/rlwinsize.h +++ b/cmd-line-utils/readline/rlwinsize.h @@ -26,7 +26,7 @@ #define _RLWINSIZE_H_ #if defined (HAVE_CONFIG_H) -# include "config.h" +# include "config_readline.h" #endif /* Try to find the definitions of `struct winsize' and TIOGCWINSZ */ diff --git a/cmd-line-utils/readline/savestring.c b/cmd-line-utils/readline/savestring.c index 820428d8881..d42bcadf5d7 100644 --- a/cmd-line-utils/readline/savestring.c +++ b/cmd-line-utils/readline/savestring.c @@ -21,7 +21,7 @@ 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #define READLINE_LIBRARY -#include +#include "config_readline.h" #ifdef HAVE_STRING_H # include #endif diff --git a/cmd-line-utils/readline/search.c b/cmd-line-utils/readline/search.c index 33cc4fc1e73..cfa5db1dc17 100644 --- a/cmd-line-utils/readline/search.c +++ b/cmd-line-utils/readline/search.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/shell.c b/cmd-line-utils/readline/shell.c index 346f8113d43..5d084476bed 100644 --- a/cmd-line-utils/readline/shell.c +++ b/cmd-line-utils/readline/shell.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/signals.c b/cmd-line-utils/readline/signals.c index 54f2a642846..65c2ff308f6 100644 --- a/cmd-line-utils/readline/signals.c +++ b/cmd-line-utils/readline/signals.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include /* Just for NULL. Yuck. */ diff --git a/cmd-line-utils/readline/tcap.h b/cmd-line-utils/readline/tcap.h index 58ab894d93e..04252e72f2d 100644 --- a/cmd-line-utils/readline/tcap.h +++ b/cmd-line-utils/readline/tcap.h @@ -25,7 +25,7 @@ #define _RLTCAP_H_ #if defined (HAVE_CONFIG_H) -# include "config.h" +# include "config_readline.h" #endif #if defined (HAVE_TERMCAP_H) diff --git a/cmd-line-utils/readline/terminal.c b/cmd-line-utils/readline/terminal.c index 547f6f5dfe5..a630bc02e05 100644 --- a/cmd-line-utils/readline/terminal.c +++ b/cmd-line-utils/readline/terminal.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/text.c b/cmd-line-utils/readline/text.c index 399a48c5f1e..b26afeda525 100644 --- a/cmd-line-utils/readline/text.c +++ b/cmd-line-utils/readline/text.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #if defined (HAVE_UNISTD_H) diff --git a/cmd-line-utils/readline/tilde.c b/cmd-line-utils/readline/tilde.c index 1b76c9f2404..d50f7a0ffa4 100644 --- a/cmd-line-utils/readline/tilde.c +++ b/cmd-line-utils/readline/tilde.c @@ -20,7 +20,7 @@ Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */ #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #if defined (HAVE_UNISTD_H) diff --git a/cmd-line-utils/readline/undo.c b/cmd-line-utils/readline/undo.c index 9d9bd25ba8f..5699193b14c 100644 --- a/cmd-line-utils/readline/undo.c +++ b/cmd-line-utils/readline/undo.c @@ -23,7 +23,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/util.c b/cmd-line-utils/readline/util.c index e44ef64349d..935c9c927c2 100644 --- a/cmd-line-utils/readline/util.c +++ b/cmd-line-utils/readline/util.c @@ -22,7 +22,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/vi_mode.c b/cmd-line-utils/readline/vi_mode.c index d0b7e330adc..25213cb762f 100644 --- a/cmd-line-utils/readline/vi_mode.c +++ b/cmd-line-utils/readline/vi_mode.c @@ -32,7 +32,7 @@ #if defined (VI_MODE) #if defined (HAVE_CONFIG_H) -# include +# include "config_readline.h" #endif #include diff --git a/cmd-line-utils/readline/xmalloc.c b/cmd-line-utils/readline/xmalloc.c index 8985d340d39..cf52da351a8 100644 --- a/cmd-line-utils/readline/xmalloc.c +++ b/cmd-line-utils/readline/xmalloc.c @@ -21,7 +21,7 @@ #define READLINE_LIBRARY #if defined (HAVE_CONFIG_H) -#include +#include "config_readline.h" #endif #include From 59ce093339fe0a63d133780bd808a006ac2e3d5b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jan 2008 21:38:05 +0100 Subject: [PATCH 041/527] configure.in, acinclude.m4: Minor cleanup, removed semicolons not needed acinclude.m4: Minor cleanup, removed semicolons not needed configure.in: Minor cleanup, removed semicolons not needed --- acinclude.m4 | 4 ++-- configure.in | 30 +++++++++++++++--------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index ddc50d2972b..3fe600c8d5d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -859,11 +859,11 @@ AC_MSG_CHECKING(for OpenSSL) AC_MSG_RESULT(no) if test ! -z "$openssl_includes" then - AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl) fi if test ! -z "$openssl_libs" then - AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl) fi fi AC_SUBST(openssl_libs) diff --git a/configure.in b/configure.in index 7e7431465a8..b7ca0b4b5dc 100644 --- a/configure.in +++ b/configure.in @@ -150,7 +150,7 @@ CC_VERSION=`$CC --version | sed 1q` esac if test $? -eq "0" then - AC_MSG_CHECKING("C Compiler version"); + AC_MSG_CHECKING("C Compiler version") AC_MSG_RESULT("$CC $CC_VERSION") else CC_VERSION="" @@ -165,7 +165,7 @@ CXX_VERSION=`$CXX --version | sed 1q` esac if test $? -eq "0" then - AC_MSG_CHECKING("C++ compiler version"); + AC_MSG_CHECKING("C++ compiler version") AC_MSG_RESULT("$CXX $CXX_VERSION") else CXX_VERSION="" @@ -389,12 +389,12 @@ if expr "$target_os" : "[[Ll]]inux.*" > /dev/null then MYSQLD_DEFAULT_SWITCHES="--skip-locking" TARGET_LINUX="true" - AC_MSG_RESULT("yes"); + AC_MSG_RESULT("yes") AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux]) else MYSQLD_DEFAULT_SWITCHES="" TARGET_LINUX="false" - AC_MSG_RESULT("no"); + AC_MSG_RESULT("no") fi AC_SUBST(MYSQLD_DEFAULT_SWITCHES) AC_SUBST(TARGET_LINUX) @@ -1289,7 +1289,7 @@ See the Installation chapter in the Reference Manual for more information.]) else AC_MSG_RESULT("no need to check headers") fi - AC_MSG_CHECKING("for pthread_create in -lpthread"); + AC_MSG_CHECKING("for pthread_create in -lpthread") ac_save_LIBS="$LIBS" LIBS="$LIBS -lpthread" AC_TRY_LINK( [#include ], @@ -1359,7 +1359,7 @@ then then AC_MSG_RESULT("yes") else - AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]); + AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]) fi AC_MSG_RESULT("yes") elif test -f /usr/local/lib/libpthread.a -o -f /usr/local/lib/libpthread.so @@ -1375,7 +1375,7 @@ then then AC_MSG_RESULT("yes") else - AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]); + AC_MSG_ERROR([On SCO UNIX MySQL must be compiled with gcc. See the Installation chapter in the Reference Manual.]) fi AC_MSG_RESULT("yes") # Hack for SCO UnixWare 7.1.x @@ -1419,7 +1419,7 @@ then AC_MSG_RESULT("no") fi else - AC_MSG_ERROR([On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual.]); + AC_MSG_ERROR([On SCO UNIX MySQL requires that the FSUThreads package is installed. See the Installation chapter in the Reference Manual.]) fi else AC_MSG_RESULT("no") @@ -1564,7 +1564,7 @@ else if test "$with_mit_threads" = "no" then # pthread_create is in standard libraries (As in BSDI 3.0) - AC_MSG_CHECKING("for pthread_create in -libc"); + AC_MSG_CHECKING("for pthread_create in -libc") AC_TRY_LINK( [#include ], [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], @@ -1572,7 +1572,7 @@ else AC_MSG_RESULT("$with_posix_threads") if test "$with_posix_threads" = "no" then - AC_MSG_CHECKING("for pthread_create in -lpthread"); + AC_MSG_CHECKING("for pthread_create in -lpthread") ac_save_LIBS="$LIBS" ac_save_TOOLS_LIBS="$TOOLS_LIBS" LIBS="$LIBS -lpthread" @@ -1586,7 +1586,7 @@ else then LIBS=" $ac_save_LIBS -lpthreads" TOOLS_LIBS=" $ac_save_TOOLS_LIBS -lpthreads" - AC_MSG_CHECKING("for pthread_create in -lpthreads"); + AC_MSG_CHECKING("for pthread_create in -lpthreads") AC_TRY_LINK( [#include ], [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], @@ -1597,7 +1597,7 @@ else # This is for FreeBSD LIBS="$ac_save_LIBS -pthread" TOOLS_LIBS="$ac_save_TOOLS_LIBS -pthread" - AC_MSG_CHECKING("for pthread_create in -pthread"); + AC_MSG_CHECKING("for pthread_create in -pthread") AC_TRY_LINK( [#include ], [ pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ], @@ -1840,7 +1840,7 @@ if test "$ac_cv_conv_longlong_to_float" != "yes" then AC_MSG_ERROR([Your compiler cannot convert a longlong value to a float! If you are using gcc 2.8.# you should upgrade to egcs 1.0.3 or newer and try -again]); +again]) fi fi MYSQL_PTHREAD_YIELD @@ -1923,7 +1923,7 @@ CFLAGS="$ORG_CFLAGS" AC_CHECK_FUNCS(fseeko, [if test "$large_file_support" = no -a "$TARGET_LINUX" = "true"; then - AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!"); + AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!") fi] ) @@ -2379,7 +2379,7 @@ do if test $charset_okay = 0; then AC_MSG_ERROR([Charset '$cs' not available. (Available $CHARSETS_AVAILABLE). - See the Installation chapter in the Reference Manual.]); + See the Installation chapter in the Reference Manual.]) fi done From 3ca5566036dbbf53411d83987e9c9ac6a5a6e5ef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jan 2008 11:34:23 +0100 Subject: [PATCH 042/527] ndb - dict remove dead code storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: remove dead code storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: remove dead code --- storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 7 ------- storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp | 2 -- 2 files changed, 9 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 7ced078144a..a61a5bc035c 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -4086,9 +4086,7 @@ Dbdict::execALTER_TABLE_REQ(Signal* signal) bool ok = false; switch(tabState){ case TableRecord::NOT_DEFINED: - case TableRecord::REORG_TABLE_PREPARED: case TableRecord::DEFINING: - case TableRecord::CHECKED: jam(); alterTableRef(signal, req, AlterTableRef::NoSuchTable); return; @@ -4339,9 +4337,7 @@ Dbdict::execALTER_TAB_REQ(Signal * signal) bool ok = false; switch(tabState){ case TableRecord::NOT_DEFINED: - case TableRecord::REORG_TABLE_PREPARED: case TableRecord::DEFINING: - case TableRecord::CHECKED: jam(); alterTabRef(signal, req, AlterTableRef::NoSuchTable); return; @@ -6690,9 +6686,7 @@ Dbdict::execDROP_TABLE_REQ(Signal* signal){ bool ok = false; switch(tabState){ case TableRecord::NOT_DEFINED: - case TableRecord::REORG_TABLE_PREPARED: case TableRecord::DEFINING: - case TableRecord::CHECKED: jam(); dropTableRef(signal, req, DropTableRef::NoSuchTable); return; @@ -7718,7 +7712,6 @@ Dbdict::execLIST_TABLES_REQ(Signal* signal) if(DictTabInfo::isTable(type)){ switch (tablePtr.p->tabState) { case TableRecord::DEFINING: - case TableRecord::CHECKED: conf->setTableState(pos, DictTabInfo::StateBuilding); break; case TableRecord::PREPARE_DROPPING: diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp index 3fff330d699..1189b23c14d 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp @@ -320,9 +320,7 @@ public: enum TabState { NOT_DEFINED = 0, - REORG_TABLE_PREPARED = 1, DEFINING = 2, - CHECKED = 3, DEFINED = 4, PREPARE_DROPPING = 5, DROPPING = 6, From fa01e8845b6b75c0d5f1f564ff5705a2c3735468 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jan 2008 12:06:20 +0100 Subject: [PATCH 043/527] Bug#30459 Partitioning across disks failing on Windows Problem was that there are no support for symlinked files on Windows for mysqld. So we fail when trying to create them. Solution: Ignore the DATA/INDEX DIRECTORY clause for partitions and push a warning. (Just like a MyISAM table) mysql-test/r/partition.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink result file mysql-test/r/partition_symlink.result: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test result file mysql-test/r/partition_windows.result: Bug#30459 Partitioning across disks failing on Windows result file mysql-test/t/partition.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests to partition_symlink test file mysql-test/t/partition_symlink.test: Bug#30459 Partitioning across disks failing on Windows Moved symlink specific tests from partition.test test file mysql-test/t/partition_windows.test: Bug#30459 Partitioning across disks failing on Windows test file --- mysql-test/r/partition.result | 28 --------------- mysql-test/r/partition_symlink.result | 31 +++++++++++++++++ mysql-test/r/partition_windows.result | 40 ++++++++++++++------- mysql-test/t/partition.test | 47 ------------------------- mysql-test/t/partition_symlink.test | 50 ++++++++++++++++++++++++++- mysql-test/t/partition_windows.test | 37 +++++++++++++------- sql/partition_info.cc | 14 ++++++-- 7 files changed, 144 insertions(+), 103 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index a361a8f6bcc..161337ae8a6 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -44,15 +44,6 @@ partition by key(a) partitions 1e+300; ERROR 42000: Only integers allowed as number here near '1e+300' at line 3 create table t1 (a int) -partition by key (a) -(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); -ERROR 42000: Incorrect table name 'part-data' -create table t1 (a int) -partition by key (a) -(partition p0, -partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); -ERROR 42000: Incorrect table name 'part-data' -create table t1 (a int) partition by list (a) (partition p0 values in (1)); create procedure pz() @@ -1207,25 +1198,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' id 22589 drop table t1, t2; -set @org_mode=@@sql_mode; -set @@sql_mode='NO_DIR_IN_CREATE'; -select @@sql_mode; -@@sql_mode -NO_DIR_IN_CREATE -create table t1 (i int ) -partition by range (i) -( -partition p01 values less than (1000) -data directory='/not/existing' - index directory='/not/existing' -); -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ -DROP TABLE t1, t2; -set @@sql_mode=@org_mode; create table t1 (c1 varchar(255),c2 tinyint,primary key(c1)) partition by key (c1) partitions 10 ; insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result index 20e841d2e0e..8b55124d7eb 100644 --- a/mysql-test/r/partition_symlink.result +++ b/mysql-test/r/partition_symlink.result @@ -81,3 +81,34 @@ Got one of the listed errors DROP DATABASE mysqltest2; USE test; DROP USER mysqltest_1@localhost; +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +@@sql_mode +NO_DIR_IN_CREATE +create table t1 (i int ) +partition by range (i) +( +partition p01 values less than (1000) +data directory='/not/existing' + index directory='/not/existing' +); +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; +create table t1 (a int) +partition by key (a) +(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); +ERROR 42000: Incorrect table name 'part-data' +create table t1 (a int) +partition by key (a) +(partition p0, +partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); +ERROR 42000: Incorrect table name 'part-data' diff --git a/mysql-test/r/partition_windows.result b/mysql-test/r/partition_windows.result index 1fc9e2ba254..c2d4054deeb 100644 --- a/mysql-test/r/partition_windows.result +++ b/mysql-test/r/partition_windows.result @@ -1,14 +1,30 @@ -DROP TABLE IF EXISTS `example`; -CREATE TABLE `example` ( -`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, -`DESCRIPTION` varchar(30) NOT NULL, -`LEVEL` smallint(5) unsigned DEFAULT NULL, -PRIMARY KEY (`ID_EXAMPLE`) +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 ( +c1 int(10) unsigned NOT NULL AUTO_INCREMENT, +c2 varchar(30) NOT NULL, +c3 smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (c1) ) ENGINE = MYISAM -PARTITION BY HASH(ID_EXAMPLE)( -PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data', -PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data', -PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data', -PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data' +PARTITION BY HASH(c1)( +PARTITION p0 +DATA DIRECTORY = 'C:/mysqltest/p0Data' + INDEX DIRECTORY = 'D:/mysqltest/p0Index', +PARTITION p1, +PARTITION p2 +DATA DIRECTORY = 'E:/mysqltest/p2Data' + INDEX DIRECTORY = 'F:/mysqltest/p2Index' ); -ERROR HY000: Can't create/write to file 'C:\build\5.1\data\partitiontest\p0Data\example#P#p0.MYD' (Errcode: 2) +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +INSERT INTO t1 VALUES (NULL, "first", 1); +INSERT INTO t1 VALUES (NULL, "second", 2); +INSERT INTO t1 VALUES (NULL, "third", 3); +ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index'); +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored +INSERT INTO t1 VALUES (NULL, "last", 4); +DROP TABLE t1; diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..183b348d473 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -78,24 +78,6 @@ create table t1 (a int) partition by key(a) partitions 1e+300; -# -# Bug 21350: Data Directory problems -# --- error ER_WRONG_TABLE_NAME -create table t1 (a int) -partition by key (a) -(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); - -# -# Insert a test that manages to create the first partition and fails with -# the second, ensure that we clean up afterwards in a proper manner. -# ---error ER_WRONG_TABLE_NAME -create table t1 (a int) -partition by key (a) -(partition p0, - partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); - # # Bug 19309 Partitions: Crash if double procedural alter # @@ -1398,35 +1380,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' drop table t1, t2; -# -# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables -# - -disable_query_log; -eval create table t2 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" -); -enable_query_log; - -set @org_mode=@@sql_mode; -set @@sql_mode='NO_DIR_IN_CREATE'; -select @@sql_mode; -create table t1 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory='/not/existing' - index directory='/not/existing' -); - -show create table t2; -DROP TABLE t1, t2; -set @@sql_mode=@org_mode; - # # Bug #27123 partition + on duplicate key update + varchar = Can't find record in # diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test index ab779ec2b68..ec809a34090 100644 --- a/mysql-test/t/partition_symlink.test +++ b/mysql-test/t/partition_symlink.test @@ -2,7 +2,9 @@ # (DATA/INDEX DIR requires symlinks) -- source include/have_partition.inc -- source include/have_symlink.inc -# remove the not_windows line after fixing bug#30459 +# remove the not_windows line after fixing bug#33687 +# symlinks must also work for files, not only directories +# as in --skip-symbolic-links -- source include/not_windows.inc -- disable_warnings DROP TABLE IF EXISTS t1; @@ -118,4 +120,50 @@ connection default; DROP USER mysqltest_1@localhost; disconnect con1; +# +# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables +# + +disable_query_log; +eval create table t2 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory="$MYSQLTEST_VARDIR/master-data/test/" + index directory="$MYSQLTEST_VARDIR/master-data/test/" +); +enable_query_log; + +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +create table t1 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory='/not/existing' + index directory='/not/existing' +); + +show create table t2; +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; + +# +# Bug 21350: Data Directory problems +# +-- error ER_WRONG_TABLE_NAME +create table t1 (a int) +partition by key (a) +(partition p0 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); + +# +# Insert a test that manages to create the first partition and fails with +# the second, ensure that we clean up afterwards in a proper manner. +# +--error ER_WRONG_TABLE_NAME +create table t1 (a int) +partition by key (a) +(partition p0, + partition p1 DATA DIRECTORY 'part-data' INDEX DIRECTORY 'part-data'); diff --git a/mysql-test/t/partition_windows.test b/mysql-test/t/partition_windows.test index a0723feac44..d42a7383c99 100644 --- a/mysql-test/t/partition_windows.test +++ b/mysql-test/t/partition_windows.test @@ -7,23 +7,34 @@ # # Bug 25141: Crash Server on Partitioning command # +# Bug#30459: Partitioning across disks failing on Windows +# updated this test, since symlinked files are not supported on Windows +# (not the same as symlinked directories that have a special hack +# on windows). This test is not dependent on have_symlink. --disable_warnings -DROP TABLE IF EXISTS `example`; +DROP TABLE IF EXISTS t1; --enable_warnings ---disable_abort_on_error -CREATE TABLE `example` ( - `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, - `DESCRIPTION` varchar(30) NOT NULL, - `LEVEL` smallint(5) unsigned DEFAULT NULL, - PRIMARY KEY (`ID_EXAMPLE`) +CREATE TABLE t1 ( + c1 int(10) unsigned NOT NULL AUTO_INCREMENT, + c2 varchar(30) NOT NULL, + c3 smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (c1) ) ENGINE = MYISAM -PARTITION BY HASH(ID_EXAMPLE)( -PARTITION p0 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p0Data', -PARTITION p1 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p1Data', -PARTITION p2 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p2Data', -PARTITION p3 DATA DIRECTORY = 'C:/build/5.1/data/partitiontest/p3Data' +PARTITION BY HASH(c1)( + PARTITION p0 + DATA DIRECTORY = 'C:/mysqltest/p0Data' + INDEX DIRECTORY = 'D:/mysqltest/p0Index', + PARTITION p1, + PARTITION p2 + DATA DIRECTORY = 'E:/mysqltest/p2Data' + INDEX DIRECTORY = 'F:/mysqltest/p2Index' ); ---enable_abort_on_error +INSERT INTO t1 VALUES (NULL, "first", 1); +INSERT INTO t1 VALUES (NULL, "second", 2); +INSERT INTO t1 VALUES (NULL, "third", 3); +ALTER TABLE t1 ADD PARTITION (PARTITION p3 DATA DIRECTORY = 'G:/mysqltest/p3Data' INDEX DIRECTORY = 'H:/mysqltest/p3Index'); +INSERT INTO t1 VALUES (NULL, "last", 4); +DROP TABLE t1; diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3b580422da1..16433497efd 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -794,8 +794,18 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, partition_element *part_elem= part_it++; if (part_elem->engine_type == NULL) part_elem->engine_type= default_engine_type; - if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) - part_elem->data_file_name= part_elem->index_file_name= 0; +#ifdef HAVE_READLINK + if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) +#endif + { + if (part_elem->data_file_name) + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, + "DATA DIRECTORY option ignored"); + if (part_elem->index_file_name) + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, + "INDEX DIRECTORY option ignored"); + part_elem->data_file_name= part_elem->index_file_name= NULL; + } if (!is_sub_partitioned()) { if (check_table_name(part_elem->partition_name, From 6074712beb90f1ef01716356203c9ec17f61c5de Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jan 2008 15:33:01 +0100 Subject: [PATCH 044/527] Bug#32648 Test failure between NDB Cluster and other engines mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test: Rename: mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test -> mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result: Rename: mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result -> mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt: Rename: mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt -> mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test: Rename: mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test -> mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result: Rename: mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result -> mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test: Rename: mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test -> mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result: Rename: mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result -> mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result --- mysql-test/lib/mtr_cases.pl | 1 + .../r/rpl_ndb_dd_advance.result | 0 .../r/rpl_ndb_extraColMaster.result | 0 .../r/rpl_ndb_mix_innodb.result | 0 mysql-test/suite/ndb_team/t/disabled.def | 3 + .../t/rpl_ndb_dd_advance.test | 0 .../t/rpl_ndb_extraColMaster.test | 0 .../t/rpl_ndb_mix_innodb-master.opt | 0 .../t/rpl_ndb_mix_innodb.test | 0 .../suite/rpl_ndb/r/rpl_ndb_2innodb.result | 61 +-- .../suite/rpl_ndb/r/rpl_ndb_2myisam.result | 57 +-- .../suite/rpl_ndb/r/rpl_ndb_2ndb.result | 401 +++++++++++++++++ .../suite/rpl_ndb/r/rpl_ndb_2other.result | 403 +----------------- mysql-test/suite/rpl_ndb/t/disabled.def | 7 - .../rpl_ndb/t/rpl_ndb_2innodb-master.opt | 2 +- .../suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt | 2 +- .../suite/rpl_ndb/t/rpl_ndb_2innodb.test | 18 +- .../rpl_ndb/t/rpl_ndb_2myisam-master.opt | 2 +- .../suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt | 2 +- .../suite/rpl_ndb/t/rpl_ndb_2myisam.test | 16 +- .../suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt | 1 + mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test | 19 + .../suite/rpl_ndb/t/rpl_ndb_2other-slave.opt | 2 +- .../suite/rpl_ndb/t/rpl_ndb_2other.test | 16 +- 24 files changed, 543 insertions(+), 470 deletions(-) rename mysql-test/suite/{rpl_ndb => ndb_team}/r/rpl_ndb_dd_advance.result (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/r/rpl_ndb_extraColMaster.result (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/r/rpl_ndb_mix_innodb.result (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/t/rpl_ndb_dd_advance.test (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/t/rpl_ndb_extraColMaster.test (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/t/rpl_ndb_mix_innodb-master.opt (100%) rename mysql-test/suite/{rpl_ndb => ndb_team}/t/rpl_ndb_mix_innodb.test (100%) create mode 100644 mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt create mode 100644 mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 0d705104303..566f48903f5 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -831,6 +831,7 @@ our @tags= ["include/have_ndb.inc", "ndb_test", 1], ["include/have_multi_ndb.inc", "ndb_test", 1], ["include/have_ndb_extra.inc", "ndb_extra", 1], + ["include/ndb_master-slave.inc", "ndb_test", 1], ["require_manager", "require_manager", 1], ); diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result b/mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result similarity index 100% rename from mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result rename to mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result similarity index 100% rename from mysql-test/suite/rpl_ndb/r/rpl_ndb_extraColMaster.result rename to mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result b/mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result similarity index 100% rename from mysql-test/suite/rpl_ndb/r/rpl_ndb_mix_innodb.result rename to mysql-test/suite/ndb_team/r/rpl_ndb_mix_innodb.result diff --git a/mysql-test/suite/ndb_team/t/disabled.def b/mysql-test/suite/ndb_team/t/disabled.def index 8ff2d29147d..714f1014a10 100644 --- a/mysql-test/suite/ndb_team/t/disabled.def +++ b/mysql-test/suite/ndb_team/t/disabled.def @@ -15,3 +15,6 @@ ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t # 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/rpl_ndb/t/rpl_ndb_dd_advance.test b/mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test similarity index 100% rename from mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test rename to mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test b/mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test similarity index 100% rename from mysql-test/suite/rpl_ndb/t/rpl_ndb_extraColMaster.test rename to mysql-test/suite/ndb_team/t/rpl_ndb_extraColMaster.test diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt similarity index 100% rename from mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb-master.opt rename to mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb-master.opt diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test b/mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test similarity index 100% rename from mysql-test/suite/rpl_ndb/t/rpl_ndb_mix_innodb.test rename to mysql-test/suite/ndb_team/t/rpl_ndb_mix_innodb.test diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result index f8ec4624062..d1390eb585d 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2innodb.result @@ -4,7 +4,13 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -SET storage_engine=ndb; +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 --- @@ -27,7 +33,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 --- Show table on slave --- SHOW CREATE TABLE t1; Table Create Table @@ -100,7 +106,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () +) 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; @@ -186,7 +192,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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 @@ -200,7 +206,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -258,7 +264,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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; @@ -274,7 +280,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -299,11 +305,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -342,7 +348,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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 @@ -356,7 +362,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -414,7 +420,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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; @@ -430,7 +436,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -495,7 +501,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -508,7 +514,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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 ""; @@ -533,11 +539,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -566,7 +572,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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; @@ -582,7 +588,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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 ""; @@ -607,11 +613,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -648,7 +654,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Show that tables on slave --- SHOW CREATE TABLE t1; Table Create Table @@ -663,7 +669,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -720,7 +726,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) 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; @@ -736,7 +742,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -793,7 +799,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) 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; @@ -809,7 +815,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -853,3 +859,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +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 index 8611d83f3f3..05bc480c50d 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2myisam.result @@ -4,7 +4,13 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -SET storage_engine=ndb; +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 --- @@ -186,7 +192,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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 @@ -200,7 +206,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -258,7 +264,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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; @@ -274,7 +280,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -299,11 +305,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -342,7 +348,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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 @@ -356,7 +362,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -414,7 +420,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 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) +) 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; @@ -430,7 +436,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 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) +) 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 ""; @@ -495,7 +501,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 */ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -508,7 +514,7 @@ t1 CREATE TABLE `t1` ( `total` bigint(20) unsigned DEFAULT NULL, `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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 ""; @@ -533,11 +539,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -566,7 +572,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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; @@ -582,7 +588,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date NOT NULL DEFAULT '0000-00-00', PRIMARY KEY (`t`,`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY HASH ( YEAR(t)) PARTITIONS 4 +) 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 ""; @@ -607,11 +613,11 @@ 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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 1 Testing MySQL databases is a cool Must make it bug free for the customer 654321.4321 15.21 0 1965 2006-02-22 +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 --- @@ -648,7 +654,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=ndbcluster DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Show that tables on slave --- SHOW CREATE TABLE t1; Table Create Table @@ -663,7 +669,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -720,7 +726,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) 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; @@ -736,7 +742,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -793,7 +799,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=ndbcluster DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) 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; @@ -809,7 +815,7 @@ t1 CREATE TABLE `t1` ( `y` year(4) DEFAULT NULL, `t` date DEFAULT NULL, PRIMARY KEY (`id`,`total`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 PARTITION BY KEY () PARTITIONS 4 +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY () PARTITIONS 4 */ --- Perform basic operation on master --- --- and ensure replicated correctly --- "--- Insert into t1 --" as ""; @@ -853,3 +859,4 @@ DELETE FROM t1; --- End test 5 key partition testing --- --- Do Cleanup --- DROP TABLE IF EXISTS t1; +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 new file mode 100644 index 00000000000..a28ec04fdf0 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2ndb.result @@ -0,0 +1,401 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 === + +SET storage_engine=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=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; 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 56b997028e9..f838b406b21 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_2other.result @@ -8,6 +8,13 @@ SET storage_engine=ndb; === NDB -> MYISAM === +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; @@ -402,6 +409,7 @@ 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; @@ -793,397 +801,4 @@ TRUNCATE TABLE t1; TRUNCATE TABLE t1; --- Do Cleanup -- DROP TABLE IF EXISTS t1; - -=== NDB -> NDB === - -SET storage_engine=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=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; diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index bb701b9dc3e..1ca2fff0b3e 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -11,13 +11,6 @@ ############################################################################## -rpl_ndb_2innodb : Bug #32648 Test failure between NDB Cluster and other engines -rpl_ndb_2myisam : Bug #32648 Test failure between NDB Cluster and other engines -rpl_ndb_2other : Bug #32648 Test failure between NDB Cluster and other engines rpl_ndb_ctype_ucs2_def : BUG#27404 util thd mysql_parse sig11 when mysqld default multibyte charset -rpl_ndb_extraColMaster : BUG#30854 : Tables name show as binary in slave err msg on vm-win2003-64-b and Solaris -rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC and PowerPC # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open - -#rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly 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 index 701dddb075b..9a3f30e4bd0 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-master.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster +--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 index d8857e54be2..0d3f1619f1e 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb-slave.opt @@ -1 +1 @@ ---innodb --default-storage-engine=innodb +--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 index 30e4e49eb7a..a91429f6014 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2innodb.test @@ -8,9 +8,19 @@ # test and to have control over the tests. ############################################################## -- source include/have_ndb.inc --- source include/ndb_master-slave.inc -connection slave; +-- source include/master-slave.inc + +-- connection slave -- source include/have_innodb.inc -connection master; -SET storage_engine=ndb; +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 + +--connection slave +drop table mysql.ndb_apply_status; 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 index 701dddb075b..b63ef44e8fc 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-master.opt @@ -1 +1 @@ ---default-storage-engine=ndbcluster +--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 index 6035ce27c46..9b5f524e131 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam-slave.opt @@ -1 +1 @@ ---default-storage-engine=myisam +--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 index 182d4c72d87..6a1c4fbc339 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2myisam.test @@ -8,6 +8,18 @@ # test and to have control over the tests. ############################################################## -- source include/have_ndb.inc --- source include/ndb_master-slave.inc -SET storage_engine=ndb; +-- source include/master-slave.inc + +-- connection slave +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 + +--connection slave +drop table mysql.ndb_apply_status; 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 new file mode 100644 index 00000000000..acd68493e0a --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb-slave.opt @@ -0,0 +1 @@ +--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 new file mode 100644 index 00000000000..1be325ed9a1 --- /dev/null +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2ndb.test @@ -0,0 +1,19 @@ +############################################################# +# 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/ndb_master-slave.inc + +# On master use NDB as storage engine. +connection master; +SET storage_engine=ndb; + +--echo +--echo === NDB -> NDB === +--echo +connection slave; +SET storage_engine=ndb; +--source extra/rpl_tests/rpl_ndb_2multi_basic.test 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 index a6c65034e68..188b31efa8a 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other-slave.opt @@ -1 +1 @@ ---innodb --log-slave-updates=0 +--innodb --ndbcluster=0 --log-slave-updates=0 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 b7e393ca3cc..aa1ba733863 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_2other.test @@ -7,7 +7,7 @@ --source include/have_ndb.inc --source include/have_innodb.inc --source include/have_binlog_format_mixed_or_row.inc ---source include/ndb_master-slave.inc +--source include/master-slave.inc # On master use NDB as storage engine. connection master; @@ -17,6 +17,13 @@ SET storage_engine=ndb; --echo === NDB -> MYISAM === --echo connection slave; +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 @@ -24,12 +31,9 @@ SET storage_engine=myisam; --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 ---echo ---echo === NDB -> NDB === ---echo connection slave; -SET storage_engine=ndb; ---source extra/rpl_tests/rpl_ndb_2multi_basic.test +drop table mysql.ndb_apply_status; From 78d0a794f45fe437f5613a901fd468ab147d6c2e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 4 Jan 2008 16:49:39 +0100 Subject: [PATCH 045/527] correct result file --- .../ndb_team/r/rpl_ndb_extraColMaster.result | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result index 194e6a375f3..3baf6afd56e 100644 --- a/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result +++ b/mysql-test/suite/ndb_team/r/rpl_ndb_extraColMaster.result @@ -440,14 +440,14 @@ f1 f2 f3 f4 select * from t4 order by f1; f1 f2 f3 f4 1 1 1 first -select * from t31 order by f1; +select * from t31 order by f3; f1 f2 f3 f4 -1 1 5 fifth -1 1 3 third 1 1 1 first -1 1 6 sixth 1 1 2 second +1 1 3 third 1 1 4 fourth +1 1 5 fifth +1 1 6 sixth ** Do updates master ** @@ -563,7 +563,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1534 +Last_Errno 1535 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 Skip_Counter 0 Exec_Master_Log_Pos # @@ -581,7 +581,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # -Last_SQL_Errno 1534 +Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -638,7 +638,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1534 +Last_Errno 1535 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 Skip_Counter 0 Exec_Master_Log_Pos # @@ -656,7 +656,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # -Last_SQL_Errno 1534 +Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1581,14 +1581,14 @@ f1 f2 f3 f4 select * from t4 order by f1; f1 f2 f3 f4 1 1 1 first -select * from t31 order by f1; +select * from t31 order by f3; f1 f2 f3 f4 -1 1 5 fifth -1 1 3 third 1 1 1 first -1 1 6 sixth 1 1 2 second +1 1 3 third 1 1 4 fourth +1 1 5 fifth +1 1 6 sixth ** Do updates master ** @@ -1704,7 +1704,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1534 +Last_Errno 1535 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 Skip_Counter 0 Exec_Master_Log_Pos # @@ -1722,7 +1722,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # -Last_SQL_Errno 1534 +Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; @@ -1779,7 +1779,7 @@ Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table -Last_Errno 1534 +Last_Errno 1535 Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 Skip_Counter 0 Exec_Master_Log_Pos # @@ -1797,7 +1797,7 @@ Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # -Last_SQL_Errno 1534 +Last_SQL_Errno 1535 Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; From d2f7c2f9b9455c5fb19049d47bd30529285d1587 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jan 2008 13:23:35 +0100 Subject: [PATCH 046/527] ndb - bug#33739 page need to refetched after timeslice --- mysql-test/r/bdb_notembedded.result | 35 +++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++ .../ndb/src/kernel/blocks/dbtup/DbtupScan.cpp | 18 +++++++++ 3 files changed, 91 insertions(+) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp index eecbee4c058..36a274ef36a 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp @@ -601,6 +601,24 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr) if (lcp && lcp_list != RNIL) goto found_lcp_keep; + + switch(pos.m_get){ + case ScanPos::Get_next_tuple: + case ScanPos::Get_next_tuple_fs: + jam(); + key.m_page_idx += size; + // fall through + case ScanPos::Get_tuple: + case ScanPos::Get_tuple_fs: + jam(); + /** + * We need to refetch page after timeslice + */ + pos.m_get = ScanPos::Get_page; + break; + default: + break; + } while (true) { switch (pos.m_get) { From 68eb3c942162a479b8f50b6c4f3fc70cc4bb1b1a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jan 2008 13:56:01 +0100 Subject: [PATCH 047/527] WL#4084: Code changes due to enabled the disabled tests (including other improvements). BitKeeper/etc/ignore: Added mysql-test/funcs_1.log to the ignore list --- .bzrignore | 1 + .../suite/funcs_1/r/innodb_func_view.result | 516 +- .../suite/funcs_1/r/innodb_storedproc.result | 4104 +++-- .../funcs_1/r/innodb_storedproc_10.result | 113 +- .../suite/funcs_1/r/innodb_trig_03.result | 78 +- .../suite/funcs_1/r/innodb_trig_08.result | 51 +- .../funcs_1/r/innodb_trig_1011ext.result | 4 +- .../suite/funcs_1/r/innodb_views.result | 11782 +++++++++++++- .../suite/funcs_1/r/memory_func_view.result | 516 +- .../suite/funcs_1/r/memory_storedproc.result | 4148 +++-- .../funcs_1/r/memory_storedproc_10.result | 113 +- .../suite/funcs_1/r/memory_trig_03.result | 78 +- .../suite/funcs_1/r/memory_trig_08.result | 51 +- .../funcs_1/r/memory_trig_1011ext.result | 4 +- .../suite/funcs_1/r/memory_views.result | 11782 +++++++++++++- .../suite/funcs_1/r/myisam_func_view.result | 516 +- .../suite/funcs_1/r/myisam_storedproc.result | 4106 +++-- .../funcs_1/r/myisam_storedproc_10.result | 113 +- .../suite/funcs_1/r/myisam_trig_03.result | 78 +- .../suite/funcs_1/r/myisam_trig_08.result | 51 +- .../funcs_1/r/myisam_trig_1011ext.result | 4 +- .../suite/funcs_1/r/myisam_views.result | 13492 +++++++++++++++- .../suite/funcs_1/r/ndb_func_view.result | 516 +- .../suite/funcs_1/r/ndb_storedproc.result | 4120 +++-- .../suite/funcs_1/r/ndb_storedproc_10.result | 121 +- mysql-test/suite/funcs_1/r/ndb_trig_03.result | 78 +- mysql-test/suite/funcs_1/r/ndb_trig_08.result | 51 +- .../suite/funcs_1/r/ndb_trig_1011ext.result | 4 +- mysql-test/suite/funcs_1/r/ndb_views.result | 11782 +++++++++++++- .../funcs_1/storedproc/storedproc_10.inc | 87 +- .../funcs_1/storedproc/storedproc_master.inc | 5007 +++--- mysql-test/suite/funcs_1/t/disabled.def | 3 - mysql-test/suite/funcs_1/t/innodb__load.test | 6 +- .../suite/funcs_1/t/innodb_bitdata.test | 6 +- .../suite/funcs_1/t/innodb_cursors.test | 6 +- .../suite/funcs_1/t/innodb_storedproc.test | 3 + .../suite/funcs_1/t/innodb_trig_0102.test | 6 +- .../suite/funcs_1/t/innodb_trig_03.test | 6 +- .../suite/funcs_1/t/innodb_trig_03e.test | 5 +- .../suite/funcs_1/t/innodb_trig_0407.test | 6 +- .../suite/funcs_1/t/innodb_trig_08.test | 6 +- .../suite/funcs_1/t/innodb_trig_09.test | 6 +- .../suite/funcs_1/t/innodb_trig_1011ext.test | 6 +- .../suite/funcs_1/t/innodb_trig_frkey.test | 6 +- mysql-test/suite/funcs_1/t/innodb_views.test | 2 - mysql-test/suite/funcs_1/t/memory__load.test | 6 +- .../suite/funcs_1/t/memory_bitdata.test | 6 +- .../suite/funcs_1/t/memory_cursors.test | 6 +- .../suite/funcs_1/t/memory_storedproc.test | 2 + .../suite/funcs_1/t/memory_trig_0102.test | 6 +- .../suite/funcs_1/t/memory_trig_03.test | 6 +- .../suite/funcs_1/t/memory_trig_03e.test | 5 +- .../suite/funcs_1/t/memory_trig_0407.test | 6 +- .../suite/funcs_1/t/memory_trig_08.test | 6 +- .../suite/funcs_1/t/memory_trig_09.test | 6 +- .../suite/funcs_1/t/memory_trig_1011ext.test | 6 +- mysql-test/suite/funcs_1/t/memory_views.test | 2 - mysql-test/suite/funcs_1/t/myisam__load.test | 6 +- .../suite/funcs_1/t/myisam_bitdata.test | 7 +- .../suite/funcs_1/t/myisam_cursors.test | 3 +- .../suite/funcs_1/t/myisam_storedproc.test | 2 + .../suite/funcs_1/t/myisam_trig_0102.test | 6 +- .../suite/funcs_1/t/myisam_trig_03.test | 7 +- .../suite/funcs_1/t/myisam_trig_03e.test | 5 +- .../suite/funcs_1/t/myisam_trig_0407.test | 7 +- .../suite/funcs_1/t/myisam_trig_08.test | 7 +- .../suite/funcs_1/t/myisam_trig_09.test | 7 +- .../suite/funcs_1/t/myisam_trig_1011ext.test | 7 +- mysql-test/suite/funcs_1/t/myisam_views.test | 3 +- mysql-test/suite/funcs_1/t/ndb__load.test | 6 +- mysql-test/suite/funcs_1/t/ndb_bitdata.test | 8 +- mysql-test/suite/funcs_1/t/ndb_cursors.test | 8 +- .../suite/funcs_1/t/ndb_storedproc.test | 9 + mysql-test/suite/funcs_1/t/ndb_trig_0102.test | 6 +- mysql-test/suite/funcs_1/t/ndb_trig_03.test | 8 +- mysql-test/suite/funcs_1/t/ndb_trig_03e.test | 7 +- mysql-test/suite/funcs_1/t/ndb_trig_0407.test | 6 +- mysql-test/suite/funcs_1/t/ndb_trig_08.test | 6 +- mysql-test/suite/funcs_1/t/ndb_trig_09.test | 6 +- .../suite/funcs_1/t/ndb_trig_1011ext.test | 6 +- mysql-test/suite/funcs_1/t/ndb_views.test | 2 - .../suite/funcs_1/triggers/triggers_03.inc | 69 +- .../suite/funcs_1/triggers/triggers_08.inc | 81 +- .../funcs_1/triggers/triggers_1011ext.inc | 7 +- mysql-test/suite/funcs_1/views/func_view.inc | 62 +- .../suite/funcs_1/views/views_master.inc | 133 +- 86 files changed, 64053 insertions(+), 10047 deletions(-) create mode 100644 mysql-test/suite/funcs_1/t/ndb_storedproc.test diff --git a/.bzrignore b/.bzrignore index 6e09cdd7b5d..b0e4d3ef18b 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3012,3 +3012,4 @@ win/vs8cache.txt ylwrap zlib/*.ds? zlib/*.vcproj +mysql-test/funcs_1.log diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 02ef728fad5..14568643665 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -89,6 +85,9 @@ 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, @@ -101,6 +100,7 @@ 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, @@ -113,6 +113,7 @@ 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, @@ -125,6 +126,7 @@ 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, @@ -135,11 +137,13 @@ 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" @@ -184,14 +188,12 @@ 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'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', ) - The file with expected results suffers from Bug 10963" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +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), @@ -284,19 +286,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; +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 = 190 OR select_id IS NULL) order by id; +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 = 189 OR select_id IS NULL order by id; +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 @@ -308,7 +310,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'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 = 189 OR select_id IS NULL) order by id; +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 @@ -322,13 +324,13 @@ 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 = 188 OR select_id IS NULL order by id; +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 = 188 OR select_id IS NULL) order by id; +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -336,13 +338,13 @@ 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 = 187 OR select_id IS NULL order by id; +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 = 187 OR select_id IS NULL) order by id; +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -350,13 +352,13 @@ 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 = 186 OR select_id IS NULL order by id; +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 = 186 OR select_id IS NULL) order by id; +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -364,13 +366,13 @@ 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 = 185 OR select_id IS NULL order by id; +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 = 185 OR select_id IS NULL) order by id; +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -378,13 +380,13 @@ 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 = 184 OR select_id IS NULL order by id; +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 = 184 OR select_id IS NULL) order by id; +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -392,13 +394,13 @@ 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 = 183 OR select_id IS NULL order by id; +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 = 183 OR select_id IS NULL) order by id; +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -406,13 +408,13 @@ 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 = 182 OR select_id IS NULL order by id; +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 = 182 OR select_id IS NULL) order by id; +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -420,13 +422,13 @@ 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 = 181 OR select_id IS NULL order by id; +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 = 181 OR select_id IS NULL) order by id; +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -434,13 +436,13 @@ 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 = 180 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 180 OR select_id IS NULL) order by id; +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -448,13 +450,13 @@ 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 = 179 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 179 OR select_id IS NULL) order by id; +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -462,13 +464,13 @@ 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 = 178 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 178 OR select_id IS NULL) order by id; +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -476,13 +478,13 @@ 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 = 177 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 177 OR select_id IS NULL) order by id; +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -490,13 +492,13 @@ 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 = 176 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 176 OR select_id IS NULL) order by id; +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -504,13 +506,13 @@ 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 = 175 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 175 OR select_id IS NULL) order by id; +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -518,13 +520,13 @@ 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 = 174 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 174 OR select_id IS NULL) order by id; +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -532,13 +534,13 @@ 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 = 173 OR select_id IS NULL order by id; +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 = 173 OR select_id IS NULL) order by id; +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -546,13 +548,13 @@ 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 = 172 OR select_id IS NULL order by id; +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 = 172 OR select_id IS NULL) order by id; +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -560,13 +562,13 @@ 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 = 171 OR select_id IS NULL order by id; +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 = 171 OR select_id IS NULL) order by id; +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -574,13 +576,13 @@ 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 = 170 OR select_id IS NULL order by id; +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 = 170 OR select_id IS NULL) order by id; +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -588,13 +590,13 @@ 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 = 169 OR select_id IS NULL order by id; +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 = 169 OR select_id IS NULL) order by id; +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -602,13 +604,13 @@ 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 = 168 OR select_id IS NULL order by id; +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 = 168 OR select_id IS NULL) order by id; +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -616,13 +618,13 @@ 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 = 167 OR select_id IS NULL order by id; +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 = 167 OR select_id IS NULL) order by id; +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -630,13 +632,13 @@ 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 = 166 OR select_id IS NULL order by id; +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 = 166 OR select_id IS NULL) order by id; +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -644,13 +646,13 @@ 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 = 165 OR select_id IS NULL order by id; +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 = 165 OR select_id IS NULL) order by id; +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -658,13 +660,13 @@ 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 = 164 OR select_id IS NULL order by id; +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 = 164 OR select_id IS NULL) order by id; +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -672,13 +674,13 @@ 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 = 163 OR select_id IS NULL order by id; +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 = 163 OR select_id IS NULL) order by id; +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -686,13 +688,13 @@ 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 = 162 OR select_id IS NULL order by id; +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 = 162 OR select_id IS NULL) order by id; +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -700,13 +702,13 @@ 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 = 161 OR select_id IS NULL order by id; +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 = 161 OR select_id IS NULL) order by id; +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -714,13 +716,13 @@ 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 = 160 OR select_id IS NULL order by id; +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 = 160 OR select_id IS NULL) order by id; +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -728,13 +730,13 @@ 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 = 159 OR select_id IS NULL order by id; +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 = 159 OR select_id IS NULL) order by id; +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -742,13 +744,13 @@ 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 = 158 OR select_id IS NULL order by id; +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 = 158 OR select_id IS NULL) order by id; +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -756,13 +758,13 @@ 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 = 157 OR select_id IS NULL order by id; +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(_latin1'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 = 157 OR select_id IS NULL) order by id; +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -770,13 +772,13 @@ 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 = 156 OR select_id IS NULL order by id; +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(_latin1'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 = 156 OR select_id IS NULL) order by id; +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -784,13 +786,13 @@ 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 = 155 OR select_id IS NULL order by id; +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(_latin1'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 = 155 OR select_id IS NULL) order by id; +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -798,19 +800,19 @@ 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 = 154 OR select_id IS NULL order by id; +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(_latin1'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 = 154 OR select_id IS NULL) order by id; +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; +WHERE select_id = 156 OR select_id IS NULL order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -827,7 +829,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`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; +WHERE select_id = 156 OR select_id IS NULL) order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -846,13 +848,13 @@ 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 = 152 OR select_id IS NULL order by id; +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 = 152 OR select_id IS NULL) order by id; +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -860,13 +862,13 @@ 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 = 151 OR select_id IS NULL order by id; +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 = 151 OR select_id IS NULL) order by id; +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -874,13 +876,13 @@ 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 = 150 OR select_id IS NULL order by id; +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 = 150 OR select_id IS NULL) order by id; +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -888,19 +890,49 @@ 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 = 149 OR select_id IS NULL order by id; +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 = 149 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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(_latin1'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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' 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 = 148 OR select_id IS NULL order by id; +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 @@ -915,7 +947,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'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 = 148 OR select_id IS NULL) order by id; +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 @@ -928,9 +960,33 @@ Error 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(_latin1'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 = 147 OR select_id IS NULL order by id; +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 @@ -942,7 +998,7 @@ 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 = 147 OR select_id IS NULL) order by id; +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 @@ -954,7 +1010,7 @@ 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 = 146 OR select_id IS NULL order by id; +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 @@ -966,7 +1022,7 @@ 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 = 146 OR select_id IS NULL) order by id; +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 @@ -978,7 +1034,7 @@ 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 = 145 OR select_id IS NULL order by id; +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 @@ -990,7 +1046,7 @@ 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 = 145 OR select_id IS NULL) order by id; +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 @@ -1002,7 +1058,7 @@ 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 = 144 OR select_id IS NULL order by id; +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 @@ -1014,7 +1070,7 @@ 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 = 144 OR select_id IS NULL) order by id; +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 @@ -1028,13 +1084,13 @@ 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 = 143 OR select_id IS NULL order by id; +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 = 143 OR select_id IS NULL) order by id; +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1042,13 +1098,13 @@ 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 = 142 OR select_id IS NULL order by id; +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(_latin1'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 = 142 OR select_id IS NULL) order by id; +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1056,7 +1112,7 @@ 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 = 141 OR select_id IS NULL order by id; +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 @@ -1068,7 +1124,7 @@ 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 = 141 OR select_id IS NULL) order by id; +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 @@ -1082,7 +1138,7 @@ 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 = 140 OR select_id IS NULL order by id; +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 @@ -1094,7 +1150,7 @@ 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 = 140 OR select_id IS NULL) order by id; +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 @@ -1108,7 +1164,7 @@ 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 = 139 OR select_id IS NULL order by id; +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 @@ -1120,7 +1176,7 @@ 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 = 139 OR select_id IS NULL) order by id; +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 @@ -1134,7 +1190,7 @@ 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 = 138 OR select_id IS NULL order by id; +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 @@ -1146,7 +1202,7 @@ 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 = 138 OR select_id IS NULL) order by id; +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 @@ -1160,7 +1216,7 @@ 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 = 137 OR select_id IS NULL order by id; +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 @@ -1172,7 +1228,7 @@ 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`,_latin1'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 = 137 OR select_id IS NULL) order by id; +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 @@ -1186,7 +1242,7 @@ 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 = 136 OR select_id IS NULL order by id; +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 @@ -1198,7 +1254,7 @@ 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`,_latin1'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 = 136 OR select_id IS NULL) order by id; +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 @@ -1212,7 +1268,7 @@ 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 = 135 OR select_id IS NULL order by id; +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 @@ -1224,7 +1280,7 @@ 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`,_latin1'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 = 135 OR select_id IS NULL) order by id; +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 @@ -1238,7 +1294,7 @@ 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 = 134 OR select_id IS NULL order by id; +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 @@ -1250,7 +1306,7 @@ 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`,_latin1'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 = 134 OR select_id IS NULL) order by id; +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 @@ -1264,7 +1320,7 @@ 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 = 133 OR select_id IS NULL order by id; +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 @@ -1276,7 +1332,7 @@ 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`,_latin1'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 = 133 OR select_id IS NULL) order by id; +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 @@ -1290,7 +1346,7 @@ 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 = 132 OR select_id IS NULL order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1302,7 +1358,7 @@ 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`,_latin1'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 = 132 OR select_id IS NULL) order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1316,7 +1372,7 @@ 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 = 131 OR select_id IS NULL order by id; +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 @@ -1328,7 +1384,7 @@ 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`,_latin1'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 = 131 OR select_id IS NULL) order by id; +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 @@ -1342,7 +1398,7 @@ 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 = 130 OR select_id IS NULL order by id; +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 @@ -1354,7 +1410,7 @@ 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`,_latin1'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 = 130 OR select_id IS NULL) order by id; +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 @@ -1368,7 +1424,7 @@ 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 = 129 OR select_id IS NULL order by id; +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 @@ -1380,7 +1436,7 @@ 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`,_latin1'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 = 129 OR select_id IS NULL) order by id; +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 @@ -1394,7 +1450,7 @@ 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 = 128 OR select_id IS NULL order by id; +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 @@ -1406,7 +1462,7 @@ 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`,_latin1'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 = 128 OR select_id IS NULL) order by id; +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 @@ -1420,7 +1476,7 @@ 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 = 127 OR select_id IS NULL order by id; +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 @@ -1432,7 +1488,7 @@ 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`,_latin1'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 = 127 OR select_id IS NULL) order by id; +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 @@ -1446,7 +1502,7 @@ 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 = 126 OR select_id IS NULL order by id; +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 @@ -1458,7 +1514,7 @@ 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`,_latin1'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 = 126 OR select_id IS NULL) order by id; +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 @@ -1472,7 +1528,7 @@ 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 = 125 OR select_id IS NULL order by id; +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 @@ -1486,7 +1542,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 125 OR select_id IS NULL) order by id; +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 @@ -1501,7 +1557,7 @@ 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 = 124 OR select_id IS NULL order by id; +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 @@ -1515,7 +1571,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 124 OR select_id IS NULL) order by id; +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 @@ -1530,7 +1586,7 @@ 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 = 123 OR select_id IS NULL order by id; +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 @@ -1544,7 +1600,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 123 OR select_id IS NULL) order by id; +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 @@ -1559,7 +1615,7 @@ 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 = 122 OR select_id IS NULL order by id; +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 @@ -1573,7 +1629,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 122 OR select_id IS NULL) order by id; +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 @@ -1588,7 +1644,7 @@ 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 = 121 OR select_id IS NULL order by id; +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 @@ -1602,7 +1658,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 121 OR select_id IS NULL) order by id; +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 @@ -1617,7 +1673,7 @@ 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 = 120 OR select_id IS NULL order by id; +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 @@ -1631,7 +1687,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 120 OR select_id IS NULL) order by id; +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 @@ -1646,7 +1702,7 @@ 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 = 119 OR select_id IS NULL order by id; +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 @@ -1660,7 +1716,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 119 OR select_id IS NULL) order by id; +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 @@ -1675,7 +1731,7 @@ 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 = 118 OR select_id IS NULL order by id; +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 @@ -1689,7 +1745,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 118 OR select_id IS NULL) order by id; +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 @@ -1704,7 +1760,7 @@ 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 = 117 OR select_id IS NULL order by id; +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 @@ -1718,7 +1774,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 117 OR select_id IS NULL) order by id; +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 @@ -1733,7 +1789,7 @@ 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 = 116 OR select_id IS NULL order by id; +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 @@ -1747,7 +1803,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 116 OR select_id IS NULL) order by id; +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 @@ -1762,7 +1818,7 @@ 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 = 115 OR select_id IS NULL order by id; +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 @@ -1776,7 +1832,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 115 OR select_id IS NULL) order by id; +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 @@ -1791,7 +1847,7 @@ 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 = 114 OR select_id IS NULL order by id; +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 @@ -1805,7 +1861,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 114 OR select_id IS NULL) order by id; +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 @@ -1820,7 +1876,7 @@ 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 = 113 OR select_id IS NULL order by id; +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 @@ -1832,7 +1888,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 113 OR select_id IS NULL) order by id; +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 @@ -1846,7 +1902,7 @@ 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 = 112 OR select_id IS NULL order by id; +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 @@ -1858,7 +1914,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 112 OR select_id IS NULL) order by id; +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 @@ -1872,7 +1928,7 @@ 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 = 111 OR select_id IS NULL order by id; +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 @@ -1884,7 +1940,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 111 OR select_id IS NULL) order by id; +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 @@ -1898,7 +1954,7 @@ 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 = 110 OR select_id IS NULL order by id; +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 @@ -1910,7 +1966,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 110 OR select_id IS NULL) order by id; +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 @@ -1924,7 +1980,7 @@ 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 = 109 OR select_id IS NULL order by id; +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 @@ -1936,7 +1992,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 109 OR select_id IS NULL) order by id; +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 @@ -1950,7 +2006,7 @@ 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 = 108 OR select_id IS NULL order by id; +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.7976931348623e+308 2 @@ -1962,7 +2018,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 108 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 @@ -1976,7 +2032,7 @@ 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 = 107 OR select_id IS NULL order by id; +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 @@ -1988,7 +2044,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 107 OR select_id IS NULL) order by id; +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 @@ -2002,7 +2058,7 @@ 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 = 106 OR select_id IS NULL order by id; +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 @@ -2014,7 +2070,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 106 OR select_id IS NULL) order by id; +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 @@ -2028,7 +2084,7 @@ 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 = 105 OR select_id IS NULL order by id; +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 @@ -2040,7 +2096,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 105 OR select_id IS NULL) order by id; +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 @@ -2054,7 +2110,7 @@ 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 = 104 OR select_id IS NULL order by id; +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 @@ -2071,7 +2127,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 104 OR select_id IS NULL) order by id; +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 @@ -2090,7 +2146,7 @@ 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 = 103 OR select_id IS NULL order by id; +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 @@ -2102,7 +2158,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 103 OR select_id IS NULL) order by id; +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 @@ -2116,7 +2172,7 @@ 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 = 102 OR select_id IS NULL order by id; +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 @@ -2131,7 +2187,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 102 OR select_id IS NULL) order by id; +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 @@ -2148,7 +2204,7 @@ 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 = 101 OR select_id IS NULL order by id; +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 @@ -2160,7 +2216,7 @@ 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 = 101 OR select_id IS NULL) order by id; +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 @@ -2174,7 +2230,7 @@ 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 = 100 OR select_id IS NULL order by id; +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 @@ -2186,7 +2242,7 @@ 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 = 100 OR select_id IS NULL) order by id; +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 @@ -2200,7 +2256,7 @@ 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 = 99 OR select_id IS NULL order by id; +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 @@ -2212,7 +2268,7 @@ 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 = 99 OR select_id IS NULL) order by id; +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 @@ -2226,7 +2282,7 @@ 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 = 98 OR select_id IS NULL order by id; +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 @@ -2238,7 +2294,7 @@ 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 = 98 OR select_id IS NULL) order by id; +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 @@ -2252,7 +2308,7 @@ 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 = 97 OR select_id IS NULL order by id; +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 @@ -2264,7 +2320,7 @@ 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 = 97 OR select_id IS NULL) order by id; +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 @@ -2278,7 +2334,7 @@ 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 = 96 OR select_id IS NULL order by id; +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 @@ -2290,7 +2346,7 @@ 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 = 96 OR select_id IS NULL) order by id; +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 @@ -2304,7 +2360,7 @@ 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 = 95 OR select_id IS NULL order by id; +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 @@ -2316,7 +2372,7 @@ 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 = 95 OR select_id IS NULL) order by id; +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 @@ -2330,7 +2386,7 @@ 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 = 94 OR select_id IS NULL order by id; +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 @@ -2342,7 +2398,7 @@ 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 = 94 OR select_id IS NULL) order by id; +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 @@ -2356,7 +2412,7 @@ 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 = 93 OR select_id IS NULL order by id; +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 @@ -2368,7 +2424,7 @@ 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 = 93 OR select_id IS NULL) order by id; +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 @@ -2382,7 +2438,7 @@ 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 = 92 OR select_id IS NULL order by id; +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 @@ -2394,7 +2450,7 @@ 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 = 92 OR select_id IS NULL) order by id; +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 @@ -2408,7 +2464,7 @@ 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 = 91 OR select_id IS NULL order by id; +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 @@ -2420,7 +2476,7 @@ 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 = 91 OR select_id IS NULL) order by id; +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 @@ -2434,7 +2490,7 @@ 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 = 90 OR select_id IS NULL order by id; +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 @@ -2446,7 +2502,7 @@ 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 = 90 OR select_id IS NULL) order by id; +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 @@ -2460,7 +2516,7 @@ 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 = 89 OR select_id IS NULL order by id; +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 @@ -2472,7 +2528,7 @@ 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 = 89 OR select_id IS NULL) order by id; +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 @@ -2482,6 +2538,38 @@ NULL NULL 1 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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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), diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc.result b/mysql-test/suite/funcs_1/r/innodb_storedproc.result index fbc908b8ccf..e8084c75e30 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc.result @@ -1,29 +1,4 @@ -. -. IMPORTANT NOTICE: -. ----------------- -. -. FIXME: The .result files are still NOT CHECKED for correctness! -. -. FIXME: Several tests are affected by known problems around DECIMAL -. FIXME: and NUMERIC that will be checked again after WL#2984 once -. FIXME: has been completed. Some of them are marked in the result. -. -. Currently (Dec 06, 2005) this .result file is checked OK for Linux -. with 5.0.17-bk (ChangeSet@1.1975.1.2, 2005-12-05 18:33:48+01:00). -. Using the available Windows version 5.0.16 there are differences -. that can be ignored (e.g. WL#2984). -. --------------------------------------------------------------------------------- - FIXME: There are subtests that are switched off due to known bugs: - ------------------------------------------------------------------ -WL#2984: DECIMAL and NUMERIC problems with differences on some machines -0 - -There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- SET @@global.max_heap_table_size=4294967295; @@ -94,23 +69,24 @@ CREATE PROCEDURE -------------------------------------------------------------------------------- USE db_storedproc; DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) ) SELECT * from t1 where f2 = f1; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa'); -f1 f2 f3 f4 f5 f6 +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 tinytext ) language sql deterministic sql security definer comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1, @v1; END// +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); -@v1 @v1 -abc abc +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 binary ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -119,12 +95,12 @@ SELECT @v1; END// CALL sp1( 34 ); @v1 -34 +3 +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 blob ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -135,10 +111,8 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 int ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -149,25 +123,27 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: SP definition accepted with m>60 in DECIMAL(m,n) CREATE PROCEDURE sp1( f1 decimal(256, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 256 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(66, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 66 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(60, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -175,101 +151,1123 @@ SELECT @v1; END// CALL sp1( 17976931340000 ); @v1 -17976931340000 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.797693134e+13 ); +@v1 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.7976931348623157493578e+308 ); +ERROR 22007: Illegal double '1.7976931348623157493578e+308' value found during parsing +CALL sp1( 0.1234567890987654321e+100 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-100 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+99 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-99 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+98 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-98 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+97 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-97 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+96 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-96 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+95 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-95 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+94 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-94 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+93 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-93 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+92 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-92 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+91 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-91 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+90 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-90 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+89 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-89 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+88 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-88 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+87 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-87 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+86 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-86 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+85 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-85 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+84 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-84 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+83 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-83 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+82 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-82 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+81 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-81 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+80 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-80 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+79 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-79 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+78 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-78 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+77 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-77 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+76 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-76 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+75 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-75 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+74 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-74 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+73 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-73 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+72 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-72 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+71 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-71 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+70 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-70 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+69 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-69 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+68 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-68 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+67 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-67 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+66 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-66 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+65 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-65 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+64 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-64 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+63 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-63 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+62 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-62 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+61 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-61 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+60 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-60 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+59 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-59 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+58 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-58 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+57 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-57 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+56 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-56 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+55 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-55 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+54 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-54 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+53 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-53 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+52 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-52 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+51 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-51 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+50 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-50 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+49 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-49 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+48 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-48 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+47 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-47 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+46 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-46 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+45 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-45 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+44 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-44 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+43 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-43 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+42 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-42 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+41 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-41 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+40 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-40 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+39 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-39 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+38 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-38 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+37 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-37 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+36 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-36 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+35 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-35 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+34 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-34 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+33 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-33 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+32 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-32 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+31 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-31 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+30 ); +@v1 +123456789098765400000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-30 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+29 ); +@v1 +12345678909876540000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-29 ); +@v1 +0.000000000000000000000000000001 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+28 ); +@v1 +1234567890987654000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-28 ); +@v1 +0.000000000000000000000000000012 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+27 ); +@v1 +123456789098765400000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-27 ); +@v1 +0.000000000000000000000000000123 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+26 ); +@v1 +12345678909876540000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-26 ); +@v1 +0.000000000000000000000000001235 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+25 ); +@v1 +1234567890987654000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-25 ); +@v1 +0.000000000000000000000000012346 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+24 ); +@v1 +123456789098765400000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-24 ); +@v1 +0.000000000000000000000000123457 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+23 ); +@v1 +12345678909876540000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-23 ); +@v1 +0.000000000000000000000001234568 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+22 ); +@v1 +1234567890987654000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-22 ); +@v1 +0.000000000000000000000012345679 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+21 ); +@v1 +123456789098765400000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-21 ); +@v1 +0.000000000000000000000123456789 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+20 ); +@v1 +12345678909876540000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-20 ); +@v1 +0.000000000000000000001234567891 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+19 ); +@v1 +1234567890987654000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-19 ); +@v1 +0.000000000000000000012345678910 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+18 ); +@v1 +123456789098765400.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-18 ); +@v1 +0.000000000000000000123456789099 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+17 ); +@v1 +12345678909876540.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-17 ); +@v1 +0.000000000000000001234567890988 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+16 ); +@v1 +1234567890987654.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-16 ); +@v1 +0.000000000000000012345678909877 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+15 ); +@v1 +123456789098765.400000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-15 ); +@v1 +0.000000000000000123456789098765 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+14 ); +@v1 +12345678909876.540000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-14 ); +@v1 +0.000000000000001234567890987654 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+13 ); +@v1 +1234567890987.654000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-13 ); +@v1 +0.000000000000012345678909876540 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+12 ); +@v1 +123456789098.765400000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-12 ); +@v1 +0.000000000000123456789098765400 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+11 ); +@v1 +12345678909.876540000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-11 ); +@v1 +0.000000000001234567890987654000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+10 ); +@v1 +1234567890.987654000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-10 ); +@v1 +0.000000000012345678909876540000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+9 ); +@v1 +123456789.098765400000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-9 ); +@v1 +0.000000000123456789098765400000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+8 ); +@v1 +12345678.909876540000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-8 ); +@v1 +0.000000001234567890987654000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+7 ); +@v1 +1234567.890987654000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-7 ); +@v1 +0.000000012345678909876540000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+6 ); +@v1 +123456.789098765400000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-6 ); +@v1 +0.000000123456789098765400000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+5 ); +@v1 +12345.678909876540000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-5 ); +@v1 +0.000001234567890987654000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+4 ); +@v1 +1234.567890987654000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-4 ); +@v1 +0.000012345678909876550000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+3 ); +@v1 +123.456789098765400000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-3 ); +@v1 +0.000123456789098765400000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+2 ); +@v1 +12.345678909876540000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-2 ); +@v1 +0.001234567890987654000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+1 ); +@v1 +1.234567890987654000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-1 ); +@v1 +0.012345678909876540000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 set("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET CALL sp1( "value1, value1" ); f1 -value1, value1 +value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) language sql SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) not deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security definer SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security invoker SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) comment 'this is simple' SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long DROP PROCEDURE sp1; Testcase 4.1.2: @@ -294,8 +1292,8 @@ SELECT fn1( ' world'); fn1( ' world') hello world SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -306,8 +1304,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 decimal(63, 31) ) returns decimal(63, 31) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -326,34 +1324,34 @@ SELECT fn1( 1.3326e+8 ); fn1( 1.3326e+8 ) 134260000.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 enum("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SELECT fn1( "value1" ); fn1( "value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 set("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET SELECT fn1( "value1, value1" ); fn1( "value1, value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1, value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql BEGIN @@ -364,8 +1362,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint deterministic BEGIN @@ -376,8 +1374,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint not deterministic BEGIN @@ -388,8 +1386,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security definer @@ -401,8 +1399,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security invoker @@ -414,8 +1412,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint comment 'this is simple' @@ -427,8 +1425,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.1.3: @@ -440,9 +1438,9 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1 (f1 char(20) ) SELECT * from t1 where f2 = f1; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`(f1 char(20) ) -SELECT * from t1 where f2 = f1 +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(f1 char(20) ) +SELECT * from t1 where f2 = f1 latin1 modified created DROP PROCEDURE sp1; Testcase 4.1.4: @@ -453,9 +1451,9 @@ DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1 (s char(20)) returns char(50) return concat('hello, ', s, '!'); show CREATE FUNCTION fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(s char(20)) RETURNS char(50) -return concat('hello, ', s, '!') +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(s char(20)) RETURNS char(50) CHARSET latin1 +return concat('hello, ', s, '!') latin1 modified created DROP FUNCTION fn1; Testcase 4.1.5: @@ -465,8 +1463,8 @@ SHOW PROCEDURE status CREATE PROCEDURE sp5() SELECT * from t1; SHOW PROCEDURE status like 'sp5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp5; Testcase 4.1.6: @@ -479,8 +1477,8 @@ set @b = 0.9 * a; return @b; END// SHOW FUNCTION STATUS LIKE 'fn5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn5 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn5 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn5; Testcase 4.1.7: @@ -498,7 +1496,7 @@ CREATE PROCEDURE sp7b (a char (20), out b char(20)) SELECT f1 into b from t1 where t1.f2= a; CALL sp7b('xyz', @out_param); Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed SELECT @out_param; @out_param NULL @@ -510,9 +1508,6 @@ SELECT f2 into c from t1 where t1.f2=999; END// set @c=1; CALL sp7c('xyz', @out_param, @c); -Warnings: -Warning 1329 No data to FETCH -Warning 1329 No data to FETCH SELECT @out_param; @out_param NULL @@ -539,48 +1534,48 @@ Testcase 4.1.9: drop procedure -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.10: ---------------- DROP FUNCTION -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.11: ---------------- @@ -604,6 +1599,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK); user_1@localhost db_storedproc CALL sp11(); +USE db_storedproc; root@localhost db_storedproc alter procedure sp11 sql security invoker; @@ -612,6 +1608,7 @@ security_type INVOKER user_1@localhost db_storedproc +USE db_storedproc; CALL sp11(); ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1' commit work; @@ -705,6 +1702,10 @@ SELECT * from t1 where f2 = f1' at line 1 CREATE PROCEDURE function() SELECT * from t1 where f2=f1; DROP PROCEDURE function; +CREATE PROCEDURE accessible() +SELECT * from t1 where f2=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 'accessible() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE add() SELECT * from t1 where f2=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() @@ -765,9 +1766,9 @@ CREATE PROCEDURE by() SELECT * from t1 where f2=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 'by() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE CALL() +CREATE PROCEDURE call() SELECT * from t1 where f2=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 'CALL() +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call() SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE cascade() SELECT * from t1 where f2=f1; @@ -801,17 +1802,10 @@ CREATE PROCEDURE column() SELECT * from t1 where f2=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 'column() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE columns() -SELECT * from t1 where f2=f1; -DROP PROCEDURE columns; CREATE PROCEDURE condition() SELECT * from t1 where f2=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 'condition() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE connection() -SELECT * from t1 where f2=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 'connection() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE constraint() SELECT * from t1 where f2=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 'constraint() @@ -995,9 +1989,6 @@ CREATE PROCEDURE foreign() SELECT * from t1 where f2=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 'foreign() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE found() -SELECT * from t1 where f2=f1; -DROP PROCEDURE found; CREATE PROCEDURE from() SELECT * from t1 where f2=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 'from() @@ -1006,9 +1997,6 @@ CREATE PROCEDURE fulltext() SELECT * from t1 where f2=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 'fulltext() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE goto() -SELECT * from t1 where f2=f1; -DROP PROCEDURE goto; CREATE PROCEDURE grant() SELECT * from t1 where f2=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 'grant() @@ -1077,6 +2065,26 @@ CREATE PROCEDURE int() SELECT * from t1 where f2=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 'int() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int1() +SELECT * from t1 where f2=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 'int1() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int2() +SELECT * from t1 where f2=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 'int2() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int3() +SELECT * from t1 where f2=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 'int3() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int4() +SELECT * from t1 where f2=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 'int4() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int8() +SELECT * from t1 where f2=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 'int8() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE integer() SELECT * from t1 where f2=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 'integer() @@ -1133,6 +2141,10 @@ CREATE PROCEDURE limit() SELECT * from t1 where f2=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 'limit() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE linear() +SELECT * from t1 where f2=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 'linear() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE lines() SELECT * from t1 where f2=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 'lines() @@ -1173,6 +2185,10 @@ CREATE PROCEDURE low_priority() SELECT * from t1 where f2=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 'low_priority() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE master_ssl_verify_server_cert() +SELECT * from t1 where f2=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 'master_ssl_verify_server_cert() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE match() SELECT * from t1 where f2=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 'match() @@ -1273,9 +2289,6 @@ CREATE PROCEDURE primary() SELECT * from t1 where f2=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 'primary() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE privileges() -SELECT * from t1 where f2=f1; -DROP PROCEDURE privileges; CREATE PROCEDURE procedure() SELECT * from t1 where f2=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 'procedure() @@ -1284,6 +2297,10 @@ CREATE PROCEDURE purge() SELECT * from t1 where f2=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 'purge() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE range() +SELECT * from t1 where f2=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 'range() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE read() SELECT * from t1 where f2=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 'read() @@ -1304,6 +2321,10 @@ CREATE PROCEDURE regexp() SELECT * from t1 where f2=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 'regexp() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE release() +SELECT * from t1 where f2=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 'release() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE rename() SELECT * from t1 where f2=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 'rename() @@ -1376,10 +2397,6 @@ CREATE PROCEDURE smallint() SELECT * from t1 where f2=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 'smallint() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE soname() -SELECT * from t1 where f2=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 'soname() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE spatial() SELECT * from t1 where f2=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 'spatial() @@ -1432,9 +2449,6 @@ CREATE PROCEDURE table() SELECT * from t1 where f2=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 'table() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE tables() -SELECT * from t1 where f2=f1; -DROP PROCEDURE tables; CREATE PROCEDURE terminated() SELECT * from t1 where f2=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 'terminated() @@ -1725,6 +2739,26 @@ CREATE FUNCTION int(f1 int) returns int return 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 'int(f1 int) returns int return f1' at line 1 +CREATE FUNCTION int1(f1 int1) returns int1 +return 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 'int1(f1 int1) returns int1 +return f1' at line 1 +CREATE FUNCTION int2(f1 int2) returns int2 +return 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 'int2(f1 int2) returns int2 +return f1' at line 1 +CREATE FUNCTION int3(f1 int3) returns int3 +return 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 'int3(f1 int3) returns int3 +return f1' at line 1 +CREATE FUNCTION int4(f1 int4) returns int4 +return 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 'int4(f1 int4) returns int4 +return f1' at line 1 +CREATE FUNCTION int8(f1 int8) returns int8 +return 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 'int8(f1 int8) returns int8 +return f1' at line 1 CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned return 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 'int unsigned(f1 int unsigned) returns int unsigned @@ -1846,485 +2880,291 @@ return f' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char f1 ) returns char +CREATE FUNCTION fn1(f1 char ) returns char return 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 'char f1 ) returns char -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary f1 ) returns char binary +CREATE FUNCTION fn1(f1 char binary ) returns char binary return 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 'char binary f1 ) returns char binary -return f1' at line 1 +ERROR 42000: This version of MySQL doesn't yet support 'return value collation' DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii f1 ) returns char ascii +CREATE FUNCTION fn1(f1 char ascii ) returns char ascii return 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 'char ascii f1 ) returns char ascii -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char not null f1 ) returns char not null +CREATE FUNCTION fn1(f1 char not null ) returns char not null return 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 'char not null f1 ) returns char not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary not null f1 ) returns char binary not null +CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null return 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 'char binary not null f1 ) returns char binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii not null f1 ) returns char ascii not null +CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null return 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 'char ascii not null f1 ) returns char ascii not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char ascii not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext f1 ) returns tinytext +CREATE FUNCTION fn1(f1 tinytext ) returns tinytext return 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 'tinytext f1 ) returns tinytext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text f1 ) returns text +CREATE FUNCTION fn1(f1 text ) returns text return 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 'f1 ) returns text -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext f1 ) returns mediumtext +CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext return 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 'mediumtext f1 ) returns mediumtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext f1 ) returns longtext +CREATE FUNCTION fn1(f1 longtext ) returns longtext return 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 'longtext f1 ) returns longtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext not null f1 ) returns tinytext not null +CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null return 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 'tinytext not null f1 ) returns tinytext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinytext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text not null f1 ) returns text not null +CREATE FUNCTION fn1(f1 text not null ) returns text not null return 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 'not null f1 ) returns text not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns text not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext not null f1 ) returns mediumtext not null +CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null return 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 'mediumtext not null f1 ) returns mediumtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext not null f1 ) returns longtext not null +CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null return 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 'longtext not null f1 ) returns longtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob f1 ) returns tinyblob +CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob return 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 'tinyblob f1 ) returns tinyblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob f1 ) returns blob +CREATE FUNCTION fn1(f1 blob ) returns blob return 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 'blob f1 ) returns blob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob f1 ) returns mediumblob +CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob return 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 'mediumblob f1 ) returns mediumblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob f1 ) returns longblob +CREATE FUNCTION fn1(f1 longblob ) returns longblob return 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 'longblob f1 ) returns longblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob not null f1 ) returns tinyblob not null +CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null return 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 'tinyblob not null f1 ) returns tinyblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinyblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob not null f1 ) returns blob not null +CREATE FUNCTION fn1(f1 blob not null ) returns blob not null return 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 'blob not null f1 ) returns blob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns blob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob not null f1 ) returns mediumblob not null +CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null return 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 'mediumblob not null f1 ) returns mediumblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob not null f1 ) returns longblob not null +CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null return 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 'longblob not null f1 ) returns longblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary f1 ) returns binary +CREATE FUNCTION fn1(f1 binary ) returns binary return 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 'binary f1 ) returns binary -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary not null f1 ) returns binary not null +CREATE FUNCTION fn1(f1 binary not null ) returns binary not null return 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 'binary not null f1 ) returns binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint f1 ) returns tinyint +CREATE FUNCTION fn1(f1 tinyint ) returns tinyint return 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 'tinyint f1 ) returns tinyint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned f1 ) returns tinyint unsigned +CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned return 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 'tinyint unsigned f1 ) returns tinyint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint zerofill f1 ) returns tinyint zerofill +CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill return 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 'tinyint zerofill f1 ) returns tinyint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill +CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill return 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 'tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint f1 ) returns smallint +CREATE FUNCTION fn1(f1 smallint ) returns smallint return 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 'smallint f1 ) returns smallint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned f1 ) returns smallint unsigned +CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned return 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 'smallint unsigned f1 ) returns smallint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint zerofill f1 ) returns smallint zerofill +CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill return 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 'smallint zerofill f1 ) returns smallint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned zerofill f1 ) returns smallint unsigned zerofill +CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill return 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 'smallint unsigned zerofill f1 ) returns smallint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint f1 ) returns mediumint +CREATE FUNCTION fn1(f1 mediumint ) returns mediumint return 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 'mediumint f1 ) returns mediumint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned f1 ) returns mediumint unsigned +CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned return 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 'mediumint unsigned f1 ) returns mediumint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint zerofill f1 ) returns mediumint zerofill +CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill return 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 'mediumint zerofill f1 ) returns mediumint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill +CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill return 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 'mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int f1 ) returns int +CREATE FUNCTION fn1(f1 int ) returns int return 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 'int f1 ) returns int -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned f1 ) returns int unsigned +CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned return 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 'int unsigned f1 ) returns int unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int zerofill f1 ) returns int zerofill +CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned return 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 'int zerofill f1 ) returns int zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned zerofill f1 ) returns int unsigned zerofill +CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned return 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 'int unsigned zerofill f1 ) returns int unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint f1 ) returns bigint +CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned return 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 'bigint f1 ) returns bigint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned f1 ) returns bigint unsigned +CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned return 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 'bigint unsigned f1 ) returns bigint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint zerofill f1 ) returns bigint zerofill +CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned return 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 'bigint zerofill f1 ) returns bigint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned zerofill f1 ) returns bigint unsigned zerofill +CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill return 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 'bigint unsigned zerofill f1 ) returns bigint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal f1 ) returns decimal +CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill return 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 'decimal f1 ) returns decimal -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned f1 ) returns decimal unsigned +CREATE FUNCTION fn1(f1 bigint ) returns bigint return 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 'decimal unsigned f1 ) returns decimal unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal zerofill f1 ) returns decimal zerofill +CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned return 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 'decimal zerofill f1 ) returns decimal zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned zerofill f1 ) returns decimal unsigned zerofill +CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill return 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 'decimal unsigned zerofill f1 ) returns decimal unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric f1 ) returns numeric +CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill return 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 'numeric f1 ) returns numeric -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned f1 ) returns numeric unsigned +CREATE FUNCTION fn1(f1 decimal ) returns decimal return 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 'numeric unsigned f1 ) returns numeric unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric zerofill f1 ) returns numeric zerofill +CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned return 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 'numeric zerofill f1 ) returns numeric zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned zerofill f1 ) returns numeric unsigned zerofill +CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill return 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 'numeric unsigned zerofill f1 ) returns numeric unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real f1 ) returns real +CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill return 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 'real f1 ) returns real -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned f1 ) returns real unsigned +CREATE FUNCTION fn1(f1 numeric ) returns numeric return 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 'real unsigned f1 ) returns real unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real zerofill f1 ) returns real zerofill +CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned return 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 'real zerofill f1 ) returns real zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned zerofill f1 ) returns real unsigned zerofill +CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill return 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 'real unsigned zerofill f1 ) returns real unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float f1 ) returns float +CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill return 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 'float f1 ) returns float -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned f1 ) returns float unsigned +CREATE FUNCTION fn1(f1 real ) returns real return 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 'float unsigned f1 ) returns float unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float zerofill f1 ) returns float zerofill +CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned return 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 'float zerofill f1 ) returns float zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned zerofill f1 ) returns float unsigned zerofill +CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill return 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 'float unsigned zerofill f1 ) returns float unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(date f1 ) returns date +CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill return 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 'f1 ) returns date -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(time f1 ) returns time +CREATE FUNCTION fn1(f1 float ) returns float return 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 'f1 ) returns time -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(datetime f1 ) returns datetime +CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned return 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 'f1 ) returns datetime -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(timestamp f1 ) returns timestamp +CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill return 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 'f1 ) returns timestamp -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year f1 ) returns year +CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill return 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 'f1 ) returns year -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(3) f1 ) returns year(3) +CREATE FUNCTION fn1(f1 date ) returns date +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 time ) returns time +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 datetime ) returns datetime +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 timestamp ) returns timestamp +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year ) returns year +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3) return 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 '(3) f1 ) returns year(3) +ERROR 42000: You 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 3) ) returns year(3) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(4) f1 ) returns year(4) +CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4) return 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 '(4) f1 ) returns year(4) +ERROR 42000: You 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 4) ) returns year(4) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(enum("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum") return 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 '("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +ERROR 42000: You 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 "1enum", "2enum") ) returns enum("1enum", "2enum") return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(set("1set", "2set") f1 ) returns set("1set", "2set") +CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set") return 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 'set("1set", "2set") f1 ) returns set("1set", "2set") +ERROR 42000: You 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 "1set", "2set") ) returns set("1set", "2set") return f1' at line 1 Testcase 4.1.16: @@ -2564,15 +3404,15 @@ alter function sp1 sql security invoker comment 'this is a function'; alter procedure sp1 sql security definer; alter function sp1 sql security definer; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() COMMENT 'this is a procedure' -set @x= 3 +set @x= 3 latin1 modified created show CREATE FUNCTION sp1; -Function sql_mode Create Function -sp1 CREATE FUNCTION `sp1`() RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` FUNCTION `sp1`() RETURNS int(11) COMMENT 'this is a function' -return 4 +return 4 latin1 modified created USE db_storedproc; DROP DATABASE db_storedproc_3122; DROP FUNCTION db_storedproc.sp1; @@ -2789,7 +3629,7 @@ SELECT count(*) into cnt from t2; set @count = cnt; SELECT @count; 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 'SELECT count(*) into cnt from t2; +ERROR 42000: You 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 @count = cnt; SELECT @count; END' at line 2 @@ -2841,6 +3681,14 @@ Testcase ....: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +accessible:BEGIN +SELECT @x; +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 'accessible:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() add:BEGIN SELECT @x; END// @@ -2860,9 +3708,7 @@ CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; 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 ':BEGIN -SELECT @x; -END' at line 2 +ERROR 0A000: ALTER VIEW is not allowed in stored procedures DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() analyze:BEGIN @@ -2961,7 +3807,7 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -CALL:BEGIN +call:BEGIN SELECT @x; 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 ':BEGIN @@ -3033,11 +3879,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -columns:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() condition:BEGIN SELECT @x; END// @@ -3046,14 +3887,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -connection:BEGIN -SELECT @x; -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 'connection:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() constraint:BEGIN SELECT @x; END// @@ -3382,11 +4215,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -fields:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() float:BEGIN SELECT @x; END// @@ -3395,6 +4223,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +float4:BEGIN +SELECT @x; +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 'float4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +float8:BEGIN +SELECT @x; +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 'float8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() for:BEGIN SELECT @x; END// @@ -3419,11 +4263,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -found:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() from:BEGIN SELECT @x; END// @@ -3440,11 +4279,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -goto:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() grant:BEGIN SELECT @x; END// @@ -3581,6 +4415,46 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +int1:BEGIN +SELECT @x; +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 'int1:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int2:BEGIN +SELECT @x; +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 'int2:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int3:BEGIN +SELECT @x; +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 'int3:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int4:BEGIN +SELECT @x; +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 'int4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int8:BEGIN +SELECT @x; +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 'int8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() integer:BEGIN SELECT @x; END// @@ -3693,6 +4567,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +linear:BEGIN +SELECT @x; +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 'linear:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() lines:BEGIN SELECT @x; END// @@ -3773,6 +4655,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +master_ssl_verify_server_cert:BEGIN +SELECT @x; +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 'master_ssl_verify_server_cert:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() match:BEGIN SELECT @x; END// @@ -3973,11 +4863,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -privileges:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() procedure:BEGIN SELECT @x; END// @@ -3994,6 +4879,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +range:BEGIN +SELECT @x; +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 'range:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() read:BEGIN SELECT @x; END// @@ -4010,6 +4903,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +read_only:BEGIN +SELECT @x; +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 'read_only:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +read_write:BEGIN +SELECT @x; +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 'read_write:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() real:BEGIN SELECT @x; END// @@ -4034,6 +4943,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +release:BEGIN +SELECT @x; +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 ':BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() rename:BEGIN SELECT @x; END// @@ -4178,14 +5095,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -soname:BEGIN -SELECT @x; -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 'soname:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() spatial:BEGIN SELECT @x; END// @@ -4290,11 +5199,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -tables:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() terminated:BEGIN SELECT @x; END// @@ -4587,6 +5491,9 @@ END begin_label// CALL sp1(); @v1 @v2 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 sp1; Testcase 4.2.7: @@ -4621,6 +5528,9 @@ declare y char; SELECT f1, f2 into x, y from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 +Warning 1265 Data truncated for column 'y' at row 1 DROP PROCEDURE sp1; Testcase 4.2.9: @@ -4684,8 +5594,6 @@ Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the declare statement) may only be properly defined -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: DECIMAL(255,255) is not rejected CREATE PROCEDURE sp6( ) BEGIN declare x char default 'a'; @@ -4703,9 +5611,9 @@ fetch cur1 into e; SELECT x, y, z, a, b, c, d, e; close cur1; END// +ERROR 42000: Too big scale 255 specified for column ''. Maximum is 30. CALL sp6(); -x y z a b c d e -a 1 1.1 value1 1200000000000 mediumtext 2005-02-02 12:12:12 a` +ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5828,13 +6736,6 @@ declare continue handler for sqlstate '23000' set @x2 = 1; declare x char; END// ERROR 42000: Variable or condition declaration after cursor or handler declaration -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '23000' set @x2 = 1; -declare x char; -END// -ERROR 42000: Variable or condition declaration after cursor or handler declaration DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5864,6 +6765,15 @@ Ensure that the declare statement can declare multiple variables both separately and all at once from a variable list. (multiple declaration) -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +DECLARE x1 CHAR(100) DEFAULT 'outer'; +BEGIN +DECLARE x1 CHAR(100) DEFAULT x1; +END; +END// +CALL sp1(); +DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z char default null; @@ -5988,7 +6898,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +000 000 000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -5997,7 +6911,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +001 001 001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6024,7 +6938,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000 00000 00000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6033,7 +6951,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00001 00001 00001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6060,7 +6978,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000 00000000 00000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6069,7 +6991,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000001 00000001 00000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6096,7 +7018,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6105,7 +7031,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +0000000001 0000000001 0000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6123,7 +7049,7 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +18446744073709551615 18446744073709551615 18446744073709551615 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6132,7 +7058,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000000000000000 00000000000000000000 00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6141,7 +7071,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000000000000000001 00000000000000000001 00000000000000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6150,18 +7080,24 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +-9999999999 -9999999999 -9999999999 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6170,62 +7106,76 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6252,7 +7202,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6261,7 +7211,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6270,7 +7220,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6279,7 +7229,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6288,7 +7238,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6297,7 +7247,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6333,7 +7283,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -20050202122012 20050202122012 20050202122012 +2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6419,6 +7369,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare accessible char; +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 'accessible char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare add char; 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 'add char; @@ -6524,9 +7481,9 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare CALL char; +declare call char; 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 'CALL char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() @@ -6587,11 +7544,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare columns char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare condition char; 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 'condition char; @@ -6599,13 +7551,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare connection char; -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 'connection char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare constraint char; 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 'constraint char; @@ -6893,11 +7838,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare fields char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare float char; 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 'float char; @@ -6905,6 +7845,20 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare float4 char; +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 'float4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare float8 char; +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 'float8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare for char; 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 'for char; @@ -6926,11 +7880,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare found char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare from char; 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 'from char; @@ -6945,11 +7894,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare goto char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare grant char; 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 'grant char; @@ -7069,6 +8013,41 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare int1 char; +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 'int1 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int2 char; +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 'int2 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int3 char; +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 'int3 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int4 char; +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 'int4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int8 char; +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 'int8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare integer char; 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 'integer char; @@ -7167,6 +8146,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare linear char; +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 'linear char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare lines char; 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 'lines char; @@ -7237,6 +8223,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare master_ssl_verify_server_cert char; +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 'master_ssl_verify_server_cert char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare match char; 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 'match char; @@ -7412,11 +8405,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare privileges char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare procedure char; 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 'procedure char; @@ -7431,6 +8419,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare range char; +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 'range char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare read char; 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 'read char; @@ -7445,6 +8440,18 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare read_only char; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare read_write char; +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 'read_write char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare real char; 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 'real char; @@ -7466,6 +8473,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare release char; +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 'release char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare rename char; 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 'rename char; @@ -7624,15 +8638,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare soname char; -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 'soname char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1() -BEGIN declare spatial char; 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 'spatial char; @@ -7750,11 +8755,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare tables char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare terminated char; 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 'terminated char; @@ -7899,9 +8899,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare USE char; +declare use char; 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 'USE char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8150,6 +9150,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'accessible condition for sqlstate '02000'; +declare exit handler for add set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// @@ -8306,10 +9316,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL condition for sqlstate '02000'; +declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 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 'CALL condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8409,11 +9419,7 @@ BEGIN declare connection condition for sqlstate '02000'; declare exit handler for connection set @var2 = 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 'connection condition for sqlstate '02000'; -declare exit handler for connection s' at line 3 DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN declare constraint condition for sqlstate '02000'; @@ -8829,12 +9835,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields condition for sqlstate '02000'; -declare exit handler for fields set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare float condition for sqlstate '02000'; declare exit handler for float set @var2 = 1; END// @@ -8845,6 +9845,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare for condition for sqlstate '02000'; declare exit handler for for set @var2 = 1; END// @@ -8876,12 +9896,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found condition for sqlstate '02000'; -declare exit handler for found set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare from condition for sqlstate '02000'; declare exit handler for from set @var2 = 1; END// @@ -8902,12 +9916,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto condition for sqlstate '02000'; -declare exit handler for goto set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare grant condition for sqlstate '02000'; declare exit handler for grant set @var2 = 1; END// @@ -9081,6 +10089,56 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer condition for sqlstate '02000'; declare exit handler for integer set @var2 = 1; END// @@ -9223,6 +10281,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines condition for sqlstate '02000'; declare exit handler for lines set @var2 = 1; END// @@ -9323,6 +10391,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handl' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match condition for sqlstate '02000'; declare exit handler for match set @var2 = 1; END// @@ -9578,12 +10656,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare privileges condition for sqlstate '02000'; -declare exit handler for privileges set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare procedure condition for sqlstate '02000'; declare exit handler for procedure set @var2 = 1; END// @@ -9604,6 +10676,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read condition for sqlstate '02000'; declare exit handler for read set @var2 = 1; END// @@ -9624,6 +10706,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int set @var2 = 1; +END' at line 4 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'read_write condition for sqlstate '02000'; +declare exit handler for int set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real condition for sqlstate '02000'; declare exit handler for real set @var2 = 1; END// @@ -9654,6 +10756,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'release condition for sqlstate '02000'; +declare exit handler for int set @var2 =' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename condition for sqlstate '02000'; declare exit handler for rename set @var2 = 1; END// @@ -9774,10 +10886,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT condition for sqlstate '02000'; +declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 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 'SELECT condition for sqlstate '02000'; +ERROR 42000: You 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 condition for sqlstate '02000'; declare exit handler for SELECT set @var2' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -9835,16 +10947,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname condition for sqlstate '02000'; -declare exit handler for soname set @var2 = 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 'soname condition for sqlstate '02000'; -declare exit handler for soname set @var2' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial condition for sqlstate '02000'; declare exit handler for spatial set @var2 = 1; END// @@ -9977,12 +11079,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables condition for sqlstate '02000'; -declare exit handler for tables set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare terminated condition for sqlstate '02000'; declare exit handler for terminated set @var2 = 1; END// @@ -10144,10 +11240,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE condition for sqlstate '02000'; +declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 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 'USE condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; ' at line 3 DROP PROCEDURE IF EXISTS sp1; @@ -10409,6 +11505,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible handler for sqlstate '02000' set @var2 = 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 'accessible handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add handler for sqlstate '02000' set @var2 = 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 'add handler for sqlstate '02000' set @var2 = 1; @@ -10544,9 +11649,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL handler for sqlstate '02000' set @var2 = 1; +declare call handler for sqlstate '02000' set @var2 = 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 'CALL handler for sqlstate '02000' set @var2 = 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 'call handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -10625,15 +11730,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare columns handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare condition handler for sqlstate '02000' set @var2 = 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 'condition handler for sqlstate '02000' set @var2 = 1; @@ -10643,15 +11739,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare connection handler for sqlstate '02000' set @var2 = 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 'connection handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare constraint handler for sqlstate '02000' set @var2 = 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 'constraint handler for sqlstate '02000' set @var2 = 1; @@ -10661,6 +11748,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare continue handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare convert handler for sqlstate '02000' set @var2 = 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 'convert handler for sqlstate '02000' set @var2 = 1; @@ -10976,6 +12068,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare exit handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare explain handler for sqlstate '02000' set @var2 = 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 'explain handler for sqlstate '02000' set @var2 = 1; @@ -11003,18 +12100,27 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields handler for sqlstate '02000' set @var2 = 1; +declare float handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare float handler for sqlstate '02000' set @var2 = 1; +declare float4 handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 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 'float4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 handler for sqlstate '02000' set @var2 = 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 'float8 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11048,15 +12154,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare from handler for sqlstate '02000' set @var2 = 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 'from handler for sqlstate '02000' set @var2 = 1; @@ -11075,15 +12172,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare grant handler for sqlstate '02000' set @var2 = 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 'grant handler for sqlstate '02000' set @var2 = 1; @@ -11237,6 +12325,51 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 handler for sqlstate '02000' set @var2 = 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 'int1 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 handler for sqlstate '02000' set @var2 = 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 'int2 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 handler for sqlstate '02000' set @var2 = 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 'int3 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 handler for sqlstate '02000' set @var2 = 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 'int4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 handler for sqlstate '02000' set @var2 = 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 'int8 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer handler for sqlstate '02000' set @var2 = 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 'integer handler for sqlstate '02000' set @var2 = 1; @@ -11363,6 +12496,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear handler for sqlstate '02000' set @var2 = 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 'linear handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines handler for sqlstate '02000' set @var2 = 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 'lines handler for sqlstate '02000' set @var2 = 1; @@ -11453,6 +12595,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match handler for sqlstate '02000' set @var2 = 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 'match handler for sqlstate '02000' set @var2 = 1; @@ -11705,6 +12856,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range handler for sqlstate '02000' set @var2 = 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 'range handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read handler for sqlstate '02000' set @var2 = 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 'read handler for sqlstate '02000' set @var2 = 1; @@ -11723,6 +12883,24 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write handler for sqlstate '02000' set @var2 = 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 'read_write handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real handler for sqlstate '02000' set @var2 = 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 'real handler for sqlstate '02000' set @var2 = 1; @@ -11750,6 +12928,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release handler for sqlstate '02000' set @var2 = 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 'release handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename handler for sqlstate '02000' set @var2 = 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 'rename handler for sqlstate '02000' set @var2 = 1; @@ -11858,9 +13045,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT handler for sqlstate '02000' set @var2 = 1; +declare select handler for sqlstate '02000' set @var2 = 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 'SELECT handler for sqlstate '02000' set @var2 = 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 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11912,15 +13099,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname handler for sqlstate '02000' set @var2 = 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 'soname handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial handler for sqlstate '02000' set @var2 = 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 'spatial handler for sqlstate '02000' set @var2 = 1; @@ -12038,15 +13216,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare terminated handler for sqlstate '02000' set @var2 = 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 'terminated handler for sqlstate '02000' set @var2 = 1; @@ -12191,9 +13360,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE handler for sqlstate '02000' set @var2 = 1; +declare use handler for sqlstate '02000' set @var2 = 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 'USE handler for sqlstate '02000' set @var2 = 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 'use handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -12384,10 +13553,13 @@ set @v2 = y; END// CALL sp1(); x y @x -NULL abaa 3 +NULL a 3 +Warnings: +Warning 1265 Data truncated for column 'y' at row 3 +Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 -4 a` +4 a DROP PROCEDURE sp1; Testcase 4.2.28: @@ -12454,7 +13626,7 @@ CALL sp1(); @xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12481,9 +13653,11 @@ set xx = 'temp'; set @xx = xx; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'xx' at row 1 SELECT @xx; @xx -temp +t DROP PROCEDURE sp1; Testcase 4.2.31 - b: @@ -12501,7 +13675,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'asd' +Warning 1265 Data truncated for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12527,7 +13701,9 @@ SELECT xx; END// CALL sp1(); xx -asd +0000-00-00 00:00:00 +Warnings: +Warning 1264 Out of range value for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12571,7 +13747,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12602,6 +13778,8 @@ declare x char ascii; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12665,6 +13843,8 @@ declare x binary; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12812,8 +13992,6 @@ declare x decimal; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12821,8 +13999,6 @@ declare x decimal unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12830,8 +14006,6 @@ declare x decimal zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12839,8 +14013,6 @@ declare x decimal unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12848,8 +14020,6 @@ declare x numeric; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12857,8 +14027,6 @@ declare x numeric unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12866,8 +14034,6 @@ declare x numeric zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12875,8 +14041,6 @@ declare x numeric unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -13254,7 +14418,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13279,7 +14443,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13306,7 +14470,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13330,7 +14494,7 @@ open cur1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13358,7 +14522,7 @@ BEGIN open cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13388,7 +14552,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13416,7 +14580,7 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13430,7 +14594,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 10; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13441,7 +14605,7 @@ open cur1; BEGIN declare cur1 cursor for SELECT f1, f2, f3, f4 from t2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13473,7 +14637,7 @@ BEGIN open cur1; close cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13485,7 +14649,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 20; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13514,13 +14678,13 @@ BEGIN declare done int default 0; declare count integer default 20; declare newf2 char(20); -declare newf1 date; +declare newf1 int1; declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2; set @x = newf1; set @y = newf2; @@ -13590,7 +14754,7 @@ BEGIN close cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13643,7 +14807,7 @@ fetch cur1 into newf1, newf2, newf4, newf3; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.65: @@ -13669,7 +14833,7 @@ commit; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.66: @@ -13690,7 +14854,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13719,12 +14883,13 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; -set count = count - 1; -while count <> 0 do +# set count = count - 1; +# while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; -set count = count - 1; -END while; +# set count = count - 1; +# END while; END; +fetch cur1 into newf1, newf2, newf4, newf3; END// CALL sp1(); DROP PROCEDURE sp1; @@ -13756,7 +14921,7 @@ BEGIN set count = 10; BEGIN open cur2; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13765,7 +14930,8 @@ insert into temp1 values(newf1, newf2, newf4, newf3); close cur1; END; BEGIN -while count <> 0 do +set count = 10; +while count > 0 do fetch cur2 into newf21, newf22, newf24, newf23; set count = count - 1; END while; @@ -13774,9 +14940,9 @@ insert into temp2 values(newf21, newf22, newf24, newf23); close cur2; END// CALL sp1(); -SELECT * from temp1; -f1 f2 f3 f4 -agaaaaaaa agaaaaaaa -4993 agaaaaaaa +SELECT count(*) from temp1; +count(*) +1 SELECT * from temp2; f1 f2 f3 f4 NULL NULL NULL NULL @@ -14023,7 +15189,7 @@ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; END case; 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 'when 'delete' then -delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 10 +delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 11 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -14041,8 +15207,9 @@ label2: while count < 10 do BEGIN insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count); -if done=1 then -set count=10; +set count = count + 1; +if count= 10 then +set done=1; END if; END; END while label2; @@ -14056,6 +15223,19 @@ END if; END loop label1; SELECT count, done; END// +CALL sp3('insert'); +count done +10 1 +Warnings: +Warning 1265 Data truncated for column 'name' at row 1 +Warning 1265 Data truncated for column 'name' at row 2 +Warning 1265 Data truncated for column 'name' at row 3 +Warning 1265 Data truncated for column 'name' at row 4 +Warning 1265 Data truncated for column 'name' at row 5 +Warning 1265 Data truncated for column 'name' at row 6 +Warning 1265 Data truncated for column 'name' at row 7 +Warning 1265 Data truncated for column 'name' at row 8 +Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -14330,11 +15510,14 @@ CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; label1: repeat -set count1 = count1; +set count1 = count1-1; until count1 < 0 END repeat label1; SELECT count1; END// +CALL sp6(); +count1 +-1 DROP PROCEDURE sp6; Testcase 4.3.7: @@ -14403,7 +15586,7 @@ do v1 > 0 while set v1 = v1 - 1; END while; 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 'do v1 > 0 while +ERROR 42000: You 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 set v1 = v1 - 1; END while; END' at line 4 @@ -14606,7 +15789,7 @@ until count1 < 3 END repeat label1; 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 'label1; -END' at line 7 +END' at line 8 Testcase 4.3.21: -------------------------------------------------------------------------------- @@ -14789,15 +15972,15 @@ insert into t43 values('abcde', 'a!@#$%^&*('); CREATE PROCEDURE d1.sp4() SELECT * from d1.t43; SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from d1.t43 USE db_storedproc; DROP DATABASE d1; CREATE DATABASE d1; USE d1; create table t44(a char(5), b char(10)); SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; @@ -14839,8 +16022,8 @@ CREATE PROCEDURE sp8 ( n char(20) ) sql security definer comment 'initial' USE d2; alter procedure d1.sp8 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='sp8' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 where t1.f1 = n Testcase 4.4.9: -------------------------------------------------------------------------------- @@ -14856,12 +16039,16 @@ END// USE d2; alter function d1.fn2 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='fn2' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 d1 fn2 FUNCTION fn2 SQL CONTAINS_SQL NO DEFINER n int int(11) BEGIN declare a int; set a = 0.9 * n; return a; -END root@localhost modified created updated +END root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci BEGIN +declare a int; +set a = 0.9 * n; +return a; +END Testcase 4.4.10: -------------------------------------------------------------------------------- @@ -14871,7 +16058,7 @@ SELECT * from t1 where t1.f1 = n; USE d2; DROP PROCEDURE d1.sp9; SELECT * from mysql.proc where specific_name='sp9' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.4.11: -------------------------------------------------------------------------------- @@ -14885,7 +16072,7 @@ END// USE d2; DROP FUNCTION d1.fn3; SELECT * from mysql.proc where specific_name='fn3' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; DROP DATABASE d2; @@ -14893,19 +16080,6 @@ DROP DATABASE d2; Section 3.1.5 - Parameter use checks: Functions with all data types -------------------------------------------------------------------------------- -SELECT 1 as 'bug_dec_num'; -bug_dec_num -1 - -. -FIXME: There are differences with datatypes DECIMAL and NUMERIC if large -FIXME: exponent values are used. The diffs are shown only on some machines like -FIXME: AIX52 and HPUX11. Until this has been solved we use numbers that -FIXME: *should* be equal to the exponent representation but have no exponents -FIXME: and use the specified count of *0*s instead. -FIXME: In the source file these tests are marked with the comment hpux11 -. --------------------------------------------------------------------------------- DROP DATABASE IF EXISTS d1; CREATE DATABASE d1; USE d1; @@ -14926,7 +16100,7 @@ return f1; END// SELECT fn2(1.84e+19); fn2(1.84e+19) -0 +18400000000000000000 DROP FUNCTION IF EXISTS fn3; CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill BEGIN @@ -14945,6 +16119,8 @@ END// SELECT fn4(-9.22e+15); fn4(-9.22e+15) 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn5; CREATE FUNCTION fn5( f1 decimal) returns decimal BEGIN @@ -14972,6 +16148,10 @@ END// SELECT fn7(99999999999); fn7(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill BEGIN @@ -14980,7 +16160,9 @@ return f1; END// SELECT fn8(999999999); fn8(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn9; CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill BEGIN @@ -14989,7 +16171,10 @@ return f1; END// SELECT fn9(-1.00e+09); fn9(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn10; CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0) BEGIN @@ -15008,6 +16193,10 @@ END// SELECT fn11(99999999999); fn11(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill BEGIN @@ -15016,7 +16205,9 @@ return f1; END// SELECT fn12(999999999); fn12(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn13; CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill BEGIN @@ -15025,7 +16216,10 @@ return f1; END// SELECT fn13(-1.00e+09); fn13(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn14; CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30) BEGIN @@ -15061,7 +16255,10 @@ return f1; END// SELECT fn17(-1.00e+21); fn17(-1.00e+21) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn18_d; CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64) BEGIN @@ -15097,7 +16294,10 @@ return f1; END// SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) -0000000000000000000000000000000000000000000000000000000000000001 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned BEGIN @@ -15106,7 +16306,10 @@ return f1; END// SELECT fn22(1.00e+00); fn22(1.00e+00) -1 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill BEGIN @@ -15115,7 +16318,10 @@ return f1; END// SELECT fn23(1.00e+00); fn23(1.00e+00) -0000000001 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill BEGIN @@ -15124,7 +16330,10 @@ return f1; END// SELECT fn24(-1.00e+09); fn24(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn25; CREATE FUNCTION fn25( f1 double) returns double BEGIN @@ -15142,7 +16351,9 @@ return f1; END// SELECT fn26(1.00e+00); fn26(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn27; CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill BEGIN @@ -15151,7 +16362,9 @@ return f1; END// SELECT fn27(1.00e+00); fn27(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn28; CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill BEGIN @@ -15160,7 +16373,9 @@ return f1; END// SELECT fn28(1.00e+00); fn28(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn29; CREATE FUNCTION fn29( f1 float) returns float BEGIN @@ -15178,7 +16393,9 @@ return f1; END// SELECT fn30(1.00e+00); fn30(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn31; CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill BEGIN @@ -15187,7 +16404,9 @@ return f1; END// SELECT fn31(1.00e+00); fn31(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn32; CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill BEGIN @@ -15196,7 +16415,9 @@ return f1; END// SELECT fn32(1.00e+00); fn32(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn33; CREATE FUNCTION fn33( f1 float(0)) returns float(0) BEGIN @@ -15214,7 +16435,9 @@ return f1; END// SELECT fn34(1.00e+00); fn34(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn35; CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill BEGIN @@ -15223,7 +16446,9 @@ return f1; END// SELECT fn35(1.00e+00); fn35(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn36; CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill BEGIN @@ -15232,7 +16457,9 @@ return f1; END// SELECT fn36(1.00e+00); fn36(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn37; CREATE FUNCTION fn37( f1 float(23)) returns float(23) BEGIN @@ -15250,7 +16477,9 @@ return f1; END// SELECT fn38(1.00e+00); fn38(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn39; CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill BEGIN @@ -15259,7 +16488,9 @@ return f1; END// SELECT fn39(1.00e+00); fn39(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn40; CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill BEGIN @@ -15268,7 +16499,9 @@ return f1; END// SELECT fn40(1.00e+00); fn40(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn41; CREATE FUNCTION fn41( f1 float(24)) returns float(24) BEGIN @@ -15286,7 +16519,9 @@ return f1; END// SELECT fn42(1.00e+00); fn42(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn43; CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill BEGIN @@ -15295,7 +16530,9 @@ return f1; END// SELECT fn43(1.00e+00); fn43(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn44; CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill BEGIN @@ -15304,7 +16541,9 @@ return f1; END// SELECT fn44(1.00e+00); fn44(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn45; CREATE FUNCTION fn45( f1 float(53)) returns float(53) BEGIN @@ -15322,7 +16561,9 @@ return f1; END// SELECT fn46(1.00e+00); fn46(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn47; CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill BEGIN @@ -15331,7 +16572,9 @@ return f1; END// SELECT fn47(1.00e+00); fn47(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn48; CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill BEGIN @@ -15340,7 +16583,9 @@ return f1; END// SELECT fn48(1.00e+00); fn48(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn49; CREATE FUNCTION fn49( f1 int) returns int BEGIN @@ -15349,7 +16594,10 @@ return f1; END// SELECT fn49(-2.15e+09); fn49(-2.15e+09) --2147483648 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn50; CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned BEGIN @@ -15385,7 +16633,9 @@ return f1; END// SELECT fn53(-8388600); fn53(-8388600) --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn54; CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned BEGIN @@ -15412,7 +16662,11 @@ return f1; END// SELECT fn56(-8388601); fn56(-8388601) -0 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -15421,7 +16675,9 @@ return f1; END// SELECT fn57(-999999999); fn57(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn58; CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0) BEGIN @@ -15430,7 +16686,9 @@ return f1; END// SELECT fn58(-999999999); fn58(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn59; CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned BEGIN @@ -15440,6 +16698,9 @@ END// SELECT fn59(9999999999); fn59(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill BEGIN @@ -15448,7 +16709,9 @@ return f1; END// SELECT fn60(99999999); fn60(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn61; CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill BEGIN @@ -15457,7 +16720,10 @@ return f1; END// SELECT fn61(-99999999); fn61(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn62; CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0) BEGIN @@ -15466,7 +16732,9 @@ return f1; END// SELECT fn62(-999999999); fn62(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn63; CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned BEGIN @@ -15476,6 +16744,9 @@ END// SELECT fn63(9999999999); fn63(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill BEGIN @@ -15484,7 +16755,9 @@ return f1; END// SELECT fn64(99999999); fn64(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn65; CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill BEGIN @@ -15493,7 +16766,10 @@ return f1; END// SELECT fn65(-99999999); fn65(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn66; CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30) BEGIN @@ -15502,7 +16778,12 @@ return f1; END// SELECT fn66(-1e+36); fn66(-1e+36) --999999999999999999999999999999999.999999999999999999999999999999 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned BEGIN @@ -15512,6 +16793,10 @@ END// SELECT fn67(1e+36); fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill BEGIN @@ -15521,6 +16806,10 @@ END// SELECT fn68(1e+36); fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill BEGIN @@ -15529,7 +16818,10 @@ return f1; END// SELECT fn69(-1e+36); fn69(-1e+36) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn70_n; CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64) BEGIN @@ -15577,7 +16869,9 @@ return f1; END// SELECT fn74(999999999); fn74(999999999) -999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn75; CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill BEGIN @@ -15586,7 +16880,9 @@ return f1; END// SELECT fn75(999999999); fn75(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn76; CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill BEGIN @@ -15595,7 +16891,10 @@ return f1; END// SELECT fn76(-999999999); fn76(-999999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn77; CREATE FUNCTION fn77( f1 real) returns real BEGIN @@ -15613,7 +16912,9 @@ return f1; END// SELECT fn78(1.1); fn78(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn79; CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill BEGIN @@ -15622,7 +16923,9 @@ return f1; END// SELECT fn79(1.1); fn79(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn80; CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill BEGIN @@ -15631,7 +16934,9 @@ return f1; END// SELECT fn80(1.1); fn80(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn81; CREATE FUNCTION fn81( f1 smallint) returns smallint BEGIN @@ -15667,7 +16972,11 @@ return f1; END// SELECT fn84(-32601); fn84(-32601) -0 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -15703,45 +17012,37 @@ return f1; END// SELECT fn88(-101); fn88(-101) -0 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN -if f1 eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; +IF f1 = '1enum' THEN +SET f1 = '2enum'; +ELSE +SET f1 = '1enum'; +END IF; +RETURN f1; 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 'eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; -END' at line 3 SELECT fn89( '1enum'); -ERROR 42000: FUNCTION d1.fn89 does not exist +fn89( '1enum') +2enum DROP FUNCTION IF EXISTS fn90; -CREATE FUNCTION fn90( f1 set("1set", "2set")) returns set("1set", "2set") +CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set') BEGIN -if(f1 == "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; +IF f1 = '1set' THEN +SET f1 = '2set'; +ELSE +SET f1 = '1set'; +END IF; +RETURN f1; 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 '== "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; -END' at line 3 SELECT fn90( '1set'); -ERROR 42000: FUNCTION d1.fn90 does not exist +fn90( '1set') +2set DROP FUNCTION IF EXISTS fn91; CREATE FUNCTION fn91( f1 date) returns date BEGIN @@ -15759,7 +17060,7 @@ return f1; END// SELECT fn92( '23:59:59.999999'); fn92( '23:59:59.999999') -26:00:00 +25:59:59 DROP FUNCTION IF EXISTS fn93; CREATE FUNCTION fn93( f1 datetime) returns datetime BEGIN @@ -15768,7 +17069,7 @@ return f1; END// SELECT fn93('1997-12-31 23:59:59.999999'); fn93('1997-12-31 23:59:59.999999') -1998-01-02 01:01:01 +1998-01-02 01:01:00 DROP FUNCTION IF EXISTS fn94; CREATE FUNCTION fn94( f1 char) returns char BEGIN @@ -15778,6 +17079,8 @@ END// SELECT fn94( 'h'); fn94( 'h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn95; CREATE FUNCTION fn95( f1 char ascii) returns char ascii BEGIN @@ -15787,15 +17090,19 @@ END// SELECT fn95('h'); fn95('h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn96; -CREATE FUNCTION fn96( f1 char binary) returns char binary +CREATE FUNCTION fn96( f1 binary) returns binary(2) BEGIN set f1 = concat('a', f1); return f1; END// SELECT fn96( 'h'); fn96( 'h') -a +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn97; CREATE FUNCTION fn97( f1 longtext) returns longtext BEGIN @@ -15917,7 +17224,7 @@ SELECT f1; END// CALL sp2(1.84e+19); f1 --9223372036854775808 +18400000000000000000 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( f1 bigint unsigned zerofill) BEGIN @@ -15926,7 +17233,7 @@ SELECT f1; END// CALL sp3(1.84e+17); f1 -184000000000000000 +00184000000000000000 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4( f1 bigint zerofill) BEGIN @@ -15935,31 +17242,27 @@ SELECT f1; END// CALL sp4(-9.22e+15); f1 --9220000000000000 +00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5( f1 decimal) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: default (10) for DECIMAL not checked, decimal digits shown although not defined CALL sp5(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( f1 decimal (0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp6(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp7; CREATE PROCEDURE sp7( f1 decimal (0) unsigned) BEGIN @@ -15968,7 +17271,11 @@ SELECT f1; END// CALL sp7(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) BEGIN @@ -15977,199 +17284,201 @@ SELECT f1; END// CALL sp8(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp9; CREATE PROCEDURE sp9( f1 decimal (0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp9(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp10; CREATE PROCEDURE sp10( f1 decimal (0, 0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp10(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp11; CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp11(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp12(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp13; CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp13(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp14; CREATE PROCEDURE sp14( f1 decimal (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp14(-1.00e+21); f1 --1000000000000000000000.000000000 +-1000000000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp15; CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp15(1.00e+16); f1 -10000000000000000.000000000 +10000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp16; CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp16(1.00e+16); f1 -10000000000000000.000000000 +000000000000000010000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp17; CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp17(-1.00e+21); f1 --1000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp18_d; CREATE PROCEDURE sp18_d( f1 decimal (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp18_d(-1.00e+30); +f1 +-1000000000000000000000000000000 CALL sp18_d( -1000000000000000000000000000000 ); f1 --1000000000000000000000000000000.000000000 +-1000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp19_du; CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp19_du(1.00e+20); +f1 +100000000000000000000 CALL sp19_du( 100000000000000000000 ); f1 -100000000000000000000.000000000 +100000000000000000000 +CALL sp19_du(1.00e+24); +f1 +1000000000000000000000000 CALL sp19_du( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +1000000000000000000000000 DROP PROCEDURE IF EXISTS sp20_duz; CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined +CALL sp20_duz(1.00e+20); +f1 +0000000000000000000000000000000000000000000100000000000000000000 CALL sp20_duz( 100000000000000000000 ); f1 -100000000000000000000.000000000 +0000000000000000000000000000000000000000000100000000000000000000 +CALL sp20_duz(1.00e+24); +f1 +0000000000000000000000000000000000000001000000000000000000000000 CALL sp20_duz( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +0000000000000000000000000000000000000001000000000000000000000000 DROP PROCEDURE IF EXISTS sp21; CREATE PROCEDURE sp21( f1 decimal (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp21(1.00e+00); f1 -1.000000000 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp22(1.00e+00); f1 -1.000000000 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp23(1.00e+00); f1 -1.000000000 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp24(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp25; CREATE PROCEDURE sp25( f1 double) BEGIN @@ -16187,7 +17496,9 @@ SELECT f1; END// CALL sp26(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp27; CREATE PROCEDURE sp27( f1 double unsigned zerofill) BEGIN @@ -16196,7 +17507,9 @@ SELECT f1; END// CALL sp27(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp28; CREATE PROCEDURE sp28( f1 double zerofill) BEGIN @@ -16205,7 +17518,9 @@ SELECT f1; END// CALL sp28(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp29; CREATE PROCEDURE sp29( f1 float) BEGIN @@ -16223,7 +17538,9 @@ SELECT f1; END// CALL sp30(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp31; CREATE PROCEDURE sp31( f1 float unsigned zerofill) BEGIN @@ -16232,7 +17549,9 @@ SELECT f1; END// CALL sp31(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp32; CREATE PROCEDURE sp32( f1 float zerofill) BEGIN @@ -16241,7 +17560,9 @@ SELECT f1; END// CALL sp32(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp33; CREATE PROCEDURE sp33( f1 float(0)) BEGIN @@ -16259,7 +17580,9 @@ SELECT f1; END// CALL sp34(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp35; CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill) BEGIN @@ -16268,7 +17591,9 @@ SELECT f1; END// CALL sp35(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp36; CREATE PROCEDURE sp36( f1 float(0) zerofill) BEGIN @@ -16277,7 +17602,9 @@ SELECT f1; END// CALL sp36(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp37; CREATE PROCEDURE sp37( f1 float(23)) BEGIN @@ -16295,7 +17622,9 @@ SELECT f1; END// CALL sp38(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp39; CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill) BEGIN @@ -16304,7 +17633,9 @@ SELECT f1; END// CALL sp39(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp40; CREATE PROCEDURE sp40( f1 float(23) zerofill) BEGIN @@ -16313,7 +17644,9 @@ SELECT f1; END// CALL sp40(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp41; CREATE PROCEDURE sp41( f1 float(24)) BEGIN @@ -16331,7 +17664,9 @@ SELECT f1; END// CALL sp42(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp43; CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill) BEGIN @@ -16340,7 +17675,9 @@ SELECT f1; END// CALL sp43(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp44; CREATE PROCEDURE sp44( f1 float(24) zerofill) BEGIN @@ -16349,7 +17686,9 @@ SELECT f1; END// CALL sp44(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp45; CREATE PROCEDURE sp45( f1 float(53)) BEGIN @@ -16367,7 +17706,9 @@ SELECT f1; END// CALL sp46(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp47; CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill) BEGIN @@ -16376,7 +17717,9 @@ SELECT f1; END// CALL sp47(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp48; CREATE PROCEDURE sp48( f1 float(53) zerofill) BEGIN @@ -16385,7 +17728,9 @@ SELECT f1; END// CALL sp48(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp49; CREATE PROCEDURE sp49( f1 int) BEGIN @@ -16394,7 +17739,10 @@ SELECT f1; END// CALL sp49(-2.15e+09); f1 --2150000000 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp50; CREATE PROCEDURE sp50( f1 int unsigned) BEGIN @@ -16421,7 +17769,7 @@ SELECT f1; END// CALL sp52(2.15e+08); f1 -215000000 +0215000000 DROP PROCEDURE IF EXISTS sp53; CREATE PROCEDURE sp53( f1 mediumint) BEGIN @@ -16430,7 +17778,9 @@ SELECT f1; END// CALL sp53(-8388600); f1 --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp54; CREATE PROCEDURE sp54( f1 mediumint unsigned) BEGIN @@ -16457,7 +17807,11 @@ SELECT f1; END// CALL sp56(-8388601); f1 --8388602 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -16466,7 +17820,9 @@ SELECT f1; END// CALL sp57(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp58; CREATE PROCEDURE sp58( f1 numeric (0)) BEGIN @@ -16475,7 +17831,9 @@ SELECT f1; END// CALL sp58(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp59; CREATE PROCEDURE sp59( f1 numeric (0) unsigned) BEGIN @@ -16484,7 +17842,10 @@ SELECT f1; END// CALL sp59(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) BEGIN @@ -16493,7 +17854,9 @@ SELECT f1; END// CALL sp60(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp61; CREATE PROCEDURE sp61( f1 numeric (0) zerofill) BEGIN @@ -16502,7 +17865,10 @@ SELECT f1; END// CALL sp61(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp62; CREATE PROCEDURE sp62( f1 numeric (0, 0)) BEGIN @@ -16511,7 +17877,9 @@ SELECT f1; END// CALL sp62(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp63; CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned) BEGIN @@ -16520,7 +17888,10 @@ SELECT f1; END// CALL sp63(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) BEGIN @@ -16529,7 +17900,9 @@ SELECT f1; END// CALL sp64(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp65; CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill) BEGIN @@ -16538,79 +17911,146 @@ SELECT f1; END// CALL sp65(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp66_n; CREATE PROCEDURE sp66_n( f1 numeric (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp66_n(-1e+36); +f1 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp67_nu(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp68_nuz(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp69_n_z(-1e+36); +f1 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp69_n_z( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp70_n; CREATE PROCEDURE sp70_n( f1 numeric (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp70_n(-1e+40); +f1 +-10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp70_n( -10000000000000000000000000000000000000000 ); f1 --10000000000000000000000000000000000000000.000000000 +-10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp71_nu; CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp71_nu(1.00e+40); +f1 +10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp71_nu( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp72_nuz; CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp72_nuz(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp72_nuz( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp73_n_z; CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp73_n_z(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp73_n_z( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp74; CREATE PROCEDURE sp74( f1 numeric unsigned) BEGIN @@ -16619,7 +18059,9 @@ SELECT f1; END// CALL sp74(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp75; CREATE PROCEDURE sp75( f1 numeric unsigned zerofill) BEGIN @@ -16628,7 +18070,9 @@ SELECT f1; END// CALL sp75(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp76; CREATE PROCEDURE sp76( f1 numeric zerofill) BEGIN @@ -16637,7 +18081,10 @@ SELECT f1; END// CALL sp76(-999999999); f1 --999999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp77; CREATE PROCEDURE sp77( f1 real) BEGIN @@ -16646,7 +18093,7 @@ SELECT f1; END// CALL sp77(1.1); f1 -1.10000 +1.1 DROP PROCEDURE IF EXISTS sp78; CREATE PROCEDURE sp78( f1 real unsigned) BEGIN @@ -16655,7 +18102,9 @@ SELECT f1; END// CALL sp78(1.1); f1 -1.10000 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp79; CREATE PROCEDURE sp79( f1 real unsigned zerofill) BEGIN @@ -16664,7 +18113,9 @@ SELECT f1; END// CALL sp79(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp80; CREATE PROCEDURE sp80( f1 real zerofill) BEGIN @@ -16673,7 +18124,9 @@ SELECT f1; END// CALL sp80(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp81; CREATE PROCEDURE sp81( f1 smallint) BEGIN @@ -16709,7 +18162,11 @@ SELECT f1; END// CALL sp84(-32601); f1 --32602 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -16745,9 +18202,23 @@ SELECT f1; END// CALL sp88(-101); f1 --102 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; +CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) +BEGIN +IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF; +END// +CALL sp89( '1enum'); DROP PROCEDURE IF EXISTS sp90; +CREATE PROCEDURE sp90( f1 set('1set', '2set')) +BEGIN +IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF; +END// +CALL sp90( '1set'); DROP PROCEDURE IF EXISTS sp91; CREATE PROCEDURE sp91( f1 date) BEGIN @@ -16765,7 +18236,7 @@ SELECT f1; END// CALL sp92( '23:59:59.999999'); f1 -26:00:00.999997 +25:59:59 DROP PROCEDURE IF EXISTS sp93; CREATE PROCEDURE sp93( f1 datetime) BEGIN @@ -16774,7 +18245,7 @@ SELECT f1; END// CALL sp93('1997-12-31 23:59:59.999999'); f1 -1998-01-02 01:01:01.000001 +1998-01-02 01:01:00 DROP PROCEDURE IF EXISTS sp94; CREATE PROCEDURE sp94( f1 char) BEGIN @@ -16783,7 +18254,9 @@ SELECT f1; END// CALL sp94( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp95; CREATE PROCEDURE sp95( f1 char ascii) BEGIN @@ -16792,7 +18265,9 @@ SELECT f1; END// CALL sp95( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp96; CREATE PROCEDURE sp96( f1 char binary) BEGIN @@ -16801,7 +18276,9 @@ SELECT f1; END// CALL sp96( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp97; CREATE PROCEDURE sp97( f1 longtext) BEGIN @@ -16846,7 +18323,7 @@ SELECT f1; END// CALL sp101(51); f1 -61 +2061 DROP PROCEDURE IF EXISTS sp102; CREATE PROCEDURE sp102( f1 year(4)) BEGIN @@ -16901,6 +18378,8 @@ END// CALL sp107(2.00e+13); f1 returned +Warnings: +returned 1265 Data truncated for column 'f1' at row 1 USE db_storedproc; DROP DATABASE db1; DROP DATABASE IF EXISTS db1; @@ -16937,9 +18416,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute01(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 2033 2033 2084 2033 2033 2084 +2061 2061 2071 2061 2061 2071 2033 2033 2084 2033 2033 2084 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 2033 2084 2033 2084 +2061 2071 2061 2071 2033 2084 2033 2084 DROP PROCEDURE spexecute01; DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS sp2; @@ -17010,9 +18489,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute03(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah helloworld helloworld NULL helloworld helloworld hellohelloworld +a a a a a a helloworld helloworld NULL helloworld helloworld hellohelloworld var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah helloworld NULL helloworld hellohelloworld +a a a a helloworld NULL helloworld hellohelloworld DROP PROCEDURE spexecute03; DROP PROCEDURE sp3; DROP PROCEDURE IF EXISTS sp4; @@ -17155,7 +18634,7 @@ SELECT var7, var8; END// CALL spexecute07(); var1 var2 -9223372036854775807 NULL +18400000000000000000 NULL var3 var4 -9220000000000000000 NULL var5 var6 @@ -17163,7 +18642,7 @@ var5 var6 var7 var8 -9220000000000000000 NULL f1 f2 f3 -9223372036854775807 9223372036854775807 NULL +18400000000000000000 18400000000000000000 NULL f4 f5 f6 -9220000000000000000 -9220000000000000000 NULL f7 f8 f9 @@ -17171,7 +18650,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 -9220000000000000000 NULL f1 f2 f3 --2 -2 -2 +18353255926290448384 18353255926290448384 18353255926290448384 f4 f5 f6 -9220000000000000000 6744073709551616 6744073709551616 f7 f8 f9 @@ -17179,7 +18658,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 --2 -2 +18353255926290448384 18353255926290448384 var3 var4 6744073709551616 6744073709551616 var5 var6 @@ -17237,9 +18716,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute08(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -368000000000000000 368000000000000000 368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000000 00368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -368000000000000000 368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute08; DROP PROCEDURE sp8; DROP PROCEDURE IF EXISTS sp9; @@ -17291,9 +18770,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute09(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --18440000000000000 -18440000000000000 -18439999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000000 00000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --18440000000000000 -18439999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute09; DROP PROCEDURE sp9; DROP PROCEDURE IF EXISTS sp10; @@ -17337,9 +18816,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute10(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute10; DROP PROCEDURE sp10; DROP PROCEDURE IF EXISTS sp11; @@ -17372,9 +18851,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute11(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute11; DROP PROCEDURE sp11; DROP PROCEDURE IF EXISTS sp12; @@ -17407,9 +18886,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute12(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999999.000000000 99999999999.000000000 100000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999999.000000000 100000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute12; DROP PROCEDURE sp12; DROP PROCEDURE IF EXISTS sp13; @@ -17442,9 +18921,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute13(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute13; DROP PROCEDURE sp13; DROP PROCEDURE IF EXISTS sp14; @@ -17477,9 +18956,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute14(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute14; DROP PROCEDURE sp14; DROP PROCEDURE IF EXISTS sp15; @@ -17545,9 +19024,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute16(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute16; DROP PROCEDURE sp16; DROP PROCEDURE IF EXISTS sp17; @@ -17579,9 +19058,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute17(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute17; DROP PROCEDURE sp17; DROP PROCEDURE IF EXISTS sp18; @@ -17613,9 +19092,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute18(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute18; DROP PROCEDURE sp18; DROP PROCEDURE IF EXISTS sp19; @@ -17647,9 +19126,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute19(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute19; DROP PROCEDURE sp19; DROP PROCEDURE IF EXISTS sp20; @@ -17681,9 +19160,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute20(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute20; DROP PROCEDURE sp20; DROP PROCEDURE IF EXISTS sp21; @@ -17715,9 +19194,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute21(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute21; DROP PROCEDURE sp21; DROP PROCEDURE IF EXISTS sp22; @@ -17783,9 +19262,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute23(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute23; DROP PROCEDURE sp23; DROP PROCEDURE IF EXISTS sp24; @@ -17817,9 +19296,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute24(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1.1 1.1 11.1 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1.1 11.1 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute24; DROP PROCEDURE sp24; DROP PROCEDURE IF EXISTS sp25; @@ -17851,9 +19330,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute25(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --65402 -65402 -65392 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-32758 -32758 -32748 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --65402 -65392 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-32758 -32748 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute25; DROP PROCEDURE sp25; DROP PROCEDURE IF EXISTS sp26; @@ -17919,9 +19398,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute27(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -26:00:00.999997 26:00:00.999997 28:00:01.999995 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +25:59:59 25:59:59 27:59:59 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -26:00:00.999997 28:00:01.999995 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +25:59:59 27:59:59 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute27; DROP PROCEDURE sp27; DROP PROCEDURE IF EXISTS sp28; @@ -17953,9 +19432,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute28(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1998-01-02 01:01:01.000001 1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-02 01:01:00 1998-01-03 02:02:01 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-03 02:02:01 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute28; DROP PROCEDURE sp28; DROP PROCEDURE IF EXISTS sp29; @@ -17987,9 +19466,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute29(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute29; DROP PROCEDURE sp29; DROP PROCEDURE IF EXISTS sp30; @@ -18021,9 +19500,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute30(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute30; DROP PROCEDURE sp30; DROP PROCEDURE IF EXISTS sp31; @@ -18089,9 +19568,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute32(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute32; DROP PROCEDURE sp32; DROP PROCEDURE IF EXISTS sp33; @@ -18123,9 +19602,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute33(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute33; DROP PROCEDURE sp33; DROP PROCEDURE IF EXISTS sp34; @@ -18191,9 +19670,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute35(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute35; DROP PROCEDURE sp35; DROP PROCEDURE IF EXISTS sp36; @@ -18225,9 +19704,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute36(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute36; DROP PROCEDURE sp36; DROP PROCEDURE IF EXISTS sp37; @@ -18293,9 +19772,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute38(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute38; DROP PROCEDURE sp38; DROP PROCEDURE IF EXISTS sp39; @@ -18327,9 +19806,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute39(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute39; DROP PROCEDURE sp39; DROP PROCEDURE IF EXISTS sp40; @@ -18361,9 +19840,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute40(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute40; DROP PROCEDURE sp40; DROP PROCEDURE IF EXISTS sp41; @@ -18395,9 +19874,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute41(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute41; DROP PROCEDURE sp41; DROP PROCEDURE IF EXISTS sp42; @@ -18429,9 +19908,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute42(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute42; DROP PROCEDURE sp42; DROP PROCEDURE IF EXISTS sp43; @@ -18463,9 +19942,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute43(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute43; DROP PROCEDURE sp43; DROP PROCEDURE IF EXISTS sp44; @@ -18497,9 +19976,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute44(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute44; DROP PROCEDURE sp44; DROP PROCEDURE IF EXISTS sp45; @@ -18531,9 +20010,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute45(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute45; DROP PROCEDURE sp45; DROP PROCEDURE IF EXISTS sp46; @@ -18565,9 +20044,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute46(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute46; DROP PROCEDURE sp46; DROP PROCEDURE IF EXISTS sp47; @@ -18599,9 +20078,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute47(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute47; DROP PROCEDURE sp47; DROP PROCEDURE IF EXISTS sp48; @@ -18633,9 +20112,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute48(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute48; DROP PROCEDURE sp48; DROP PROCEDURE IF EXISTS sp49; @@ -18667,9 +20146,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute49(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute49; DROP PROCEDURE sp49; DROP PROCEDURE IF EXISTS sp50; @@ -18701,9 +20180,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute50(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute50; DROP PROCEDURE sp50; DROP PROCEDURE IF EXISTS sp51; @@ -18735,9 +20214,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute51(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute51; DROP PROCEDURE sp51; DROP PROCEDURE IF EXISTS sp52; @@ -18769,9 +20248,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute52(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000.000000000000000000000000000000 -10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute52; DROP PROCEDURE sp52; DROP PROCEDURE IF EXISTS sp53; @@ -18803,9 +20282,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute53(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute53; DROP PROCEDURE sp53; DROP PROCEDURE IF EXISTS sp54; @@ -18837,9 +20316,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute54(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute54; DROP PROCEDURE sp54; DROP PROCEDURE IF EXISTS sp55; @@ -18871,9 +20350,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute55(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute55; DROP PROCEDURE sp55; DROP PROCEDURE IF EXISTS sp56; @@ -18905,9 +20384,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute56(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 61 61 71 61 61 71 +2061 2061 2071 2061 2061 2071 2061 2061 2071 2061 2061 2071 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 61 71 61 71 +2061 2071 2061 2071 2061 2071 2061 2071 DROP PROCEDURE spexecute56; DROP PROCEDURE sp56; DROP PROCEDURE IF EXISTS sp57; @@ -19041,9 +20520,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute60(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah aah ah ah aah +a a a a a a a a a a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah aah ah aah +a a a a a a a a DROP PROCEDURE spexecute60; DROP PROCEDURE sp60; DROP PROCEDURE IF EXISTS sp61; @@ -19075,9 +20554,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute61(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah NULL ah ah aah +a a a a a a a a NULL a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah NULL ah aah +a a a a a NULL a a DROP PROCEDURE spexecute61; DROP PROCEDURE sp61; DROP PROCEDURE IF EXISTS sp62; @@ -19177,9 +20656,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute64(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 DROP PROCEDURE spexecute64; DROP PROCEDURE sp64; DROP PROCEDURE IF EXISTS sp65; @@ -19211,9 +20690,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute65(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -999999999.000000000 999999999.000000000 1000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -999999999.000000000 1000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute65; DROP PROCEDURE sp65; DROP PROCEDURE IF EXISTS sp66; @@ -19245,9 +20724,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute66(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute66; DROP PROCEDURE sp66; DROP PROCEDURE IF EXISTS sp67; @@ -19279,9 +20758,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute67(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute67; DROP PROCEDURE sp67; DROP PROCEDURE IF EXISTS sp68; @@ -19313,9 +20792,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute68(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute68; DROP PROCEDURE sp68; DROP PROCEDURE IF EXISTS sp69; @@ -19347,9 +20826,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute69(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute69; DROP PROCEDURE sp69; DROP PROCEDURE IF EXISTS sp70; @@ -19381,9 +20860,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute70(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute70; DROP PROCEDURE sp70; DROP PROCEDURE IF EXISTS sp71; @@ -19415,9 +20894,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute71(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute71; DROP PROCEDURE sp71; DROP PROCEDURE IF EXISTS sp72; @@ -19449,9 +20928,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute72(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute72; DROP PROCEDURE sp72; DROP PROCEDURE IF EXISTS sp73; @@ -19483,9 +20962,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute73(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute73; DROP PROCEDURE sp73; DROP PROCEDURE IF EXISTS sp74; @@ -19517,9 +20996,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute74(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute74; DROP PROCEDURE sp74; DROP PROCEDURE IF EXISTS sp75; @@ -19551,9 +21030,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute75(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute75; DROP PROCEDURE sp75; DROP PROCEDURE IF EXISTS sp76; @@ -19585,9 +21064,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute76(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute76; DROP PROCEDURE sp76; DROP PROCEDURE IF EXISTS sp77; @@ -19619,9 +21098,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute77(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute77; DROP PROCEDURE sp77; DROP PROCEDURE IF EXISTS sp78; @@ -19653,9 +21132,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute78(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute78; DROP PROCEDURE sp78; DROP PROCEDURE IF EXISTS sp79; @@ -19687,9 +21166,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute79(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute79; DROP PROCEDURE sp79; DROP PROCEDURE IF EXISTS sp80; @@ -19721,9 +21200,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute80(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --2150000000 -2150000000 -2149999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-2147483638 -2147483638 -2147483628 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --2150000000 -2149999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-2147483638 -2147483628 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute80; DROP PROCEDURE sp80; DROP PROCEDURE IF EXISTS sp81; @@ -19823,9 +21302,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute83(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -215000000 215000000 215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0215000000 0215000000 0215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -215000000 215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0215000000 0215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute83; DROP PROCEDURE sp83; DROP PROCEDURE IF EXISTS sp84; @@ -19857,9 +21336,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute84(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388600 -8388600 -8388590 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-8388598 -8388598 -8388588 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388600 -8388590 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-8388598 -8388588 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute84; DROP PROCEDURE sp84; DROP PROCEDURE IF EXISTS sp85; @@ -19925,9 +21404,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute86(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -16777210 16777210 16777220 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777210 16777210 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -16777210 16777220 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777210 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute86; DROP PROCEDURE sp86; DROP PROCEDURE IF EXISTS sp87; @@ -19959,9 +21438,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute87(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388602 -8388602 -8388592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777215 16777215 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388602 -8388592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777215 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute87; DROP PROCEDURE sp87; DROP PROCEDURE IF EXISTS sp88; @@ -19993,9 +21472,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute88(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute88; DROP PROCEDURE sp88; DROP PROCEDURE IF EXISTS sp89; @@ -20027,9 +21506,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute89(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute89; DROP PROCEDURE sp89; DROP PROCEDURE IF EXISTS sp90; @@ -20061,9 +21540,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute90(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000.000000000000000000000000000000 10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute90; DROP PROCEDURE sp90; DROP PROCEDURE IF EXISTS sp91; @@ -20095,9 +21574,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute91(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000100000000000000000000.000000000000000000000000000000 000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute91; DROP PROCEDURE sp91; DROP PROCEDURE IF EXISTS sp92; @@ -20129,9 +21608,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute92(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute92; DROP PROCEDURE sp92; DROP PROCEDURE IF EXISTS sp93; @@ -20163,9 +21642,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute93(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute93; DROP PROCEDURE sp93; DROP PROCEDURE IF EXISTS sp94; @@ -20231,9 +21710,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute95(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute95; DROP PROCEDURE sp95; DROP PROCEDURE IF EXISTS sp96; @@ -20265,9 +21744,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute96(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute96; DROP PROCEDURE sp96; DROP PROCEDURE IF EXISTS sp97; @@ -20299,9 +21778,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute97(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --32602 -32602 -32592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65535 65535 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --32602 -32592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65535 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute97; DROP PROCEDURE sp97; DROP PROCEDURE IF EXISTS sp98; @@ -20367,9 +21846,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute99(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -252 252 262 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +252 252 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -252 262 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +252 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute99; DROP PROCEDURE sp99; DROP PROCEDURE IF EXISTS sp100; @@ -20435,9 +21914,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute101(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --102 -102 -92 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +255 255 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --102 -92 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +255 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute101; DROP PROCEDURE sp101; USE db_storedproc; @@ -20462,13 +21941,13 @@ set a = '2005-03-14 01:01:02'; insert into temp_table values(a); END// show CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure -sp2 ALLOW_INVALID_DATES CREATE PROCEDURE `sp2`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp2 ALLOW_INVALID_DATES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() BEGIN declare a datetime; set a = '2005-03-14 01:01:02'; insert into temp_table values(a); -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode = 'traditional'; CALL sp2 (); SELECT * from temp_table; @@ -20498,15 +21977,15 @@ set b = 5; SELECT not 1 between a and b; END// show CREATE PROCEDURE sp3; -Procedure sql_mode Create Procedure -sp3 HIGH_NOT_PRECEDENCE CREATE PROCEDURE `sp3`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp3 HIGH_NOT_PRECEDENCE CREATE DEFINER=`root`@`localhost` PROCEDURE `sp3`() BEGIN declare a int signed; declare b int unsigned; set a = -5; set b = 5; SELECT not 1 between a and b; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp3(); not 1 between a and b @@ -20541,8 +22020,8 @@ set c = b/a; show warnings; END// show CREATE PROCEDURE sp4; -Procedure sql_mode Create Procedure -sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE PROCEDURE "sp4"() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE DEFINER="root"@"localhost" PROCEDURE "sp4"() BEGIN declare a int; declare b int; @@ -20551,7 +22030,7 @@ set a = 0; set b = 1; set c = b/a; show warnings; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message @@ -20589,37 +22068,37 @@ set @x=i1; set @y=@x; END// show CREATE PROCEDURE sp6a; -Procedure sql_mode Create Procedure -sp6a CREATE PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6a CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6b; -Procedure sql_mode Create Procedure -sp6b CREATE PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6b CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) DETERMINISTIC BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6c; -Procedure sql_mode Create Procedure -sp6c CREATE PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6c CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) COMMENT 'this is a comment' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6a'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6b'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6c'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6a; DROP PROCEDURE sp6b; DROP PROCEDURE sp6c; @@ -20633,8 +22112,8 @@ set @x=i1; set @y=@x; END// SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.3: @@ -20659,8 +22138,8 @@ set @y=@x; return 0; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION sp6; Testcase 4.8.5: @@ -20673,7 +22152,7 @@ Testcase 4.8.6: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; show procedure status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.7: -------------------------------------------------------------------------------- @@ -20694,7 +22173,7 @@ BEGIN return i1; END// show procedure status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP FUNCTION fn1; Testcase 4.8.9: @@ -20708,8 +22187,8 @@ BEGIN return i1; END// SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.11: @@ -20738,7 +22217,7 @@ Testcase 4.8.13: -------------------------------------------------------------------------------- DROP FUNCTION IF EXISTS f1000; SHOW FUNCTION STATUS LIKE 'f1000'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.14: -------------------------------------------------------------------------------- @@ -20760,7 +22239,7 @@ set @x=i1; set @y=@x; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE sp6; Testcase 4.8.16: @@ -20777,8 +22256,8 @@ END// alter procedure sp6 sql security invoker; alter procedure sp6 comment 'this is a new comment'; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.18: @@ -20790,12 +22269,12 @@ return x; END// alter function fn1 sql security invoker; show create function fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(x int) RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) SQL SECURITY INVOKER BEGIN return x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.19: @@ -20808,8 +22287,8 @@ END// alter function fn1 sql security invoker; alter function fn1 comment 'this is a function 3242#@%$#@'; show function status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.20: @@ -20822,13 +22301,13 @@ set @y=@x; END// alter procedure sp6 comment 'this is simple'; show CREATE PROCEDURE sp6; -Procedure sql_mode Create Procedure -sp6 CREATE PROCEDURE `sp6`(i1 int , i2 int) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6`(i1 int , i2 int) COMMENT 'this is simple' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.21: @@ -20853,7 +22332,7 @@ set @y=@x; END// DROP PROCEDURE sp6; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.23: -------------------------------------------------------------------------------- @@ -20875,7 +22354,7 @@ return i1; END// DROP FUNCTION fn1; SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Section 3.1.9 - Routine body checks: -------------------------------------------------------------------------------- @@ -20894,16 +22373,16 @@ SELECT * from t9 limit 0, 100; END// CALL sp6 (10, 20, 30, 40, 50); f1 f2 f3 --5000 a` -5000 --4999 aaa -4999 --4998 abaa -4998 --4997 acaaa -4997 --4996 adaaaa -4996 --4995 aeaaaaa -4995 --4994 afaaaaaa -4994 --4993 agaaaaaaa -4993 --4992 a^aaaaaaaa -4992 -4991 a_aaaaaaaaa -4991 +-4992 a^aaaaaaaa -4992 +-4993 agaaaaaaa -4993 +-4994 afaaaaaa -4994 +-4995 aeaaaaa -4995 +-4996 adaaaa -4996 +-4997 acaaa -4997 +-4998 abaa -4998 +-4999 aaa -4999 +-5000 a` -5000 DROP PROCEDURE sp6; Testcase 4.9.2: @@ -21363,9 +22842,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.14: -------------------------------------------------------------------------------- @@ -21392,9 +22878,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.15: -------------------------------------------------------------------------------- @@ -21422,9 +22915,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +@x=1 +0 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.16: -------------------------------------------------------------------------------- @@ -21452,17 +22952,16 @@ until done END repeat; SELECT done; close cur1; END// -CALL h1() -# cleanup; +CALL h1(); done 0 @x=1 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.17: -------------------------------------------------------------------------------- @@ -21490,9 +22989,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.18: -------------------------------------------------------------------------------- @@ -21520,9 +23019,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.19: -------------------------------------------------------------------------------- @@ -21550,9 +23049,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.20: -------------------------------------------------------------------------------- @@ -21580,9 +23079,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.21: -------------------------------------------------------------------------------- @@ -21610,9 +23109,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.22: -------------------------------------------------------------------------------- @@ -21641,9 +23140,9 @@ done 0 done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.23: -------------------------------------------------------------------------------- @@ -21671,9 +23170,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.24: -------------------------------------------------------------------------------- @@ -21701,9 +23200,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.25: -------------------------------------------------------------------------------- @@ -21728,9 +23227,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.26: -------------------------------------------------------------------------------- @@ -21755,9 +23254,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.27: -------------------------------------------------------------------------------- @@ -21780,9 +23279,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.28: -------------------------------------------------------------------------------- @@ -21805,9 +23304,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.29: -------------------------------------------------------------------------------- @@ -21835,9 +23334,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.30: -------------------------------------------------------------------------------- @@ -21865,9 +23364,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.31: -------------------------------------------------------------------------------- @@ -21893,9 +23392,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.32: -------------------------------------------------------------------------------- @@ -21921,9 +23420,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.33: -------------------------------------------------------------------------------- @@ -21948,7 +23447,7 @@ set @x=1; SELECT done, @x; END// ERROR 42000: Duplicate condition: condname -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.35: -------------------------------------------------------------------------------- @@ -21973,7 +23472,21 @@ insert into res_t1 values (3, 'c'); END begin2_label; END begin1_label// ERROR 42000: Bad SQLSTATE: '020' -drop table res_t1; +CREATE PROCEDURE h1 () +begin1_label:BEGIN +declare condname1 condition for sqlstate '020'; +declare condname2 condition for sqlstate 'wewe'; +declare condname3 condition for 9999; +set @var2 = 1; +insert into res_t1 values (2, 'b'); +begin2_label: BEGIN +declare continue handler for sqlstate '90000023' set @var3= 1; +set @var4 = 1; +insert into res_t1 values (3, 'c'); +END begin2_label; +END begin1_label// +ERROR 42000: Bad SQLSTATE: '020' +DROP TABLE IF EXISTS res_t1; Testcase 4.11.36: -------------------------------------------------------------------------------- @@ -21989,7 +23502,7 @@ set x1 = 2; END; SELECT @x, x1; END// -DROP PROCEDURE h1; +DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: -------------------------------------------------------------------------------- @@ -22010,7 +23523,7 @@ declare exit handler for condname2 set x5 = 1; END// ERROR 42000: Duplicate handler declared in the same block DROP PROCEDURE IF EXISTS h1; -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.41: -------------------------------------------------------------------------------- @@ -22026,6 +23539,9 @@ set x1 = 2; END; SELECT @x, x1; END// +CALL h1(); +@x x1 +0 2 DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): @@ -22076,8 +23592,8 @@ CALL h1(); SELECT @done, @x; @done @x 1 1 -DROP PROCEDURE h1; -DROP TABLE res_t1; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result index 84ef164b0dc..f8e5cc98691 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result @@ -58,6 +58,7 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- +USE db_storedproc; Testcase 3.1.10.2 + 3.1.10.5: ----------------------------- @@ -94,6 +95,7 @@ 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 @@ -114,6 +116,7 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; USE db_storedproc; root@localhost db_storedproc @@ -180,6 +183,8 @@ 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() @@ -207,49 +212,72 @@ 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 ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -abc abc 2005-10-03 100 uvw 1000 CALL sp_ins_3(); SELECT row_count(); row_count() 1 -SELECT * FROM temp ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 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 ORDER BY f4; +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 @@ -258,8 +286,6 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 updated abc 2005-10-03 100 uvw 1000 updated xyz 1949-05-23 100 uvw 1000 updated xyz 1989-11-09 100 uvw 1000 @@ -281,8 +307,10 @@ COUNT( f1 ) f1 SELECT row_count(); row_count() 3 -SELECT * FROM temp ORDER BY f4; +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 @@ -291,20 +319,67 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 -qwe xyz 1998-03-26 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() +-1 +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: diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index c72a792a3a5..f4a47b03e19 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -184,15 +184,14 @@ 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 - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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 -insert 3.5.3.7-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes drop trigger trg4a_1; @@ -210,7 +209,6 @@ 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-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes trig 3.5.3.7-2a @@ -239,29 +237,27 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a 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-1a +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 3.5.3.7-1b drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost @@ -275,23 +271,21 @@ 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-1a +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 3.5.3.7-1b 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-1a +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 -update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -317,21 +311,19 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -345,14 +337,12 @@ 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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -376,23 +366,20 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -406,16 +393,13 @@ 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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -440,14 +424,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -495,15 +479,15 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -550,11 +534,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -596,11 +580,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index 4388950aba1..dec9557e1e5 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -139,10 +139,10 @@ 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 order by i120; +select * from db_test.t1_i; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; +select * from db_test.t1_u; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 b 00222 0000023456 1.050000000000000000000000000000 @@ -150,7 +150,7 @@ 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 order by d120; +select * from db_test.t1_d; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -343,20 +343,20 @@ 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; +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; +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; +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 @@ -366,7 +366,7 @@ 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; +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 @@ -377,7 +377,7 @@ 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; +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 @@ -387,7 +387,7 @@ 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; +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 @@ -499,9 +499,38 @@ 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: (Disabled as a result of bug _____) ------------------------------------------------------ +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; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result index 6c9c1fb98c0..4ecd3c22999 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result @@ -294,8 +294,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index b826f2a8449..06e7d065e18 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -123,11 +123,7 @@ USE test; -------------------------------------------------------------------------------- There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables +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); @@ -403,71 +399,3069 @@ f59 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 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 +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 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 +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; @@ -931,9 +3925,108 @@ 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 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 +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 @@ -994,10 +4087,58 @@ 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 ORDER BY f59,f60,f61 LIMIT 2; +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 @@ -1140,17 +4281,17 @@ Drop view if exists test.v1 ; Testcase 3.3.1.22 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2; -SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2; +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 LIMIT 2; +SELECT * FROM test.v1; product 2 CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1 LIMIT 2; +SELECT * FROM test.v1; product root@localhost Drop view if exists test.v1 ; @@ -1228,10 +4369,58 @@ Testcase 3.3.1.26 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; Create view test.v1 AS Select * from test.tb2; -Select * from test.v1 order by f59, f60, f61 limit 2; +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 @@ -1255,57 +4444,2556 @@ 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 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 +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 ; @@ -1896,12 +7584,110 @@ 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 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 -122 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 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 -3000 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -1926,16 +7712,214 @@ 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 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 -30 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 -30 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 +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 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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 ; @@ -9721,13 +15705,2557 @@ 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 limit 5; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -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 +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; @@ -9784,28 +18312,2557 @@ F59 F61 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 limit 20; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -10180,8 +21237,57 @@ F59 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 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 -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 +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 @@ -10544,8 +21650,57 @@ 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 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 -2005 101 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 @@ -10561,8 +21716,57 @@ 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 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 -8 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 +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 @@ -10577,11 +21781,210 @@ 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 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 -891 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 -891 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 -891 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 -891 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 +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 @@ -10930,10 +22333,6 @@ 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'; - -Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view --------------------------------------------------------------------------------- SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; @@ -11465,21 +22864,24 @@ ABC 0 ABC 1.7320508075689 CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t1; DROP TABLE t2; DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/memory_func_view.result b/mysql-test/suite/funcs_1/r/memory_func_view.result index 02ef728fad5..14568643665 100644 --- a/mysql-test/suite/funcs_1/r/memory_func_view.result +++ b/mysql-test/suite/funcs_1/r/memory_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -89,6 +85,9 @@ 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, @@ -101,6 +100,7 @@ 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, @@ -113,6 +113,7 @@ 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, @@ -125,6 +126,7 @@ 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, @@ -135,11 +137,13 @@ 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" @@ -184,14 +188,12 @@ 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'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', ) - The file with expected results suffers from Bug 10963" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +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), @@ -284,19 +286,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; +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 = 190 OR select_id IS NULL) order by id; +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 = 189 OR select_id IS NULL order by id; +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 @@ -308,7 +310,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'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 = 189 OR select_id IS NULL) order by id; +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 @@ -322,13 +324,13 @@ 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 = 188 OR select_id IS NULL order by id; +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 = 188 OR select_id IS NULL) order by id; +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -336,13 +338,13 @@ 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 = 187 OR select_id IS NULL order by id; +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 = 187 OR select_id IS NULL) order by id; +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -350,13 +352,13 @@ 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 = 186 OR select_id IS NULL order by id; +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 = 186 OR select_id IS NULL) order by id; +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -364,13 +366,13 @@ 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 = 185 OR select_id IS NULL order by id; +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 = 185 OR select_id IS NULL) order by id; +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -378,13 +380,13 @@ 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 = 184 OR select_id IS NULL order by id; +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 = 184 OR select_id IS NULL) order by id; +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -392,13 +394,13 @@ 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 = 183 OR select_id IS NULL order by id; +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 = 183 OR select_id IS NULL) order by id; +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -406,13 +408,13 @@ 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 = 182 OR select_id IS NULL order by id; +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 = 182 OR select_id IS NULL) order by id; +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -420,13 +422,13 @@ 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 = 181 OR select_id IS NULL order by id; +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 = 181 OR select_id IS NULL) order by id; +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -434,13 +436,13 @@ 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 = 180 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 180 OR select_id IS NULL) order by id; +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -448,13 +450,13 @@ 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 = 179 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 179 OR select_id IS NULL) order by id; +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -462,13 +464,13 @@ 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 = 178 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 178 OR select_id IS NULL) order by id; +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -476,13 +478,13 @@ 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 = 177 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 177 OR select_id IS NULL) order by id; +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -490,13 +492,13 @@ 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 = 176 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 176 OR select_id IS NULL) order by id; +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -504,13 +506,13 @@ 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 = 175 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 175 OR select_id IS NULL) order by id; +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -518,13 +520,13 @@ 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 = 174 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 174 OR select_id IS NULL) order by id; +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -532,13 +534,13 @@ 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 = 173 OR select_id IS NULL order by id; +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 = 173 OR select_id IS NULL) order by id; +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -546,13 +548,13 @@ 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 = 172 OR select_id IS NULL order by id; +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 = 172 OR select_id IS NULL) order by id; +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -560,13 +562,13 @@ 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 = 171 OR select_id IS NULL order by id; +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 = 171 OR select_id IS NULL) order by id; +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -574,13 +576,13 @@ 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 = 170 OR select_id IS NULL order by id; +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 = 170 OR select_id IS NULL) order by id; +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -588,13 +590,13 @@ 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 = 169 OR select_id IS NULL order by id; +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 = 169 OR select_id IS NULL) order by id; +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -602,13 +604,13 @@ 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 = 168 OR select_id IS NULL order by id; +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 = 168 OR select_id IS NULL) order by id; +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -616,13 +618,13 @@ 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 = 167 OR select_id IS NULL order by id; +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 = 167 OR select_id IS NULL) order by id; +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -630,13 +632,13 @@ 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 = 166 OR select_id IS NULL order by id; +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 = 166 OR select_id IS NULL) order by id; +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -644,13 +646,13 @@ 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 = 165 OR select_id IS NULL order by id; +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 = 165 OR select_id IS NULL) order by id; +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -658,13 +660,13 @@ 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 = 164 OR select_id IS NULL order by id; +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 = 164 OR select_id IS NULL) order by id; +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -672,13 +674,13 @@ 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 = 163 OR select_id IS NULL order by id; +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 = 163 OR select_id IS NULL) order by id; +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -686,13 +688,13 @@ 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 = 162 OR select_id IS NULL order by id; +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 = 162 OR select_id IS NULL) order by id; +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -700,13 +702,13 @@ 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 = 161 OR select_id IS NULL order by id; +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 = 161 OR select_id IS NULL) order by id; +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -714,13 +716,13 @@ 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 = 160 OR select_id IS NULL order by id; +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 = 160 OR select_id IS NULL) order by id; +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -728,13 +730,13 @@ 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 = 159 OR select_id IS NULL order by id; +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 = 159 OR select_id IS NULL) order by id; +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -742,13 +744,13 @@ 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 = 158 OR select_id IS NULL order by id; +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 = 158 OR select_id IS NULL) order by id; +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -756,13 +758,13 @@ 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 = 157 OR select_id IS NULL order by id; +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(_latin1'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 = 157 OR select_id IS NULL) order by id; +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -770,13 +772,13 @@ 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 = 156 OR select_id IS NULL order by id; +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(_latin1'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 = 156 OR select_id IS NULL) order by id; +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -784,13 +786,13 @@ 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 = 155 OR select_id IS NULL order by id; +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(_latin1'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 = 155 OR select_id IS NULL) order by id; +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -798,19 +800,19 @@ 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 = 154 OR select_id IS NULL order by id; +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(_latin1'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 = 154 OR select_id IS NULL) order by id; +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; +WHERE select_id = 156 OR select_id IS NULL order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -827,7 +829,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`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; +WHERE select_id = 156 OR select_id IS NULL) order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -846,13 +848,13 @@ 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 = 152 OR select_id IS NULL order by id; +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 = 152 OR select_id IS NULL) order by id; +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -860,13 +862,13 @@ 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 = 151 OR select_id IS NULL order by id; +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 = 151 OR select_id IS NULL) order by id; +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -874,13 +876,13 @@ 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 = 150 OR select_id IS NULL order by id; +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 = 150 OR select_id IS NULL) order by id; +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -888,19 +890,49 @@ 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 = 149 OR select_id IS NULL order by id; +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 = 149 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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(_latin1'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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' 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 = 148 OR select_id IS NULL order by id; +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 @@ -915,7 +947,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'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 = 148 OR select_id IS NULL) order by id; +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 @@ -928,9 +960,33 @@ Error 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(_latin1'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 = 147 OR select_id IS NULL order by id; +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 @@ -942,7 +998,7 @@ 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 = 147 OR select_id IS NULL) order by id; +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 @@ -954,7 +1010,7 @@ 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 = 146 OR select_id IS NULL order by id; +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 @@ -966,7 +1022,7 @@ 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 = 146 OR select_id IS NULL) order by id; +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 @@ -978,7 +1034,7 @@ 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 = 145 OR select_id IS NULL order by id; +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 @@ -990,7 +1046,7 @@ 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 = 145 OR select_id IS NULL) order by id; +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 @@ -1002,7 +1058,7 @@ 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 = 144 OR select_id IS NULL order by id; +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 @@ -1014,7 +1070,7 @@ 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 = 144 OR select_id IS NULL) order by id; +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 @@ -1028,13 +1084,13 @@ 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 = 143 OR select_id IS NULL order by id; +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 = 143 OR select_id IS NULL) order by id; +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1042,13 +1098,13 @@ 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 = 142 OR select_id IS NULL order by id; +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(_latin1'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 = 142 OR select_id IS NULL) order by id; +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1056,7 +1112,7 @@ 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 = 141 OR select_id IS NULL order by id; +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 @@ -1068,7 +1124,7 @@ 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 = 141 OR select_id IS NULL) order by id; +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 @@ -1082,7 +1138,7 @@ 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 = 140 OR select_id IS NULL order by id; +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 @@ -1094,7 +1150,7 @@ 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 = 140 OR select_id IS NULL) order by id; +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 @@ -1108,7 +1164,7 @@ 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 = 139 OR select_id IS NULL order by id; +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 @@ -1120,7 +1176,7 @@ 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 = 139 OR select_id IS NULL) order by id; +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 @@ -1134,7 +1190,7 @@ 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 = 138 OR select_id IS NULL order by id; +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 @@ -1146,7 +1202,7 @@ 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 = 138 OR select_id IS NULL) order by id; +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 @@ -1160,7 +1216,7 @@ 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 = 137 OR select_id IS NULL order by id; +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 @@ -1172,7 +1228,7 @@ 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`,_latin1'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 = 137 OR select_id IS NULL) order by id; +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 @@ -1186,7 +1242,7 @@ 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 = 136 OR select_id IS NULL order by id; +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 @@ -1198,7 +1254,7 @@ 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`,_latin1'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 = 136 OR select_id IS NULL) order by id; +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 @@ -1212,7 +1268,7 @@ 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 = 135 OR select_id IS NULL order by id; +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 @@ -1224,7 +1280,7 @@ 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`,_latin1'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 = 135 OR select_id IS NULL) order by id; +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 @@ -1238,7 +1294,7 @@ 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 = 134 OR select_id IS NULL order by id; +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 @@ -1250,7 +1306,7 @@ 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`,_latin1'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 = 134 OR select_id IS NULL) order by id; +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 @@ -1264,7 +1320,7 @@ 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 = 133 OR select_id IS NULL order by id; +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 @@ -1276,7 +1332,7 @@ 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`,_latin1'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 = 133 OR select_id IS NULL) order by id; +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 @@ -1290,7 +1346,7 @@ 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 = 132 OR select_id IS NULL order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1302,7 +1358,7 @@ 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`,_latin1'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 = 132 OR select_id IS NULL) order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1316,7 +1372,7 @@ 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 = 131 OR select_id IS NULL order by id; +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 @@ -1328,7 +1384,7 @@ 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`,_latin1'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 = 131 OR select_id IS NULL) order by id; +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 @@ -1342,7 +1398,7 @@ 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 = 130 OR select_id IS NULL order by id; +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 @@ -1354,7 +1410,7 @@ 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`,_latin1'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 = 130 OR select_id IS NULL) order by id; +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 @@ -1368,7 +1424,7 @@ 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 = 129 OR select_id IS NULL order by id; +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 @@ -1380,7 +1436,7 @@ 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`,_latin1'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 = 129 OR select_id IS NULL) order by id; +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 @@ -1394,7 +1450,7 @@ 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 = 128 OR select_id IS NULL order by id; +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 @@ -1406,7 +1462,7 @@ 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`,_latin1'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 = 128 OR select_id IS NULL) order by id; +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 @@ -1420,7 +1476,7 @@ 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 = 127 OR select_id IS NULL order by id; +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 @@ -1432,7 +1488,7 @@ 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`,_latin1'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 = 127 OR select_id IS NULL) order by id; +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 @@ -1446,7 +1502,7 @@ 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 = 126 OR select_id IS NULL order by id; +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 @@ -1458,7 +1514,7 @@ 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`,_latin1'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 = 126 OR select_id IS NULL) order by id; +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 @@ -1472,7 +1528,7 @@ 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 = 125 OR select_id IS NULL order by id; +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 @@ -1486,7 +1542,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 125 OR select_id IS NULL) order by id; +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 @@ -1501,7 +1557,7 @@ 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 = 124 OR select_id IS NULL order by id; +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 @@ -1515,7 +1571,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 124 OR select_id IS NULL) order by id; +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 @@ -1530,7 +1586,7 @@ 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 = 123 OR select_id IS NULL order by id; +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 @@ -1544,7 +1600,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 123 OR select_id IS NULL) order by id; +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 @@ -1559,7 +1615,7 @@ 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 = 122 OR select_id IS NULL order by id; +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 @@ -1573,7 +1629,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 122 OR select_id IS NULL) order by id; +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 @@ -1588,7 +1644,7 @@ 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 = 121 OR select_id IS NULL order by id; +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 @@ -1602,7 +1658,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 121 OR select_id IS NULL) order by id; +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 @@ -1617,7 +1673,7 @@ 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 = 120 OR select_id IS NULL order by id; +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 @@ -1631,7 +1687,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 120 OR select_id IS NULL) order by id; +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 @@ -1646,7 +1702,7 @@ 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 = 119 OR select_id IS NULL order by id; +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 @@ -1660,7 +1716,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 119 OR select_id IS NULL) order by id; +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 @@ -1675,7 +1731,7 @@ 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 = 118 OR select_id IS NULL order by id; +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 @@ -1689,7 +1745,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 118 OR select_id IS NULL) order by id; +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 @@ -1704,7 +1760,7 @@ 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 = 117 OR select_id IS NULL order by id; +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 @@ -1718,7 +1774,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 117 OR select_id IS NULL) order by id; +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 @@ -1733,7 +1789,7 @@ 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 = 116 OR select_id IS NULL order by id; +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 @@ -1747,7 +1803,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 116 OR select_id IS NULL) order by id; +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 @@ -1762,7 +1818,7 @@ 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 = 115 OR select_id IS NULL order by id; +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 @@ -1776,7 +1832,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 115 OR select_id IS NULL) order by id; +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 @@ -1791,7 +1847,7 @@ 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 = 114 OR select_id IS NULL order by id; +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 @@ -1805,7 +1861,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 114 OR select_id IS NULL) order by id; +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 @@ -1820,7 +1876,7 @@ 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 = 113 OR select_id IS NULL order by id; +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 @@ -1832,7 +1888,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 113 OR select_id IS NULL) order by id; +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 @@ -1846,7 +1902,7 @@ 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 = 112 OR select_id IS NULL order by id; +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 @@ -1858,7 +1914,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 112 OR select_id IS NULL) order by id; +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 @@ -1872,7 +1928,7 @@ 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 = 111 OR select_id IS NULL order by id; +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 @@ -1884,7 +1940,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 111 OR select_id IS NULL) order by id; +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 @@ -1898,7 +1954,7 @@ 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 = 110 OR select_id IS NULL order by id; +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 @@ -1910,7 +1966,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 110 OR select_id IS NULL) order by id; +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 @@ -1924,7 +1980,7 @@ 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 = 109 OR select_id IS NULL order by id; +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 @@ -1936,7 +1992,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 109 OR select_id IS NULL) order by id; +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 @@ -1950,7 +2006,7 @@ 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 = 108 OR select_id IS NULL order by id; +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.7976931348623e+308 2 @@ -1962,7 +2018,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 108 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 @@ -1976,7 +2032,7 @@ 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 = 107 OR select_id IS NULL order by id; +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 @@ -1988,7 +2044,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 107 OR select_id IS NULL) order by id; +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 @@ -2002,7 +2058,7 @@ 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 = 106 OR select_id IS NULL order by id; +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 @@ -2014,7 +2070,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 106 OR select_id IS NULL) order by id; +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 @@ -2028,7 +2084,7 @@ 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 = 105 OR select_id IS NULL order by id; +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 @@ -2040,7 +2096,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 105 OR select_id IS NULL) order by id; +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 @@ -2054,7 +2110,7 @@ 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 = 104 OR select_id IS NULL order by id; +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 @@ -2071,7 +2127,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 104 OR select_id IS NULL) order by id; +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 @@ -2090,7 +2146,7 @@ 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 = 103 OR select_id IS NULL order by id; +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 @@ -2102,7 +2158,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 103 OR select_id IS NULL) order by id; +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 @@ -2116,7 +2172,7 @@ 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 = 102 OR select_id IS NULL order by id; +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 @@ -2131,7 +2187,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 102 OR select_id IS NULL) order by id; +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 @@ -2148,7 +2204,7 @@ 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 = 101 OR select_id IS NULL order by id; +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 @@ -2160,7 +2216,7 @@ 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 = 101 OR select_id IS NULL) order by id; +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 @@ -2174,7 +2230,7 @@ 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 = 100 OR select_id IS NULL order by id; +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 @@ -2186,7 +2242,7 @@ 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 = 100 OR select_id IS NULL) order by id; +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 @@ -2200,7 +2256,7 @@ 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 = 99 OR select_id IS NULL order by id; +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 @@ -2212,7 +2268,7 @@ 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 = 99 OR select_id IS NULL) order by id; +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 @@ -2226,7 +2282,7 @@ 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 = 98 OR select_id IS NULL order by id; +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 @@ -2238,7 +2294,7 @@ 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 = 98 OR select_id IS NULL) order by id; +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 @@ -2252,7 +2308,7 @@ 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 = 97 OR select_id IS NULL order by id; +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 @@ -2264,7 +2320,7 @@ 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 = 97 OR select_id IS NULL) order by id; +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 @@ -2278,7 +2334,7 @@ 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 = 96 OR select_id IS NULL order by id; +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 @@ -2290,7 +2346,7 @@ 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 = 96 OR select_id IS NULL) order by id; +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 @@ -2304,7 +2360,7 @@ 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 = 95 OR select_id IS NULL order by id; +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 @@ -2316,7 +2372,7 @@ 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 = 95 OR select_id IS NULL) order by id; +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 @@ -2330,7 +2386,7 @@ 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 = 94 OR select_id IS NULL order by id; +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 @@ -2342,7 +2398,7 @@ 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 = 94 OR select_id IS NULL) order by id; +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 @@ -2356,7 +2412,7 @@ 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 = 93 OR select_id IS NULL order by id; +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 @@ -2368,7 +2424,7 @@ 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 = 93 OR select_id IS NULL) order by id; +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 @@ -2382,7 +2438,7 @@ 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 = 92 OR select_id IS NULL order by id; +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 @@ -2394,7 +2450,7 @@ 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 = 92 OR select_id IS NULL) order by id; +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 @@ -2408,7 +2464,7 @@ 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 = 91 OR select_id IS NULL order by id; +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 @@ -2420,7 +2476,7 @@ 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 = 91 OR select_id IS NULL) order by id; +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 @@ -2434,7 +2490,7 @@ 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 = 90 OR select_id IS NULL order by id; +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 @@ -2446,7 +2502,7 @@ 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 = 90 OR select_id IS NULL) order by id; +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 @@ -2460,7 +2516,7 @@ 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 = 89 OR select_id IS NULL order by id; +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 @@ -2472,7 +2528,7 @@ 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 = 89 OR select_id IS NULL) order by id; +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 @@ -2482,6 +2538,38 @@ NULL NULL 1 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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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), diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc.result b/mysql-test/suite/funcs_1/r/memory_storedproc.result index 402b527241f..ec0fde80dda 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc.result @@ -1,29 +1,4 @@ -. -. IMPORTANT NOTICE: -. ----------------- -. -. FIXME: The .result files are still NOT CHECKED for correctness! -. -. FIXME: Several tests are affected by known problems around DECIMAL -. FIXME: and NUMERIC that will be checked again after WL#2984 once -. FIXME: has been completed. Some of them are marked in the result. -. -. Currently (Dec 06, 2005) this .result file is checked OK for Linux -. with 5.0.17-bk (ChangeSet@1.1975.1.2, 2005-12-05 18:33:48+01:00). -. Using the available Windows version 5.0.16 there are differences -. that can be ignored (e.g. WL#2984). -. --------------------------------------------------------------------------------- - FIXME: There are subtests that are switched off due to known bugs: - ------------------------------------------------------------------ -WL#2984: DECIMAL and NUMERIC problems with differences on some machines -0 - -There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- SET @@global.max_heap_table_size=4294967295; @@ -94,23 +69,24 @@ CREATE PROCEDURE -------------------------------------------------------------------------------- USE db_storedproc; DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) ) SELECT * from t1 where f2 = f1; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa'); -f1 f2 f3 f4 f5 f6 +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 tinytext ) language sql deterministic sql security definer comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1, @v1; END// +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); -@v1 @v1 -abc abc +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 binary ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -119,12 +95,12 @@ SELECT @v1; END// CALL sp1( 34 ); @v1 -34 +3 +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 blob ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -135,10 +111,8 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 int ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -149,25 +123,27 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: SP definition accepted with m>60 in DECIMAL(m,n) CREATE PROCEDURE sp1( f1 decimal(256, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 256 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(66, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 66 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(60, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -175,101 +151,1123 @@ SELECT @v1; END// CALL sp1( 17976931340000 ); @v1 -17976931340000 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.797693134e+13 ); +@v1 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.7976931348623157493578e+308 ); +ERROR 22007: Illegal double '1.7976931348623157493578e+308' value found during parsing +CALL sp1( 0.1234567890987654321e+100 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-100 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+99 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-99 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+98 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-98 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+97 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-97 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+96 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-96 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+95 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-95 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+94 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-94 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+93 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-93 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+92 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-92 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+91 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-91 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+90 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-90 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+89 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-89 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+88 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-88 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+87 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-87 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+86 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-86 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+85 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-85 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+84 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-84 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+83 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-83 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+82 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-82 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+81 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-81 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+80 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-80 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+79 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-79 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+78 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-78 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+77 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-77 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+76 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-76 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+75 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-75 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+74 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-74 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+73 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-73 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+72 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-72 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+71 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-71 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+70 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-70 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+69 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-69 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+68 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-68 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+67 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-67 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+66 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-66 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+65 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-65 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+64 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-64 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+63 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-63 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+62 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-62 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+61 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-61 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+60 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-60 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+59 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-59 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+58 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-58 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+57 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-57 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+56 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-56 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+55 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-55 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+54 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-54 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+53 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-53 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+52 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-52 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+51 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-51 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+50 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-50 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+49 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-49 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+48 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-48 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+47 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-47 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+46 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-46 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+45 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-45 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+44 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-44 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+43 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-43 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+42 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-42 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+41 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-41 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+40 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-40 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+39 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-39 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+38 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-38 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+37 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-37 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+36 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-36 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+35 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-35 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+34 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-34 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+33 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-33 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+32 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-32 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+31 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-31 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+30 ); +@v1 +123456789098765400000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-30 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+29 ); +@v1 +12345678909876540000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-29 ); +@v1 +0.000000000000000000000000000001 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+28 ); +@v1 +1234567890987654000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-28 ); +@v1 +0.000000000000000000000000000012 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+27 ); +@v1 +123456789098765400000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-27 ); +@v1 +0.000000000000000000000000000123 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+26 ); +@v1 +12345678909876540000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-26 ); +@v1 +0.000000000000000000000000001235 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+25 ); +@v1 +1234567890987654000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-25 ); +@v1 +0.000000000000000000000000012346 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+24 ); +@v1 +123456789098765400000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-24 ); +@v1 +0.000000000000000000000000123457 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+23 ); +@v1 +12345678909876540000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-23 ); +@v1 +0.000000000000000000000001234568 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+22 ); +@v1 +1234567890987654000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-22 ); +@v1 +0.000000000000000000000012345679 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+21 ); +@v1 +123456789098765400000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-21 ); +@v1 +0.000000000000000000000123456789 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+20 ); +@v1 +12345678909876540000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-20 ); +@v1 +0.000000000000000000001234567891 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+19 ); +@v1 +1234567890987654000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-19 ); +@v1 +0.000000000000000000012345678910 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+18 ); +@v1 +123456789098765400.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-18 ); +@v1 +0.000000000000000000123456789099 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+17 ); +@v1 +12345678909876540.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-17 ); +@v1 +0.000000000000000001234567890988 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+16 ); +@v1 +1234567890987654.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-16 ); +@v1 +0.000000000000000012345678909877 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+15 ); +@v1 +123456789098765.400000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-15 ); +@v1 +0.000000000000000123456789098765 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+14 ); +@v1 +12345678909876.540000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-14 ); +@v1 +0.000000000000001234567890987654 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+13 ); +@v1 +1234567890987.654000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-13 ); +@v1 +0.000000000000012345678909876540 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+12 ); +@v1 +123456789098.765400000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-12 ); +@v1 +0.000000000000123456789098765400 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+11 ); +@v1 +12345678909.876540000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-11 ); +@v1 +0.000000000001234567890987654000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+10 ); +@v1 +1234567890.987654000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-10 ); +@v1 +0.000000000012345678909876540000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+9 ); +@v1 +123456789.098765400000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-9 ); +@v1 +0.000000000123456789098765400000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+8 ); +@v1 +12345678.909876540000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-8 ); +@v1 +0.000000001234567890987654000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+7 ); +@v1 +1234567.890987654000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-7 ); +@v1 +0.000000012345678909876540000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+6 ); +@v1 +123456.789098765400000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-6 ); +@v1 +0.000000123456789098765400000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+5 ); +@v1 +12345.678909876540000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-5 ); +@v1 +0.000001234567890987654000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+4 ); +@v1 +1234.567890987654000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-4 ); +@v1 +0.000012345678909876550000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+3 ); +@v1 +123.456789098765400000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-3 ); +@v1 +0.000123456789098765400000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+2 ); +@v1 +12.345678909876540000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-2 ); +@v1 +0.001234567890987654000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+1 ); +@v1 +1.234567890987654000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-1 ); +@v1 +0.012345678909876540000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 set("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET CALL sp1( "value1, value1" ); f1 -value1, value1 +value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) language sql SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) not deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security definer SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security invoker SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) comment 'this is simple' SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long DROP PROCEDURE sp1; Testcase 4.1.2: @@ -294,8 +1292,8 @@ SELECT fn1( ' world'); fn1( ' world') hello world SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -306,8 +1304,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 decimal(63, 31) ) returns decimal(63, 31) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -326,34 +1324,34 @@ SELECT fn1( 1.3326e+8 ); fn1( 1.3326e+8 ) 134260000.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 enum("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SELECT fn1( "value1" ); fn1( "value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 set("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET SELECT fn1( "value1, value1" ); fn1( "value1, value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1, value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql BEGIN @@ -364,8 +1362,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint deterministic BEGIN @@ -376,8 +1374,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint not deterministic BEGIN @@ -388,8 +1386,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security definer @@ -401,8 +1399,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security invoker @@ -414,8 +1412,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint comment 'this is simple' @@ -427,8 +1425,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.1.3: @@ -440,9 +1438,9 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1 (f1 char(20) ) SELECT * from t1 where f2 = f1; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`(f1 char(20) ) -SELECT * from t1 where f2 = f1 +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(f1 char(20) ) +SELECT * from t1 where f2 = f1 latin1 modified created DROP PROCEDURE sp1; Testcase 4.1.4: @@ -453,9 +1451,9 @@ DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1 (s char(20)) returns char(50) return concat('hello, ', s, '!'); show CREATE FUNCTION fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(s char(20)) RETURNS char(50) -return concat('hello, ', s, '!') +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(s char(20)) RETURNS char(50) CHARSET latin1 +return concat('hello, ', s, '!') latin1 modified created DROP FUNCTION fn1; Testcase 4.1.5: @@ -465,8 +1463,8 @@ SHOW PROCEDURE status CREATE PROCEDURE sp5() SELECT * from t1; SHOW PROCEDURE status like 'sp5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp5; Testcase 4.1.6: @@ -479,8 +1477,8 @@ set @b = 0.9 * a; return @b; END// SHOW FUNCTION STATUS LIKE 'fn5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn5 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn5 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn5; Testcase 4.1.7: @@ -498,7 +1496,7 @@ CREATE PROCEDURE sp7b (a char (20), out b char(20)) SELECT f1 into b from t1 where t1.f2= a; CALL sp7b('xyz', @out_param); Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed SELECT @out_param; @out_param NULL @@ -510,9 +1508,6 @@ SELECT f2 into c from t1 where t1.f2=999; END// set @c=1; CALL sp7c('xyz', @out_param, @c); -Warnings: -Warning 1329 No data to FETCH -Warning 1329 No data to FETCH SELECT @out_param; @out_param NULL @@ -539,48 +1534,48 @@ Testcase 4.1.9: drop procedure -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.10: ---------------- DROP FUNCTION -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.11: ---------------- @@ -604,6 +1599,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK); user_1@localhost db_storedproc CALL sp11(); +USE db_storedproc; root@localhost db_storedproc alter procedure sp11 sql security invoker; @@ -612,6 +1608,7 @@ security_type INVOKER user_1@localhost db_storedproc +USE db_storedproc; CALL sp11(); ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1' commit work; @@ -705,6 +1702,10 @@ SELECT * from t1 where f2 = f1' at line 1 CREATE PROCEDURE function() SELECT * from t1 where f2=f1; DROP PROCEDURE function; +CREATE PROCEDURE accessible() +SELECT * from t1 where f2=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 'accessible() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE add() SELECT * from t1 where f2=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() @@ -765,9 +1766,9 @@ CREATE PROCEDURE by() SELECT * from t1 where f2=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 'by() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE CALL() +CREATE PROCEDURE call() SELECT * from t1 where f2=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 'CALL() +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call() SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE cascade() SELECT * from t1 where f2=f1; @@ -801,17 +1802,10 @@ CREATE PROCEDURE column() SELECT * from t1 where f2=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 'column() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE columns() -SELECT * from t1 where f2=f1; -DROP PROCEDURE columns; CREATE PROCEDURE condition() SELECT * from t1 where f2=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 'condition() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE connection() -SELECT * from t1 where f2=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 'connection() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE constraint() SELECT * from t1 where f2=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 'constraint() @@ -995,9 +1989,6 @@ CREATE PROCEDURE foreign() SELECT * from t1 where f2=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 'foreign() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE found() -SELECT * from t1 where f2=f1; -DROP PROCEDURE found; CREATE PROCEDURE from() SELECT * from t1 where f2=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 'from() @@ -1006,9 +1997,6 @@ CREATE PROCEDURE fulltext() SELECT * from t1 where f2=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 'fulltext() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE goto() -SELECT * from t1 where f2=f1; -DROP PROCEDURE goto; CREATE PROCEDURE grant() SELECT * from t1 where f2=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 'grant() @@ -1077,6 +2065,26 @@ CREATE PROCEDURE int() SELECT * from t1 where f2=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 'int() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int1() +SELECT * from t1 where f2=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 'int1() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int2() +SELECT * from t1 where f2=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 'int2() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int3() +SELECT * from t1 where f2=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 'int3() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int4() +SELECT * from t1 where f2=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 'int4() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int8() +SELECT * from t1 where f2=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 'int8() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE integer() SELECT * from t1 where f2=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 'integer() @@ -1133,6 +2141,10 @@ CREATE PROCEDURE limit() SELECT * from t1 where f2=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 'limit() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE linear() +SELECT * from t1 where f2=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 'linear() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE lines() SELECT * from t1 where f2=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 'lines() @@ -1173,6 +2185,10 @@ CREATE PROCEDURE low_priority() SELECT * from t1 where f2=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 'low_priority() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE master_ssl_verify_server_cert() +SELECT * from t1 where f2=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 'master_ssl_verify_server_cert() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE match() SELECT * from t1 where f2=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 'match() @@ -1273,9 +2289,6 @@ CREATE PROCEDURE primary() SELECT * from t1 where f2=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 'primary() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE privileges() -SELECT * from t1 where f2=f1; -DROP PROCEDURE privileges; CREATE PROCEDURE procedure() SELECT * from t1 where f2=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 'procedure() @@ -1284,6 +2297,10 @@ CREATE PROCEDURE purge() SELECT * from t1 where f2=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 'purge() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE range() +SELECT * from t1 where f2=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 'range() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE read() SELECT * from t1 where f2=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 'read() @@ -1304,6 +2321,10 @@ CREATE PROCEDURE regexp() SELECT * from t1 where f2=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 'regexp() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE release() +SELECT * from t1 where f2=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 'release() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE rename() SELECT * from t1 where f2=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 'rename() @@ -1376,10 +2397,6 @@ CREATE PROCEDURE smallint() SELECT * from t1 where f2=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 'smallint() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE soname() -SELECT * from t1 where f2=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 'soname() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE spatial() SELECT * from t1 where f2=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 'spatial() @@ -1432,9 +2449,6 @@ CREATE PROCEDURE table() SELECT * from t1 where f2=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 'table() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE tables() -SELECT * from t1 where f2=f1; -DROP PROCEDURE tables; CREATE PROCEDURE terminated() SELECT * from t1 where f2=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 'terminated() @@ -1725,6 +2739,26 @@ CREATE FUNCTION int(f1 int) returns int return 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 'int(f1 int) returns int return f1' at line 1 +CREATE FUNCTION int1(f1 int1) returns int1 +return 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 'int1(f1 int1) returns int1 +return f1' at line 1 +CREATE FUNCTION int2(f1 int2) returns int2 +return 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 'int2(f1 int2) returns int2 +return f1' at line 1 +CREATE FUNCTION int3(f1 int3) returns int3 +return 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 'int3(f1 int3) returns int3 +return f1' at line 1 +CREATE FUNCTION int4(f1 int4) returns int4 +return 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 'int4(f1 int4) returns int4 +return f1' at line 1 +CREATE FUNCTION int8(f1 int8) returns int8 +return 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 'int8(f1 int8) returns int8 +return f1' at line 1 CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned return 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 'int unsigned(f1 int unsigned) returns int unsigned @@ -1846,485 +2880,291 @@ return f' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char f1 ) returns char +CREATE FUNCTION fn1(f1 char ) returns char return 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 'char f1 ) returns char -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary f1 ) returns char binary +CREATE FUNCTION fn1(f1 char binary ) returns char binary return 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 'char binary f1 ) returns char binary -return f1' at line 1 +ERROR 42000: This version of MySQL doesn't yet support 'return value collation' DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii f1 ) returns char ascii +CREATE FUNCTION fn1(f1 char ascii ) returns char ascii return 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 'char ascii f1 ) returns char ascii -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char not null f1 ) returns char not null +CREATE FUNCTION fn1(f1 char not null ) returns char not null return 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 'char not null f1 ) returns char not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary not null f1 ) returns char binary not null +CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null return 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 'char binary not null f1 ) returns char binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii not null f1 ) returns char ascii not null +CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null return 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 'char ascii not null f1 ) returns char ascii not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char ascii not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext f1 ) returns tinytext +CREATE FUNCTION fn1(f1 tinytext ) returns tinytext return 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 'tinytext f1 ) returns tinytext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text f1 ) returns text +CREATE FUNCTION fn1(f1 text ) returns text return 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 'f1 ) returns text -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext f1 ) returns mediumtext +CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext return 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 'mediumtext f1 ) returns mediumtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext f1 ) returns longtext +CREATE FUNCTION fn1(f1 longtext ) returns longtext return 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 'longtext f1 ) returns longtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext not null f1 ) returns tinytext not null +CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null return 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 'tinytext not null f1 ) returns tinytext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinytext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text not null f1 ) returns text not null +CREATE FUNCTION fn1(f1 text not null ) returns text not null return 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 'not null f1 ) returns text not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns text not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext not null f1 ) returns mediumtext not null +CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null return 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 'mediumtext not null f1 ) returns mediumtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext not null f1 ) returns longtext not null +CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null return 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 'longtext not null f1 ) returns longtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob f1 ) returns tinyblob +CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob return 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 'tinyblob f1 ) returns tinyblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob f1 ) returns blob +CREATE FUNCTION fn1(f1 blob ) returns blob return 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 'blob f1 ) returns blob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob f1 ) returns mediumblob +CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob return 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 'mediumblob f1 ) returns mediumblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob f1 ) returns longblob +CREATE FUNCTION fn1(f1 longblob ) returns longblob return 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 'longblob f1 ) returns longblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob not null f1 ) returns tinyblob not null +CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null return 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 'tinyblob not null f1 ) returns tinyblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinyblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob not null f1 ) returns blob not null +CREATE FUNCTION fn1(f1 blob not null ) returns blob not null return 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 'blob not null f1 ) returns blob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns blob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob not null f1 ) returns mediumblob not null +CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null return 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 'mediumblob not null f1 ) returns mediumblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob not null f1 ) returns longblob not null +CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null return 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 'longblob not null f1 ) returns longblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary f1 ) returns binary +CREATE FUNCTION fn1(f1 binary ) returns binary return 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 'binary f1 ) returns binary -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary not null f1 ) returns binary not null +CREATE FUNCTION fn1(f1 binary not null ) returns binary not null return 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 'binary not null f1 ) returns binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint f1 ) returns tinyint +CREATE FUNCTION fn1(f1 tinyint ) returns tinyint return 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 'tinyint f1 ) returns tinyint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned f1 ) returns tinyint unsigned +CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned return 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 'tinyint unsigned f1 ) returns tinyint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint zerofill f1 ) returns tinyint zerofill +CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill return 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 'tinyint zerofill f1 ) returns tinyint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill +CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill return 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 'tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint f1 ) returns smallint +CREATE FUNCTION fn1(f1 smallint ) returns smallint return 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 'smallint f1 ) returns smallint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned f1 ) returns smallint unsigned +CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned return 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 'smallint unsigned f1 ) returns smallint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint zerofill f1 ) returns smallint zerofill +CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill return 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 'smallint zerofill f1 ) returns smallint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned zerofill f1 ) returns smallint unsigned zerofill +CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill return 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 'smallint unsigned zerofill f1 ) returns smallint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint f1 ) returns mediumint +CREATE FUNCTION fn1(f1 mediumint ) returns mediumint return 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 'mediumint f1 ) returns mediumint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned f1 ) returns mediumint unsigned +CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned return 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 'mediumint unsigned f1 ) returns mediumint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint zerofill f1 ) returns mediumint zerofill +CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill return 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 'mediumint zerofill f1 ) returns mediumint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill +CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill return 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 'mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int f1 ) returns int +CREATE FUNCTION fn1(f1 int ) returns int return 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 'int f1 ) returns int -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned f1 ) returns int unsigned +CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned return 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 'int unsigned f1 ) returns int unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int zerofill f1 ) returns int zerofill +CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned return 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 'int zerofill f1 ) returns int zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned zerofill f1 ) returns int unsigned zerofill +CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned return 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 'int unsigned zerofill f1 ) returns int unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint f1 ) returns bigint +CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned return 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 'bigint f1 ) returns bigint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned f1 ) returns bigint unsigned +CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned return 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 'bigint unsigned f1 ) returns bigint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint zerofill f1 ) returns bigint zerofill +CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned return 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 'bigint zerofill f1 ) returns bigint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned zerofill f1 ) returns bigint unsigned zerofill +CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill return 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 'bigint unsigned zerofill f1 ) returns bigint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal f1 ) returns decimal +CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill return 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 'decimal f1 ) returns decimal -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned f1 ) returns decimal unsigned +CREATE FUNCTION fn1(f1 bigint ) returns bigint return 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 'decimal unsigned f1 ) returns decimal unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal zerofill f1 ) returns decimal zerofill +CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned return 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 'decimal zerofill f1 ) returns decimal zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned zerofill f1 ) returns decimal unsigned zerofill +CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill return 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 'decimal unsigned zerofill f1 ) returns decimal unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric f1 ) returns numeric +CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill return 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 'numeric f1 ) returns numeric -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned f1 ) returns numeric unsigned +CREATE FUNCTION fn1(f1 decimal ) returns decimal return 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 'numeric unsigned f1 ) returns numeric unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric zerofill f1 ) returns numeric zerofill +CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned return 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 'numeric zerofill f1 ) returns numeric zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned zerofill f1 ) returns numeric unsigned zerofill +CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill return 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 'numeric unsigned zerofill f1 ) returns numeric unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real f1 ) returns real +CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill return 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 'real f1 ) returns real -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned f1 ) returns real unsigned +CREATE FUNCTION fn1(f1 numeric ) returns numeric return 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 'real unsigned f1 ) returns real unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real zerofill f1 ) returns real zerofill +CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned return 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 'real zerofill f1 ) returns real zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned zerofill f1 ) returns real unsigned zerofill +CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill return 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 'real unsigned zerofill f1 ) returns real unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float f1 ) returns float +CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill return 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 'float f1 ) returns float -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned f1 ) returns float unsigned +CREATE FUNCTION fn1(f1 real ) returns real return 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 'float unsigned f1 ) returns float unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float zerofill f1 ) returns float zerofill +CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned return 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 'float zerofill f1 ) returns float zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned zerofill f1 ) returns float unsigned zerofill +CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill return 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 'float unsigned zerofill f1 ) returns float unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(date f1 ) returns date +CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill return 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 'f1 ) returns date -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(time f1 ) returns time +CREATE FUNCTION fn1(f1 float ) returns float return 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 'f1 ) returns time -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(datetime f1 ) returns datetime +CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned return 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 'f1 ) returns datetime -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(timestamp f1 ) returns timestamp +CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill return 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 'f1 ) returns timestamp -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year f1 ) returns year +CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill return 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 'f1 ) returns year -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(3) f1 ) returns year(3) +CREATE FUNCTION fn1(f1 date ) returns date +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 time ) returns time +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 datetime ) returns datetime +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 timestamp ) returns timestamp +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year ) returns year +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3) return 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 '(3) f1 ) returns year(3) +ERROR 42000: You 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 3) ) returns year(3) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(4) f1 ) returns year(4) +CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4) return 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 '(4) f1 ) returns year(4) +ERROR 42000: You 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 4) ) returns year(4) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(enum("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum") return 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 '("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +ERROR 42000: You 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 "1enum", "2enum") ) returns enum("1enum", "2enum") return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(set("1set", "2set") f1 ) returns set("1set", "2set") +CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set") return 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 'set("1set", "2set") f1 ) returns set("1set", "2set") +ERROR 42000: You 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 "1set", "2set") ) returns set("1set", "2set") return f1' at line 1 Testcase 4.1.16: @@ -2564,15 +3404,15 @@ alter function sp1 sql security invoker comment 'this is a function'; alter procedure sp1 sql security definer; alter function sp1 sql security definer; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() COMMENT 'this is a procedure' -set @x= 3 +set @x= 3 latin1 modified created show CREATE FUNCTION sp1; -Function sql_mode Create Function -sp1 CREATE FUNCTION `sp1`() RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` FUNCTION `sp1`() RETURNS int(11) COMMENT 'this is a function' -return 4 +return 4 latin1 modified created USE db_storedproc; DROP DATABASE db_storedproc_3122; DROP FUNCTION db_storedproc.sp1; @@ -2789,7 +3629,7 @@ SELECT count(*) into cnt from t2; set @count = cnt; SELECT @count; 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 'SELECT count(*) into cnt from t2; +ERROR 42000: You 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 @count = cnt; SELECT @count; END' at line 2 @@ -2841,6 +3681,14 @@ Testcase ....: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +accessible:BEGIN +SELECT @x; +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 'accessible:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() add:BEGIN SELECT @x; END// @@ -2860,9 +3708,7 @@ CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; 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 ':BEGIN -SELECT @x; -END' at line 2 +ERROR 0A000: ALTER VIEW is not allowed in stored procedures DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() analyze:BEGIN @@ -2961,7 +3807,7 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -CALL:BEGIN +call:BEGIN SELECT @x; 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 ':BEGIN @@ -3033,11 +3879,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -columns:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() condition:BEGIN SELECT @x; END// @@ -3046,14 +3887,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -connection:BEGIN -SELECT @x; -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 'connection:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() constraint:BEGIN SELECT @x; END// @@ -3382,11 +4215,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -fields:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() float:BEGIN SELECT @x; END// @@ -3395,6 +4223,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +float4:BEGIN +SELECT @x; +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 'float4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +float8:BEGIN +SELECT @x; +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 'float8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() for:BEGIN SELECT @x; END// @@ -3419,11 +4263,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -found:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() from:BEGIN SELECT @x; END// @@ -3440,11 +4279,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -goto:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() grant:BEGIN SELECT @x; END// @@ -3581,6 +4415,46 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +int1:BEGIN +SELECT @x; +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 'int1:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int2:BEGIN +SELECT @x; +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 'int2:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int3:BEGIN +SELECT @x; +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 'int3:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int4:BEGIN +SELECT @x; +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 'int4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int8:BEGIN +SELECT @x; +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 'int8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() integer:BEGIN SELECT @x; END// @@ -3693,6 +4567,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +linear:BEGIN +SELECT @x; +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 'linear:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() lines:BEGIN SELECT @x; END// @@ -3773,6 +4655,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +master_ssl_verify_server_cert:BEGIN +SELECT @x; +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 'master_ssl_verify_server_cert:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() match:BEGIN SELECT @x; END// @@ -3973,11 +4863,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -privileges:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() procedure:BEGIN SELECT @x; END// @@ -3994,6 +4879,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +range:BEGIN +SELECT @x; +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 'range:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() read:BEGIN SELECT @x; END// @@ -4010,6 +4903,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +read_only:BEGIN +SELECT @x; +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 'read_only:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +read_write:BEGIN +SELECT @x; +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 'read_write:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() real:BEGIN SELECT @x; END// @@ -4034,6 +4943,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +release:BEGIN +SELECT @x; +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 ':BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() rename:BEGIN SELECT @x; END// @@ -4178,14 +5095,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -soname:BEGIN -SELECT @x; -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 'soname:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() spatial:BEGIN SELECT @x; END// @@ -4290,11 +5199,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -tables:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() terminated:BEGIN SELECT @x; END// @@ -4587,6 +5491,9 @@ END begin_label// CALL sp1(); @v1 @v2 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 sp1; Testcase 4.2.7: @@ -4621,6 +5528,9 @@ declare y char; SELECT f1, f2 into x, y from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 +Warning 1265 Data truncated for column 'y' at row 1 DROP PROCEDURE sp1; Testcase 4.2.9: @@ -4684,8 +5594,6 @@ Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the declare statement) may only be properly defined -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: DECIMAL(255,255) is not rejected CREATE PROCEDURE sp6( ) BEGIN declare x char default 'a'; @@ -4703,9 +5611,9 @@ fetch cur1 into e; SELECT x, y, z, a, b, c, d, e; close cur1; END// +ERROR 42000: Too big scale 255 specified for column ''. Maximum is 30. CALL sp6(); -x y z a b c d e -a 1 1.1 value1 1200000000000 mediumtext 2005-02-02 12:12:12 a` +ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5828,13 +6736,6 @@ declare continue handler for sqlstate '23000' set @x2 = 1; declare x char; END// ERROR 42000: Variable or condition declaration after cursor or handler declaration -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '23000' set @x2 = 1; -declare x char; -END// -ERROR 42000: Variable or condition declaration after cursor or handler declaration DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5864,6 +6765,15 @@ Ensure that the declare statement can declare multiple variables both separately and all at once from a variable list. (multiple declaration) -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +DECLARE x1 CHAR(100) DEFAULT 'outer'; +BEGIN +DECLARE x1 CHAR(100) DEFAULT x1; +END; +END// +CALL sp1(); +DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z char default null; @@ -5988,7 +6898,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +000 000 000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -5997,7 +6911,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +001 001 001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6024,7 +6938,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000 00000 00000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6033,7 +6951,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00001 00001 00001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6060,7 +6978,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000 00000000 00000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6069,7 +6991,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000001 00000001 00000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6096,7 +7018,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6105,7 +7031,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +0000000001 0000000001 0000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6123,7 +7049,7 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +18446744073709551615 18446744073709551615 18446744073709551615 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6132,7 +7058,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000000000000000 00000000000000000000 00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6141,7 +7071,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000000000000000001 00000000000000000001 00000000000000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6150,18 +7080,24 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +-9999999999 -9999999999 -9999999999 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6170,62 +7106,76 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6252,7 +7202,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6261,7 +7211,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6270,7 +7220,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6279,7 +7229,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6288,7 +7238,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6297,7 +7247,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6333,7 +7283,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -20050202122012 20050202122012 20050202122012 +2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6419,6 +7369,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare accessible char; +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 'accessible char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare add char; 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 'add char; @@ -6524,9 +7481,9 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare CALL char; +declare call char; 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 'CALL char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() @@ -6587,11 +7544,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare columns char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare condition char; 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 'condition char; @@ -6599,13 +7551,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare connection char; -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 'connection char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare constraint char; 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 'constraint char; @@ -6893,11 +7838,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare fields char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare float char; 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 'float char; @@ -6905,6 +7845,20 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare float4 char; +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 'float4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare float8 char; +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 'float8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare for char; 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 'for char; @@ -6926,11 +7880,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare found char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare from char; 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 'from char; @@ -6945,11 +7894,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare goto char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare grant char; 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 'grant char; @@ -7069,6 +8013,41 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare int1 char; +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 'int1 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int2 char; +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 'int2 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int3 char; +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 'int3 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int4 char; +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 'int4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int8 char; +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 'int8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare integer char; 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 'integer char; @@ -7167,6 +8146,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare linear char; +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 'linear char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare lines char; 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 'lines char; @@ -7237,6 +8223,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare master_ssl_verify_server_cert char; +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 'master_ssl_verify_server_cert char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare match char; 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 'match char; @@ -7412,11 +8405,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare privileges char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare procedure char; 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 'procedure char; @@ -7431,6 +8419,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare range char; +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 'range char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare read char; 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 'read char; @@ -7445,6 +8440,18 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare read_only char; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare read_write char; +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 'read_write char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare real char; 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 'real char; @@ -7466,6 +8473,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare release char; +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 'release char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare rename char; 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 'rename char; @@ -7624,15 +8638,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare soname char; -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 'soname char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1() -BEGIN declare spatial char; 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 'spatial char; @@ -7750,11 +8755,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare tables char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare terminated char; 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 'terminated char; @@ -7899,9 +8899,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare USE char; +declare use char; 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 'USE char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8150,6 +9150,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'accessible condition for sqlstate '02000'; +declare exit handler for add set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// @@ -8306,10 +9316,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL condition for sqlstate '02000'; +declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 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 'CALL condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8409,11 +9419,7 @@ BEGIN declare connection condition for sqlstate '02000'; declare exit handler for connection set @var2 = 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 'connection condition for sqlstate '02000'; -declare exit handler for connection s' at line 3 DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN declare constraint condition for sqlstate '02000'; @@ -8829,12 +9835,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields condition for sqlstate '02000'; -declare exit handler for fields set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare float condition for sqlstate '02000'; declare exit handler for float set @var2 = 1; END// @@ -8845,6 +9845,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare for condition for sqlstate '02000'; declare exit handler for for set @var2 = 1; END// @@ -8876,12 +9896,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found condition for sqlstate '02000'; -declare exit handler for found set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare from condition for sqlstate '02000'; declare exit handler for from set @var2 = 1; END// @@ -8902,12 +9916,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto condition for sqlstate '02000'; -declare exit handler for goto set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare grant condition for sqlstate '02000'; declare exit handler for grant set @var2 = 1; END// @@ -9081,6 +10089,56 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer condition for sqlstate '02000'; declare exit handler for integer set @var2 = 1; END// @@ -9223,6 +10281,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines condition for sqlstate '02000'; declare exit handler for lines set @var2 = 1; END// @@ -9323,6 +10391,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handl' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match condition for sqlstate '02000'; declare exit handler for match set @var2 = 1; END// @@ -9578,12 +10656,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare privileges condition for sqlstate '02000'; -declare exit handler for privileges set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare procedure condition for sqlstate '02000'; declare exit handler for procedure set @var2 = 1; END// @@ -9604,6 +10676,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read condition for sqlstate '02000'; declare exit handler for read set @var2 = 1; END// @@ -9624,6 +10706,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int set @var2 = 1; +END' at line 4 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'read_write condition for sqlstate '02000'; +declare exit handler for int set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real condition for sqlstate '02000'; declare exit handler for real set @var2 = 1; END// @@ -9654,6 +10756,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'release condition for sqlstate '02000'; +declare exit handler for int set @var2 =' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename condition for sqlstate '02000'; declare exit handler for rename set @var2 = 1; END// @@ -9774,10 +10886,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT condition for sqlstate '02000'; +declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 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 'SELECT condition for sqlstate '02000'; +ERROR 42000: You 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 condition for sqlstate '02000'; declare exit handler for SELECT set @var2' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -9835,16 +10947,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname condition for sqlstate '02000'; -declare exit handler for soname set @var2 = 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 'soname condition for sqlstate '02000'; -declare exit handler for soname set @var2' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial condition for sqlstate '02000'; declare exit handler for spatial set @var2 = 1; END// @@ -9977,12 +11079,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables condition for sqlstate '02000'; -declare exit handler for tables set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare terminated condition for sqlstate '02000'; declare exit handler for terminated set @var2 = 1; END// @@ -10144,10 +11240,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE condition for sqlstate '02000'; +declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 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 'USE condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; ' at line 3 DROP PROCEDURE IF EXISTS sp1; @@ -10409,6 +11505,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible handler for sqlstate '02000' set @var2 = 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 'accessible handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add handler for sqlstate '02000' set @var2 = 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 'add handler for sqlstate '02000' set @var2 = 1; @@ -10544,9 +11649,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL handler for sqlstate '02000' set @var2 = 1; +declare call handler for sqlstate '02000' set @var2 = 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 'CALL handler for sqlstate '02000' set @var2 = 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 'call handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -10625,15 +11730,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare columns handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare condition handler for sqlstate '02000' set @var2 = 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 'condition handler for sqlstate '02000' set @var2 = 1; @@ -10643,15 +11739,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare connection handler for sqlstate '02000' set @var2 = 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 'connection handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare constraint handler for sqlstate '02000' set @var2 = 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 'constraint handler for sqlstate '02000' set @var2 = 1; @@ -10661,6 +11748,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare continue handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare convert handler for sqlstate '02000' set @var2 = 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 'convert handler for sqlstate '02000' set @var2 = 1; @@ -10976,6 +12068,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare exit handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare explain handler for sqlstate '02000' set @var2 = 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 'explain handler for sqlstate '02000' set @var2 = 1; @@ -11003,18 +12100,27 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields handler for sqlstate '02000' set @var2 = 1; +declare float handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare float handler for sqlstate '02000' set @var2 = 1; +declare float4 handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 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 'float4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 handler for sqlstate '02000' set @var2 = 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 'float8 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11048,15 +12154,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare from handler for sqlstate '02000' set @var2 = 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 'from handler for sqlstate '02000' set @var2 = 1; @@ -11075,15 +12172,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare grant handler for sqlstate '02000' set @var2 = 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 'grant handler for sqlstate '02000' set @var2 = 1; @@ -11237,6 +12325,51 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 handler for sqlstate '02000' set @var2 = 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 'int1 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 handler for sqlstate '02000' set @var2 = 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 'int2 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 handler for sqlstate '02000' set @var2 = 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 'int3 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 handler for sqlstate '02000' set @var2 = 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 'int4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 handler for sqlstate '02000' set @var2 = 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 'int8 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer handler for sqlstate '02000' set @var2 = 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 'integer handler for sqlstate '02000' set @var2 = 1; @@ -11363,6 +12496,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear handler for sqlstate '02000' set @var2 = 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 'linear handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines handler for sqlstate '02000' set @var2 = 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 'lines handler for sqlstate '02000' set @var2 = 1; @@ -11453,6 +12595,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match handler for sqlstate '02000' set @var2 = 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 'match handler for sqlstate '02000' set @var2 = 1; @@ -11705,6 +12856,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range handler for sqlstate '02000' set @var2 = 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 'range handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read handler for sqlstate '02000' set @var2 = 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 'read handler for sqlstate '02000' set @var2 = 1; @@ -11723,6 +12883,24 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write handler for sqlstate '02000' set @var2 = 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 'read_write handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real handler for sqlstate '02000' set @var2 = 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 'real handler for sqlstate '02000' set @var2 = 1; @@ -11750,6 +12928,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release handler for sqlstate '02000' set @var2 = 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 'release handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename handler for sqlstate '02000' set @var2 = 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 'rename handler for sqlstate '02000' set @var2 = 1; @@ -11858,9 +13045,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT handler for sqlstate '02000' set @var2 = 1; +declare select handler for sqlstate '02000' set @var2 = 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 'SELECT handler for sqlstate '02000' set @var2 = 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 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11912,15 +13099,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname handler for sqlstate '02000' set @var2 = 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 'soname handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial handler for sqlstate '02000' set @var2 = 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 'spatial handler for sqlstate '02000' set @var2 = 1; @@ -12038,15 +13216,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare terminated handler for sqlstate '02000' set @var2 = 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 'terminated handler for sqlstate '02000' set @var2 = 1; @@ -12191,9 +13360,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE handler for sqlstate '02000' set @var2 = 1; +declare use handler for sqlstate '02000' set @var2 = 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 'USE handler for sqlstate '02000' set @var2 = 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 'use handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -12384,10 +13553,13 @@ set @v2 = y; END// CALL sp1(); x y @x -NULL abaa 3 +NULL a 3 +Warnings: +Warning 1265 Data truncated for column 'y' at row 3 +Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 -4 a` +4 a DROP PROCEDURE sp1; Testcase 4.2.28: @@ -12454,7 +13626,7 @@ CALL sp1(); @xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12481,9 +13653,11 @@ set xx = 'temp'; set @xx = xx; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'xx' at row 1 SELECT @xx; @xx -temp +t DROP PROCEDURE sp1; Testcase 4.2.31 - b: @@ -12501,7 +13675,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'asd' +Warning 1265 Data truncated for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12527,7 +13701,9 @@ SELECT xx; END// CALL sp1(); xx -asd +0000-00-00 00:00:00 +Warnings: +Warning 1264 Out of range value for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12571,7 +13747,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12602,6 +13778,8 @@ declare x char ascii; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12665,6 +13843,8 @@ declare x binary; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12812,8 +13992,6 @@ declare x decimal; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12821,8 +13999,6 @@ declare x decimal unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12830,8 +14006,6 @@ declare x decimal zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12839,8 +14013,6 @@ declare x decimal unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12848,8 +14020,6 @@ declare x numeric; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12857,8 +14027,6 @@ declare x numeric unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12866,8 +14034,6 @@ declare x numeric zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12875,8 +14041,6 @@ declare x numeric unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -13254,7 +14418,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13279,7 +14443,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13306,7 +14470,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13330,7 +14494,7 @@ open cur1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13358,7 +14522,7 @@ BEGIN open cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13388,7 +14552,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13416,7 +14580,7 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13430,7 +14594,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 10; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13441,7 +14605,7 @@ open cur1; BEGIN declare cur1 cursor for SELECT f1, f2, f3, f4 from t2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13473,7 +14637,7 @@ BEGIN open cur1; close cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13485,7 +14649,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 20; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13514,13 +14678,13 @@ BEGIN declare done int default 0; declare count integer default 20; declare newf2 char(20); -declare newf1 date; +declare newf1 int1; declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2; set @x = newf1; set @y = newf2; @@ -13590,7 +14754,7 @@ BEGIN close cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13643,7 +14807,7 @@ fetch cur1 into newf1, newf2, newf4, newf3; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.65: @@ -13669,7 +14833,7 @@ commit; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.66: @@ -13690,7 +14854,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13719,12 +14883,13 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; -set count = count - 1; -while count <> 0 do +# set count = count - 1; +# while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; -set count = count - 1; -END while; +# set count = count - 1; +# END while; END; +fetch cur1 into newf1, newf2, newf4, newf3; END// CALL sp1(); DROP PROCEDURE sp1; @@ -13756,7 +14921,7 @@ BEGIN set count = 10; BEGIN open cur2; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13765,7 +14930,8 @@ insert into temp1 values(newf1, newf2, newf4, newf3); close cur1; END; BEGIN -while count <> 0 do +set count = 10; +while count > 0 do fetch cur2 into newf21, newf22, newf24, newf23; set count = count - 1; END while; @@ -13774,9 +14940,9 @@ insert into temp2 values(newf21, newf22, newf24, newf23); close cur2; END// CALL sp1(); -SELECT * from temp1; -f1 f2 f3 f4 -agaaaaaaa agaaaaaaa -4993 agaaaaaaa +SELECT count(*) from temp1; +count(*) +1 SELECT * from temp2; f1 f2 f3 f4 NULL NULL NULL NULL @@ -13797,9 +14963,11 @@ CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( middleinitial CHAR, lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 int, -COMMENT TEXT) ENGINE=innodb; +COMMENT TEXT) ENGINE=memory; +ERROR 42000: The used table type doesn't support BLOB/TEXT columns INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CREATE PROCEDURE sp1(a int) BEGIN declare itisjustaverylargevariablename_xxxxxxxxxxxxxxxxxxxxx char; @@ -13834,46 +15002,22 @@ iterate label1; END loop label1; END// CALL sp1(101); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CALL sp1(100); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CALL sp1(75); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CALL sp1(40); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CALL sp1(20); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist CALL sp1(-1); +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist SELECT * from res_t3_itisalongname_1381742_itsaverylongname_1381742 ORDER BY middleinitial, lastname, age_averylongfieldname_averylongname_1234569; -middleinitial lastname age_averylongfieldname_averylongname_1234569 COMMENT -a aaaaaaaaaabbbbbbbbc 0 default -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% -1 -1 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 100 100 value of a is 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 101 101 value of a is greater than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 20 20 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 40 40 value of a is less than 50 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100 -b oldmacdonalds)(*&(^^%$&^%$&^%*^)(*^#@$@% 75 75 value of a is greater than 50 and less than 100 +ERROR 42S02: Table 'db_storedproc.res_t3_itisalongname_1381742_itsaverylongname_1381742' doesn't exist drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; +ERROR 42S02: Unknown table 'res_t3_itisalongname_1381742_itsaverylongname_1381742' DROP PROCEDURE sp1; Testcase 4.3.2: @@ -14023,7 +15167,7 @@ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; END case; 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 'when 'delete' then -delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 10 +delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 11 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -14041,8 +15185,9 @@ label2: while count < 10 do BEGIN insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count); -if done=1 then -set count=10; +set count = count + 1; +if count= 10 then +set done=1; END if; END; END while label2; @@ -14056,6 +15201,19 @@ END if; END loop label1; SELECT count, done; END// +CALL sp3('insert'); +count done +10 1 +Warnings: +Warning 1265 Data truncated for column 'name' at row 1 +Warning 1265 Data truncated for column 'name' at row 2 +Warning 1265 Data truncated for column 'name' at row 3 +Warning 1265 Data truncated for column 'name' at row 4 +Warning 1265 Data truncated for column 'name' at row 5 +Warning 1265 Data truncated for column 'name' at row 6 +Warning 1265 Data truncated for column 'name' at row 7 +Warning 1265 Data truncated for column 'name' at row 8 +Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -14330,11 +15488,14 @@ CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; label1: repeat -set count1 = count1; +set count1 = count1-1; until count1 < 0 END repeat label1; SELECT count1; END// +CALL sp6(); +count1 +-1 DROP PROCEDURE sp6; Testcase 4.3.7: @@ -14403,7 +15564,7 @@ do v1 > 0 while set v1 = v1 - 1; END while; 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 'do v1 > 0 while +ERROR 42000: You 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 set v1 = v1 - 1; END while; END' at line 4 @@ -14606,7 +15767,7 @@ until count1 < 3 END repeat label1; 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 'label1; -END' at line 7 +END' at line 8 Testcase 4.3.21: -------------------------------------------------------------------------------- @@ -14789,15 +15950,15 @@ insert into t43 values('abcde', 'a!@#$%^&*('); CREATE PROCEDURE d1.sp4() SELECT * from d1.t43; SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from d1.t43 USE db_storedproc; DROP DATABASE d1; CREATE DATABASE d1; USE d1; create table t44(a char(5), b char(10)); SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; @@ -14839,8 +16000,8 @@ CREATE PROCEDURE sp8 ( n char(20) ) sql security definer comment 'initial' USE d2; alter procedure d1.sp8 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='sp8' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 where t1.f1 = n Testcase 4.4.9: -------------------------------------------------------------------------------- @@ -14856,12 +16017,16 @@ END// USE d2; alter function d1.fn2 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='fn2' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 d1 fn2 FUNCTION fn2 SQL CONTAINS_SQL NO DEFINER n int int(11) BEGIN declare a int; set a = 0.9 * n; return a; -END root@localhost modified created updated +END root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci BEGIN +declare a int; +set a = 0.9 * n; +return a; +END Testcase 4.4.10: -------------------------------------------------------------------------------- @@ -14871,7 +16036,7 @@ SELECT * from t1 where t1.f1 = n; USE d2; DROP PROCEDURE d1.sp9; SELECT * from mysql.proc where specific_name='sp9' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.4.11: -------------------------------------------------------------------------------- @@ -14885,7 +16050,7 @@ END// USE d2; DROP FUNCTION d1.fn3; SELECT * from mysql.proc where specific_name='fn3' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; DROP DATABASE d2; @@ -14893,19 +16058,6 @@ DROP DATABASE d2; Section 3.1.5 - Parameter use checks: Functions with all data types -------------------------------------------------------------------------------- -SELECT 1 as 'bug_dec_num'; -bug_dec_num -1 - -. -FIXME: There are differences with datatypes DECIMAL and NUMERIC if large -FIXME: exponent values are used. The diffs are shown only on some machines like -FIXME: AIX52 and HPUX11. Until this has been solved we use numbers that -FIXME: *should* be equal to the exponent representation but have no exponents -FIXME: and use the specified count of *0*s instead. -FIXME: In the source file these tests are marked with the comment hpux11 -. --------------------------------------------------------------------------------- DROP DATABASE IF EXISTS d1; CREATE DATABASE d1; USE d1; @@ -14926,7 +16078,7 @@ return f1; END// SELECT fn2(1.84e+19); fn2(1.84e+19) -0 +18400000000000000000 DROP FUNCTION IF EXISTS fn3; CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill BEGIN @@ -14945,6 +16097,8 @@ END// SELECT fn4(-9.22e+15); fn4(-9.22e+15) 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn5; CREATE FUNCTION fn5( f1 decimal) returns decimal BEGIN @@ -14972,6 +16126,10 @@ END// SELECT fn7(99999999999); fn7(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill BEGIN @@ -14980,7 +16138,9 @@ return f1; END// SELECT fn8(999999999); fn8(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn9; CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill BEGIN @@ -14989,7 +16149,10 @@ return f1; END// SELECT fn9(-1.00e+09); fn9(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn10; CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0) BEGIN @@ -15008,6 +16171,10 @@ END// SELECT fn11(99999999999); fn11(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill BEGIN @@ -15016,7 +16183,9 @@ return f1; END// SELECT fn12(999999999); fn12(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn13; CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill BEGIN @@ -15025,7 +16194,10 @@ return f1; END// SELECT fn13(-1.00e+09); fn13(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn14; CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30) BEGIN @@ -15061,7 +16233,10 @@ return f1; END// SELECT fn17(-1.00e+21); fn17(-1.00e+21) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn18_d; CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64) BEGIN @@ -15097,7 +16272,10 @@ return f1; END// SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) -0000000000000000000000000000000000000000000000000000000000000001 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned BEGIN @@ -15106,7 +16284,10 @@ return f1; END// SELECT fn22(1.00e+00); fn22(1.00e+00) -1 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill BEGIN @@ -15115,7 +16296,10 @@ return f1; END// SELECT fn23(1.00e+00); fn23(1.00e+00) -0000000001 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill BEGIN @@ -15124,7 +16308,10 @@ return f1; END// SELECT fn24(-1.00e+09); fn24(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn25; CREATE FUNCTION fn25( f1 double) returns double BEGIN @@ -15142,7 +16329,9 @@ return f1; END// SELECT fn26(1.00e+00); fn26(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn27; CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill BEGIN @@ -15151,7 +16340,9 @@ return f1; END// SELECT fn27(1.00e+00); fn27(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn28; CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill BEGIN @@ -15160,7 +16351,9 @@ return f1; END// SELECT fn28(1.00e+00); fn28(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn29; CREATE FUNCTION fn29( f1 float) returns float BEGIN @@ -15178,7 +16371,9 @@ return f1; END// SELECT fn30(1.00e+00); fn30(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn31; CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill BEGIN @@ -15187,7 +16382,9 @@ return f1; END// SELECT fn31(1.00e+00); fn31(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn32; CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill BEGIN @@ -15196,7 +16393,9 @@ return f1; END// SELECT fn32(1.00e+00); fn32(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn33; CREATE FUNCTION fn33( f1 float(0)) returns float(0) BEGIN @@ -15214,7 +16413,9 @@ return f1; END// SELECT fn34(1.00e+00); fn34(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn35; CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill BEGIN @@ -15223,7 +16424,9 @@ return f1; END// SELECT fn35(1.00e+00); fn35(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn36; CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill BEGIN @@ -15232,7 +16435,9 @@ return f1; END// SELECT fn36(1.00e+00); fn36(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn37; CREATE FUNCTION fn37( f1 float(23)) returns float(23) BEGIN @@ -15250,7 +16455,9 @@ return f1; END// SELECT fn38(1.00e+00); fn38(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn39; CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill BEGIN @@ -15259,7 +16466,9 @@ return f1; END// SELECT fn39(1.00e+00); fn39(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn40; CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill BEGIN @@ -15268,7 +16477,9 @@ return f1; END// SELECT fn40(1.00e+00); fn40(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn41; CREATE FUNCTION fn41( f1 float(24)) returns float(24) BEGIN @@ -15286,7 +16497,9 @@ return f1; END// SELECT fn42(1.00e+00); fn42(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn43; CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill BEGIN @@ -15295,7 +16508,9 @@ return f1; END// SELECT fn43(1.00e+00); fn43(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn44; CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill BEGIN @@ -15304,7 +16519,9 @@ return f1; END// SELECT fn44(1.00e+00); fn44(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn45; CREATE FUNCTION fn45( f1 float(53)) returns float(53) BEGIN @@ -15322,7 +16539,9 @@ return f1; END// SELECT fn46(1.00e+00); fn46(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn47; CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill BEGIN @@ -15331,7 +16550,9 @@ return f1; END// SELECT fn47(1.00e+00); fn47(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn48; CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill BEGIN @@ -15340,7 +16561,9 @@ return f1; END// SELECT fn48(1.00e+00); fn48(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn49; CREATE FUNCTION fn49( f1 int) returns int BEGIN @@ -15349,7 +16572,10 @@ return f1; END// SELECT fn49(-2.15e+09); fn49(-2.15e+09) --2147483648 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn50; CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned BEGIN @@ -15385,7 +16611,9 @@ return f1; END// SELECT fn53(-8388600); fn53(-8388600) --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn54; CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned BEGIN @@ -15412,7 +16640,11 @@ return f1; END// SELECT fn56(-8388601); fn56(-8388601) -0 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -15421,7 +16653,9 @@ return f1; END// SELECT fn57(-999999999); fn57(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn58; CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0) BEGIN @@ -15430,7 +16664,9 @@ return f1; END// SELECT fn58(-999999999); fn58(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn59; CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned BEGIN @@ -15440,6 +16676,9 @@ END// SELECT fn59(9999999999); fn59(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill BEGIN @@ -15448,7 +16687,9 @@ return f1; END// SELECT fn60(99999999); fn60(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn61; CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill BEGIN @@ -15457,7 +16698,10 @@ return f1; END// SELECT fn61(-99999999); fn61(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn62; CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0) BEGIN @@ -15466,7 +16710,9 @@ return f1; END// SELECT fn62(-999999999); fn62(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn63; CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned BEGIN @@ -15476,6 +16722,9 @@ END// SELECT fn63(9999999999); fn63(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill BEGIN @@ -15484,7 +16733,9 @@ return f1; END// SELECT fn64(99999999); fn64(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn65; CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill BEGIN @@ -15493,7 +16744,10 @@ return f1; END// SELECT fn65(-99999999); fn65(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn66; CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30) BEGIN @@ -15502,7 +16756,12 @@ return f1; END// SELECT fn66(-1e+36); fn66(-1e+36) --999999999999999999999999999999999.999999999999999999999999999999 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned BEGIN @@ -15512,6 +16771,10 @@ END// SELECT fn67(1e+36); fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill BEGIN @@ -15521,6 +16784,10 @@ END// SELECT fn68(1e+36); fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill BEGIN @@ -15529,7 +16796,10 @@ return f1; END// SELECT fn69(-1e+36); fn69(-1e+36) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn70_n; CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64) BEGIN @@ -15577,7 +16847,9 @@ return f1; END// SELECT fn74(999999999); fn74(999999999) -999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn75; CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill BEGIN @@ -15586,7 +16858,9 @@ return f1; END// SELECT fn75(999999999); fn75(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn76; CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill BEGIN @@ -15595,7 +16869,10 @@ return f1; END// SELECT fn76(-999999999); fn76(-999999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn77; CREATE FUNCTION fn77( f1 real) returns real BEGIN @@ -15613,7 +16890,9 @@ return f1; END// SELECT fn78(1.1); fn78(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn79; CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill BEGIN @@ -15622,7 +16901,9 @@ return f1; END// SELECT fn79(1.1); fn79(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn80; CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill BEGIN @@ -15631,7 +16912,9 @@ return f1; END// SELECT fn80(1.1); fn80(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn81; CREATE FUNCTION fn81( f1 smallint) returns smallint BEGIN @@ -15667,7 +16950,11 @@ return f1; END// SELECT fn84(-32601); fn84(-32601) -0 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -15703,45 +16990,37 @@ return f1; END// SELECT fn88(-101); fn88(-101) -0 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN -if f1 eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; +IF f1 = '1enum' THEN +SET f1 = '2enum'; +ELSE +SET f1 = '1enum'; +END IF; +RETURN f1; 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 'eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; -END' at line 3 SELECT fn89( '1enum'); -ERROR 42000: FUNCTION d1.fn89 does not exist +fn89( '1enum') +2enum DROP FUNCTION IF EXISTS fn90; -CREATE FUNCTION fn90( f1 set("1set", "2set")) returns set("1set", "2set") +CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set') BEGIN -if(f1 == "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; +IF f1 = '1set' THEN +SET f1 = '2set'; +ELSE +SET f1 = '1set'; +END IF; +RETURN f1; 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 '== "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; -END' at line 3 SELECT fn90( '1set'); -ERROR 42000: FUNCTION d1.fn90 does not exist +fn90( '1set') +2set DROP FUNCTION IF EXISTS fn91; CREATE FUNCTION fn91( f1 date) returns date BEGIN @@ -15759,7 +17038,7 @@ return f1; END// SELECT fn92( '23:59:59.999999'); fn92( '23:59:59.999999') -26:00:00 +25:59:59 DROP FUNCTION IF EXISTS fn93; CREATE FUNCTION fn93( f1 datetime) returns datetime BEGIN @@ -15768,7 +17047,7 @@ return f1; END// SELECT fn93('1997-12-31 23:59:59.999999'); fn93('1997-12-31 23:59:59.999999') -1998-01-02 01:01:01 +1998-01-02 01:01:00 DROP FUNCTION IF EXISTS fn94; CREATE FUNCTION fn94( f1 char) returns char BEGIN @@ -15778,6 +17057,8 @@ END// SELECT fn94( 'h'); fn94( 'h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn95; CREATE FUNCTION fn95( f1 char ascii) returns char ascii BEGIN @@ -15787,15 +17068,19 @@ END// SELECT fn95('h'); fn95('h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn96; -CREATE FUNCTION fn96( f1 char binary) returns char binary +CREATE FUNCTION fn96( f1 binary) returns binary(2) BEGIN set f1 = concat('a', f1); return f1; END// SELECT fn96( 'h'); fn96( 'h') -a +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn97; CREATE FUNCTION fn97( f1 longtext) returns longtext BEGIN @@ -15917,7 +17202,7 @@ SELECT f1; END// CALL sp2(1.84e+19); f1 --9223372036854775808 +18400000000000000000 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( f1 bigint unsigned zerofill) BEGIN @@ -15926,7 +17211,7 @@ SELECT f1; END// CALL sp3(1.84e+17); f1 -184000000000000000 +00184000000000000000 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4( f1 bigint zerofill) BEGIN @@ -15935,31 +17220,27 @@ SELECT f1; END// CALL sp4(-9.22e+15); f1 --9220000000000000 +00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5( f1 decimal) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: default (10) for DECIMAL not checked, decimal digits shown although not defined CALL sp5(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( f1 decimal (0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp6(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp7; CREATE PROCEDURE sp7( f1 decimal (0) unsigned) BEGIN @@ -15968,7 +17249,11 @@ SELECT f1; END// CALL sp7(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) BEGIN @@ -15977,199 +17262,201 @@ SELECT f1; END// CALL sp8(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp9; CREATE PROCEDURE sp9( f1 decimal (0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp9(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp10; CREATE PROCEDURE sp10( f1 decimal (0, 0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp10(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp11; CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp11(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp12(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp13; CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp13(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp14; CREATE PROCEDURE sp14( f1 decimal (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp14(-1.00e+21); f1 --1000000000000000000000.000000000 +-1000000000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp15; CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp15(1.00e+16); f1 -10000000000000000.000000000 +10000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp16; CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp16(1.00e+16); f1 -10000000000000000.000000000 +000000000000000010000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp17; CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp17(-1.00e+21); f1 --1000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp18_d; CREATE PROCEDURE sp18_d( f1 decimal (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp18_d(-1.00e+30); +f1 +-1000000000000000000000000000000 CALL sp18_d( -1000000000000000000000000000000 ); f1 --1000000000000000000000000000000.000000000 +-1000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp19_du; CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp19_du(1.00e+20); +f1 +100000000000000000000 CALL sp19_du( 100000000000000000000 ); f1 -100000000000000000000.000000000 +100000000000000000000 +CALL sp19_du(1.00e+24); +f1 +1000000000000000000000000 CALL sp19_du( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +1000000000000000000000000 DROP PROCEDURE IF EXISTS sp20_duz; CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined +CALL sp20_duz(1.00e+20); +f1 +0000000000000000000000000000000000000000000100000000000000000000 CALL sp20_duz( 100000000000000000000 ); f1 -100000000000000000000.000000000 +0000000000000000000000000000000000000000000100000000000000000000 +CALL sp20_duz(1.00e+24); +f1 +0000000000000000000000000000000000000001000000000000000000000000 CALL sp20_duz( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +0000000000000000000000000000000000000001000000000000000000000000 DROP PROCEDURE IF EXISTS sp21; CREATE PROCEDURE sp21( f1 decimal (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp21(1.00e+00); f1 -1.000000000 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp22(1.00e+00); f1 -1.000000000 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp23(1.00e+00); f1 -1.000000000 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp24(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp25; CREATE PROCEDURE sp25( f1 double) BEGIN @@ -16187,7 +17474,9 @@ SELECT f1; END// CALL sp26(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp27; CREATE PROCEDURE sp27( f1 double unsigned zerofill) BEGIN @@ -16196,7 +17485,9 @@ SELECT f1; END// CALL sp27(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp28; CREATE PROCEDURE sp28( f1 double zerofill) BEGIN @@ -16205,7 +17496,9 @@ SELECT f1; END// CALL sp28(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp29; CREATE PROCEDURE sp29( f1 float) BEGIN @@ -16223,7 +17516,9 @@ SELECT f1; END// CALL sp30(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp31; CREATE PROCEDURE sp31( f1 float unsigned zerofill) BEGIN @@ -16232,7 +17527,9 @@ SELECT f1; END// CALL sp31(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp32; CREATE PROCEDURE sp32( f1 float zerofill) BEGIN @@ -16241,7 +17538,9 @@ SELECT f1; END// CALL sp32(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp33; CREATE PROCEDURE sp33( f1 float(0)) BEGIN @@ -16259,7 +17558,9 @@ SELECT f1; END// CALL sp34(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp35; CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill) BEGIN @@ -16268,7 +17569,9 @@ SELECT f1; END// CALL sp35(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp36; CREATE PROCEDURE sp36( f1 float(0) zerofill) BEGIN @@ -16277,7 +17580,9 @@ SELECT f1; END// CALL sp36(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp37; CREATE PROCEDURE sp37( f1 float(23)) BEGIN @@ -16295,7 +17600,9 @@ SELECT f1; END// CALL sp38(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp39; CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill) BEGIN @@ -16304,7 +17611,9 @@ SELECT f1; END// CALL sp39(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp40; CREATE PROCEDURE sp40( f1 float(23) zerofill) BEGIN @@ -16313,7 +17622,9 @@ SELECT f1; END// CALL sp40(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp41; CREATE PROCEDURE sp41( f1 float(24)) BEGIN @@ -16331,7 +17642,9 @@ SELECT f1; END// CALL sp42(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp43; CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill) BEGIN @@ -16340,7 +17653,9 @@ SELECT f1; END// CALL sp43(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp44; CREATE PROCEDURE sp44( f1 float(24) zerofill) BEGIN @@ -16349,7 +17664,9 @@ SELECT f1; END// CALL sp44(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp45; CREATE PROCEDURE sp45( f1 float(53)) BEGIN @@ -16367,7 +17684,9 @@ SELECT f1; END// CALL sp46(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp47; CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill) BEGIN @@ -16376,7 +17695,9 @@ SELECT f1; END// CALL sp47(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp48; CREATE PROCEDURE sp48( f1 float(53) zerofill) BEGIN @@ -16385,7 +17706,9 @@ SELECT f1; END// CALL sp48(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp49; CREATE PROCEDURE sp49( f1 int) BEGIN @@ -16394,7 +17717,10 @@ SELECT f1; END// CALL sp49(-2.15e+09); f1 --2150000000 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp50; CREATE PROCEDURE sp50( f1 int unsigned) BEGIN @@ -16421,7 +17747,7 @@ SELECT f1; END// CALL sp52(2.15e+08); f1 -215000000 +0215000000 DROP PROCEDURE IF EXISTS sp53; CREATE PROCEDURE sp53( f1 mediumint) BEGIN @@ -16430,7 +17756,9 @@ SELECT f1; END// CALL sp53(-8388600); f1 --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp54; CREATE PROCEDURE sp54( f1 mediumint unsigned) BEGIN @@ -16457,7 +17785,11 @@ SELECT f1; END// CALL sp56(-8388601); f1 --8388602 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -16466,7 +17798,9 @@ SELECT f1; END// CALL sp57(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp58; CREATE PROCEDURE sp58( f1 numeric (0)) BEGIN @@ -16475,7 +17809,9 @@ SELECT f1; END// CALL sp58(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp59; CREATE PROCEDURE sp59( f1 numeric (0) unsigned) BEGIN @@ -16484,7 +17820,10 @@ SELECT f1; END// CALL sp59(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) BEGIN @@ -16493,7 +17832,9 @@ SELECT f1; END// CALL sp60(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp61; CREATE PROCEDURE sp61( f1 numeric (0) zerofill) BEGIN @@ -16502,7 +17843,10 @@ SELECT f1; END// CALL sp61(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp62; CREATE PROCEDURE sp62( f1 numeric (0, 0)) BEGIN @@ -16511,7 +17855,9 @@ SELECT f1; END// CALL sp62(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp63; CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned) BEGIN @@ -16520,7 +17866,10 @@ SELECT f1; END// CALL sp63(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) BEGIN @@ -16529,7 +17878,9 @@ SELECT f1; END// CALL sp64(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp65; CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill) BEGIN @@ -16538,79 +17889,146 @@ SELECT f1; END// CALL sp65(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp66_n; CREATE PROCEDURE sp66_n( f1 numeric (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp66_n(-1e+36); +f1 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp67_nu(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp68_nuz(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp69_n_z(-1e+36); +f1 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp69_n_z( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp70_n; CREATE PROCEDURE sp70_n( f1 numeric (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp70_n(-1e+40); +f1 +-10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp70_n( -10000000000000000000000000000000000000000 ); f1 --10000000000000000000000000000000000000000.000000000 +-10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp71_nu; CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp71_nu(1.00e+40); +f1 +10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp71_nu( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp72_nuz; CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp72_nuz(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp72_nuz( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp73_n_z; CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp73_n_z(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp73_n_z( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp74; CREATE PROCEDURE sp74( f1 numeric unsigned) BEGIN @@ -16619,7 +18037,9 @@ SELECT f1; END// CALL sp74(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp75; CREATE PROCEDURE sp75( f1 numeric unsigned zerofill) BEGIN @@ -16628,7 +18048,9 @@ SELECT f1; END// CALL sp75(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp76; CREATE PROCEDURE sp76( f1 numeric zerofill) BEGIN @@ -16637,7 +18059,10 @@ SELECT f1; END// CALL sp76(-999999999); f1 --999999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp77; CREATE PROCEDURE sp77( f1 real) BEGIN @@ -16646,7 +18071,7 @@ SELECT f1; END// CALL sp77(1.1); f1 -1.10000 +1.1 DROP PROCEDURE IF EXISTS sp78; CREATE PROCEDURE sp78( f1 real unsigned) BEGIN @@ -16655,7 +18080,9 @@ SELECT f1; END// CALL sp78(1.1); f1 -1.10000 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp79; CREATE PROCEDURE sp79( f1 real unsigned zerofill) BEGIN @@ -16664,7 +18091,9 @@ SELECT f1; END// CALL sp79(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp80; CREATE PROCEDURE sp80( f1 real zerofill) BEGIN @@ -16673,7 +18102,9 @@ SELECT f1; END// CALL sp80(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp81; CREATE PROCEDURE sp81( f1 smallint) BEGIN @@ -16709,7 +18140,11 @@ SELECT f1; END// CALL sp84(-32601); f1 --32602 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -16745,9 +18180,23 @@ SELECT f1; END// CALL sp88(-101); f1 --102 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; +CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) +BEGIN +IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF; +END// +CALL sp89( '1enum'); DROP PROCEDURE IF EXISTS sp90; +CREATE PROCEDURE sp90( f1 set('1set', '2set')) +BEGIN +IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF; +END// +CALL sp90( '1set'); DROP PROCEDURE IF EXISTS sp91; CREATE PROCEDURE sp91( f1 date) BEGIN @@ -16765,7 +18214,7 @@ SELECT f1; END// CALL sp92( '23:59:59.999999'); f1 -26:00:00.999997 +25:59:59 DROP PROCEDURE IF EXISTS sp93; CREATE PROCEDURE sp93( f1 datetime) BEGIN @@ -16774,7 +18223,7 @@ SELECT f1; END// CALL sp93('1997-12-31 23:59:59.999999'); f1 -1998-01-02 01:01:01.000001 +1998-01-02 01:01:00 DROP PROCEDURE IF EXISTS sp94; CREATE PROCEDURE sp94( f1 char) BEGIN @@ -16783,7 +18232,9 @@ SELECT f1; END// CALL sp94( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp95; CREATE PROCEDURE sp95( f1 char ascii) BEGIN @@ -16792,7 +18243,9 @@ SELECT f1; END// CALL sp95( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp96; CREATE PROCEDURE sp96( f1 char binary) BEGIN @@ -16801,7 +18254,9 @@ SELECT f1; END// CALL sp96( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp97; CREATE PROCEDURE sp97( f1 longtext) BEGIN @@ -16846,7 +18301,7 @@ SELECT f1; END// CALL sp101(51); f1 -61 +2061 DROP PROCEDURE IF EXISTS sp102; CREATE PROCEDURE sp102( f1 year(4)) BEGIN @@ -16901,6 +18356,8 @@ END// CALL sp107(2.00e+13); f1 returned +Warnings: +returned 1265 Data truncated for column 'f1' at row 1 USE db_storedproc; DROP DATABASE db1; DROP DATABASE IF EXISTS db1; @@ -16937,9 +18394,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute01(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 2033 2033 2084 2033 2033 2084 +2061 2061 2071 2061 2061 2071 2033 2033 2084 2033 2033 2084 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 2033 2084 2033 2084 +2061 2071 2061 2071 2033 2084 2033 2084 DROP PROCEDURE spexecute01; DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS sp2; @@ -17010,9 +18467,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute03(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah helloworld helloworld NULL helloworld helloworld hellohelloworld +a a a a a a helloworld helloworld NULL helloworld helloworld hellohelloworld var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah helloworld NULL helloworld hellohelloworld +a a a a helloworld NULL helloworld hellohelloworld DROP PROCEDURE spexecute03; DROP PROCEDURE sp3; DROP PROCEDURE IF EXISTS sp4; @@ -17155,7 +18612,7 @@ SELECT var7, var8; END// CALL spexecute07(); var1 var2 -9223372036854775807 NULL +18400000000000000000 NULL var3 var4 -9220000000000000000 NULL var5 var6 @@ -17163,7 +18620,7 @@ var5 var6 var7 var8 -9220000000000000000 NULL f1 f2 f3 -9223372036854775807 9223372036854775807 NULL +18400000000000000000 18400000000000000000 NULL f4 f5 f6 -9220000000000000000 -9220000000000000000 NULL f7 f8 f9 @@ -17171,7 +18628,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 -9220000000000000000 NULL f1 f2 f3 --2 -2 -2 +18353255926290448384 18353255926290448384 18353255926290448384 f4 f5 f6 -9220000000000000000 6744073709551616 6744073709551616 f7 f8 f9 @@ -17179,7 +18636,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 --2 -2 +18353255926290448384 18353255926290448384 var3 var4 6744073709551616 6744073709551616 var5 var6 @@ -17237,9 +18694,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute08(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -368000000000000000 368000000000000000 368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000000 00368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -368000000000000000 368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute08; DROP PROCEDURE sp8; DROP PROCEDURE IF EXISTS sp9; @@ -17291,9 +18748,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute09(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --18440000000000000 -18440000000000000 -18439999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000000 00000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --18440000000000000 -18439999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute09; DROP PROCEDURE sp9; DROP PROCEDURE IF EXISTS sp10; @@ -17337,9 +18794,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute10(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute10; DROP PROCEDURE sp10; DROP PROCEDURE IF EXISTS sp11; @@ -17372,9 +18829,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute11(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute11; DROP PROCEDURE sp11; DROP PROCEDURE IF EXISTS sp12; @@ -17407,9 +18864,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute12(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999999.000000000 99999999999.000000000 100000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999999.000000000 100000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute12; DROP PROCEDURE sp12; DROP PROCEDURE IF EXISTS sp13; @@ -17442,9 +18899,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute13(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute13; DROP PROCEDURE sp13; DROP PROCEDURE IF EXISTS sp14; @@ -17477,9 +18934,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute14(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute14; DROP PROCEDURE sp14; DROP PROCEDURE IF EXISTS sp15; @@ -17545,9 +19002,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute16(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute16; DROP PROCEDURE sp16; DROP PROCEDURE IF EXISTS sp17; @@ -17579,9 +19036,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute17(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute17; DROP PROCEDURE sp17; DROP PROCEDURE IF EXISTS sp18; @@ -17613,9 +19070,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute18(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute18; DROP PROCEDURE sp18; DROP PROCEDURE IF EXISTS sp19; @@ -17647,9 +19104,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute19(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute19; DROP PROCEDURE sp19; DROP PROCEDURE IF EXISTS sp20; @@ -17681,9 +19138,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute20(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute20; DROP PROCEDURE sp20; DROP PROCEDURE IF EXISTS sp21; @@ -17715,9 +19172,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute21(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute21; DROP PROCEDURE sp21; DROP PROCEDURE IF EXISTS sp22; @@ -17783,9 +19240,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute23(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute23; DROP PROCEDURE sp23; DROP PROCEDURE IF EXISTS sp24; @@ -17817,9 +19274,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute24(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1.1 1.1 11.1 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1.1 11.1 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute24; DROP PROCEDURE sp24; DROP PROCEDURE IF EXISTS sp25; @@ -17851,9 +19308,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute25(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --65402 -65402 -65392 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-32758 -32758 -32748 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --65402 -65392 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-32758 -32748 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute25; DROP PROCEDURE sp25; DROP PROCEDURE IF EXISTS sp26; @@ -17919,9 +19376,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute27(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -26:00:00.999997 26:00:00.999997 28:00:01.999995 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +25:59:59 25:59:59 27:59:59 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -26:00:00.999997 28:00:01.999995 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +25:59:59 27:59:59 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute27; DROP PROCEDURE sp27; DROP PROCEDURE IF EXISTS sp28; @@ -17953,9 +19410,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute28(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1998-01-02 01:01:01.000001 1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-02 01:01:00 1998-01-03 02:02:01 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-03 02:02:01 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute28; DROP PROCEDURE sp28; DROP PROCEDURE IF EXISTS sp29; @@ -17987,9 +19444,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute29(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute29; DROP PROCEDURE sp29; DROP PROCEDURE IF EXISTS sp30; @@ -18021,9 +19478,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute30(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute30; DROP PROCEDURE sp30; DROP PROCEDURE IF EXISTS sp31; @@ -18089,9 +19546,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute32(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute32; DROP PROCEDURE sp32; DROP PROCEDURE IF EXISTS sp33; @@ -18123,9 +19580,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute33(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute33; DROP PROCEDURE sp33; DROP PROCEDURE IF EXISTS sp34; @@ -18191,9 +19648,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute35(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute35; DROP PROCEDURE sp35; DROP PROCEDURE IF EXISTS sp36; @@ -18225,9 +19682,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute36(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute36; DROP PROCEDURE sp36; DROP PROCEDURE IF EXISTS sp37; @@ -18293,9 +19750,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute38(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute38; DROP PROCEDURE sp38; DROP PROCEDURE IF EXISTS sp39; @@ -18327,9 +19784,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute39(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute39; DROP PROCEDURE sp39; DROP PROCEDURE IF EXISTS sp40; @@ -18361,9 +19818,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute40(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute40; DROP PROCEDURE sp40; DROP PROCEDURE IF EXISTS sp41; @@ -18395,9 +19852,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute41(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute41; DROP PROCEDURE sp41; DROP PROCEDURE IF EXISTS sp42; @@ -18429,9 +19886,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute42(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute42; DROP PROCEDURE sp42; DROP PROCEDURE IF EXISTS sp43; @@ -18463,9 +19920,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute43(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute43; DROP PROCEDURE sp43; DROP PROCEDURE IF EXISTS sp44; @@ -18497,9 +19954,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute44(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute44; DROP PROCEDURE sp44; DROP PROCEDURE IF EXISTS sp45; @@ -18531,9 +19988,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute45(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute45; DROP PROCEDURE sp45; DROP PROCEDURE IF EXISTS sp46; @@ -18565,9 +20022,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute46(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute46; DROP PROCEDURE sp46; DROP PROCEDURE IF EXISTS sp47; @@ -18599,9 +20056,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute47(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute47; DROP PROCEDURE sp47; DROP PROCEDURE IF EXISTS sp48; @@ -18633,9 +20090,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute48(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute48; DROP PROCEDURE sp48; DROP PROCEDURE IF EXISTS sp49; @@ -18667,9 +20124,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute49(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute49; DROP PROCEDURE sp49; DROP PROCEDURE IF EXISTS sp50; @@ -18701,9 +20158,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute50(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute50; DROP PROCEDURE sp50; DROP PROCEDURE IF EXISTS sp51; @@ -18735,9 +20192,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute51(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute51; DROP PROCEDURE sp51; DROP PROCEDURE IF EXISTS sp52; @@ -18769,9 +20226,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute52(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000.000000000000000000000000000000 -10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute52; DROP PROCEDURE sp52; DROP PROCEDURE IF EXISTS sp53; @@ -18803,9 +20260,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute53(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute53; DROP PROCEDURE sp53; DROP PROCEDURE IF EXISTS sp54; @@ -18837,9 +20294,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute54(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute54; DROP PROCEDURE sp54; DROP PROCEDURE IF EXISTS sp55; @@ -18871,9 +20328,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute55(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute55; DROP PROCEDURE sp55; DROP PROCEDURE IF EXISTS sp56; @@ -18905,9 +20362,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute56(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 61 61 71 61 61 71 +2061 2061 2071 2061 2061 2071 2061 2061 2071 2061 2061 2071 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 61 71 61 71 +2061 2071 2061 2071 2061 2071 2061 2071 DROP PROCEDURE spexecute56; DROP PROCEDURE sp56; DROP PROCEDURE IF EXISTS sp57; @@ -19041,9 +20498,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute60(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah aah ah ah aah +a a a a a a a a a a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah aah ah aah +a a a a a a a a DROP PROCEDURE spexecute60; DROP PROCEDURE sp60; DROP PROCEDURE IF EXISTS sp61; @@ -19075,9 +20532,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute61(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah NULL ah ah aah +a a a a a a a a NULL a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah NULL ah aah +a a a a a NULL a a DROP PROCEDURE spexecute61; DROP PROCEDURE sp61; DROP PROCEDURE IF EXISTS sp62; @@ -19177,9 +20634,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute64(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 DROP PROCEDURE spexecute64; DROP PROCEDURE sp64; DROP PROCEDURE IF EXISTS sp65; @@ -19211,9 +20668,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute65(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -999999999.000000000 999999999.000000000 1000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -999999999.000000000 1000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute65; DROP PROCEDURE sp65; DROP PROCEDURE IF EXISTS sp66; @@ -19245,9 +20702,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute66(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute66; DROP PROCEDURE sp66; DROP PROCEDURE IF EXISTS sp67; @@ -19279,9 +20736,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute67(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute67; DROP PROCEDURE sp67; DROP PROCEDURE IF EXISTS sp68; @@ -19313,9 +20770,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute68(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute68; DROP PROCEDURE sp68; DROP PROCEDURE IF EXISTS sp69; @@ -19347,9 +20804,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute69(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute69; DROP PROCEDURE sp69; DROP PROCEDURE IF EXISTS sp70; @@ -19381,9 +20838,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute70(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute70; DROP PROCEDURE sp70; DROP PROCEDURE IF EXISTS sp71; @@ -19415,9 +20872,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute71(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute71; DROP PROCEDURE sp71; DROP PROCEDURE IF EXISTS sp72; @@ -19449,9 +20906,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute72(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute72; DROP PROCEDURE sp72; DROP PROCEDURE IF EXISTS sp73; @@ -19483,9 +20940,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute73(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute73; DROP PROCEDURE sp73; DROP PROCEDURE IF EXISTS sp74; @@ -19517,9 +20974,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute74(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute74; DROP PROCEDURE sp74; DROP PROCEDURE IF EXISTS sp75; @@ -19551,9 +21008,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute75(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute75; DROP PROCEDURE sp75; DROP PROCEDURE IF EXISTS sp76; @@ -19585,9 +21042,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute76(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute76; DROP PROCEDURE sp76; DROP PROCEDURE IF EXISTS sp77; @@ -19619,9 +21076,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute77(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute77; DROP PROCEDURE sp77; DROP PROCEDURE IF EXISTS sp78; @@ -19653,9 +21110,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute78(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute78; DROP PROCEDURE sp78; DROP PROCEDURE IF EXISTS sp79; @@ -19687,9 +21144,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute79(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute79; DROP PROCEDURE sp79; DROP PROCEDURE IF EXISTS sp80; @@ -19721,9 +21178,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute80(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --2150000000 -2150000000 -2149999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-2147483638 -2147483638 -2147483628 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --2150000000 -2149999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-2147483638 -2147483628 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute80; DROP PROCEDURE sp80; DROP PROCEDURE IF EXISTS sp81; @@ -19823,9 +21280,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute83(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -215000000 215000000 215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0215000000 0215000000 0215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -215000000 215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0215000000 0215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute83; DROP PROCEDURE sp83; DROP PROCEDURE IF EXISTS sp84; @@ -19857,9 +21314,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute84(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388600 -8388600 -8388590 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-8388598 -8388598 -8388588 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388600 -8388590 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-8388598 -8388588 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute84; DROP PROCEDURE sp84; DROP PROCEDURE IF EXISTS sp85; @@ -19925,9 +21382,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute86(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -16777210 16777210 16777220 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777210 16777210 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -16777210 16777220 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777210 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute86; DROP PROCEDURE sp86; DROP PROCEDURE IF EXISTS sp87; @@ -19959,9 +21416,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute87(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388602 -8388602 -8388592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777215 16777215 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388602 -8388592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777215 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute87; DROP PROCEDURE sp87; DROP PROCEDURE IF EXISTS sp88; @@ -19993,9 +21450,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute88(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute88; DROP PROCEDURE sp88; DROP PROCEDURE IF EXISTS sp89; @@ -20027,9 +21484,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute89(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute89; DROP PROCEDURE sp89; DROP PROCEDURE IF EXISTS sp90; @@ -20061,9 +21518,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute90(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000.000000000000000000000000000000 10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute90; DROP PROCEDURE sp90; DROP PROCEDURE IF EXISTS sp91; @@ -20095,9 +21552,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute91(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000100000000000000000000.000000000000000000000000000000 000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute91; DROP PROCEDURE sp91; DROP PROCEDURE IF EXISTS sp92; @@ -20129,9 +21586,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute92(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute92; DROP PROCEDURE sp92; DROP PROCEDURE IF EXISTS sp93; @@ -20163,9 +21620,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute93(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute93; DROP PROCEDURE sp93; DROP PROCEDURE IF EXISTS sp94; @@ -20231,9 +21688,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute95(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute95; DROP PROCEDURE sp95; DROP PROCEDURE IF EXISTS sp96; @@ -20265,9 +21722,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute96(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute96; DROP PROCEDURE sp96; DROP PROCEDURE IF EXISTS sp97; @@ -20299,9 +21756,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute97(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --32602 -32602 -32592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65535 65535 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --32602 -32592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65535 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute97; DROP PROCEDURE sp97; DROP PROCEDURE IF EXISTS sp98; @@ -20367,9 +21824,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute99(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -252 252 262 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +252 252 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -252 262 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +252 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute99; DROP PROCEDURE sp99; DROP PROCEDURE IF EXISTS sp100; @@ -20435,9 +21892,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute101(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --102 -102 -92 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +255 255 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --102 -92 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +255 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute101; DROP PROCEDURE sp101; USE db_storedproc; @@ -20462,13 +21919,13 @@ set a = '2005-03-14 01:01:02'; insert into temp_table values(a); END// show CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure -sp2 ALLOW_INVALID_DATES CREATE PROCEDURE `sp2`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp2 ALLOW_INVALID_DATES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() BEGIN declare a datetime; set a = '2005-03-14 01:01:02'; insert into temp_table values(a); -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode = 'traditional'; CALL sp2 (); SELECT * from temp_table; @@ -20498,15 +21955,15 @@ set b = 5; SELECT not 1 between a and b; END// show CREATE PROCEDURE sp3; -Procedure sql_mode Create Procedure -sp3 HIGH_NOT_PRECEDENCE CREATE PROCEDURE `sp3`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp3 HIGH_NOT_PRECEDENCE CREATE DEFINER=`root`@`localhost` PROCEDURE `sp3`() BEGIN declare a int signed; declare b int unsigned; set a = -5; set b = 5; SELECT not 1 between a and b; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp3(); not 1 between a and b @@ -20541,8 +21998,8 @@ set c = b/a; show warnings; END// show CREATE PROCEDURE sp4; -Procedure sql_mode Create Procedure -sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE PROCEDURE "sp4"() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE DEFINER="root"@"localhost" PROCEDURE "sp4"() BEGIN declare a int; declare b int; @@ -20551,7 +22008,7 @@ set a = 0; set b = 1; set c = b/a; show warnings; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message @@ -20589,37 +22046,37 @@ set @x=i1; set @y=@x; END// show CREATE PROCEDURE sp6a; -Procedure sql_mode Create Procedure -sp6a CREATE PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6a CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6b; -Procedure sql_mode Create Procedure -sp6b CREATE PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6b CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) DETERMINISTIC BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6c; -Procedure sql_mode Create Procedure -sp6c CREATE PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6c CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) COMMENT 'this is a comment' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6a'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6b'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6c'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6a; DROP PROCEDURE sp6b; DROP PROCEDURE sp6c; @@ -20633,8 +22090,8 @@ set @x=i1; set @y=@x; END// SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.3: @@ -20659,8 +22116,8 @@ set @y=@x; return 0; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION sp6; Testcase 4.8.5: @@ -20673,7 +22130,7 @@ Testcase 4.8.6: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; show procedure status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.7: -------------------------------------------------------------------------------- @@ -20694,7 +22151,7 @@ BEGIN return i1; END// show procedure status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP FUNCTION fn1; Testcase 4.8.9: @@ -20708,8 +22165,8 @@ BEGIN return i1; END// SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.11: @@ -20738,7 +22195,7 @@ Testcase 4.8.13: -------------------------------------------------------------------------------- DROP FUNCTION IF EXISTS f1000; SHOW FUNCTION STATUS LIKE 'f1000'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.14: -------------------------------------------------------------------------------- @@ -20760,7 +22217,7 @@ set @x=i1; set @y=@x; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE sp6; Testcase 4.8.16: @@ -20777,8 +22234,8 @@ END// alter procedure sp6 sql security invoker; alter procedure sp6 comment 'this is a new comment'; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.18: @@ -20790,12 +22247,12 @@ return x; END// alter function fn1 sql security invoker; show create function fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(x int) RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) SQL SECURITY INVOKER BEGIN return x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.19: @@ -20808,8 +22265,8 @@ END// alter function fn1 sql security invoker; alter function fn1 comment 'this is a function 3242#@%$#@'; show function status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.20: @@ -20822,13 +22279,13 @@ set @y=@x; END// alter procedure sp6 comment 'this is simple'; show CREATE PROCEDURE sp6; -Procedure sql_mode Create Procedure -sp6 CREATE PROCEDURE `sp6`(i1 int , i2 int) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6`(i1 int , i2 int) COMMENT 'this is simple' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.21: @@ -20853,7 +22310,7 @@ set @y=@x; END// DROP PROCEDURE sp6; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.23: -------------------------------------------------------------------------------- @@ -20875,7 +22332,7 @@ return i1; END// DROP FUNCTION fn1; SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Section 3.1.9 - Routine body checks: -------------------------------------------------------------------------------- @@ -20894,16 +22351,16 @@ SELECT * from t9 limit 0, 100; END// CALL sp6 (10, 20, 30, 40, 50); f1 f2 f3 --5000 a` -5000 --4999 aaa -4999 --4998 abaa -4998 --4997 acaaa -4997 --4996 adaaaa -4996 --4995 aeaaaaa -4995 --4994 afaaaaaa -4994 --4993 agaaaaaaa -4993 --4992 a^aaaaaaaa -4992 -4991 a_aaaaaaaaa -4991 +-4992 a^aaaaaaaa -4992 +-4993 agaaaaaaa -4993 +-4994 afaaaaaa -4994 +-4995 aeaaaaa -4995 +-4996 adaaaa -4996 +-4997 acaaa -4997 +-4998 abaa -4998 +-4999 aaa -4999 +-5000 a` -5000 DROP PROCEDURE sp6; Testcase 4.9.2: @@ -21363,9 +22820,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.14: -------------------------------------------------------------------------------- @@ -21392,9 +22856,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.15: -------------------------------------------------------------------------------- @@ -21422,9 +22893,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +@x=1 +0 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.16: -------------------------------------------------------------------------------- @@ -21452,17 +22930,16 @@ until done END repeat; SELECT done; close cur1; END// -CALL h1() -# cleanup; +CALL h1(); done 0 @x=1 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.17: -------------------------------------------------------------------------------- @@ -21490,9 +22967,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.18: -------------------------------------------------------------------------------- @@ -21520,9 +22997,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.19: -------------------------------------------------------------------------------- @@ -21550,9 +23027,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.20: -------------------------------------------------------------------------------- @@ -21580,9 +23057,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.21: -------------------------------------------------------------------------------- @@ -21610,9 +23087,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.22: -------------------------------------------------------------------------------- @@ -21641,9 +23118,9 @@ done 0 done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.23: -------------------------------------------------------------------------------- @@ -21671,9 +23148,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.24: -------------------------------------------------------------------------------- @@ -21701,9 +23178,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.25: -------------------------------------------------------------------------------- @@ -21728,9 +23205,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.26: -------------------------------------------------------------------------------- @@ -21755,9 +23232,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.27: -------------------------------------------------------------------------------- @@ -21780,9 +23257,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.28: -------------------------------------------------------------------------------- @@ -21805,9 +23282,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.29: -------------------------------------------------------------------------------- @@ -21835,9 +23312,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.30: -------------------------------------------------------------------------------- @@ -21865,9 +23342,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.31: -------------------------------------------------------------------------------- @@ -21893,9 +23370,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.32: -------------------------------------------------------------------------------- @@ -21921,9 +23398,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.33: -------------------------------------------------------------------------------- @@ -21948,7 +23425,7 @@ set @x=1; SELECT done, @x; END// ERROR 42000: Duplicate condition: condname -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.35: -------------------------------------------------------------------------------- @@ -21973,7 +23450,21 @@ insert into res_t1 values (3, 'c'); END begin2_label; END begin1_label// ERROR 42000: Bad SQLSTATE: '020' -drop table res_t1; +CREATE PROCEDURE h1 () +begin1_label:BEGIN +declare condname1 condition for sqlstate '020'; +declare condname2 condition for sqlstate 'wewe'; +declare condname3 condition for 9999; +set @var2 = 1; +insert into res_t1 values (2, 'b'); +begin2_label: BEGIN +declare continue handler for sqlstate '90000023' set @var3= 1; +set @var4 = 1; +insert into res_t1 values (3, 'c'); +END begin2_label; +END begin1_label// +ERROR 42000: Bad SQLSTATE: '020' +DROP TABLE IF EXISTS res_t1; Testcase 4.11.36: -------------------------------------------------------------------------------- @@ -21989,7 +23480,7 @@ set x1 = 2; END; SELECT @x, x1; END// -DROP PROCEDURE h1; +DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: -------------------------------------------------------------------------------- @@ -22010,7 +23501,7 @@ declare exit handler for condname2 set x5 = 1; END// ERROR 42000: Duplicate handler declared in the same block DROP PROCEDURE IF EXISTS h1; -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.41: -------------------------------------------------------------------------------- @@ -22026,6 +23517,9 @@ set x1 = 2; END; SELECT @x, x1; END// +CALL h1(); +@x x1 +0 2 DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): @@ -22076,8 +23570,8 @@ CALL h1(); SELECT @done, @x; @done @x 1 1 -DROP PROCEDURE h1; -DROP TABLE res_t1; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result index c316ce36dde..b5c70ec1c95 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result @@ -58,6 +58,7 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- +USE db_storedproc; Testcase 3.1.10.2 + 3.1.10.5: ----------------------------- @@ -94,6 +95,7 @@ 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 @@ -114,6 +116,7 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; USE db_storedproc; root@localhost db_storedproc @@ -180,6 +183,8 @@ 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() @@ -207,49 +212,72 @@ 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 ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -abc abc 2005-10-03 100 uvw 1000 CALL sp_ins_3(); SELECT row_count(); row_count() 1 -SELECT * FROM temp ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 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 ORDER BY f4; +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 @@ -258,8 +286,6 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 updated abc 2005-10-03 100 uvw 1000 updated xyz 1949-05-23 100 uvw 1000 updated xyz 1989-11-09 100 uvw 1000 @@ -281,8 +307,10 @@ COUNT( f1 ) f1 SELECT row_count(); row_count() 3 -SELECT * FROM temp ORDER BY f4; +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 @@ -291,20 +319,67 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 -qwe xyz 1998-03-26 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() +-1 +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: diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index ae7b83f820d..072237f55de 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -180,15 +180,14 @@ 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 - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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 -insert 3.5.3.7-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes drop trigger trg4a_1; @@ -206,7 +205,6 @@ 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-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes trig 3.5.3.7-2a @@ -235,29 +233,27 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a 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-1a +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 3.5.3.7-1b drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost @@ -271,23 +267,21 @@ 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-1a +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 3.5.3.7-1b 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-1a +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 -update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -313,21 +307,19 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -341,14 +333,12 @@ 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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -372,23 +362,20 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -402,16 +389,13 @@ 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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -436,14 +420,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -491,15 +475,15 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -546,11 +530,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -592,11 +576,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 diff --git a/mysql-test/suite/funcs_1/r/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index c445f03a2c0..f1ef5e5211a 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -135,10 +135,10 @@ 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 order by i120; +select * from db_test.t1_i; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; +select * from db_test.t1_u; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 b 00222 0000023456 1.050000000000000000000000000000 @@ -146,7 +146,7 @@ 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 order by d120; +select * from db_test.t1_d; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -339,20 +339,20 @@ 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; +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; +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; +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 @@ -362,7 +362,7 @@ 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; +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 @@ -373,7 +373,7 @@ 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; +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 @@ -383,7 +383,7 @@ 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; +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 @@ -495,9 +495,38 @@ 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: (Disabled as a result of bug _____) ------------------------------------------------------ +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; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result index 451041575af..c0a7009737a 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result @@ -294,8 +294,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 7d045e3412a..602f4de0264 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -127,11 +127,7 @@ USE test; -------------------------------------------------------------------------------- There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables +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); @@ -407,71 +403,3069 @@ f59 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 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 +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 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 +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; @@ -935,9 +3929,108 @@ 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 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 +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 @@ -998,10 +4091,58 @@ 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 ORDER BY f59,f60,f61 LIMIT 2; +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 @@ -1144,17 +4285,17 @@ Drop view if exists test.v1 ; Testcase 3.3.1.22 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2; -SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2; +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 LIMIT 2; +SELECT * FROM test.v1; product 2 CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1 LIMIT 2; +SELECT * FROM test.v1; product root@localhost Drop view if exists test.v1 ; @@ -1232,10 +4373,58 @@ Testcase 3.3.1.26 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; Create view test.v1 AS Select * from test.tb2; -Select * from test.v1 order by f59, f60, f61 limit 2; +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 @@ -1259,57 +4448,2556 @@ 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 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 +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 ; @@ -1900,12 +7588,110 @@ 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 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 -122 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 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 -3000 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -1930,16 +7716,214 @@ 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 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 -30 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 -30 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 +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 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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 ; @@ -9726,13 +15710,2557 @@ 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 limit 5; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -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 +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; @@ -9789,28 +18317,2557 @@ F59 F61 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 limit 20; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -10185,8 +21242,57 @@ F59 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 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 -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 +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 @@ -10549,8 +21655,57 @@ 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 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 -2005 101 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 @@ -10566,8 +21721,57 @@ 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 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 -8 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 +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 @@ -10582,11 +21786,210 @@ 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 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 -891 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 -891 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 -891 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 -891 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 +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 @@ -10935,10 +22338,6 @@ 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'; - -Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view --------------------------------------------------------------------------------- SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; @@ -11470,21 +22869,24 @@ ABC 0 ABC 1.7320508075689 CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t1; DROP TABLE t2; DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/myisam_func_view.result b/mysql-test/suite/funcs_1/r/myisam_func_view.result index 02ef728fad5..14568643665 100644 --- a/mysql-test/suite/funcs_1/r/myisam_func_view.result +++ b/mysql-test/suite/funcs_1/r/myisam_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -89,6 +85,9 @@ 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, @@ -101,6 +100,7 @@ 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, @@ -113,6 +113,7 @@ 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, @@ -125,6 +126,7 @@ 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, @@ -135,11 +137,13 @@ 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" @@ -184,14 +188,12 @@ 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'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', ) - The file with expected results suffers from Bug 10963" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +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), @@ -284,19 +286,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; +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 = 190 OR select_id IS NULL) order by id; +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 = 189 OR select_id IS NULL order by id; +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 @@ -308,7 +310,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'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 = 189 OR select_id IS NULL) order by id; +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 @@ -322,13 +324,13 @@ 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 = 188 OR select_id IS NULL order by id; +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 = 188 OR select_id IS NULL) order by id; +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -336,13 +338,13 @@ 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 = 187 OR select_id IS NULL order by id; +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 = 187 OR select_id IS NULL) order by id; +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -350,13 +352,13 @@ 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 = 186 OR select_id IS NULL order by id; +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 = 186 OR select_id IS NULL) order by id; +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -364,13 +366,13 @@ 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 = 185 OR select_id IS NULL order by id; +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 = 185 OR select_id IS NULL) order by id; +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -378,13 +380,13 @@ 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 = 184 OR select_id IS NULL order by id; +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 = 184 OR select_id IS NULL) order by id; +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -392,13 +394,13 @@ 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 = 183 OR select_id IS NULL order by id; +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 = 183 OR select_id IS NULL) order by id; +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -406,13 +408,13 @@ 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 = 182 OR select_id IS NULL order by id; +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 = 182 OR select_id IS NULL) order by id; +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -420,13 +422,13 @@ 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 = 181 OR select_id IS NULL order by id; +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 = 181 OR select_id IS NULL) order by id; +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -434,13 +436,13 @@ 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 = 180 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 180 OR select_id IS NULL) order by id; +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -448,13 +450,13 @@ 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 = 179 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 179 OR select_id IS NULL) order by id; +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -462,13 +464,13 @@ 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 = 178 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 178 OR select_id IS NULL) order by id; +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -476,13 +478,13 @@ 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 = 177 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 177 OR select_id IS NULL) order by id; +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -490,13 +492,13 @@ 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 = 176 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 176 OR select_id IS NULL) order by id; +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -504,13 +506,13 @@ 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 = 175 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 175 OR select_id IS NULL) order by id; +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -518,13 +520,13 @@ 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 = 174 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 174 OR select_id IS NULL) order by id; +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -532,13 +534,13 @@ 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 = 173 OR select_id IS NULL order by id; +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 = 173 OR select_id IS NULL) order by id; +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -546,13 +548,13 @@ 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 = 172 OR select_id IS NULL order by id; +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 = 172 OR select_id IS NULL) order by id; +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -560,13 +562,13 @@ 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 = 171 OR select_id IS NULL order by id; +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 = 171 OR select_id IS NULL) order by id; +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -574,13 +576,13 @@ 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 = 170 OR select_id IS NULL order by id; +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 = 170 OR select_id IS NULL) order by id; +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -588,13 +590,13 @@ 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 = 169 OR select_id IS NULL order by id; +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 = 169 OR select_id IS NULL) order by id; +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -602,13 +604,13 @@ 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 = 168 OR select_id IS NULL order by id; +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 = 168 OR select_id IS NULL) order by id; +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -616,13 +618,13 @@ 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 = 167 OR select_id IS NULL order by id; +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 = 167 OR select_id IS NULL) order by id; +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -630,13 +632,13 @@ 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 = 166 OR select_id IS NULL order by id; +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 = 166 OR select_id IS NULL) order by id; +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -644,13 +646,13 @@ 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 = 165 OR select_id IS NULL order by id; +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 = 165 OR select_id IS NULL) order by id; +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -658,13 +660,13 @@ 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 = 164 OR select_id IS NULL order by id; +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 = 164 OR select_id IS NULL) order by id; +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -672,13 +674,13 @@ 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 = 163 OR select_id IS NULL order by id; +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 = 163 OR select_id IS NULL) order by id; +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -686,13 +688,13 @@ 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 = 162 OR select_id IS NULL order by id; +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 = 162 OR select_id IS NULL) order by id; +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -700,13 +702,13 @@ 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 = 161 OR select_id IS NULL order by id; +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 = 161 OR select_id IS NULL) order by id; +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -714,13 +716,13 @@ 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 = 160 OR select_id IS NULL order by id; +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 = 160 OR select_id IS NULL) order by id; +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -728,13 +730,13 @@ 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 = 159 OR select_id IS NULL order by id; +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 = 159 OR select_id IS NULL) order by id; +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -742,13 +744,13 @@ 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 = 158 OR select_id IS NULL order by id; +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 = 158 OR select_id IS NULL) order by id; +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -756,13 +758,13 @@ 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 = 157 OR select_id IS NULL order by id; +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(_latin1'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 = 157 OR select_id IS NULL) order by id; +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -770,13 +772,13 @@ 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 = 156 OR select_id IS NULL order by id; +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(_latin1'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 = 156 OR select_id IS NULL) order by id; +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -784,13 +786,13 @@ 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 = 155 OR select_id IS NULL order by id; +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(_latin1'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 = 155 OR select_id IS NULL) order by id; +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -798,19 +800,19 @@ 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 = 154 OR select_id IS NULL order by id; +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(_latin1'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 = 154 OR select_id IS NULL) order by id; +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; +WHERE select_id = 156 OR select_id IS NULL order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -827,7 +829,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`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; +WHERE select_id = 156 OR select_id IS NULL) order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -846,13 +848,13 @@ 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 = 152 OR select_id IS NULL order by id; +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 = 152 OR select_id IS NULL) order by id; +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -860,13 +862,13 @@ 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 = 151 OR select_id IS NULL order by id; +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 = 151 OR select_id IS NULL) order by id; +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -874,13 +876,13 @@ 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 = 150 OR select_id IS NULL order by id; +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 = 150 OR select_id IS NULL) order by id; +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -888,19 +890,49 @@ 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 = 149 OR select_id IS NULL order by id; +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 = 149 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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(_latin1'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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' 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 = 148 OR select_id IS NULL order by id; +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 @@ -915,7 +947,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'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 = 148 OR select_id IS NULL) order by id; +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 @@ -928,9 +960,33 @@ Error 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(_latin1'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 = 147 OR select_id IS NULL order by id; +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 @@ -942,7 +998,7 @@ 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 = 147 OR select_id IS NULL) order by id; +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 @@ -954,7 +1010,7 @@ 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 = 146 OR select_id IS NULL order by id; +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 @@ -966,7 +1022,7 @@ 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 = 146 OR select_id IS NULL) order by id; +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 @@ -978,7 +1034,7 @@ 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 = 145 OR select_id IS NULL order by id; +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 @@ -990,7 +1046,7 @@ 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 = 145 OR select_id IS NULL) order by id; +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 @@ -1002,7 +1058,7 @@ 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 = 144 OR select_id IS NULL order by id; +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 @@ -1014,7 +1070,7 @@ 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 = 144 OR select_id IS NULL) order by id; +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 @@ -1028,13 +1084,13 @@ 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 = 143 OR select_id IS NULL order by id; +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 = 143 OR select_id IS NULL) order by id; +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1042,13 +1098,13 @@ 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 = 142 OR select_id IS NULL order by id; +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(_latin1'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 = 142 OR select_id IS NULL) order by id; +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1056,7 +1112,7 @@ 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 = 141 OR select_id IS NULL order by id; +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 @@ -1068,7 +1124,7 @@ 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 = 141 OR select_id IS NULL) order by id; +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 @@ -1082,7 +1138,7 @@ 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 = 140 OR select_id IS NULL order by id; +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 @@ -1094,7 +1150,7 @@ 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 = 140 OR select_id IS NULL) order by id; +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 @@ -1108,7 +1164,7 @@ 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 = 139 OR select_id IS NULL order by id; +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 @@ -1120,7 +1176,7 @@ 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 = 139 OR select_id IS NULL) order by id; +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 @@ -1134,7 +1190,7 @@ 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 = 138 OR select_id IS NULL order by id; +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 @@ -1146,7 +1202,7 @@ 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 = 138 OR select_id IS NULL) order by id; +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 @@ -1160,7 +1216,7 @@ 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 = 137 OR select_id IS NULL order by id; +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 @@ -1172,7 +1228,7 @@ 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`,_latin1'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 = 137 OR select_id IS NULL) order by id; +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 @@ -1186,7 +1242,7 @@ 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 = 136 OR select_id IS NULL order by id; +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 @@ -1198,7 +1254,7 @@ 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`,_latin1'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 = 136 OR select_id IS NULL) order by id; +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 @@ -1212,7 +1268,7 @@ 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 = 135 OR select_id IS NULL order by id; +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 @@ -1224,7 +1280,7 @@ 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`,_latin1'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 = 135 OR select_id IS NULL) order by id; +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 @@ -1238,7 +1294,7 @@ 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 = 134 OR select_id IS NULL order by id; +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 @@ -1250,7 +1306,7 @@ 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`,_latin1'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 = 134 OR select_id IS NULL) order by id; +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 @@ -1264,7 +1320,7 @@ 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 = 133 OR select_id IS NULL order by id; +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 @@ -1276,7 +1332,7 @@ 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`,_latin1'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 = 133 OR select_id IS NULL) order by id; +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 @@ -1290,7 +1346,7 @@ 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 = 132 OR select_id IS NULL order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1302,7 +1358,7 @@ 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`,_latin1'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 = 132 OR select_id IS NULL) order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1316,7 +1372,7 @@ 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 = 131 OR select_id IS NULL order by id; +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 @@ -1328,7 +1384,7 @@ 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`,_latin1'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 = 131 OR select_id IS NULL) order by id; +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 @@ -1342,7 +1398,7 @@ 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 = 130 OR select_id IS NULL order by id; +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 @@ -1354,7 +1410,7 @@ 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`,_latin1'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 = 130 OR select_id IS NULL) order by id; +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 @@ -1368,7 +1424,7 @@ 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 = 129 OR select_id IS NULL order by id; +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 @@ -1380,7 +1436,7 @@ 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`,_latin1'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 = 129 OR select_id IS NULL) order by id; +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 @@ -1394,7 +1450,7 @@ 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 = 128 OR select_id IS NULL order by id; +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 @@ -1406,7 +1462,7 @@ 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`,_latin1'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 = 128 OR select_id IS NULL) order by id; +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 @@ -1420,7 +1476,7 @@ 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 = 127 OR select_id IS NULL order by id; +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 @@ -1432,7 +1488,7 @@ 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`,_latin1'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 = 127 OR select_id IS NULL) order by id; +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 @@ -1446,7 +1502,7 @@ 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 = 126 OR select_id IS NULL order by id; +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 @@ -1458,7 +1514,7 @@ 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`,_latin1'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 = 126 OR select_id IS NULL) order by id; +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 @@ -1472,7 +1528,7 @@ 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 = 125 OR select_id IS NULL order by id; +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 @@ -1486,7 +1542,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 125 OR select_id IS NULL) order by id; +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 @@ -1501,7 +1557,7 @@ 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 = 124 OR select_id IS NULL order by id; +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 @@ -1515,7 +1571,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 124 OR select_id IS NULL) order by id; +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 @@ -1530,7 +1586,7 @@ 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 = 123 OR select_id IS NULL order by id; +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 @@ -1544,7 +1600,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 123 OR select_id IS NULL) order by id; +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 @@ -1559,7 +1615,7 @@ 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 = 122 OR select_id IS NULL order by id; +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 @@ -1573,7 +1629,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 122 OR select_id IS NULL) order by id; +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 @@ -1588,7 +1644,7 @@ 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 = 121 OR select_id IS NULL order by id; +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 @@ -1602,7 +1658,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 121 OR select_id IS NULL) order by id; +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 @@ -1617,7 +1673,7 @@ 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 = 120 OR select_id IS NULL order by id; +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 @@ -1631,7 +1687,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 120 OR select_id IS NULL) order by id; +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 @@ -1646,7 +1702,7 @@ 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 = 119 OR select_id IS NULL order by id; +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 @@ -1660,7 +1716,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 119 OR select_id IS NULL) order by id; +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 @@ -1675,7 +1731,7 @@ 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 = 118 OR select_id IS NULL order by id; +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 @@ -1689,7 +1745,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 118 OR select_id IS NULL) order by id; +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 @@ -1704,7 +1760,7 @@ 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 = 117 OR select_id IS NULL order by id; +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 @@ -1718,7 +1774,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 117 OR select_id IS NULL) order by id; +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 @@ -1733,7 +1789,7 @@ 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 = 116 OR select_id IS NULL order by id; +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 @@ -1747,7 +1803,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 116 OR select_id IS NULL) order by id; +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 @@ -1762,7 +1818,7 @@ 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 = 115 OR select_id IS NULL order by id; +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 @@ -1776,7 +1832,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 115 OR select_id IS NULL) order by id; +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 @@ -1791,7 +1847,7 @@ 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 = 114 OR select_id IS NULL order by id; +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 @@ -1805,7 +1861,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 114 OR select_id IS NULL) order by id; +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 @@ -1820,7 +1876,7 @@ 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 = 113 OR select_id IS NULL order by id; +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 @@ -1832,7 +1888,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 113 OR select_id IS NULL) order by id; +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 @@ -1846,7 +1902,7 @@ 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 = 112 OR select_id IS NULL order by id; +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 @@ -1858,7 +1914,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 112 OR select_id IS NULL) order by id; +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 @@ -1872,7 +1928,7 @@ 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 = 111 OR select_id IS NULL order by id; +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 @@ -1884,7 +1940,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 111 OR select_id IS NULL) order by id; +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 @@ -1898,7 +1954,7 @@ 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 = 110 OR select_id IS NULL order by id; +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 @@ -1910,7 +1966,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 110 OR select_id IS NULL) order by id; +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 @@ -1924,7 +1980,7 @@ 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 = 109 OR select_id IS NULL order by id; +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 @@ -1936,7 +1992,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 109 OR select_id IS NULL) order by id; +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 @@ -1950,7 +2006,7 @@ 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 = 108 OR select_id IS NULL order by id; +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.7976931348623e+308 2 @@ -1962,7 +2018,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 108 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 @@ -1976,7 +2032,7 @@ 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 = 107 OR select_id IS NULL order by id; +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 @@ -1988,7 +2044,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 107 OR select_id IS NULL) order by id; +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 @@ -2002,7 +2058,7 @@ 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 = 106 OR select_id IS NULL order by id; +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 @@ -2014,7 +2070,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 106 OR select_id IS NULL) order by id; +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 @@ -2028,7 +2084,7 @@ 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 = 105 OR select_id IS NULL order by id; +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 @@ -2040,7 +2096,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 105 OR select_id IS NULL) order by id; +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 @@ -2054,7 +2110,7 @@ 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 = 104 OR select_id IS NULL order by id; +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 @@ -2071,7 +2127,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 104 OR select_id IS NULL) order by id; +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 @@ -2090,7 +2146,7 @@ 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 = 103 OR select_id IS NULL order by id; +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 @@ -2102,7 +2158,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 103 OR select_id IS NULL) order by id; +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 @@ -2116,7 +2172,7 @@ 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 = 102 OR select_id IS NULL order by id; +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 @@ -2131,7 +2187,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 102 OR select_id IS NULL) order by id; +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 @@ -2148,7 +2204,7 @@ 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 = 101 OR select_id IS NULL order by id; +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 @@ -2160,7 +2216,7 @@ 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 = 101 OR select_id IS NULL) order by id; +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 @@ -2174,7 +2230,7 @@ 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 = 100 OR select_id IS NULL order by id; +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 @@ -2186,7 +2242,7 @@ 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 = 100 OR select_id IS NULL) order by id; +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 @@ -2200,7 +2256,7 @@ 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 = 99 OR select_id IS NULL order by id; +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 @@ -2212,7 +2268,7 @@ 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 = 99 OR select_id IS NULL) order by id; +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 @@ -2226,7 +2282,7 @@ 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 = 98 OR select_id IS NULL order by id; +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 @@ -2238,7 +2294,7 @@ 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 = 98 OR select_id IS NULL) order by id; +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 @@ -2252,7 +2308,7 @@ 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 = 97 OR select_id IS NULL order by id; +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 @@ -2264,7 +2320,7 @@ 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 = 97 OR select_id IS NULL) order by id; +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 @@ -2278,7 +2334,7 @@ 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 = 96 OR select_id IS NULL order by id; +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 @@ -2290,7 +2346,7 @@ 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 = 96 OR select_id IS NULL) order by id; +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 @@ -2304,7 +2360,7 @@ 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 = 95 OR select_id IS NULL order by id; +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 @@ -2316,7 +2372,7 @@ 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 = 95 OR select_id IS NULL) order by id; +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 @@ -2330,7 +2386,7 @@ 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 = 94 OR select_id IS NULL order by id; +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 @@ -2342,7 +2398,7 @@ 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 = 94 OR select_id IS NULL) order by id; +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 @@ -2356,7 +2412,7 @@ 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 = 93 OR select_id IS NULL order by id; +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 @@ -2368,7 +2424,7 @@ 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 = 93 OR select_id IS NULL) order by id; +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 @@ -2382,7 +2438,7 @@ 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 = 92 OR select_id IS NULL order by id; +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 @@ -2394,7 +2450,7 @@ 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 = 92 OR select_id IS NULL) order by id; +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 @@ -2408,7 +2464,7 @@ 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 = 91 OR select_id IS NULL order by id; +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 @@ -2420,7 +2476,7 @@ 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 = 91 OR select_id IS NULL) order by id; +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 @@ -2434,7 +2490,7 @@ 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 = 90 OR select_id IS NULL order by id; +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 @@ -2446,7 +2502,7 @@ 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 = 90 OR select_id IS NULL) order by id; +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 @@ -2460,7 +2516,7 @@ 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 = 89 OR select_id IS NULL order by id; +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 @@ -2472,7 +2528,7 @@ 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 = 89 OR select_id IS NULL) order by id; +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 @@ -2482,6 +2538,38 @@ NULL NULL 1 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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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), diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc.result b/mysql-test/suite/funcs_1/r/myisam_storedproc.result index b52f0dbbbf0..629f275dd4a 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc.result @@ -1,29 +1,4 @@ -. -. IMPORTANT NOTICE: -. ----------------- -. -. FIXME: The .result files are still NOT CHECKED for correctness! -. -. FIXME: Several tests are affected by known problems around DECIMAL -. FIXME: and NUMERIC that will be checked again after WL#2984 once -. FIXME: has been completed. Some of them are marked in the result. -. -. Currently (Dec 06, 2005) this .result file is checked OK for Linux -. with 5.0.17-bk (ChangeSet@1.1975.1.2, 2005-12-05 18:33:48+01:00). -. Using the available Windows version 5.0.16 there are differences -. that can be ignored (e.g. WL#2984). -. --------------------------------------------------------------------------------- - FIXME: There are subtests that are switched off due to known bugs: - ------------------------------------------------------------------ -WL#2984: DECIMAL and NUMERIC problems with differences on some machines -0 - -There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- SET @@global.max_heap_table_size=4294967295; @@ -94,23 +69,24 @@ CREATE PROCEDURE -------------------------------------------------------------------------------- USE db_storedproc; DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) ) SELECT * from t1 where f2 = f1; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa'); -f1 f2 f3 f4 f5 f6 +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 tinytext ) language sql deterministic sql security definer comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1, @v1; END// +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); -@v1 @v1 -abc abc +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 binary ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -119,12 +95,12 @@ SELECT @v1; END// CALL sp1( 34 ); @v1 -34 +3 +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 blob ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -135,10 +111,8 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 int ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -149,25 +123,27 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: SP definition accepted with m>60 in DECIMAL(m,n) CREATE PROCEDURE sp1( f1 decimal(256, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 256 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(66, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 66 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(60, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -175,101 +151,1123 @@ SELECT @v1; END// CALL sp1( 17976931340000 ); @v1 -17976931340000 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.797693134e+13 ); +@v1 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.7976931348623157493578e+308 ); +ERROR 22007: Illegal double '1.7976931348623157493578e+308' value found during parsing +CALL sp1( 0.1234567890987654321e+100 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-100 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+99 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-99 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+98 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-98 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+97 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-97 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+96 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-96 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+95 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-95 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+94 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-94 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+93 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-93 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+92 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-92 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+91 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-91 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+90 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-90 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+89 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-89 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+88 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-88 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+87 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-87 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+86 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-86 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+85 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-85 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+84 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-84 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+83 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-83 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+82 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-82 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+81 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-81 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+80 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-80 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+79 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-79 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+78 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-78 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+77 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-77 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+76 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-76 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+75 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-75 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+74 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-74 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+73 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-73 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+72 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-72 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+71 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-71 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+70 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-70 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+69 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-69 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+68 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-68 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+67 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-67 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+66 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-66 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+65 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-65 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+64 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-64 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+63 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-63 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+62 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-62 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+61 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-61 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+60 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-60 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+59 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-59 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+58 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-58 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+57 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-57 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+56 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-56 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+55 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-55 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+54 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-54 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+53 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-53 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+52 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-52 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+51 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-51 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+50 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-50 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+49 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-49 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+48 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-48 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+47 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-47 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+46 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-46 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+45 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-45 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+44 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-44 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+43 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-43 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+42 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-42 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+41 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-41 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+40 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-40 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+39 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-39 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+38 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-38 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+37 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-37 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+36 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-36 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+35 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-35 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+34 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-34 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+33 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-33 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+32 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-32 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+31 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-31 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+30 ); +@v1 +123456789098765400000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-30 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+29 ); +@v1 +12345678909876540000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-29 ); +@v1 +0.000000000000000000000000000001 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+28 ); +@v1 +1234567890987654000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-28 ); +@v1 +0.000000000000000000000000000012 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+27 ); +@v1 +123456789098765400000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-27 ); +@v1 +0.000000000000000000000000000123 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+26 ); +@v1 +12345678909876540000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-26 ); +@v1 +0.000000000000000000000000001235 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+25 ); +@v1 +1234567890987654000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-25 ); +@v1 +0.000000000000000000000000012346 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+24 ); +@v1 +123456789098765400000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-24 ); +@v1 +0.000000000000000000000000123457 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+23 ); +@v1 +12345678909876540000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-23 ); +@v1 +0.000000000000000000000001234568 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+22 ); +@v1 +1234567890987654000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-22 ); +@v1 +0.000000000000000000000012345679 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+21 ); +@v1 +123456789098765400000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-21 ); +@v1 +0.000000000000000000000123456789 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+20 ); +@v1 +12345678909876540000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-20 ); +@v1 +0.000000000000000000001234567891 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+19 ); +@v1 +1234567890987654000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-19 ); +@v1 +0.000000000000000000012345678910 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+18 ); +@v1 +123456789098765400.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-18 ); +@v1 +0.000000000000000000123456789099 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+17 ); +@v1 +12345678909876540.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-17 ); +@v1 +0.000000000000000001234567890988 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+16 ); +@v1 +1234567890987654.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-16 ); +@v1 +0.000000000000000012345678909877 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+15 ); +@v1 +123456789098765.400000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-15 ); +@v1 +0.000000000000000123456789098765 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+14 ); +@v1 +12345678909876.540000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-14 ); +@v1 +0.000000000000001234567890987654 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+13 ); +@v1 +1234567890987.654000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-13 ); +@v1 +0.000000000000012345678909876540 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+12 ); +@v1 +123456789098.765400000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-12 ); +@v1 +0.000000000000123456789098765400 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+11 ); +@v1 +12345678909.876540000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-11 ); +@v1 +0.000000000001234567890987654000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+10 ); +@v1 +1234567890.987654000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-10 ); +@v1 +0.000000000012345678909876540000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+9 ); +@v1 +123456789.098765400000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-9 ); +@v1 +0.000000000123456789098765400000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+8 ); +@v1 +12345678.909876540000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-8 ); +@v1 +0.000000001234567890987654000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+7 ); +@v1 +1234567.890987654000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-7 ); +@v1 +0.000000012345678909876540000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+6 ); +@v1 +123456.789098765400000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-6 ); +@v1 +0.000000123456789098765400000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+5 ); +@v1 +12345.678909876540000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-5 ); +@v1 +0.000001234567890987654000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+4 ); +@v1 +1234.567890987654000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-4 ); +@v1 +0.000012345678909876550000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+3 ); +@v1 +123.456789098765400000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-3 ); +@v1 +0.000123456789098765400000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+2 ); +@v1 +12.345678909876540000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-2 ); +@v1 +0.001234567890987654000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+1 ); +@v1 +1.234567890987654000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-1 ); +@v1 +0.012345678909876540000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 set("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET CALL sp1( "value1, value1" ); f1 -value1, value1 +value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) language sql SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) not deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security definer SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security invoker SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) comment 'this is simple' SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long DROP PROCEDURE sp1; Testcase 4.1.2: @@ -294,8 +1292,8 @@ SELECT fn1( ' world'); fn1( ' world') hello world SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -306,8 +1304,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 decimal(63, 31) ) returns decimal(63, 31) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -326,34 +1324,34 @@ SELECT fn1( 1.3326e+8 ); fn1( 1.3326e+8 ) 134260000.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 enum("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SELECT fn1( "value1" ); fn1( "value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 set("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET SELECT fn1( "value1, value1" ); fn1( "value1, value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1, value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql BEGIN @@ -364,8 +1362,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint deterministic BEGIN @@ -376,8 +1374,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint not deterministic BEGIN @@ -388,8 +1386,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security definer @@ -401,8 +1399,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security invoker @@ -414,8 +1412,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint comment 'this is simple' @@ -427,8 +1425,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.1.3: @@ -440,9 +1438,9 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1 (f1 char(20) ) SELECT * from t1 where f2 = f1; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`(f1 char(20) ) -SELECT * from t1 where f2 = f1 +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(f1 char(20) ) +SELECT * from t1 where f2 = f1 latin1 modified created DROP PROCEDURE sp1; Testcase 4.1.4: @@ -453,9 +1451,9 @@ DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1 (s char(20)) returns char(50) return concat('hello, ', s, '!'); show CREATE FUNCTION fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(s char(20)) RETURNS char(50) -return concat('hello, ', s, '!') +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(s char(20)) RETURNS char(50) CHARSET latin1 +return concat('hello, ', s, '!') latin1 modified created DROP FUNCTION fn1; Testcase 4.1.5: @@ -465,8 +1463,8 @@ SHOW PROCEDURE status CREATE PROCEDURE sp5() SELECT * from t1; SHOW PROCEDURE status like 'sp5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp5; Testcase 4.1.6: @@ -479,8 +1477,8 @@ set @b = 0.9 * a; return @b; END// SHOW FUNCTION STATUS LIKE 'fn5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn5 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn5 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn5; Testcase 4.1.7: @@ -498,7 +1496,7 @@ CREATE PROCEDURE sp7b (a char (20), out b char(20)) SELECT f1 into b from t1 where t1.f2= a; CALL sp7b('xyz', @out_param); Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed SELECT @out_param; @out_param NULL @@ -510,9 +1508,6 @@ SELECT f2 into c from t1 where t1.f2=999; END// set @c=1; CALL sp7c('xyz', @out_param, @c); -Warnings: -Warning 1329 No data to FETCH -Warning 1329 No data to FETCH SELECT @out_param; @out_param NULL @@ -539,48 +1534,48 @@ Testcase 4.1.9: drop procedure -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.10: ---------------- DROP FUNCTION -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.11: ---------------- @@ -604,6 +1599,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK); user_1@localhost db_storedproc CALL sp11(); +USE db_storedproc; root@localhost db_storedproc alter procedure sp11 sql security invoker; @@ -612,6 +1608,7 @@ security_type INVOKER user_1@localhost db_storedproc +USE db_storedproc; CALL sp11(); ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1' commit work; @@ -705,6 +1702,10 @@ SELECT * from t1 where f2 = f1' at line 1 CREATE PROCEDURE function() SELECT * from t1 where f2=f1; DROP PROCEDURE function; +CREATE PROCEDURE accessible() +SELECT * from t1 where f2=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 'accessible() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE add() SELECT * from t1 where f2=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() @@ -765,9 +1766,9 @@ CREATE PROCEDURE by() SELECT * from t1 where f2=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 'by() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE CALL() +CREATE PROCEDURE call() SELECT * from t1 where f2=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 'CALL() +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call() SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE cascade() SELECT * from t1 where f2=f1; @@ -801,17 +1802,10 @@ CREATE PROCEDURE column() SELECT * from t1 where f2=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 'column() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE columns() -SELECT * from t1 where f2=f1; -DROP PROCEDURE columns; CREATE PROCEDURE condition() SELECT * from t1 where f2=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 'condition() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE connection() -SELECT * from t1 where f2=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 'connection() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE constraint() SELECT * from t1 where f2=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 'constraint() @@ -995,9 +1989,6 @@ CREATE PROCEDURE foreign() SELECT * from t1 where f2=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 'foreign() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE found() -SELECT * from t1 where f2=f1; -DROP PROCEDURE found; CREATE PROCEDURE from() SELECT * from t1 where f2=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 'from() @@ -1006,9 +1997,6 @@ CREATE PROCEDURE fulltext() SELECT * from t1 where f2=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 'fulltext() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE goto() -SELECT * from t1 where f2=f1; -DROP PROCEDURE goto; CREATE PROCEDURE grant() SELECT * from t1 where f2=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 'grant() @@ -1077,6 +2065,26 @@ CREATE PROCEDURE int() SELECT * from t1 where f2=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 'int() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int1() +SELECT * from t1 where f2=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 'int1() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int2() +SELECT * from t1 where f2=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 'int2() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int3() +SELECT * from t1 where f2=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 'int3() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int4() +SELECT * from t1 where f2=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 'int4() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int8() +SELECT * from t1 where f2=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 'int8() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE integer() SELECT * from t1 where f2=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 'integer() @@ -1133,6 +2141,10 @@ CREATE PROCEDURE limit() SELECT * from t1 where f2=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 'limit() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE linear() +SELECT * from t1 where f2=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 'linear() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE lines() SELECT * from t1 where f2=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 'lines() @@ -1173,6 +2185,10 @@ CREATE PROCEDURE low_priority() SELECT * from t1 where f2=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 'low_priority() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE master_ssl_verify_server_cert() +SELECT * from t1 where f2=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 'master_ssl_verify_server_cert() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE match() SELECT * from t1 where f2=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 'match() @@ -1273,9 +2289,6 @@ CREATE PROCEDURE primary() SELECT * from t1 where f2=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 'primary() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE privileges() -SELECT * from t1 where f2=f1; -DROP PROCEDURE privileges; CREATE PROCEDURE procedure() SELECT * from t1 where f2=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 'procedure() @@ -1284,6 +2297,10 @@ CREATE PROCEDURE purge() SELECT * from t1 where f2=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 'purge() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE range() +SELECT * from t1 where f2=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 'range() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE read() SELECT * from t1 where f2=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 'read() @@ -1304,6 +2321,10 @@ CREATE PROCEDURE regexp() SELECT * from t1 where f2=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 'regexp() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE release() +SELECT * from t1 where f2=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 'release() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE rename() SELECT * from t1 where f2=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 'rename() @@ -1376,10 +2397,6 @@ CREATE PROCEDURE smallint() SELECT * from t1 where f2=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 'smallint() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE soname() -SELECT * from t1 where f2=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 'soname() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE spatial() SELECT * from t1 where f2=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 'spatial() @@ -1432,9 +2449,6 @@ CREATE PROCEDURE table() SELECT * from t1 where f2=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 'table() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE tables() -SELECT * from t1 where f2=f1; -DROP PROCEDURE tables; CREATE PROCEDURE terminated() SELECT * from t1 where f2=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 'terminated() @@ -1725,6 +2739,26 @@ CREATE FUNCTION int(f1 int) returns int return 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 'int(f1 int) returns int return f1' at line 1 +CREATE FUNCTION int1(f1 int1) returns int1 +return 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 'int1(f1 int1) returns int1 +return f1' at line 1 +CREATE FUNCTION int2(f1 int2) returns int2 +return 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 'int2(f1 int2) returns int2 +return f1' at line 1 +CREATE FUNCTION int3(f1 int3) returns int3 +return 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 'int3(f1 int3) returns int3 +return f1' at line 1 +CREATE FUNCTION int4(f1 int4) returns int4 +return 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 'int4(f1 int4) returns int4 +return f1' at line 1 +CREATE FUNCTION int8(f1 int8) returns int8 +return 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 'int8(f1 int8) returns int8 +return f1' at line 1 CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned return 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 'int unsigned(f1 int unsigned) returns int unsigned @@ -1846,485 +2880,291 @@ return f' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char f1 ) returns char +CREATE FUNCTION fn1(f1 char ) returns char return 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 'char f1 ) returns char -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary f1 ) returns char binary +CREATE FUNCTION fn1(f1 char binary ) returns char binary return 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 'char binary f1 ) returns char binary -return f1' at line 1 +ERROR 42000: This version of MySQL doesn't yet support 'return value collation' DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii f1 ) returns char ascii +CREATE FUNCTION fn1(f1 char ascii ) returns char ascii return 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 'char ascii f1 ) returns char ascii -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char not null f1 ) returns char not null +CREATE FUNCTION fn1(f1 char not null ) returns char not null return 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 'char not null f1 ) returns char not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary not null f1 ) returns char binary not null +CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null return 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 'char binary not null f1 ) returns char binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii not null f1 ) returns char ascii not null +CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null return 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 'char ascii not null f1 ) returns char ascii not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char ascii not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext f1 ) returns tinytext +CREATE FUNCTION fn1(f1 tinytext ) returns tinytext return 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 'tinytext f1 ) returns tinytext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text f1 ) returns text +CREATE FUNCTION fn1(f1 text ) returns text return 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 'f1 ) returns text -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext f1 ) returns mediumtext +CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext return 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 'mediumtext f1 ) returns mediumtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext f1 ) returns longtext +CREATE FUNCTION fn1(f1 longtext ) returns longtext return 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 'longtext f1 ) returns longtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext not null f1 ) returns tinytext not null +CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null return 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 'tinytext not null f1 ) returns tinytext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinytext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text not null f1 ) returns text not null +CREATE FUNCTION fn1(f1 text not null ) returns text not null return 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 'not null f1 ) returns text not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns text not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext not null f1 ) returns mediumtext not null +CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null return 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 'mediumtext not null f1 ) returns mediumtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext not null f1 ) returns longtext not null +CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null return 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 'longtext not null f1 ) returns longtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob f1 ) returns tinyblob +CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob return 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 'tinyblob f1 ) returns tinyblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob f1 ) returns blob +CREATE FUNCTION fn1(f1 blob ) returns blob return 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 'blob f1 ) returns blob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob f1 ) returns mediumblob +CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob return 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 'mediumblob f1 ) returns mediumblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob f1 ) returns longblob +CREATE FUNCTION fn1(f1 longblob ) returns longblob return 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 'longblob f1 ) returns longblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob not null f1 ) returns tinyblob not null +CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null return 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 'tinyblob not null f1 ) returns tinyblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinyblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob not null f1 ) returns blob not null +CREATE FUNCTION fn1(f1 blob not null ) returns blob not null return 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 'blob not null f1 ) returns blob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns blob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob not null f1 ) returns mediumblob not null +CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null return 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 'mediumblob not null f1 ) returns mediumblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob not null f1 ) returns longblob not null +CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null return 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 'longblob not null f1 ) returns longblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary f1 ) returns binary +CREATE FUNCTION fn1(f1 binary ) returns binary return 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 'binary f1 ) returns binary -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary not null f1 ) returns binary not null +CREATE FUNCTION fn1(f1 binary not null ) returns binary not null return 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 'binary not null f1 ) returns binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint f1 ) returns tinyint +CREATE FUNCTION fn1(f1 tinyint ) returns tinyint return 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 'tinyint f1 ) returns tinyint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned f1 ) returns tinyint unsigned +CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned return 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 'tinyint unsigned f1 ) returns tinyint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint zerofill f1 ) returns tinyint zerofill +CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill return 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 'tinyint zerofill f1 ) returns tinyint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill +CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill return 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 'tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint f1 ) returns smallint +CREATE FUNCTION fn1(f1 smallint ) returns smallint return 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 'smallint f1 ) returns smallint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned f1 ) returns smallint unsigned +CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned return 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 'smallint unsigned f1 ) returns smallint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint zerofill f1 ) returns smallint zerofill +CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill return 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 'smallint zerofill f1 ) returns smallint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned zerofill f1 ) returns smallint unsigned zerofill +CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill return 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 'smallint unsigned zerofill f1 ) returns smallint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint f1 ) returns mediumint +CREATE FUNCTION fn1(f1 mediumint ) returns mediumint return 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 'mediumint f1 ) returns mediumint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned f1 ) returns mediumint unsigned +CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned return 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 'mediumint unsigned f1 ) returns mediumint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint zerofill f1 ) returns mediumint zerofill +CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill return 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 'mediumint zerofill f1 ) returns mediumint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill +CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill return 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 'mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int f1 ) returns int +CREATE FUNCTION fn1(f1 int ) returns int return 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 'int f1 ) returns int -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned f1 ) returns int unsigned +CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned return 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 'int unsigned f1 ) returns int unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int zerofill f1 ) returns int zerofill +CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned return 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 'int zerofill f1 ) returns int zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned zerofill f1 ) returns int unsigned zerofill +CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned return 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 'int unsigned zerofill f1 ) returns int unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint f1 ) returns bigint +CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned return 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 'bigint f1 ) returns bigint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned f1 ) returns bigint unsigned +CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned return 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 'bigint unsigned f1 ) returns bigint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint zerofill f1 ) returns bigint zerofill +CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned return 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 'bigint zerofill f1 ) returns bigint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned zerofill f1 ) returns bigint unsigned zerofill +CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill return 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 'bigint unsigned zerofill f1 ) returns bigint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal f1 ) returns decimal +CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill return 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 'decimal f1 ) returns decimal -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned f1 ) returns decimal unsigned +CREATE FUNCTION fn1(f1 bigint ) returns bigint return 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 'decimal unsigned f1 ) returns decimal unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal zerofill f1 ) returns decimal zerofill +CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned return 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 'decimal zerofill f1 ) returns decimal zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned zerofill f1 ) returns decimal unsigned zerofill +CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill return 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 'decimal unsigned zerofill f1 ) returns decimal unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric f1 ) returns numeric +CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill return 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 'numeric f1 ) returns numeric -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned f1 ) returns numeric unsigned +CREATE FUNCTION fn1(f1 decimal ) returns decimal return 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 'numeric unsigned f1 ) returns numeric unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric zerofill f1 ) returns numeric zerofill +CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned return 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 'numeric zerofill f1 ) returns numeric zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned zerofill f1 ) returns numeric unsigned zerofill +CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill return 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 'numeric unsigned zerofill f1 ) returns numeric unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real f1 ) returns real +CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill return 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 'real f1 ) returns real -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned f1 ) returns real unsigned +CREATE FUNCTION fn1(f1 numeric ) returns numeric return 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 'real unsigned f1 ) returns real unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real zerofill f1 ) returns real zerofill +CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned return 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 'real zerofill f1 ) returns real zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned zerofill f1 ) returns real unsigned zerofill +CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill return 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 'real unsigned zerofill f1 ) returns real unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float f1 ) returns float +CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill return 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 'float f1 ) returns float -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned f1 ) returns float unsigned +CREATE FUNCTION fn1(f1 real ) returns real return 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 'float unsigned f1 ) returns float unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float zerofill f1 ) returns float zerofill +CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned return 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 'float zerofill f1 ) returns float zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned zerofill f1 ) returns float unsigned zerofill +CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill return 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 'float unsigned zerofill f1 ) returns float unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(date f1 ) returns date +CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill return 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 'f1 ) returns date -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(time f1 ) returns time +CREATE FUNCTION fn1(f1 float ) returns float return 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 'f1 ) returns time -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(datetime f1 ) returns datetime +CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned return 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 'f1 ) returns datetime -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(timestamp f1 ) returns timestamp +CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill return 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 'f1 ) returns timestamp -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year f1 ) returns year +CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill return 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 'f1 ) returns year -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(3) f1 ) returns year(3) +CREATE FUNCTION fn1(f1 date ) returns date +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 time ) returns time +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 datetime ) returns datetime +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 timestamp ) returns timestamp +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year ) returns year +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3) return 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 '(3) f1 ) returns year(3) +ERROR 42000: You 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 3) ) returns year(3) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(4) f1 ) returns year(4) +CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4) return 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 '(4) f1 ) returns year(4) +ERROR 42000: You 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 4) ) returns year(4) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(enum("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum") return 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 '("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +ERROR 42000: You 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 "1enum", "2enum") ) returns enum("1enum", "2enum") return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(set("1set", "2set") f1 ) returns set("1set", "2set") +CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set") return 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 'set("1set", "2set") f1 ) returns set("1set", "2set") +ERROR 42000: You 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 "1set", "2set") ) returns set("1set", "2set") return f1' at line 1 Testcase 4.1.16: @@ -2564,15 +3404,15 @@ alter function sp1 sql security invoker comment 'this is a function'; alter procedure sp1 sql security definer; alter function sp1 sql security definer; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() COMMENT 'this is a procedure' -set @x= 3 +set @x= 3 latin1 modified created show CREATE FUNCTION sp1; -Function sql_mode Create Function -sp1 CREATE FUNCTION `sp1`() RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` FUNCTION `sp1`() RETURNS int(11) COMMENT 'this is a function' -return 4 +return 4 latin1 modified created USE db_storedproc; DROP DATABASE db_storedproc_3122; DROP FUNCTION db_storedproc.sp1; @@ -2789,7 +3629,7 @@ SELECT count(*) into cnt from t2; set @count = cnt; SELECT @count; 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 'SELECT count(*) into cnt from t2; +ERROR 42000: You 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 @count = cnt; SELECT @count; END' at line 2 @@ -2841,6 +3681,14 @@ Testcase ....: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +accessible:BEGIN +SELECT @x; +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 'accessible:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() add:BEGIN SELECT @x; END// @@ -2860,9 +3708,7 @@ CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; 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 ':BEGIN -SELECT @x; -END' at line 2 +ERROR 0A000: ALTER VIEW is not allowed in stored procedures DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() analyze:BEGIN @@ -2961,7 +3807,7 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -CALL:BEGIN +call:BEGIN SELECT @x; 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 ':BEGIN @@ -3033,11 +3879,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -columns:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() condition:BEGIN SELECT @x; END// @@ -3046,14 +3887,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -connection:BEGIN -SELECT @x; -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 'connection:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() constraint:BEGIN SELECT @x; END// @@ -3382,11 +4215,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -fields:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() float:BEGIN SELECT @x; END// @@ -3395,6 +4223,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +float4:BEGIN +SELECT @x; +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 'float4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +float8:BEGIN +SELECT @x; +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 'float8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() for:BEGIN SELECT @x; END// @@ -3419,11 +4263,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -found:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() from:BEGIN SELECT @x; END// @@ -3440,11 +4279,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -goto:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() grant:BEGIN SELECT @x; END// @@ -3581,6 +4415,46 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +int1:BEGIN +SELECT @x; +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 'int1:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int2:BEGIN +SELECT @x; +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 'int2:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int3:BEGIN +SELECT @x; +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 'int3:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int4:BEGIN +SELECT @x; +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 'int4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int8:BEGIN +SELECT @x; +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 'int8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() integer:BEGIN SELECT @x; END// @@ -3693,6 +4567,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +linear:BEGIN +SELECT @x; +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 'linear:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() lines:BEGIN SELECT @x; END// @@ -3773,6 +4655,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +master_ssl_verify_server_cert:BEGIN +SELECT @x; +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 'master_ssl_verify_server_cert:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() match:BEGIN SELECT @x; END// @@ -3973,11 +4863,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -privileges:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() procedure:BEGIN SELECT @x; END// @@ -3994,6 +4879,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +range:BEGIN +SELECT @x; +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 'range:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() read:BEGIN SELECT @x; END// @@ -4010,6 +4903,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +read_only:BEGIN +SELECT @x; +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 'read_only:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +read_write:BEGIN +SELECT @x; +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 'read_write:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() real:BEGIN SELECT @x; END// @@ -4034,6 +4943,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +release:BEGIN +SELECT @x; +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 ':BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() rename:BEGIN SELECT @x; END// @@ -4178,14 +5095,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -soname:BEGIN -SELECT @x; -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 'soname:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() spatial:BEGIN SELECT @x; END// @@ -4290,11 +5199,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -tables:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() terminated:BEGIN SELECT @x; END// @@ -4587,6 +5491,9 @@ END begin_label// CALL sp1(); @v1 @v2 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 sp1; Testcase 4.2.7: @@ -4621,6 +5528,9 @@ declare y char; SELECT f1, f2 into x, y from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 +Warning 1265 Data truncated for column 'y' at row 1 DROP PROCEDURE sp1; Testcase 4.2.9: @@ -4684,8 +5594,6 @@ Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the declare statement) may only be properly defined -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: DECIMAL(255,255) is not rejected CREATE PROCEDURE sp6( ) BEGIN declare x char default 'a'; @@ -4703,9 +5611,9 @@ fetch cur1 into e; SELECT x, y, z, a, b, c, d, e; close cur1; END// +ERROR 42000: Too big scale 255 specified for column ''. Maximum is 30. CALL sp6(); -x y z a b c d e -a 1 1.1 value1 1200000000000 mediumtext 2005-02-02 12:12:12 a` +ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5828,13 +6736,6 @@ declare continue handler for sqlstate '23000' set @x2 = 1; declare x char; END// ERROR 42000: Variable or condition declaration after cursor or handler declaration -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '23000' set @x2 = 1; -declare x char; -END// -ERROR 42000: Variable or condition declaration after cursor or handler declaration DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5864,6 +6765,15 @@ Ensure that the declare statement can declare multiple variables both separately and all at once from a variable list. (multiple declaration) -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +DECLARE x1 CHAR(100) DEFAULT 'outer'; +BEGIN +DECLARE x1 CHAR(100) DEFAULT x1; +END; +END// +CALL sp1(); +DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z char default null; @@ -5988,7 +6898,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +000 000 000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -5997,7 +6911,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +001 001 001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6024,7 +6938,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000 00000 00000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6033,7 +6951,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00001 00001 00001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6060,7 +6978,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000 00000000 00000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6069,7 +6991,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000001 00000001 00000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6096,7 +7018,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6105,7 +7031,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +0000000001 0000000001 0000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6123,7 +7049,7 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +18446744073709551615 18446744073709551615 18446744073709551615 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6132,7 +7058,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000000000000000 00000000000000000000 00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6141,7 +7071,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000000000000000001 00000000000000000001 00000000000000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6150,18 +7080,24 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +-9999999999 -9999999999 -9999999999 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6170,62 +7106,76 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6252,7 +7202,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6261,7 +7211,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6270,7 +7220,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6279,7 +7229,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6288,7 +7238,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6297,7 +7247,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6333,7 +7283,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -20050202122012 20050202122012 20050202122012 +2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6419,6 +7369,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare accessible char; +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 'accessible char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare add char; 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 'add char; @@ -6524,9 +7481,9 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare CALL char; +declare call char; 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 'CALL char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() @@ -6587,11 +7544,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare columns char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare condition char; 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 'condition char; @@ -6599,13 +7551,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare connection char; -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 'connection char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare constraint char; 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 'constraint char; @@ -6893,11 +7838,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare fields char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare float char; 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 'float char; @@ -6905,6 +7845,20 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare float4 char; +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 'float4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare float8 char; +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 'float8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare for char; 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 'for char; @@ -6926,11 +7880,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare found char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare from char; 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 'from char; @@ -6945,11 +7894,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare goto char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare grant char; 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 'grant char; @@ -7069,6 +8013,41 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare int1 char; +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 'int1 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int2 char; +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 'int2 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int3 char; +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 'int3 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int4 char; +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 'int4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int8 char; +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 'int8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare integer char; 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 'integer char; @@ -7167,6 +8146,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare linear char; +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 'linear char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare lines char; 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 'lines char; @@ -7237,6 +8223,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare master_ssl_verify_server_cert char; +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 'master_ssl_verify_server_cert char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare match char; 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 'match char; @@ -7412,11 +8405,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare privileges char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare procedure char; 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 'procedure char; @@ -7431,6 +8419,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare range char; +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 'range char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare read char; 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 'read char; @@ -7445,6 +8440,18 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare read_only char; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare read_write char; +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 'read_write char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare real char; 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 'real char; @@ -7466,6 +8473,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare release char; +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 'release char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare rename char; 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 'rename char; @@ -7624,15 +8638,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare soname char; -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 'soname char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1() -BEGIN declare spatial char; 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 'spatial char; @@ -7750,11 +8755,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare tables char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare terminated char; 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 'terminated char; @@ -7899,9 +8899,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare USE char; +declare use char; 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 'USE char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8150,6 +9150,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'accessible condition for sqlstate '02000'; +declare exit handler for add set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// @@ -8306,10 +9316,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL condition for sqlstate '02000'; +declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 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 'CALL condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8409,11 +9419,7 @@ BEGIN declare connection condition for sqlstate '02000'; declare exit handler for connection set @var2 = 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 'connection condition for sqlstate '02000'; -declare exit handler for connection s' at line 3 DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN declare constraint condition for sqlstate '02000'; @@ -8829,12 +9835,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields condition for sqlstate '02000'; -declare exit handler for fields set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare float condition for sqlstate '02000'; declare exit handler for float set @var2 = 1; END// @@ -8845,6 +9845,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare for condition for sqlstate '02000'; declare exit handler for for set @var2 = 1; END// @@ -8876,12 +9896,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found condition for sqlstate '02000'; -declare exit handler for found set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare from condition for sqlstate '02000'; declare exit handler for from set @var2 = 1; END// @@ -8902,12 +9916,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto condition for sqlstate '02000'; -declare exit handler for goto set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare grant condition for sqlstate '02000'; declare exit handler for grant set @var2 = 1; END// @@ -9081,6 +10089,56 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer condition for sqlstate '02000'; declare exit handler for integer set @var2 = 1; END// @@ -9223,6 +10281,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines condition for sqlstate '02000'; declare exit handler for lines set @var2 = 1; END// @@ -9323,6 +10391,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handl' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match condition for sqlstate '02000'; declare exit handler for match set @var2 = 1; END// @@ -9578,12 +10656,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare privileges condition for sqlstate '02000'; -declare exit handler for privileges set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare procedure condition for sqlstate '02000'; declare exit handler for procedure set @var2 = 1; END// @@ -9604,6 +10676,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read condition for sqlstate '02000'; declare exit handler for read set @var2 = 1; END// @@ -9624,6 +10706,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int set @var2 = 1; +END' at line 4 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'read_write condition for sqlstate '02000'; +declare exit handler for int set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real condition for sqlstate '02000'; declare exit handler for real set @var2 = 1; END// @@ -9654,6 +10756,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'release condition for sqlstate '02000'; +declare exit handler for int set @var2 =' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename condition for sqlstate '02000'; declare exit handler for rename set @var2 = 1; END// @@ -9774,10 +10886,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT condition for sqlstate '02000'; +declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 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 'SELECT condition for sqlstate '02000'; +ERROR 42000: You 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 condition for sqlstate '02000'; declare exit handler for SELECT set @var2' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -9835,16 +10947,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname condition for sqlstate '02000'; -declare exit handler for soname set @var2 = 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 'soname condition for sqlstate '02000'; -declare exit handler for soname set @var2' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial condition for sqlstate '02000'; declare exit handler for spatial set @var2 = 1; END// @@ -9977,12 +11079,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables condition for sqlstate '02000'; -declare exit handler for tables set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare terminated condition for sqlstate '02000'; declare exit handler for terminated set @var2 = 1; END// @@ -10144,10 +11240,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE condition for sqlstate '02000'; +declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 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 'USE condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; ' at line 3 DROP PROCEDURE IF EXISTS sp1; @@ -10409,6 +11505,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible handler for sqlstate '02000' set @var2 = 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 'accessible handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add handler for sqlstate '02000' set @var2 = 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 'add handler for sqlstate '02000' set @var2 = 1; @@ -10544,9 +11649,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL handler for sqlstate '02000' set @var2 = 1; +declare call handler for sqlstate '02000' set @var2 = 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 'CALL handler for sqlstate '02000' set @var2 = 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 'call handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -10625,15 +11730,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare columns handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare condition handler for sqlstate '02000' set @var2 = 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 'condition handler for sqlstate '02000' set @var2 = 1; @@ -10643,15 +11739,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare connection handler for sqlstate '02000' set @var2 = 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 'connection handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare constraint handler for sqlstate '02000' set @var2 = 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 'constraint handler for sqlstate '02000' set @var2 = 1; @@ -10661,6 +11748,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare continue handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare convert handler for sqlstate '02000' set @var2 = 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 'convert handler for sqlstate '02000' set @var2 = 1; @@ -10976,6 +12068,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare exit handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare explain handler for sqlstate '02000' set @var2 = 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 'explain handler for sqlstate '02000' set @var2 = 1; @@ -11003,18 +12100,27 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields handler for sqlstate '02000' set @var2 = 1; +declare float handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare float handler for sqlstate '02000' set @var2 = 1; +declare float4 handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 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 'float4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 handler for sqlstate '02000' set @var2 = 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 'float8 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11048,15 +12154,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare from handler for sqlstate '02000' set @var2 = 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 'from handler for sqlstate '02000' set @var2 = 1; @@ -11075,15 +12172,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare grant handler for sqlstate '02000' set @var2 = 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 'grant handler for sqlstate '02000' set @var2 = 1; @@ -11237,6 +12325,51 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 handler for sqlstate '02000' set @var2 = 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 'int1 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 handler for sqlstate '02000' set @var2 = 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 'int2 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 handler for sqlstate '02000' set @var2 = 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 'int3 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 handler for sqlstate '02000' set @var2 = 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 'int4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 handler for sqlstate '02000' set @var2 = 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 'int8 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer handler for sqlstate '02000' set @var2 = 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 'integer handler for sqlstate '02000' set @var2 = 1; @@ -11363,6 +12496,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear handler for sqlstate '02000' set @var2 = 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 'linear handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines handler for sqlstate '02000' set @var2 = 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 'lines handler for sqlstate '02000' set @var2 = 1; @@ -11453,6 +12595,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match handler for sqlstate '02000' set @var2 = 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 'match handler for sqlstate '02000' set @var2 = 1; @@ -11705,6 +12856,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range handler for sqlstate '02000' set @var2 = 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 'range handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read handler for sqlstate '02000' set @var2 = 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 'read handler for sqlstate '02000' set @var2 = 1; @@ -11723,6 +12883,24 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write handler for sqlstate '02000' set @var2 = 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 'read_write handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real handler for sqlstate '02000' set @var2 = 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 'real handler for sqlstate '02000' set @var2 = 1; @@ -11750,6 +12928,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release handler for sqlstate '02000' set @var2 = 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 'release handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename handler for sqlstate '02000' set @var2 = 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 'rename handler for sqlstate '02000' set @var2 = 1; @@ -11858,9 +13045,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT handler for sqlstate '02000' set @var2 = 1; +declare select handler for sqlstate '02000' set @var2 = 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 'SELECT handler for sqlstate '02000' set @var2 = 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 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11912,15 +13099,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname handler for sqlstate '02000' set @var2 = 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 'soname handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial handler for sqlstate '02000' set @var2 = 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 'spatial handler for sqlstate '02000' set @var2 = 1; @@ -12038,15 +13216,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare terminated handler for sqlstate '02000' set @var2 = 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 'terminated handler for sqlstate '02000' set @var2 = 1; @@ -12191,9 +13360,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE handler for sqlstate '02000' set @var2 = 1; +declare use handler for sqlstate '02000' set @var2 = 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 'USE handler for sqlstate '02000' set @var2 = 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 'use handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -12384,10 +13553,13 @@ set @v2 = y; END// CALL sp1(); x y @x -NULL abaa 3 +NULL a 3 +Warnings: +Warning 1265 Data truncated for column 'y' at row 3 +Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 -4 a` +4 a DROP PROCEDURE sp1; Testcase 4.2.28: @@ -12454,7 +13626,7 @@ CALL sp1(); @xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12481,9 +13653,11 @@ set xx = 'temp'; set @xx = xx; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'xx' at row 1 SELECT @xx; @xx -temp +t DROP PROCEDURE sp1; Testcase 4.2.31 - b: @@ -12501,7 +13675,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'asd' +Warning 1265 Data truncated for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12527,7 +13701,9 @@ SELECT xx; END// CALL sp1(); xx -asd +0000-00-00 00:00:00 +Warnings: +Warning 1264 Out of range value for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12571,7 +13747,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12602,6 +13778,8 @@ declare x char ascii; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12665,6 +13843,8 @@ declare x binary; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12812,8 +13992,6 @@ declare x decimal; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12821,8 +13999,6 @@ declare x decimal unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12830,8 +14006,6 @@ declare x decimal zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12839,8 +14013,6 @@ declare x decimal unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12848,8 +14020,6 @@ declare x numeric; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12857,8 +14027,6 @@ declare x numeric unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12866,8 +14034,6 @@ declare x numeric zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12875,8 +14041,6 @@ declare x numeric unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -13254,7 +14418,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13279,7 +14443,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13306,7 +14470,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13330,7 +14494,7 @@ open cur1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13358,7 +14522,7 @@ BEGIN open cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13388,7 +14552,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13416,7 +14580,7 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13430,7 +14594,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 10; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13441,7 +14605,7 @@ open cur1; BEGIN declare cur1 cursor for SELECT f1, f2, f3, f4 from t2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13473,7 +14637,7 @@ BEGIN open cur1; close cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13485,7 +14649,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 20; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13514,13 +14678,13 @@ BEGIN declare done int default 0; declare count integer default 20; declare newf2 char(20); -declare newf1 date; +declare newf1 int1; declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2; set @x = newf1; set @y = newf2; @@ -13590,7 +14754,7 @@ BEGIN close cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13643,7 +14807,7 @@ fetch cur1 into newf1, newf2, newf4, newf3; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.65: @@ -13669,7 +14833,7 @@ commit; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.66: @@ -13690,7 +14854,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13719,12 +14883,13 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; -set count = count - 1; -while count <> 0 do +# set count = count - 1; +# while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; -set count = count - 1; -END while; +# set count = count - 1; +# END while; END; +fetch cur1 into newf1, newf2, newf4, newf3; END// CALL sp1(); DROP PROCEDURE sp1; @@ -13756,7 +14921,7 @@ BEGIN set count = 10; BEGIN open cur2; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13765,7 +14930,8 @@ insert into temp1 values(newf1, newf2, newf4, newf3); close cur1; END; BEGIN -while count <> 0 do +set count = 10; +while count > 0 do fetch cur2 into newf21, newf22, newf24, newf23; set count = count - 1; END while; @@ -13774,9 +14940,9 @@ insert into temp2 values(newf21, newf22, newf24, newf23); close cur2; END// CALL sp1(); -SELECT * from temp1; -f1 f2 f3 f4 -agaaaaaaa agaaaaaaa -4993 agaaaaaaa +SELECT count(*) from temp1; +count(*) +1 SELECT * from temp2; f1 f2 f3 f4 NULL NULL NULL NULL @@ -13797,7 +14963,7 @@ CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( middleinitial CHAR, lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 int, -COMMENT TEXT) ENGINE=innodb; +COMMENT TEXT) ENGINE=myisam; INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); CREATE PROCEDURE sp1(a int) @@ -14023,7 +15189,7 @@ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; END case; 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 'when 'delete' then -delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 10 +delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 11 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -14041,8 +15207,9 @@ label2: while count < 10 do BEGIN insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count); -if done=1 then -set count=10; +set count = count + 1; +if count= 10 then +set done=1; END if; END; END while label2; @@ -14056,6 +15223,19 @@ END if; END loop label1; SELECT count, done; END// +CALL sp3('insert'); +count done +10 1 +Warnings: +Warning 1265 Data truncated for column 'name' at row 1 +Warning 1265 Data truncated for column 'name' at row 2 +Warning 1265 Data truncated for column 'name' at row 3 +Warning 1265 Data truncated for column 'name' at row 4 +Warning 1265 Data truncated for column 'name' at row 5 +Warning 1265 Data truncated for column 'name' at row 6 +Warning 1265 Data truncated for column 'name' at row 7 +Warning 1265 Data truncated for column 'name' at row 8 +Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -14330,11 +15510,14 @@ CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; label1: repeat -set count1 = count1; +set count1 = count1-1; until count1 < 0 END repeat label1; SELECT count1; END// +CALL sp6(); +count1 +-1 DROP PROCEDURE sp6; Testcase 4.3.7: @@ -14403,7 +15586,7 @@ do v1 > 0 while set v1 = v1 - 1; END while; 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 'do v1 > 0 while +ERROR 42000: You 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 set v1 = v1 - 1; END while; END' at line 4 @@ -14606,7 +15789,7 @@ until count1 < 3 END repeat label1; 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 'label1; -END' at line 7 +END' at line 8 Testcase 4.3.21: -------------------------------------------------------------------------------- @@ -14789,15 +15972,15 @@ insert into t43 values('abcde', 'a!@#$%^&*('); CREATE PROCEDURE d1.sp4() SELECT * from d1.t43; SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from d1.t43 USE db_storedproc; DROP DATABASE d1; CREATE DATABASE d1; USE d1; create table t44(a char(5), b char(10)); SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; @@ -14839,8 +16022,8 @@ CREATE PROCEDURE sp8 ( n char(20) ) sql security definer comment 'initial' USE d2; alter procedure d1.sp8 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='sp8' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 where t1.f1 = n Testcase 4.4.9: -------------------------------------------------------------------------------- @@ -14856,12 +16039,16 @@ END// USE d2; alter function d1.fn2 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='fn2' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 d1 fn2 FUNCTION fn2 SQL CONTAINS_SQL NO DEFINER n int int(11) BEGIN declare a int; set a = 0.9 * n; return a; -END root@localhost modified created updated +END root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci BEGIN +declare a int; +set a = 0.9 * n; +return a; +END Testcase 4.4.10: -------------------------------------------------------------------------------- @@ -14871,7 +16058,7 @@ SELECT * from t1 where t1.f1 = n; USE d2; DROP PROCEDURE d1.sp9; SELECT * from mysql.proc where specific_name='sp9' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.4.11: -------------------------------------------------------------------------------- @@ -14885,7 +16072,7 @@ END// USE d2; DROP FUNCTION d1.fn3; SELECT * from mysql.proc where specific_name='fn3' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; DROP DATABASE d2; @@ -14893,19 +16080,6 @@ DROP DATABASE d2; Section 3.1.5 - Parameter use checks: Functions with all data types -------------------------------------------------------------------------------- -SELECT 1 as 'bug_dec_num'; -bug_dec_num -1 - -. -FIXME: There are differences with datatypes DECIMAL and NUMERIC if large -FIXME: exponent values are used. The diffs are shown only on some machines like -FIXME: AIX52 and HPUX11. Until this has been solved we use numbers that -FIXME: *should* be equal to the exponent representation but have no exponents -FIXME: and use the specified count of *0*s instead. -FIXME: In the source file these tests are marked with the comment hpux11 -. --------------------------------------------------------------------------------- DROP DATABASE IF EXISTS d1; CREATE DATABASE d1; USE d1; @@ -14926,7 +16100,7 @@ return f1; END// SELECT fn2(1.84e+19); fn2(1.84e+19) -0 +18400000000000000000 DROP FUNCTION IF EXISTS fn3; CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill BEGIN @@ -14945,6 +16119,8 @@ END// SELECT fn4(-9.22e+15); fn4(-9.22e+15) 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn5; CREATE FUNCTION fn5( f1 decimal) returns decimal BEGIN @@ -14972,6 +16148,10 @@ END// SELECT fn7(99999999999); fn7(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill BEGIN @@ -14980,7 +16160,9 @@ return f1; END// SELECT fn8(999999999); fn8(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn9; CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill BEGIN @@ -14989,7 +16171,10 @@ return f1; END// SELECT fn9(-1.00e+09); fn9(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn10; CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0) BEGIN @@ -15008,6 +16193,10 @@ END// SELECT fn11(99999999999); fn11(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill BEGIN @@ -15016,7 +16205,9 @@ return f1; END// SELECT fn12(999999999); fn12(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn13; CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill BEGIN @@ -15025,7 +16216,10 @@ return f1; END// SELECT fn13(-1.00e+09); fn13(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn14; CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30) BEGIN @@ -15061,7 +16255,10 @@ return f1; END// SELECT fn17(-1.00e+21); fn17(-1.00e+21) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn18_d; CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64) BEGIN @@ -15097,7 +16294,10 @@ return f1; END// SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) -0000000000000000000000000000000000000000000000000000000000000001 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned BEGIN @@ -15106,7 +16306,10 @@ return f1; END// SELECT fn22(1.00e+00); fn22(1.00e+00) -1 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill BEGIN @@ -15115,7 +16318,10 @@ return f1; END// SELECT fn23(1.00e+00); fn23(1.00e+00) -0000000001 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill BEGIN @@ -15124,7 +16330,10 @@ return f1; END// SELECT fn24(-1.00e+09); fn24(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn25; CREATE FUNCTION fn25( f1 double) returns double BEGIN @@ -15142,7 +16351,9 @@ return f1; END// SELECT fn26(1.00e+00); fn26(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn27; CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill BEGIN @@ -15151,7 +16362,9 @@ return f1; END// SELECT fn27(1.00e+00); fn27(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn28; CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill BEGIN @@ -15160,7 +16373,9 @@ return f1; END// SELECT fn28(1.00e+00); fn28(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn29; CREATE FUNCTION fn29( f1 float) returns float BEGIN @@ -15178,7 +16393,9 @@ return f1; END// SELECT fn30(1.00e+00); fn30(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn31; CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill BEGIN @@ -15187,7 +16404,9 @@ return f1; END// SELECT fn31(1.00e+00); fn31(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn32; CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill BEGIN @@ -15196,7 +16415,9 @@ return f1; END// SELECT fn32(1.00e+00); fn32(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn33; CREATE FUNCTION fn33( f1 float(0)) returns float(0) BEGIN @@ -15214,7 +16435,9 @@ return f1; END// SELECT fn34(1.00e+00); fn34(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn35; CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill BEGIN @@ -15223,7 +16446,9 @@ return f1; END// SELECT fn35(1.00e+00); fn35(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn36; CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill BEGIN @@ -15232,7 +16457,9 @@ return f1; END// SELECT fn36(1.00e+00); fn36(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn37; CREATE FUNCTION fn37( f1 float(23)) returns float(23) BEGIN @@ -15250,7 +16477,9 @@ return f1; END// SELECT fn38(1.00e+00); fn38(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn39; CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill BEGIN @@ -15259,7 +16488,9 @@ return f1; END// SELECT fn39(1.00e+00); fn39(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn40; CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill BEGIN @@ -15268,7 +16499,9 @@ return f1; END// SELECT fn40(1.00e+00); fn40(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn41; CREATE FUNCTION fn41( f1 float(24)) returns float(24) BEGIN @@ -15286,7 +16519,9 @@ return f1; END// SELECT fn42(1.00e+00); fn42(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn43; CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill BEGIN @@ -15295,7 +16530,9 @@ return f1; END// SELECT fn43(1.00e+00); fn43(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn44; CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill BEGIN @@ -15304,7 +16541,9 @@ return f1; END// SELECT fn44(1.00e+00); fn44(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn45; CREATE FUNCTION fn45( f1 float(53)) returns float(53) BEGIN @@ -15322,7 +16561,9 @@ return f1; END// SELECT fn46(1.00e+00); fn46(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn47; CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill BEGIN @@ -15331,7 +16572,9 @@ return f1; END// SELECT fn47(1.00e+00); fn47(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn48; CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill BEGIN @@ -15340,7 +16583,9 @@ return f1; END// SELECT fn48(1.00e+00); fn48(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn49; CREATE FUNCTION fn49( f1 int) returns int BEGIN @@ -15349,7 +16594,10 @@ return f1; END// SELECT fn49(-2.15e+09); fn49(-2.15e+09) --2147483648 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn50; CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned BEGIN @@ -15385,7 +16633,9 @@ return f1; END// SELECT fn53(-8388600); fn53(-8388600) --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn54; CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned BEGIN @@ -15412,7 +16662,11 @@ return f1; END// SELECT fn56(-8388601); fn56(-8388601) -0 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -15421,7 +16675,9 @@ return f1; END// SELECT fn57(-999999999); fn57(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn58; CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0) BEGIN @@ -15430,7 +16686,9 @@ return f1; END// SELECT fn58(-999999999); fn58(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn59; CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned BEGIN @@ -15440,6 +16698,9 @@ END// SELECT fn59(9999999999); fn59(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill BEGIN @@ -15448,7 +16709,9 @@ return f1; END// SELECT fn60(99999999); fn60(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn61; CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill BEGIN @@ -15457,7 +16720,10 @@ return f1; END// SELECT fn61(-99999999); fn61(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn62; CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0) BEGIN @@ -15466,7 +16732,9 @@ return f1; END// SELECT fn62(-999999999); fn62(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn63; CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned BEGIN @@ -15476,6 +16744,9 @@ END// SELECT fn63(9999999999); fn63(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill BEGIN @@ -15484,7 +16755,9 @@ return f1; END// SELECT fn64(99999999); fn64(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn65; CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill BEGIN @@ -15493,7 +16766,10 @@ return f1; END// SELECT fn65(-99999999); fn65(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn66; CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30) BEGIN @@ -15502,7 +16778,12 @@ return f1; END// SELECT fn66(-1e+36); fn66(-1e+36) --999999999999999999999999999999999.999999999999999999999999999999 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned BEGIN @@ -15512,6 +16793,10 @@ END// SELECT fn67(1e+36); fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill BEGIN @@ -15521,6 +16806,10 @@ END// SELECT fn68(1e+36); fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill BEGIN @@ -15529,7 +16818,10 @@ return f1; END// SELECT fn69(-1e+36); fn69(-1e+36) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn70_n; CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64) BEGIN @@ -15577,7 +16869,9 @@ return f1; END// SELECT fn74(999999999); fn74(999999999) -999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn75; CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill BEGIN @@ -15586,7 +16880,9 @@ return f1; END// SELECT fn75(999999999); fn75(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn76; CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill BEGIN @@ -15595,7 +16891,10 @@ return f1; END// SELECT fn76(-999999999); fn76(-999999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn77; CREATE FUNCTION fn77( f1 real) returns real BEGIN @@ -15613,7 +16912,9 @@ return f1; END// SELECT fn78(1.1); fn78(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn79; CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill BEGIN @@ -15622,7 +16923,9 @@ return f1; END// SELECT fn79(1.1); fn79(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn80; CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill BEGIN @@ -15631,7 +16934,9 @@ return f1; END// SELECT fn80(1.1); fn80(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn81; CREATE FUNCTION fn81( f1 smallint) returns smallint BEGIN @@ -15667,7 +16972,11 @@ return f1; END// SELECT fn84(-32601); fn84(-32601) -0 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -15703,45 +17012,37 @@ return f1; END// SELECT fn88(-101); fn88(-101) -0 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN -if f1 eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; +IF f1 = '1enum' THEN +SET f1 = '2enum'; +ELSE +SET f1 = '1enum'; +END IF; +RETURN f1; 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 'eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; -END' at line 3 SELECT fn89( '1enum'); -ERROR 42000: FUNCTION d1.fn89 does not exist +fn89( '1enum') +2enum DROP FUNCTION IF EXISTS fn90; -CREATE FUNCTION fn90( f1 set("1set", "2set")) returns set("1set", "2set") +CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set') BEGIN -if(f1 == "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; +IF f1 = '1set' THEN +SET f1 = '2set'; +ELSE +SET f1 = '1set'; +END IF; +RETURN f1; 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 '== "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; -END' at line 3 SELECT fn90( '1set'); -ERROR 42000: FUNCTION d1.fn90 does not exist +fn90( '1set') +2set DROP FUNCTION IF EXISTS fn91; CREATE FUNCTION fn91( f1 date) returns date BEGIN @@ -15759,7 +17060,7 @@ return f1; END// SELECT fn92( '23:59:59.999999'); fn92( '23:59:59.999999') -26:00:00 +25:59:59 DROP FUNCTION IF EXISTS fn93; CREATE FUNCTION fn93( f1 datetime) returns datetime BEGIN @@ -15768,7 +17069,7 @@ return f1; END// SELECT fn93('1997-12-31 23:59:59.999999'); fn93('1997-12-31 23:59:59.999999') -1998-01-02 01:01:01 +1998-01-02 01:01:00 DROP FUNCTION IF EXISTS fn94; CREATE FUNCTION fn94( f1 char) returns char BEGIN @@ -15778,6 +17079,8 @@ END// SELECT fn94( 'h'); fn94( 'h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn95; CREATE FUNCTION fn95( f1 char ascii) returns char ascii BEGIN @@ -15787,15 +17090,19 @@ END// SELECT fn95('h'); fn95('h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn96; -CREATE FUNCTION fn96( f1 char binary) returns char binary +CREATE FUNCTION fn96( f1 binary) returns binary(2) BEGIN set f1 = concat('a', f1); return f1; END// SELECT fn96( 'h'); fn96( 'h') -a +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn97; CREATE FUNCTION fn97( f1 longtext) returns longtext BEGIN @@ -15917,7 +17224,7 @@ SELECT f1; END// CALL sp2(1.84e+19); f1 --9223372036854775808 +18400000000000000000 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( f1 bigint unsigned zerofill) BEGIN @@ -15926,7 +17233,7 @@ SELECT f1; END// CALL sp3(1.84e+17); f1 -184000000000000000 +00184000000000000000 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4( f1 bigint zerofill) BEGIN @@ -15935,31 +17242,27 @@ SELECT f1; END// CALL sp4(-9.22e+15); f1 --9220000000000000 +00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5( f1 decimal) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: default (10) for DECIMAL not checked, decimal digits shown although not defined CALL sp5(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( f1 decimal (0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp6(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp7; CREATE PROCEDURE sp7( f1 decimal (0) unsigned) BEGIN @@ -15968,7 +17271,11 @@ SELECT f1; END// CALL sp7(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) BEGIN @@ -15977,199 +17284,201 @@ SELECT f1; END// CALL sp8(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp9; CREATE PROCEDURE sp9( f1 decimal (0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp9(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp10; CREATE PROCEDURE sp10( f1 decimal (0, 0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp10(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp11; CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp11(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp12(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp13; CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp13(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp14; CREATE PROCEDURE sp14( f1 decimal (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp14(-1.00e+21); f1 --1000000000000000000000.000000000 +-1000000000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp15; CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp15(1.00e+16); f1 -10000000000000000.000000000 +10000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp16; CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp16(1.00e+16); f1 -10000000000000000.000000000 +000000000000000010000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp17; CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp17(-1.00e+21); f1 --1000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp18_d; CREATE PROCEDURE sp18_d( f1 decimal (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp18_d(-1.00e+30); +f1 +-1000000000000000000000000000000 CALL sp18_d( -1000000000000000000000000000000 ); f1 --1000000000000000000000000000000.000000000 +-1000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp19_du; CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp19_du(1.00e+20); +f1 +100000000000000000000 CALL sp19_du( 100000000000000000000 ); f1 -100000000000000000000.000000000 +100000000000000000000 +CALL sp19_du(1.00e+24); +f1 +1000000000000000000000000 CALL sp19_du( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +1000000000000000000000000 DROP PROCEDURE IF EXISTS sp20_duz; CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined +CALL sp20_duz(1.00e+20); +f1 +0000000000000000000000000000000000000000000100000000000000000000 CALL sp20_duz( 100000000000000000000 ); f1 -100000000000000000000.000000000 +0000000000000000000000000000000000000000000100000000000000000000 +CALL sp20_duz(1.00e+24); +f1 +0000000000000000000000000000000000000001000000000000000000000000 CALL sp20_duz( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +0000000000000000000000000000000000000001000000000000000000000000 DROP PROCEDURE IF EXISTS sp21; CREATE PROCEDURE sp21( f1 decimal (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp21(1.00e+00); f1 -1.000000000 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp22(1.00e+00); f1 -1.000000000 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp23(1.00e+00); f1 -1.000000000 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp24(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp25; CREATE PROCEDURE sp25( f1 double) BEGIN @@ -16187,7 +17496,9 @@ SELECT f1; END// CALL sp26(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp27; CREATE PROCEDURE sp27( f1 double unsigned zerofill) BEGIN @@ -16196,7 +17507,9 @@ SELECT f1; END// CALL sp27(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp28; CREATE PROCEDURE sp28( f1 double zerofill) BEGIN @@ -16205,7 +17518,9 @@ SELECT f1; END// CALL sp28(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp29; CREATE PROCEDURE sp29( f1 float) BEGIN @@ -16223,7 +17538,9 @@ SELECT f1; END// CALL sp30(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp31; CREATE PROCEDURE sp31( f1 float unsigned zerofill) BEGIN @@ -16232,7 +17549,9 @@ SELECT f1; END// CALL sp31(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp32; CREATE PROCEDURE sp32( f1 float zerofill) BEGIN @@ -16241,7 +17560,9 @@ SELECT f1; END// CALL sp32(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp33; CREATE PROCEDURE sp33( f1 float(0)) BEGIN @@ -16259,7 +17580,9 @@ SELECT f1; END// CALL sp34(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp35; CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill) BEGIN @@ -16268,7 +17591,9 @@ SELECT f1; END// CALL sp35(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp36; CREATE PROCEDURE sp36( f1 float(0) zerofill) BEGIN @@ -16277,7 +17602,9 @@ SELECT f1; END// CALL sp36(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp37; CREATE PROCEDURE sp37( f1 float(23)) BEGIN @@ -16295,7 +17622,9 @@ SELECT f1; END// CALL sp38(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp39; CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill) BEGIN @@ -16304,7 +17633,9 @@ SELECT f1; END// CALL sp39(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp40; CREATE PROCEDURE sp40( f1 float(23) zerofill) BEGIN @@ -16313,7 +17644,9 @@ SELECT f1; END// CALL sp40(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp41; CREATE PROCEDURE sp41( f1 float(24)) BEGIN @@ -16331,7 +17664,9 @@ SELECT f1; END// CALL sp42(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp43; CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill) BEGIN @@ -16340,7 +17675,9 @@ SELECT f1; END// CALL sp43(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp44; CREATE PROCEDURE sp44( f1 float(24) zerofill) BEGIN @@ -16349,7 +17686,9 @@ SELECT f1; END// CALL sp44(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp45; CREATE PROCEDURE sp45( f1 float(53)) BEGIN @@ -16367,7 +17706,9 @@ SELECT f1; END// CALL sp46(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp47; CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill) BEGIN @@ -16376,7 +17717,9 @@ SELECT f1; END// CALL sp47(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp48; CREATE PROCEDURE sp48( f1 float(53) zerofill) BEGIN @@ -16385,7 +17728,9 @@ SELECT f1; END// CALL sp48(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp49; CREATE PROCEDURE sp49( f1 int) BEGIN @@ -16394,7 +17739,10 @@ SELECT f1; END// CALL sp49(-2.15e+09); f1 --2150000000 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp50; CREATE PROCEDURE sp50( f1 int unsigned) BEGIN @@ -16421,7 +17769,7 @@ SELECT f1; END// CALL sp52(2.15e+08); f1 -215000000 +0215000000 DROP PROCEDURE IF EXISTS sp53; CREATE PROCEDURE sp53( f1 mediumint) BEGIN @@ -16430,7 +17778,9 @@ SELECT f1; END// CALL sp53(-8388600); f1 --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp54; CREATE PROCEDURE sp54( f1 mediumint unsigned) BEGIN @@ -16457,7 +17807,11 @@ SELECT f1; END// CALL sp56(-8388601); f1 --8388602 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -16466,7 +17820,9 @@ SELECT f1; END// CALL sp57(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp58; CREATE PROCEDURE sp58( f1 numeric (0)) BEGIN @@ -16475,7 +17831,9 @@ SELECT f1; END// CALL sp58(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp59; CREATE PROCEDURE sp59( f1 numeric (0) unsigned) BEGIN @@ -16484,7 +17842,10 @@ SELECT f1; END// CALL sp59(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) BEGIN @@ -16493,7 +17854,9 @@ SELECT f1; END// CALL sp60(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp61; CREATE PROCEDURE sp61( f1 numeric (0) zerofill) BEGIN @@ -16502,7 +17865,10 @@ SELECT f1; END// CALL sp61(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp62; CREATE PROCEDURE sp62( f1 numeric (0, 0)) BEGIN @@ -16511,7 +17877,9 @@ SELECT f1; END// CALL sp62(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp63; CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned) BEGIN @@ -16520,7 +17888,10 @@ SELECT f1; END// CALL sp63(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) BEGIN @@ -16529,7 +17900,9 @@ SELECT f1; END// CALL sp64(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp65; CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill) BEGIN @@ -16538,79 +17911,146 @@ SELECT f1; END// CALL sp65(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp66_n; CREATE PROCEDURE sp66_n( f1 numeric (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp66_n(-1e+36); +f1 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp67_nu(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp68_nuz(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp69_n_z(-1e+36); +f1 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp69_n_z( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp70_n; CREATE PROCEDURE sp70_n( f1 numeric (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp70_n(-1e+40); +f1 +-10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp70_n( -10000000000000000000000000000000000000000 ); f1 --10000000000000000000000000000000000000000.000000000 +-10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp71_nu; CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp71_nu(1.00e+40); +f1 +10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp71_nu( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp72_nuz; CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp72_nuz(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp72_nuz( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp73_n_z; CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp73_n_z(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp73_n_z( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp74; CREATE PROCEDURE sp74( f1 numeric unsigned) BEGIN @@ -16619,7 +18059,9 @@ SELECT f1; END// CALL sp74(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp75; CREATE PROCEDURE sp75( f1 numeric unsigned zerofill) BEGIN @@ -16628,7 +18070,9 @@ SELECT f1; END// CALL sp75(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp76; CREATE PROCEDURE sp76( f1 numeric zerofill) BEGIN @@ -16637,7 +18081,10 @@ SELECT f1; END// CALL sp76(-999999999); f1 --999999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp77; CREATE PROCEDURE sp77( f1 real) BEGIN @@ -16646,7 +18093,7 @@ SELECT f1; END// CALL sp77(1.1); f1 -1.10000 +1.1 DROP PROCEDURE IF EXISTS sp78; CREATE PROCEDURE sp78( f1 real unsigned) BEGIN @@ -16655,7 +18102,9 @@ SELECT f1; END// CALL sp78(1.1); f1 -1.10000 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp79; CREATE PROCEDURE sp79( f1 real unsigned zerofill) BEGIN @@ -16664,7 +18113,9 @@ SELECT f1; END// CALL sp79(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp80; CREATE PROCEDURE sp80( f1 real zerofill) BEGIN @@ -16673,7 +18124,9 @@ SELECT f1; END// CALL sp80(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp81; CREATE PROCEDURE sp81( f1 smallint) BEGIN @@ -16709,7 +18162,11 @@ SELECT f1; END// CALL sp84(-32601); f1 --32602 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -16745,9 +18202,23 @@ SELECT f1; END// CALL sp88(-101); f1 --102 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; +CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) +BEGIN +IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF; +END// +CALL sp89( '1enum'); DROP PROCEDURE IF EXISTS sp90; +CREATE PROCEDURE sp90( f1 set('1set', '2set')) +BEGIN +IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF; +END// +CALL sp90( '1set'); DROP PROCEDURE IF EXISTS sp91; CREATE PROCEDURE sp91( f1 date) BEGIN @@ -16765,7 +18236,7 @@ SELECT f1; END// CALL sp92( '23:59:59.999999'); f1 -26:00:00.999997 +25:59:59 DROP PROCEDURE IF EXISTS sp93; CREATE PROCEDURE sp93( f1 datetime) BEGIN @@ -16774,7 +18245,7 @@ SELECT f1; END// CALL sp93('1997-12-31 23:59:59.999999'); f1 -1998-01-02 01:01:01.000001 +1998-01-02 01:01:00 DROP PROCEDURE IF EXISTS sp94; CREATE PROCEDURE sp94( f1 char) BEGIN @@ -16783,7 +18254,9 @@ SELECT f1; END// CALL sp94( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp95; CREATE PROCEDURE sp95( f1 char ascii) BEGIN @@ -16792,7 +18265,9 @@ SELECT f1; END// CALL sp95( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp96; CREATE PROCEDURE sp96( f1 char binary) BEGIN @@ -16801,7 +18276,9 @@ SELECT f1; END// CALL sp96( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp97; CREATE PROCEDURE sp97( f1 longtext) BEGIN @@ -16846,7 +18323,7 @@ SELECT f1; END// CALL sp101(51); f1 -61 +2061 DROP PROCEDURE IF EXISTS sp102; CREATE PROCEDURE sp102( f1 year(4)) BEGIN @@ -16901,6 +18378,8 @@ END// CALL sp107(2.00e+13); f1 returned +Warnings: +returned 1265 Data truncated for column 'f1' at row 1 USE db_storedproc; DROP DATABASE db1; DROP DATABASE IF EXISTS db1; @@ -16937,9 +18416,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute01(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 2033 2033 2084 2033 2033 2084 +2061 2061 2071 2061 2061 2071 2033 2033 2084 2033 2033 2084 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 2033 2084 2033 2084 +2061 2071 2061 2071 2033 2084 2033 2084 DROP PROCEDURE spexecute01; DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS sp2; @@ -17010,9 +18489,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute03(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah helloworld helloworld NULL helloworld helloworld hellohelloworld +a a a a a a helloworld helloworld NULL helloworld helloworld hellohelloworld var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah helloworld NULL helloworld hellohelloworld +a a a a helloworld NULL helloworld hellohelloworld DROP PROCEDURE spexecute03; DROP PROCEDURE sp3; DROP PROCEDURE IF EXISTS sp4; @@ -17155,7 +18634,7 @@ SELECT var7, var8; END// CALL spexecute07(); var1 var2 -9223372036854775807 NULL +18400000000000000000 NULL var3 var4 -9220000000000000000 NULL var5 var6 @@ -17163,7 +18642,7 @@ var5 var6 var7 var8 -9220000000000000000 NULL f1 f2 f3 -9223372036854775807 9223372036854775807 NULL +18400000000000000000 18400000000000000000 NULL f4 f5 f6 -9220000000000000000 -9220000000000000000 NULL f7 f8 f9 @@ -17171,7 +18650,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 -9220000000000000000 NULL f1 f2 f3 --2 -2 -2 +18353255926290448384 18353255926290448384 18353255926290448384 f4 f5 f6 -9220000000000000000 6744073709551616 6744073709551616 f7 f8 f9 @@ -17179,7 +18658,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 --2 -2 +18353255926290448384 18353255926290448384 var3 var4 6744073709551616 6744073709551616 var5 var6 @@ -17237,9 +18716,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute08(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -368000000000000000 368000000000000000 368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000000 00368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -368000000000000000 368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute08; DROP PROCEDURE sp8; DROP PROCEDURE IF EXISTS sp9; @@ -17291,9 +18770,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute09(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --18440000000000000 -18440000000000000 -18439999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000000 00000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --18440000000000000 -18439999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute09; DROP PROCEDURE sp9; DROP PROCEDURE IF EXISTS sp10; @@ -17337,9 +18816,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute10(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute10; DROP PROCEDURE sp10; DROP PROCEDURE IF EXISTS sp11; @@ -17372,9 +18851,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute11(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute11; DROP PROCEDURE sp11; DROP PROCEDURE IF EXISTS sp12; @@ -17407,9 +18886,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute12(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999999.000000000 99999999999.000000000 100000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999999.000000000 100000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute12; DROP PROCEDURE sp12; DROP PROCEDURE IF EXISTS sp13; @@ -17442,9 +18921,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute13(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute13; DROP PROCEDURE sp13; DROP PROCEDURE IF EXISTS sp14; @@ -17477,9 +18956,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute14(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute14; DROP PROCEDURE sp14; DROP PROCEDURE IF EXISTS sp15; @@ -17545,9 +19024,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute16(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute16; DROP PROCEDURE sp16; DROP PROCEDURE IF EXISTS sp17; @@ -17579,9 +19058,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute17(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute17; DROP PROCEDURE sp17; DROP PROCEDURE IF EXISTS sp18; @@ -17613,9 +19092,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute18(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute18; DROP PROCEDURE sp18; DROP PROCEDURE IF EXISTS sp19; @@ -17647,9 +19126,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute19(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute19; DROP PROCEDURE sp19; DROP PROCEDURE IF EXISTS sp20; @@ -17681,9 +19160,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute20(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute20; DROP PROCEDURE sp20; DROP PROCEDURE IF EXISTS sp21; @@ -17715,9 +19194,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute21(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute21; DROP PROCEDURE sp21; DROP PROCEDURE IF EXISTS sp22; @@ -17783,9 +19262,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute23(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute23; DROP PROCEDURE sp23; DROP PROCEDURE IF EXISTS sp24; @@ -17817,9 +19296,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute24(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1.1 1.1 11.1 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1.1 11.1 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute24; DROP PROCEDURE sp24; DROP PROCEDURE IF EXISTS sp25; @@ -17851,9 +19330,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute25(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --65402 -65402 -65392 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-32758 -32758 -32748 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --65402 -65392 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-32758 -32748 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute25; DROP PROCEDURE sp25; DROP PROCEDURE IF EXISTS sp26; @@ -17919,9 +19398,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute27(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -26:00:00.999997 26:00:00.999997 28:00:01.999995 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +25:59:59 25:59:59 27:59:59 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -26:00:00.999997 28:00:01.999995 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +25:59:59 27:59:59 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute27; DROP PROCEDURE sp27; DROP PROCEDURE IF EXISTS sp28; @@ -17953,9 +19432,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute28(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1998-01-02 01:01:01.000001 1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-02 01:01:00 1998-01-03 02:02:01 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-03 02:02:01 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute28; DROP PROCEDURE sp28; DROP PROCEDURE IF EXISTS sp29; @@ -17987,9 +19466,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute29(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute29; DROP PROCEDURE sp29; DROP PROCEDURE IF EXISTS sp30; @@ -18021,9 +19500,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute30(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute30; DROP PROCEDURE sp30; DROP PROCEDURE IF EXISTS sp31; @@ -18089,9 +19568,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute32(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute32; DROP PROCEDURE sp32; DROP PROCEDURE IF EXISTS sp33; @@ -18123,9 +19602,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute33(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute33; DROP PROCEDURE sp33; DROP PROCEDURE IF EXISTS sp34; @@ -18191,9 +19670,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute35(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute35; DROP PROCEDURE sp35; DROP PROCEDURE IF EXISTS sp36; @@ -18225,9 +19704,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute36(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute36; DROP PROCEDURE sp36; DROP PROCEDURE IF EXISTS sp37; @@ -18293,9 +19772,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute38(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute38; DROP PROCEDURE sp38; DROP PROCEDURE IF EXISTS sp39; @@ -18327,9 +19806,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute39(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute39; DROP PROCEDURE sp39; DROP PROCEDURE IF EXISTS sp40; @@ -18361,9 +19840,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute40(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute40; DROP PROCEDURE sp40; DROP PROCEDURE IF EXISTS sp41; @@ -18395,9 +19874,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute41(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute41; DROP PROCEDURE sp41; DROP PROCEDURE IF EXISTS sp42; @@ -18429,9 +19908,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute42(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute42; DROP PROCEDURE sp42; DROP PROCEDURE IF EXISTS sp43; @@ -18463,9 +19942,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute43(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute43; DROP PROCEDURE sp43; DROP PROCEDURE IF EXISTS sp44; @@ -18497,9 +19976,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute44(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute44; DROP PROCEDURE sp44; DROP PROCEDURE IF EXISTS sp45; @@ -18531,9 +20010,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute45(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute45; DROP PROCEDURE sp45; DROP PROCEDURE IF EXISTS sp46; @@ -18565,9 +20044,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute46(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute46; DROP PROCEDURE sp46; DROP PROCEDURE IF EXISTS sp47; @@ -18599,9 +20078,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute47(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute47; DROP PROCEDURE sp47; DROP PROCEDURE IF EXISTS sp48; @@ -18633,9 +20112,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute48(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute48; DROP PROCEDURE sp48; DROP PROCEDURE IF EXISTS sp49; @@ -18667,9 +20146,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute49(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute49; DROP PROCEDURE sp49; DROP PROCEDURE IF EXISTS sp50; @@ -18701,9 +20180,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute50(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute50; DROP PROCEDURE sp50; DROP PROCEDURE IF EXISTS sp51; @@ -18735,9 +20214,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute51(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute51; DROP PROCEDURE sp51; DROP PROCEDURE IF EXISTS sp52; @@ -18769,9 +20248,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute52(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000.000000000000000000000000000000 -10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute52; DROP PROCEDURE sp52; DROP PROCEDURE IF EXISTS sp53; @@ -18803,9 +20282,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute53(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute53; DROP PROCEDURE sp53; DROP PROCEDURE IF EXISTS sp54; @@ -18837,9 +20316,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute54(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute54; DROP PROCEDURE sp54; DROP PROCEDURE IF EXISTS sp55; @@ -18871,9 +20350,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute55(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute55; DROP PROCEDURE sp55; DROP PROCEDURE IF EXISTS sp56; @@ -18905,9 +20384,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute56(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 61 61 71 61 61 71 +2061 2061 2071 2061 2061 2071 2061 2061 2071 2061 2061 2071 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 61 71 61 71 +2061 2071 2061 2071 2061 2071 2061 2071 DROP PROCEDURE spexecute56; DROP PROCEDURE sp56; DROP PROCEDURE IF EXISTS sp57; @@ -19041,9 +20520,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute60(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah aah ah ah aah +a a a a a a a a a a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah aah ah aah +a a a a a a a a DROP PROCEDURE spexecute60; DROP PROCEDURE sp60; DROP PROCEDURE IF EXISTS sp61; @@ -19075,9 +20554,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute61(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah NULL ah ah aah +a a a a a a a a NULL a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah NULL ah aah +a a a a a NULL a a DROP PROCEDURE spexecute61; DROP PROCEDURE sp61; DROP PROCEDURE IF EXISTS sp62; @@ -19177,9 +20656,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute64(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 DROP PROCEDURE spexecute64; DROP PROCEDURE sp64; DROP PROCEDURE IF EXISTS sp65; @@ -19211,9 +20690,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute65(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -999999999.000000000 999999999.000000000 1000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -999999999.000000000 1000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute65; DROP PROCEDURE sp65; DROP PROCEDURE IF EXISTS sp66; @@ -19245,9 +20724,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute66(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute66; DROP PROCEDURE sp66; DROP PROCEDURE IF EXISTS sp67; @@ -19279,9 +20758,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute67(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute67; DROP PROCEDURE sp67; DROP PROCEDURE IF EXISTS sp68; @@ -19313,9 +20792,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute68(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute68; DROP PROCEDURE sp68; DROP PROCEDURE IF EXISTS sp69; @@ -19347,9 +20826,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute69(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute69; DROP PROCEDURE sp69; DROP PROCEDURE IF EXISTS sp70; @@ -19381,9 +20860,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute70(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute70; DROP PROCEDURE sp70; DROP PROCEDURE IF EXISTS sp71; @@ -19415,9 +20894,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute71(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute71; DROP PROCEDURE sp71; DROP PROCEDURE IF EXISTS sp72; @@ -19449,9 +20928,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute72(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute72; DROP PROCEDURE sp72; DROP PROCEDURE IF EXISTS sp73; @@ -19483,9 +20962,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute73(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute73; DROP PROCEDURE sp73; DROP PROCEDURE IF EXISTS sp74; @@ -19517,9 +20996,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute74(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute74; DROP PROCEDURE sp74; DROP PROCEDURE IF EXISTS sp75; @@ -19551,9 +21030,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute75(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute75; DROP PROCEDURE sp75; DROP PROCEDURE IF EXISTS sp76; @@ -19585,9 +21064,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute76(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute76; DROP PROCEDURE sp76; DROP PROCEDURE IF EXISTS sp77; @@ -19619,9 +21098,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute77(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute77; DROP PROCEDURE sp77; DROP PROCEDURE IF EXISTS sp78; @@ -19653,9 +21132,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute78(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute78; DROP PROCEDURE sp78; DROP PROCEDURE IF EXISTS sp79; @@ -19687,9 +21166,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute79(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute79; DROP PROCEDURE sp79; DROP PROCEDURE IF EXISTS sp80; @@ -19721,9 +21200,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute80(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --2150000000 -2150000000 -2149999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-2147483638 -2147483638 -2147483628 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --2150000000 -2149999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-2147483638 -2147483628 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute80; DROP PROCEDURE sp80; DROP PROCEDURE IF EXISTS sp81; @@ -19823,9 +21302,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute83(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -215000000 215000000 215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0215000000 0215000000 0215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -215000000 215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0215000000 0215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute83; DROP PROCEDURE sp83; DROP PROCEDURE IF EXISTS sp84; @@ -19857,9 +21336,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute84(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388600 -8388600 -8388590 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-8388598 -8388598 -8388588 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388600 -8388590 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-8388598 -8388588 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute84; DROP PROCEDURE sp84; DROP PROCEDURE IF EXISTS sp85; @@ -19925,9 +21404,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute86(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -16777210 16777210 16777220 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777210 16777210 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -16777210 16777220 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777210 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute86; DROP PROCEDURE sp86; DROP PROCEDURE IF EXISTS sp87; @@ -19959,9 +21438,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute87(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388602 -8388602 -8388592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777215 16777215 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388602 -8388592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777215 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute87; DROP PROCEDURE sp87; DROP PROCEDURE IF EXISTS sp88; @@ -19993,9 +21472,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute88(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute88; DROP PROCEDURE sp88; DROP PROCEDURE IF EXISTS sp89; @@ -20027,9 +21506,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute89(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute89; DROP PROCEDURE sp89; DROP PROCEDURE IF EXISTS sp90; @@ -20061,9 +21540,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute90(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000.000000000000000000000000000000 10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute90; DROP PROCEDURE sp90; DROP PROCEDURE IF EXISTS sp91; @@ -20095,9 +21574,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute91(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000100000000000000000000.000000000000000000000000000000 000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute91; DROP PROCEDURE sp91; DROP PROCEDURE IF EXISTS sp92; @@ -20129,9 +21608,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute92(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute92; DROP PROCEDURE sp92; DROP PROCEDURE IF EXISTS sp93; @@ -20163,9 +21642,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute93(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute93; DROP PROCEDURE sp93; DROP PROCEDURE IF EXISTS sp94; @@ -20231,9 +21710,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute95(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute95; DROP PROCEDURE sp95; DROP PROCEDURE IF EXISTS sp96; @@ -20265,9 +21744,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute96(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute96; DROP PROCEDURE sp96; DROP PROCEDURE IF EXISTS sp97; @@ -20299,9 +21778,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute97(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --32602 -32602 -32592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65535 65535 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --32602 -32592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65535 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute97; DROP PROCEDURE sp97; DROP PROCEDURE IF EXISTS sp98; @@ -20367,9 +21846,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute99(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -252 252 262 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +252 252 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -252 262 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +252 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute99; DROP PROCEDURE sp99; DROP PROCEDURE IF EXISTS sp100; @@ -20435,9 +21914,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute101(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --102 -102 -92 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +255 255 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --102 -92 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +255 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute101; DROP PROCEDURE sp101; USE db_storedproc; @@ -20462,13 +21941,13 @@ set a = '2005-03-14 01:01:02'; insert into temp_table values(a); END// show CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure -sp2 ALLOW_INVALID_DATES CREATE PROCEDURE `sp2`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp2 ALLOW_INVALID_DATES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() BEGIN declare a datetime; set a = '2005-03-14 01:01:02'; insert into temp_table values(a); -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode = 'traditional'; CALL sp2 (); SELECT * from temp_table; @@ -20498,15 +21977,15 @@ set b = 5; SELECT not 1 between a and b; END// show CREATE PROCEDURE sp3; -Procedure sql_mode Create Procedure -sp3 HIGH_NOT_PRECEDENCE CREATE PROCEDURE `sp3`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp3 HIGH_NOT_PRECEDENCE CREATE DEFINER=`root`@`localhost` PROCEDURE `sp3`() BEGIN declare a int signed; declare b int unsigned; set a = -5; set b = 5; SELECT not 1 between a and b; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp3(); not 1 between a and b @@ -20541,8 +22020,8 @@ set c = b/a; show warnings; END// show CREATE PROCEDURE sp4; -Procedure sql_mode Create Procedure -sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE PROCEDURE "sp4"() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE DEFINER="root"@"localhost" PROCEDURE "sp4"() BEGIN declare a int; declare b int; @@ -20551,7 +22030,7 @@ set a = 0; set b = 1; set c = b/a; show warnings; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message @@ -20589,37 +22068,37 @@ set @x=i1; set @y=@x; END// show CREATE PROCEDURE sp6a; -Procedure sql_mode Create Procedure -sp6a CREATE PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6a CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6b; -Procedure sql_mode Create Procedure -sp6b CREATE PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6b CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) DETERMINISTIC BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6c; -Procedure sql_mode Create Procedure -sp6c CREATE PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6c CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) COMMENT 'this is a comment' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6a'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6b'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6c'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6a; DROP PROCEDURE sp6b; DROP PROCEDURE sp6c; @@ -20633,8 +22112,8 @@ set @x=i1; set @y=@x; END// SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.3: @@ -20659,8 +22138,8 @@ set @y=@x; return 0; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION sp6; Testcase 4.8.5: @@ -20673,7 +22152,7 @@ Testcase 4.8.6: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; show procedure status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.7: -------------------------------------------------------------------------------- @@ -20694,7 +22173,7 @@ BEGIN return i1; END// show procedure status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP FUNCTION fn1; Testcase 4.8.9: @@ -20708,8 +22187,8 @@ BEGIN return i1; END// SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.11: @@ -20738,7 +22217,7 @@ Testcase 4.8.13: -------------------------------------------------------------------------------- DROP FUNCTION IF EXISTS f1000; SHOW FUNCTION STATUS LIKE 'f1000'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.14: -------------------------------------------------------------------------------- @@ -20760,7 +22239,7 @@ set @x=i1; set @y=@x; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE sp6; Testcase 4.8.16: @@ -20777,8 +22256,8 @@ END// alter procedure sp6 sql security invoker; alter procedure sp6 comment 'this is a new comment'; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.18: @@ -20790,12 +22269,12 @@ return x; END// alter function fn1 sql security invoker; show create function fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(x int) RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) SQL SECURITY INVOKER BEGIN return x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.19: @@ -20808,8 +22287,8 @@ END// alter function fn1 sql security invoker; alter function fn1 comment 'this is a function 3242#@%$#@'; show function status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.20: @@ -20822,13 +22301,13 @@ set @y=@x; END// alter procedure sp6 comment 'this is simple'; show CREATE PROCEDURE sp6; -Procedure sql_mode Create Procedure -sp6 CREATE PROCEDURE `sp6`(i1 int , i2 int) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6`(i1 int , i2 int) COMMENT 'this is simple' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.21: @@ -20853,7 +22332,7 @@ set @y=@x; END// DROP PROCEDURE sp6; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.23: -------------------------------------------------------------------------------- @@ -20875,7 +22354,7 @@ return i1; END// DROP FUNCTION fn1; SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Section 3.1.9 - Routine body checks: -------------------------------------------------------------------------------- @@ -20894,16 +22373,16 @@ SELECT * from t9 limit 0, 100; END// CALL sp6 (10, 20, 30, 40, 50); f1 f2 f3 --5000 a` -5000 --4999 aaa -4999 --4998 abaa -4998 --4997 acaaa -4997 --4996 adaaaa -4996 --4995 aeaaaaa -4995 --4994 afaaaaaa -4994 --4993 agaaaaaaa -4993 --4992 a^aaaaaaaa -4992 -4991 a_aaaaaaaaa -4991 +-4992 a^aaaaaaaa -4992 +-4993 agaaaaaaa -4993 +-4994 afaaaaaa -4994 +-4995 aeaaaaa -4995 +-4996 adaaaa -4996 +-4997 acaaa -4997 +-4998 abaa -4998 +-4999 aaa -4999 +-5000 a` -5000 DROP PROCEDURE sp6; Testcase 4.9.2: @@ -21363,9 +22842,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.14: -------------------------------------------------------------------------------- @@ -21392,9 +22878,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.15: -------------------------------------------------------------------------------- @@ -21422,9 +22915,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +@x=1 +0 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.16: -------------------------------------------------------------------------------- @@ -21452,17 +22952,16 @@ until done END repeat; SELECT done; close cur1; END// -CALL h1() -# cleanup; +CALL h1(); done 0 @x=1 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.17: -------------------------------------------------------------------------------- @@ -21490,9 +22989,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.18: -------------------------------------------------------------------------------- @@ -21520,9 +23019,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.19: -------------------------------------------------------------------------------- @@ -21550,9 +23049,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.20: -------------------------------------------------------------------------------- @@ -21580,9 +23079,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.21: -------------------------------------------------------------------------------- @@ -21610,9 +23109,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.22: -------------------------------------------------------------------------------- @@ -21641,9 +23140,9 @@ done 0 done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.23: -------------------------------------------------------------------------------- @@ -21671,9 +23170,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.24: -------------------------------------------------------------------------------- @@ -21701,9 +23200,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.25: -------------------------------------------------------------------------------- @@ -21728,9 +23227,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.26: -------------------------------------------------------------------------------- @@ -21755,9 +23254,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.27: -------------------------------------------------------------------------------- @@ -21780,9 +23279,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.28: -------------------------------------------------------------------------------- @@ -21805,9 +23304,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.29: -------------------------------------------------------------------------------- @@ -21835,9 +23334,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.30: -------------------------------------------------------------------------------- @@ -21865,9 +23364,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.31: -------------------------------------------------------------------------------- @@ -21893,9 +23392,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.32: -------------------------------------------------------------------------------- @@ -21921,9 +23420,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.33: -------------------------------------------------------------------------------- @@ -21948,7 +23447,7 @@ set @x=1; SELECT done, @x; END// ERROR 42000: Duplicate condition: condname -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.35: -------------------------------------------------------------------------------- @@ -21973,7 +23472,21 @@ insert into res_t1 values (3, 'c'); END begin2_label; END begin1_label// ERROR 42000: Bad SQLSTATE: '020' -drop table res_t1; +CREATE PROCEDURE h1 () +begin1_label:BEGIN +declare condname1 condition for sqlstate '020'; +declare condname2 condition for sqlstate 'wewe'; +declare condname3 condition for 9999; +set @var2 = 1; +insert into res_t1 values (2, 'b'); +begin2_label: BEGIN +declare continue handler for sqlstate '90000023' set @var3= 1; +set @var4 = 1; +insert into res_t1 values (3, 'c'); +END begin2_label; +END begin1_label// +ERROR 42000: Bad SQLSTATE: '020' +DROP TABLE IF EXISTS res_t1; Testcase 4.11.36: -------------------------------------------------------------------------------- @@ -21989,7 +23502,7 @@ set x1 = 2; END; SELECT @x, x1; END// -DROP PROCEDURE h1; +DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: -------------------------------------------------------------------------------- @@ -22010,7 +23523,7 @@ declare exit handler for condname2 set x5 = 1; END// ERROR 42000: Duplicate handler declared in the same block DROP PROCEDURE IF EXISTS h1; -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.41: -------------------------------------------------------------------------------- @@ -22026,6 +23539,9 @@ set x1 = 2; END; SELECT @x, x1; END// +CALL h1(); +@x x1 +0 2 DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): @@ -22076,8 +23592,8 @@ CALL h1(); SELECT @done, @x; @done @x 1 1 -DROP PROCEDURE h1; -DROP TABLE res_t1; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result index 13b14b242fe..a5a52acbc1d 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result @@ -58,6 +58,7 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- +USE db_storedproc; Testcase 3.1.10.2 + 3.1.10.5: ----------------------------- @@ -94,6 +95,7 @@ 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 @@ -114,6 +116,7 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; USE db_storedproc; root@localhost db_storedproc @@ -180,6 +183,8 @@ 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() @@ -207,49 +212,72 @@ 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 ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -abc abc 2005-10-03 100 uvw 1000 CALL sp_ins_3(); SELECT row_count(); row_count() 1 -SELECT * FROM temp ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 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 ORDER BY f4; +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 @@ -258,8 +286,6 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 updated abc 2005-10-03 100 uvw 1000 updated xyz 1949-05-23 100 uvw 1000 updated xyz 1989-11-09 100 uvw 1000 @@ -281,8 +307,10 @@ COUNT( f1 ) f1 SELECT row_count(); row_count() 3 -SELECT * FROM temp ORDER BY f4; +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 @@ -291,20 +319,67 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 +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 -qwe xyz 1998-03-26 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() +-1 +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: diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index 73befa606c9..3bd8db3880a 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -184,15 +184,14 @@ 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 - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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 -insert 3.5.3.7-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes drop trigger trg4a_1; @@ -210,7 +209,6 @@ 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-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes trig 3.5.3.7-2a @@ -239,29 +237,27 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a 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-1a +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 3.5.3.7-1b drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost @@ -275,23 +271,21 @@ 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-1a +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 3.5.3.7-1b 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-1a +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 -update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -317,21 +311,19 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -345,14 +337,12 @@ 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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -376,23 +366,20 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -406,16 +393,13 @@ 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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -440,14 +424,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -495,15 +479,15 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -550,11 +534,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -596,11 +580,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index 4f350191099..69e8d2313e7 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -139,10 +139,10 @@ 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 order by i120; +select * from db_test.t1_i; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; +select * from db_test.t1_u; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 b 00222 0000023456 1.050000000000000000000000000000 @@ -150,7 +150,7 @@ 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 order by d120; +select * from db_test.t1_d; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -343,20 +343,20 @@ 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; +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; +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; +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 @@ -366,7 +366,7 @@ 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; +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 @@ -377,7 +377,7 @@ 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; +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 @@ -387,7 +387,7 @@ 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; +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 @@ -499,9 +499,38 @@ 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: (Disabled as a result of bug _____) ------------------------------------------------------ +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; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result index d1ab6daa423..5d26ea7d8c9 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result @@ -298,8 +298,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 3e494f53a2d..d6585d90374 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -145,11 +145,7 @@ SET @limit1 = 20; -------------------------------------------------------------------------------- There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables +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); @@ -425,71 +421,3549 @@ f59 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -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 @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -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 ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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 @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +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 +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -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 @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -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 ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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 @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +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 +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ 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; @@ -953,9 +4427,124 @@ 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`,`tb2`.`f110` AS `f110`,`tb2`.`f111` AS `f111`,`tb2`.`f112` AS `f112`,`tb2`.`f113` AS `f113`,`tb2`.`f114` AS `f114`,`tb2`.`f115` AS `f115`,`tb2`.`f116` AS `f116`,`tb2`.`f117` AS `f117` 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; SHOW CREATE VIEW test.v1; View Create View character_set_client collation_connection @@ -1016,10 +4605,9 @@ 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 ORDER BY f59,f60,f61 LIMIT 2; +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 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 Drop view test.v1 ; Testcase 3.3.1.16 + 3.3.1.17 @@ -1162,17 +4750,17 @@ Drop view if exists test.v1 ; Testcase 3.3.1.22 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2; -SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2; +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 LIMIT 2; +SELECT * FROM test.v1; product 2 CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1 LIMIT 2; +SELECT * FROM test.v1; product root@localhost Drop view if exists test.v1 ; @@ -1250,10 +4838,9 @@ Testcase 3.3.1.26 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; Create view test.v1 AS Select * from test.tb2; -Select * from test.v1 order by f59, f60, f61 limit 2; +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 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 Drop view test.v1 ; Testcase 3.3.1.27 @@ -1277,57 +4864,2956 @@ 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -4 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -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 @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -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 ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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 @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -107 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -109 108 0000000104 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -195 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -207 205 0000000206 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -209 208 0000000204 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -250 87895654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -292 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -299 899 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -321 NULL 0000000765 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -323 14376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -340 9984376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -394 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -424 89 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -441 16546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -500 NULL 0000000900 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -660 876546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -987 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2550 775654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -2760 985654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3330 764376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -3410 996546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -7876 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -9112 NULL 0000008771 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -76710 226546 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -569300 9114376 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +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 +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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 f110 f111 f112 f113 f114 f115 f116 f117 Drop view if exists test2.v1 ; @@ -1918,12 +8404,126 @@ 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -122 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -3000 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL DELETE FROM test.v1 where test.v1.f59 = 3000 and test.v1.f60 = 432; SELECT * FROM test.tb2 where f59 = 3000 and f60 = 432; @@ -1948,16 +8548,246 @@ 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 f110 f111 f112 f113 f114 f115 f116 f117 SELECT * FROM test.tb2 where f59 = 30 ; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -30 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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -30 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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 f110 f111 f112 f113 f114 f115 f116 f117 drop view if exists test.v1 ; @@ -9743,13 +16573,2957 @@ 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 limit 5; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -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 @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +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 +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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; @@ -9806,28 +19580,2957 @@ F59 F61 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 limit 20; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set ��@@ $@$@ ��@@ $@$@$@$@@@@@@@@@@@ $@$@$@$@@@@@@@@@@@  ��@@ $@$@$@$@@@@@@@@@@@ -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ I@I@ @@@@@@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ @@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ -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 @@@@ @ @ 9@.@ @@@@ @ @ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ @@ @@@@ @ @ @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ -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 ��@@@@ 4@4@ ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ �� ��@@@@ ��4@�4@4@�4@��@@ @@ @ @@ @@@ -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 @@@@@@ >@>@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ @@ @@@@@@ @@4@@>@>@@>@@@@@"@@"@"@@"@@@ -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 @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -15 87 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -17 15 0000000016 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -19 18 0000000014 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -22 93 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -24 51654 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -27 25 0000000026 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -29 28 0000000024 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -34 41 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -94 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set @@@@@@ D@D@ @@@@@@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ @*@ @@@@@@ NULL -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 I@I@ +f112 @@@@@@ +f113 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f114 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +f115 @@ +f116 @@@@@@ +f117 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +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 +f110 @@@@ @ @ +f111 9@.@ +f112 @@@@ @ @ +f113 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f114 @@Q@@Q@Q@@Q@@@&@&@*@&@*@*@&@*@&@&@ +f115 @@ +f116 @@@@ @ @ +f117 @@N@@N@N@@N@@@$@$@(@$@(@(@$@(@$@$@ +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 +f110 ��@@ +f111 $@$@ +f112 ��@@ +f113 $@$@$@$@@@@@@@@@@@ +f114 $@$@$@$@@@@@@@@@@@ +f115  +f116 ��@@ +f117 $@$@$@$@@@@@@@@@@@ +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 +f110 ��@@@@ +f111 4@4@ +f112 ��@@@@ +f113 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f114 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +f115 �� +f116 ��@@@@ +f117 ��4@�4@4@�4@��@@ @@ @ @@ @@@ +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 +f110 @@@@@@ +f111 >@>@ +f112 @@@@@@ +f113 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f114 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +f115 @@ +f116 @@@@@@ +f117 @@4@@>@>@@>@@@@@"@@"@"@@"@@@ +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 @@@@@@ +f111 D@D@ +f112 @@@@@@ +f113 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f114 @@I@@I@I@@I@@@"@"@&@"@&@&@"@&@"@"@ +f115 @*@ +f116 @@@@@@ +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL 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; @@ -10202,8 +22905,65 @@ F59 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -242 79 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL Drop view test.v1 ; Testcase 3.3.1.65, 3.3.1.A4, 3.3.1.66, 3.3.1.67 @@ -10545,8 +23305,65 @@ 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -2005 101 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; f59 f60 2005 101 @@ -10562,8 +23379,65 @@ 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -8 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; f59 f60 8 105 @@ -10578,11 +23452,242 @@ 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 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 f110 f111 f112 f113 f114 f115 f116 f117 -891 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -891 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -891 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL -891 105 0000000106 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set NULL NULL NULL NULL NULL NULL NULL NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL +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 +f110 NULL +f111 NULL +f112 NULL +f113 NULL +f114 NULL +f115 NULL +f116 NULL +f117 NULL SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; f59 f60 891 105 @@ -10931,10 +24036,6 @@ 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'; - -Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view --------------------------------------------------------------------------------- SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; @@ -11466,21 +24567,24 @@ ABC 0 ABC 1.7320508075689 CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t1; DROP TABLE t2; DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/r/ndb_func_view.result b/mysql-test/suite/funcs_1/r/ndb_func_view.result index 02ef728fad5..14568643665 100644 --- a/mysql-test/suite/funcs_1/r/ndb_func_view.result +++ b/mysql-test/suite/funcs_1/r/ndb_func_view.result @@ -1,7 +1,3 @@ - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables --------------------------------------------------------------------------------- DROP TABLE IF EXISTS t1_selects, t1_modes, t1_values; DROP VIEW IF EXISTS v1; CREATE TABLE t1_values @@ -89,6 +85,9 @@ 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, @@ -101,6 +100,7 @@ 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, @@ -113,6 +113,7 @@ 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, @@ -125,6 +126,7 @@ 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, @@ -135,11 +137,13 @@ 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" @@ -184,14 +188,12 @@ 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'; - -"Attention: LEFT('AaBbCcDdEeFfGgHhIiJjÄäÜüÖö', ) - The file with expected results suffers from Bug 10963" - and the testcases with length = BIGINT or DOUBLE column are deactivated, -because there are 32/64 Bit differences --------------------------------------------------------------------------------- +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), @@ -284,19 +286,19 @@ SET sql_mode = ''; -------------------------------------------------------------------------------- CREATE VIEW v1 AS SELECT my_char_30, id FROM t1_values; SELECT my_char_30, id FROM t1_values -WHERE select_id = 190 OR select_id IS NULL order by id; +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 = 190 OR select_id IS NULL) order by id; +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 = 189 OR select_id IS NULL order by id; +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 @@ -308,7 +310,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select concat(_latin1'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 = 189 OR select_id IS NULL) order by id; +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 @@ -322,13 +324,13 @@ 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 = 188 OR select_id IS NULL order by id; +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 = 188 OR select_id IS NULL) order by id; +WHERE select_id = 191 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -336,13 +338,13 @@ 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 = 187 OR select_id IS NULL order by id; +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 = 187 OR select_id IS NULL) order by id; +WHERE select_id = 190 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -350,13 +352,13 @@ 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 = 186 OR select_id IS NULL order by id; +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 = 186 OR select_id IS NULL) order by id; +WHERE select_id = 189 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -364,13 +366,13 @@ 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 = 185 OR select_id IS NULL order by id; +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 = 185 OR select_id IS NULL) order by id; +WHERE select_id = 188 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -378,13 +380,13 @@ 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 = 184 OR select_id IS NULL order by id; +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 = 184 OR select_id IS NULL) order by id; +WHERE select_id = 187 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -392,13 +394,13 @@ 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 = 183 OR select_id IS NULL order by id; +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 = 183 OR select_id IS NULL) order by id; +WHERE select_id = 186 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -406,13 +408,13 @@ 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 = 182 OR select_id IS NULL order by id; +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 = 182 OR select_id IS NULL) order by id; +WHERE select_id = 185 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -420,13 +422,13 @@ 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 = 181 OR select_id IS NULL order by id; +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 = 181 OR select_id IS NULL) order by id; +WHERE select_id = 184 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -434,13 +436,13 @@ 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 = 180 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 180 OR select_id IS NULL) order by id; +WHERE select_id = 183 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -448,13 +450,13 @@ 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 = 179 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 179 OR select_id IS NULL) order by id; +WHERE select_id = 182 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -462,13 +464,13 @@ 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 = 178 OR select_id IS NULL order by id; +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(_latin1'-',_latin1' - -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 = 178 OR select_id IS NULL) order by id; +WHERE select_id = 181 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -476,13 +478,13 @@ 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 = 177 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 177 OR select_id IS NULL) order by id; +WHERE select_id = 180 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -490,13 +492,13 @@ 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 = 176 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 176 OR select_id IS NULL) order by id; +WHERE select_id = 179 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -504,13 +506,13 @@ 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 = 175 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 175 OR select_id IS NULL) order by id; +WHERE select_id = 178 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -518,13 +520,13 @@ 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 = 174 OR select_id IS NULL order by id; +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(_latin1'-',`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 = 174 OR select_id IS NULL) order by id; +WHERE select_id = 177 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -532,13 +534,13 @@ 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 = 173 OR select_id IS NULL order by id; +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 = 173 OR select_id IS NULL) order by id; +WHERE select_id = 176 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -546,13 +548,13 @@ 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 = 172 OR select_id IS NULL order by id; +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 = 172 OR select_id IS NULL) order by id; +WHERE select_id = 175 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -560,13 +562,13 @@ 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 = 171 OR select_id IS NULL order by id; +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 = 171 OR select_id IS NULL) order by id; +WHERE select_id = 174 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -574,13 +576,13 @@ 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 = 170 OR select_id IS NULL order by id; +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 = 170 OR select_id IS NULL) order by id; +WHERE select_id = 173 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -588,13 +590,13 @@ 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 = 169 OR select_id IS NULL order by id; +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 = 169 OR select_id IS NULL) order by id; +WHERE select_id = 172 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -602,13 +604,13 @@ 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 = 168 OR select_id IS NULL order by id; +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 = 168 OR select_id IS NULL) order by id; +WHERE select_id = 171 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -616,13 +618,13 @@ 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 = 167 OR select_id IS NULL order by id; +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 = 167 OR select_id IS NULL) order by id; +WHERE select_id = 170 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -630,13 +632,13 @@ 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 = 166 OR select_id IS NULL order by id; +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 = 166 OR select_id IS NULL) order by id; +WHERE select_id = 169 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -644,13 +646,13 @@ 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 = 165 OR select_id IS NULL order by id; +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 = 165 OR select_id IS NULL) order by id; +WHERE select_id = 168 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -658,13 +660,13 @@ 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 = 164 OR select_id IS NULL order by id; +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 = 164 OR select_id IS NULL) order by id; +WHERE select_id = 167 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -672,13 +674,13 @@ 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 = 163 OR select_id IS NULL order by id; +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 = 163 OR select_id IS NULL) order by id; +WHERE select_id = 166 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -686,13 +688,13 @@ 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 = 162 OR select_id IS NULL order by id; +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 = 162 OR select_id IS NULL) order by id; +WHERE select_id = 165 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -700,13 +702,13 @@ 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 = 161 OR select_id IS NULL order by id; +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 = 161 OR select_id IS NULL) order by id; +WHERE select_id = 164 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -714,13 +716,13 @@ 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 = 160 OR select_id IS NULL order by id; +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 = 160 OR select_id IS NULL) order by id; +WHERE select_id = 163 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -728,13 +730,13 @@ 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 = 159 OR select_id IS NULL order by id; +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 = 159 OR select_id IS NULL) order by id; +WHERE select_id = 162 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -742,13 +744,13 @@ 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 = 158 OR select_id IS NULL order by id; +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 = 158 OR select_id IS NULL) order by id; +WHERE select_id = 161 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -756,13 +758,13 @@ 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 = 157 OR select_id IS NULL order by id; +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(_latin1'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 = 157 OR select_id IS NULL) order by id; +WHERE select_id = 160 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -770,13 +772,13 @@ 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 = 156 OR select_id IS NULL order by id; +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(_latin1'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 = 156 OR select_id IS NULL) order by id; +WHERE select_id = 159 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -784,13 +786,13 @@ 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 = 155 OR select_id IS NULL order by id; +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(_latin1'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 = 155 OR select_id IS NULL) order by id; +WHERE select_id = 158 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -798,19 +800,19 @@ 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 = 154 OR select_id IS NULL order by id; +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(_latin1'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 = 154 OR select_id IS NULL) order by id; +WHERE select_id = 157 OR select_id IS NULL) order by id; DROP VIEW v1; CREATE VIEW v1 AS SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values; SELECT LOAD_FILE('../tmp/func_view.dat'), id FROM t1_values -WHERE select_id = 153 OR select_id IS NULL order by id; +WHERE select_id = 156 OR select_id IS NULL order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -827,7 +829,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`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; +WHERE select_id = 156 OR select_id IS NULL) order by id; LOAD_FILE('../tmp/func_view.dat') id äÄ@ 1 @@ -846,13 +848,13 @@ 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 = 152 OR select_id IS NULL order by id; +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 = 152 OR select_id IS NULL) order by id; +WHERE select_id = 155 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -860,13 +862,13 @@ 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 = 151 OR select_id IS NULL order by id; +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 = 151 OR select_id IS NULL) order by id; +WHERE select_id = 154 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -874,13 +876,13 @@ 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 = 150 OR select_id IS NULL order by id; +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 = 150 OR select_id IS NULL) order by id; +WHERE select_id = 153 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -888,19 +890,49 @@ 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 = 149 OR select_id IS NULL order by id; +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 = 149 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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(_latin1'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.7976931348623e+308 2 +AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 1.7976931348623e+308 3 + 0 4 + -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' 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 = 148 OR select_id IS NULL order by id; +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 @@ -915,7 +947,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select left(_latin1'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 = 148 OR select_id IS NULL) order by id; +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 @@ -928,9 +960,33 @@ Error 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(_latin1'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 = 147 OR select_id IS NULL order by id; +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 @@ -942,7 +998,7 @@ 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 = 147 OR select_id IS NULL) order by id; +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 @@ -954,7 +1010,7 @@ 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 = 146 OR select_id IS NULL order by id; +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 @@ -966,7 +1022,7 @@ 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 = 146 OR select_id IS NULL) order by id; +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 @@ -978,7 +1034,7 @@ 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 = 145 OR select_id IS NULL order by id; +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 @@ -990,7 +1046,7 @@ 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 = 145 OR select_id IS NULL) order by id; +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 @@ -1002,7 +1058,7 @@ 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 = 144 OR select_id IS NULL order by id; +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 @@ -1014,7 +1070,7 @@ 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 = 144 OR select_id IS NULL) order by id; +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 @@ -1028,13 +1084,13 @@ 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 = 143 OR select_id IS NULL order by id; +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 = 143 OR select_id IS NULL) order by id; +WHERE select_id = 144 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1042,13 +1098,13 @@ 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 = 142 OR select_id IS NULL order by id; +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(_latin1'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 = 142 OR select_id IS NULL) order by id; +WHERE select_id = 143 OR select_id IS NULL) order by id; DROP VIEW v1; @@ -1056,7 +1112,7 @@ 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 = 141 OR select_id IS NULL order by id; +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 @@ -1068,7 +1124,7 @@ 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 = 141 OR select_id IS NULL) order by id; +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 @@ -1082,7 +1138,7 @@ 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 = 140 OR select_id IS NULL order by id; +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 @@ -1094,7 +1150,7 @@ 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 = 140 OR select_id IS NULL) order by id; +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 @@ -1108,7 +1164,7 @@ 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 = 139 OR select_id IS NULL order by id; +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 @@ -1120,7 +1176,7 @@ 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 = 139 OR select_id IS NULL) order by id; +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 @@ -1134,7 +1190,7 @@ 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 = 138 OR select_id IS NULL order by id; +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 @@ -1146,7 +1202,7 @@ 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 = 138 OR select_id IS NULL) order by id; +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 @@ -1160,7 +1216,7 @@ 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 = 137 OR select_id IS NULL order by id; +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 @@ -1172,7 +1228,7 @@ 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`,_latin1'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 = 137 OR select_id IS NULL) order by id; +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 @@ -1186,7 +1242,7 @@ 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 = 136 OR select_id IS NULL order by id; +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 @@ -1198,7 +1254,7 @@ 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`,_latin1'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 = 136 OR select_id IS NULL) order by id; +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 @@ -1212,7 +1268,7 @@ 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 = 135 OR select_id IS NULL order by id; +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 @@ -1224,7 +1280,7 @@ 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`,_latin1'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 = 135 OR select_id IS NULL) order by id; +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 @@ -1238,7 +1294,7 @@ 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 = 134 OR select_id IS NULL order by id; +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 @@ -1250,7 +1306,7 @@ 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`,_latin1'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 = 134 OR select_id IS NULL) order by id; +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 @@ -1264,7 +1320,7 @@ 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 = 133 OR select_id IS NULL order by id; +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 @@ -1276,7 +1332,7 @@ 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`,_latin1'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 = 133 OR select_id IS NULL) order by id; +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 @@ -1290,7 +1346,7 @@ 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 = 132 OR select_id IS NULL order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1302,7 +1358,7 @@ 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`,_latin1'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 = 132 OR select_id IS NULL) order by id; +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.7976931348623e+308 -1.7976931348623e+308 2 @@ -1316,7 +1372,7 @@ 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 = 131 OR select_id IS NULL order by id; +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 @@ -1328,7 +1384,7 @@ 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`,_latin1'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 = 131 OR select_id IS NULL) order by id; +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 @@ -1342,7 +1398,7 @@ 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 = 130 OR select_id IS NULL order by id; +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 @@ -1354,7 +1410,7 @@ 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`,_latin1'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 = 130 OR select_id IS NULL) order by id; +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 @@ -1368,7 +1424,7 @@ 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 = 129 OR select_id IS NULL order by id; +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 @@ -1380,7 +1436,7 @@ 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`,_latin1'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 = 129 OR select_id IS NULL) order by id; +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 @@ -1394,7 +1450,7 @@ 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 = 128 OR select_id IS NULL order by id; +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 @@ -1406,7 +1462,7 @@ 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`,_latin1'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 = 128 OR select_id IS NULL) order by id; +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 @@ -1420,7 +1476,7 @@ 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 = 127 OR select_id IS NULL order by id; +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 @@ -1432,7 +1488,7 @@ 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`,_latin1'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 = 127 OR select_id IS NULL) order by id; +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 @@ -1446,7 +1502,7 @@ 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 = 126 OR select_id IS NULL order by id; +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 @@ -1458,7 +1514,7 @@ 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`,_latin1'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 = 126 OR select_id IS NULL) order by id; +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 @@ -1472,7 +1528,7 @@ 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 = 125 OR select_id IS NULL order by id; +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 @@ -1486,7 +1542,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 125 OR select_id IS NULL) order by id; +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 @@ -1501,7 +1557,7 @@ 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 = 124 OR select_id IS NULL order by id; +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 @@ -1515,7 +1571,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 124 OR select_id IS NULL) order by id; +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 @@ -1530,7 +1586,7 @@ 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 = 123 OR select_id IS NULL order by id; +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 @@ -1544,7 +1600,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 123 OR select_id IS NULL) order by id; +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 @@ -1559,7 +1615,7 @@ 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 = 122 OR select_id IS NULL order by id; +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 @@ -1573,7 +1629,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 122 OR select_id IS NULL) order by id; +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 @@ -1588,7 +1644,7 @@ 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 = 121 OR select_id IS NULL order by id; +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 @@ -1602,7 +1658,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 121 OR select_id IS NULL) order by id; +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 @@ -1617,7 +1673,7 @@ 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 = 120 OR select_id IS NULL order by id; +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 @@ -1631,7 +1687,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 120 OR select_id IS NULL) order by id; +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 @@ -1646,7 +1702,7 @@ 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 = 119 OR select_id IS NULL order by id; +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 @@ -1660,7 +1716,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 119 OR select_id IS NULL) order by id; +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 @@ -1675,7 +1731,7 @@ 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 = 118 OR select_id IS NULL order by id; +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 @@ -1689,7 +1745,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 118 OR select_id IS NULL) order by id; +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 @@ -1704,7 +1760,7 @@ 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 = 117 OR select_id IS NULL order by id; +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 @@ -1718,7 +1774,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 117 OR select_id IS NULL) order by id; +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 @@ -1733,7 +1789,7 @@ 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 = 116 OR select_id IS NULL order by id; +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 @@ -1747,7 +1803,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 116 OR select_id IS NULL) order by id; +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 @@ -1762,7 +1818,7 @@ 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 = 115 OR select_id IS NULL order by id; +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 @@ -1776,7 +1832,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 115 OR select_id IS NULL) order by id; +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 @@ -1791,7 +1847,7 @@ 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 = 114 OR select_id IS NULL order by id; +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 @@ -1805,7 +1861,7 @@ v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI '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 = 114 OR select_id IS NULL) order by id; +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 @@ -1820,7 +1876,7 @@ 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 = 113 OR select_id IS NULL order by id; +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 @@ -1832,7 +1888,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 113 OR select_id IS NULL) order by id; +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 @@ -1846,7 +1902,7 @@ 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 = 112 OR select_id IS NULL order by id; +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 @@ -1858,7 +1914,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 112 OR select_id IS NULL) order by id; +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 @@ -1872,7 +1928,7 @@ 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 = 111 OR select_id IS NULL order by id; +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 @@ -1884,7 +1940,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 111 OR select_id IS NULL) order by id; +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 @@ -1898,7 +1954,7 @@ 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 = 110 OR select_id IS NULL order by id; +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 @@ -1910,7 +1966,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 110 OR select_id IS NULL) order by id; +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 @@ -1924,7 +1980,7 @@ 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 = 109 OR select_id IS NULL order by id; +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 @@ -1936,7 +1992,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 109 OR select_id IS NULL) order by id; +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 @@ -1950,7 +2006,7 @@ 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 = 108 OR select_id IS NULL order by id; +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.7976931348623e+308 2 @@ -1962,7 +2018,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 108 OR select_id IS NULL) order by id; +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.7976931348623e+308 2 @@ -1976,7 +2032,7 @@ 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 = 107 OR select_id IS NULL order by id; +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 @@ -1988,7 +2044,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 107 OR select_id IS NULL) order by id; +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 @@ -2002,7 +2058,7 @@ 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 = 106 OR select_id IS NULL order by id; +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 @@ -2014,7 +2070,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 106 OR select_id IS NULL) order by id; +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 @@ -2028,7 +2084,7 @@ 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 = 105 OR select_id IS NULL order by id; +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 @@ -2040,7 +2096,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 105 OR select_id IS NULL) order by id; +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 @@ -2054,7 +2110,7 @@ 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 = 104 OR select_id IS NULL order by id; +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 @@ -2071,7 +2127,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 104 OR select_id IS NULL) order by id; +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 @@ -2090,7 +2146,7 @@ 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 = 103 OR select_id IS NULL order by id; +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 @@ -2102,7 +2158,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 103 OR select_id IS NULL) order by id; +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 @@ -2116,7 +2172,7 @@ 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 = 102 OR select_id IS NULL order by id; +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 @@ -2131,7 +2187,7 @@ 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`,_latin1'IS TRUE',_latin1'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 = 102 OR select_id IS NULL) order by id; +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 @@ -2148,7 +2204,7 @@ 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 = 101 OR select_id IS NULL order by id; +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 @@ -2160,7 +2216,7 @@ 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 = 101 OR select_id IS NULL) order by id; +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 @@ -2174,7 +2230,7 @@ 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 = 100 OR select_id IS NULL order by id; +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 @@ -2186,7 +2242,7 @@ 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 = 100 OR select_id IS NULL) order by id; +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 @@ -2200,7 +2256,7 @@ 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 = 99 OR select_id IS NULL order by id; +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 @@ -2212,7 +2268,7 @@ 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 = 99 OR select_id IS NULL) order by id; +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 @@ -2226,7 +2282,7 @@ 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 = 98 OR select_id IS NULL order by id; +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 @@ -2238,7 +2294,7 @@ 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 = 98 OR select_id IS NULL) order by id; +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 @@ -2252,7 +2308,7 @@ 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 = 97 OR select_id IS NULL order by id; +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 @@ -2264,7 +2320,7 @@ 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 = 97 OR select_id IS NULL) order by id; +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 @@ -2278,7 +2334,7 @@ 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 = 96 OR select_id IS NULL order by id; +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 @@ -2290,7 +2346,7 @@ 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 = 96 OR select_id IS NULL) order by id; +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 @@ -2304,7 +2360,7 @@ 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 = 95 OR select_id IS NULL order by id; +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 @@ -2316,7 +2372,7 @@ 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 = 95 OR select_id IS NULL) order by id; +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 @@ -2330,7 +2386,7 @@ 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 = 94 OR select_id IS NULL order by id; +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 @@ -2342,7 +2398,7 @@ 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 = 94 OR select_id IS NULL) order by id; +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 @@ -2356,7 +2412,7 @@ 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 = 93 OR select_id IS NULL order by id; +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 @@ -2368,7 +2424,7 @@ 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 = 93 OR select_id IS NULL) order by id; +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 @@ -2382,7 +2438,7 @@ 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 = 92 OR select_id IS NULL order by id; +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 @@ -2394,7 +2450,7 @@ 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 = 92 OR select_id IS NULL) order by id; +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 @@ -2408,7 +2464,7 @@ 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 = 91 OR select_id IS NULL order by id; +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 @@ -2420,7 +2476,7 @@ 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 = 91 OR select_id IS NULL) order by id; +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 @@ -2434,7 +2490,7 @@ 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 = 90 OR select_id IS NULL order by id; +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 @@ -2446,7 +2502,7 @@ 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 = 90 OR select_id IS NULL) order by id; +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 @@ -2460,7 +2516,7 @@ 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 = 89 OR select_id IS NULL order by id; +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 @@ -2472,7 +2528,7 @@ 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 = 89 OR select_id IS NULL) order by id; +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 @@ -2482,6 +2538,38 @@ NULL NULL 1 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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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.7976931348623e+308 2 +9223372036854775807 1.7976931348623e+308 3 +0 0 4 +18446744073709551615 -1 5 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' +Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' +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), diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc.result b/mysql-test/suite/funcs_1/r/ndb_storedproc.result index 2e1d5035397..42c4e502127 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc.result @@ -1,29 +1,4 @@ -. -. IMPORTANT NOTICE: -. ----------------- -. -. FIXME: The .result files are still NOT CHECKED for correctness! -. -. FIXME: Several tests are affected by known problems around DECIMAL -. FIXME: and NUMERIC that will be checked again after WL#2984 once -. FIXME: has been completed. Some of them are marked in the result. -. -. Currently (Dec 06, 2005) this .result file is checked OK for Linux -. with 5.0.17-bk (ChangeSet@1.1975.1.2, 2005-12-05 18:33:48+01:00). -. Using the available Windows version 5.0.16 there are differences -. that can be ignored (e.g. WL#2984). -. --------------------------------------------------------------------------------- - FIXME: There are subtests that are switched off due to known bugs: - ------------------------------------------------------------------ -WL#2984: DECIMAL and NUMERIC problems with differences on some machines -0 - -There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- SET @@global.max_heap_table_size=4294967295; @@ -94,23 +69,24 @@ CREATE PROCEDURE -------------------------------------------------------------------------------- USE db_storedproc; DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) ) SELECT * from t1 where f2 = f1; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa'); -f1 f2 f3 f4 f5 f6 +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 tinytext ) language sql deterministic sql security definer comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1, @v1; END// +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); -@v1 @v1 -abc abc +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 binary ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -119,12 +95,12 @@ SELECT @v1; END// CALL sp1( 34 ); @v1 -34 +3 +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 blob ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -135,10 +111,8 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 int ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -149,25 +123,27 @@ CALL sp1( 34 ); @v1 34 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: SP definition accepted with m>60 in DECIMAL(m,n) CREATE PROCEDURE sp1( f1 decimal(256, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 256 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(66, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; SELECT @v1; END// +ERROR 42000: Too big precision 66 specified for column ''. Maximum is 65. DROP PROCEDURE IF EXISTS sp1// +Warnings: +Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( f1 decimal(60, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -175,101 +151,1123 @@ SELECT @v1; END// CALL sp1( 17976931340000 ); @v1 -17976931340000 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.797693134e+13 ); +@v1 +17976931340000.000000000000000000000000000000 +CALL sp1( 1.7976931348623157493578e+308 ); +ERROR 22007: Illegal double '1.7976931348623157493578e+308' value found during parsing +CALL sp1( 0.1234567890987654321e+100 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-100 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+99 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-99 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+98 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-98 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+97 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-97 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+96 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-96 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+95 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-95 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+94 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-94 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+93 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-93 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+92 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-92 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+91 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-91 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+90 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-90 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+89 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-89 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+88 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-88 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+87 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-87 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+86 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-86 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+85 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-85 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+84 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-84 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+83 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-83 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+82 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-82 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+81 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-81 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+80 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-80 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+79 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-79 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+78 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-78 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+77 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-77 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+76 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-76 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+75 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-75 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+74 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-74 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+73 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-73 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+72 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-72 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+71 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-71 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+70 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-70 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+69 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-69 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+68 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-68 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+67 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-67 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+66 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-66 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+65 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-65 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+64 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-64 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+63 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-63 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+62 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-62 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+61 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-61 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+60 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-60 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+59 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-59 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+58 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-58 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+57 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-57 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+56 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-56 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+55 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-55 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+54 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-54 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+53 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-53 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+52 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-52 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+51 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-51 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+50 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-50 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+49 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-49 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+48 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-48 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+47 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-47 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+46 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-46 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+45 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-45 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+44 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-44 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+43 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-43 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+42 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-42 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+41 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-41 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+40 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-40 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+39 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-39 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+38 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-38 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+37 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-37 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+36 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-36 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+35 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-35 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+34 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-34 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+33 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-33 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+32 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-32 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+31 ); +@v1 +999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-31 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+30 ); +@v1 +123456789098765400000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-30 ); +@v1 +0.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+29 ); +@v1 +12345678909876540000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-29 ); +@v1 +0.000000000000000000000000000001 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+28 ); +@v1 +1234567890987654000000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-28 ); +@v1 +0.000000000000000000000000000012 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+27 ); +@v1 +123456789098765400000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-27 ); +@v1 +0.000000000000000000000000000123 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+26 ); +@v1 +12345678909876540000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-26 ); +@v1 +0.000000000000000000000000001235 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+25 ); +@v1 +1234567890987654000000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-25 ); +@v1 +0.000000000000000000000000012346 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+24 ); +@v1 +123456789098765400000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-24 ); +@v1 +0.000000000000000000000000123457 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+23 ); +@v1 +12345678909876540000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-23 ); +@v1 +0.000000000000000000000001234568 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+22 ); +@v1 +1234567890987654000000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-22 ); +@v1 +0.000000000000000000000012345679 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+21 ); +@v1 +123456789098765400000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-21 ); +@v1 +0.000000000000000000000123456789 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+20 ); +@v1 +12345678909876540000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-20 ); +@v1 +0.000000000000000000001234567891 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+19 ); +@v1 +1234567890987654000.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-19 ); +@v1 +0.000000000000000000012345678910 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+18 ); +@v1 +123456789098765400.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-18 ); +@v1 +0.000000000000000000123456789099 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+17 ); +@v1 +12345678909876540.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-17 ); +@v1 +0.000000000000000001234567890988 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+16 ); +@v1 +1234567890987654.000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-16 ); +@v1 +0.000000000000000012345678909877 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+15 ); +@v1 +123456789098765.400000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-15 ); +@v1 +0.000000000000000123456789098765 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+14 ); +@v1 +12345678909876.540000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-14 ); +@v1 +0.000000000000001234567890987654 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+13 ); +@v1 +1234567890987.654000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-13 ); +@v1 +0.000000000000012345678909876540 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+12 ); +@v1 +123456789098.765400000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-12 ); +@v1 +0.000000000000123456789098765400 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+11 ); +@v1 +12345678909.876540000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-11 ); +@v1 +0.000000000001234567890987654000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+10 ); +@v1 +1234567890.987654000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-10 ); +@v1 +0.000000000012345678909876540000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+9 ); +@v1 +123456789.098765400000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-9 ); +@v1 +0.000000000123456789098765400000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+8 ); +@v1 +12345678.909876540000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-8 ); +@v1 +0.000000001234567890987654000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+7 ); +@v1 +1234567.890987654000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-7 ); +@v1 +0.000000012345678909876540000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+6 ); +@v1 +123456.789098765400000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-6 ); +@v1 +0.000000123456789098765400000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+5 ); +@v1 +12345.678909876540000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-5 ); +@v1 +0.000001234567890987654000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+4 ); +@v1 +1234.567890987654000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-4 ); +@v1 +0.000012345678909876550000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+3 ); +@v1 +123.456789098765400000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-3 ); +@v1 +0.000123456789098765400000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+2 ); +@v1 +12.345678909876540000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-2 ); +@v1 +0.001234567890987654000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+1 ); +@v1 +1.234567890987654000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-1 ); +@v1 +0.012345678909876540000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e+0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +CALL sp1( 0.1234567890987654321e-0 ); +@v1 +0.123456789098765400000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 set("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET CALL sp1( "value1, value1" ); f1 -value1, value1 +value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET +Warning 1265 Data truncated for column 'f1' at row 1 SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 enum("value1", "value1") ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN SELECT f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM CALL sp1( "value1" ); f1 value1 +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SHOW PROCEDURE status; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongname2348 PROCEDURE root@localhost modified created DEFINER -db_storedproc sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcd PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) language sql SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) not deterministic SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security definer SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) sql security invoker SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( f1 text ) comment 'this is simple' SELECT f1; CALL sp1( 'abc' ); f1 abc SHOW PROCEDURE status like 'sp1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp1 PROCEDURE root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934' is too long DROP PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; +ERROR 42000: Identifier name 'sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde' is too long DROP PROCEDURE sp1; Testcase 4.1.2: @@ -294,8 +1292,8 @@ SELECT fn1( ' world'); fn1( ' world') hello world SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -306,8 +1304,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 decimal(63, 31) ) returns decimal(63, 31) language sql not deterministic sql security invoker comment 'this is simple' BEGIN @@ -326,34 +1324,34 @@ SELECT fn1( 1.3326e+8 ); fn1( 1.3326e+8 ) 134260000.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 enum("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in ENUM SELECT fn1( "value1" ); fn1( "value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 set("value1", "value1") ) returns decimal(63, 30) language sql not deterministic sql security invoker comment 'this is simple' BEGIN return f1; END// +Warnings: +Note 1291 Column '' has duplicated value 'value1' in SET SELECT fn1( "value1, value1" ); fn1( "value1, value1" ) -0.000000000000000000000000000000 -Warnings: -Warning 1292 Truncated incorrect DECIMAL value: 'value1, value1' +1.000000000000000000000000000000 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint language sql BEGIN @@ -364,8 +1362,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint deterministic BEGIN @@ -376,8 +1374,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint not deterministic BEGIN @@ -388,8 +1386,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security definer @@ -401,8 +1399,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint sql security invoker @@ -414,8 +1412,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1( f1 smallint ) returns smallint comment 'this is simple' @@ -427,8 +1425,8 @@ SELECT fn1( 126 ); fn1( 126 ) 127 SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER this is simple latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.1.3: @@ -440,9 +1438,9 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1 (f1 char(20) ) SELECT * from t1 where f2 = f1; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`(f1 char(20) ) -SELECT * from t1 where f2 = f1 +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`(f1 char(20) ) +SELECT * from t1 where f2 = f1 latin1 modified created DROP PROCEDURE sp1; Testcase 4.1.4: @@ -453,9 +1451,9 @@ DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1 (s char(20)) returns char(50) return concat('hello, ', s, '!'); show CREATE FUNCTION fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(s char(20)) RETURNS char(50) -return concat('hello, ', s, '!') +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(s char(20)) RETURNS char(50) CHARSET latin1 +return concat('hello, ', s, '!') latin1 modified created DROP FUNCTION fn1; Testcase 4.1.5: @@ -465,8 +1463,8 @@ SHOW PROCEDURE status CREATE PROCEDURE sp5() SELECT * from t1; SHOW PROCEDURE status like 'sp5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp5 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp5; Testcase 4.1.6: @@ -479,8 +1477,8 @@ set @b = 0.9 * a; return @b; END// SHOW FUNCTION STATUS LIKE 'fn5'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn5 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn5 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn5; Testcase 4.1.7: @@ -498,7 +1496,7 @@ CREATE PROCEDURE sp7b (a char (20), out b char(20)) SELECT f1 into b from t1 where t1.f2= a; CALL sp7b('xyz', @out_param); Warnings: -Warning 1329 No data to FETCH +Warning 1329 No data - zero rows fetched, selected, or processed SELECT @out_param; @out_param NULL @@ -510,9 +1508,6 @@ SELECT f2 into c from t1 where t1.f2=999; END// set @c=1; CALL sp7c('xyz', @out_param, @c); -Warnings: -Warning 1329 No data to FETCH -Warning 1329 No data to FETCH SELECT @out_param; @out_param NULL @@ -539,48 +1534,48 @@ Testcase 4.1.9: drop procedure -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE PROCEDURE sp9()SELECT * from t1; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc sp9 PROCEDURE sp9 SQL CONTAINS_SQL NO DEFINER SELECT * from t1 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 DROP PROCEDURE IF EXISTS sp9; SELECT * from mysql.proc where specific_name='sp9'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.10: ---------------- DROP FUNCTION -------------------------------------------------------------------------------- SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 CREATE FUNCTION fn10() returns int return 100; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +db_storedproc fn10 FUNCTION fn10 SQL CONTAINS_SQL NO DEFINER int(11) return 100 root@localhost created modified latin1 latin1_swedish_ci latin1_swedish_ci return 100 DROP FUNCTION IF EXISTS fn10; SELECT * from mysql.proc where specific_name='fn10' and type='function'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.1.11: ---------------- @@ -604,6 +1599,7 @@ connect(localhost,user_1,,db_storedproc,MYSQL_PORT,MYSQL_SOCK); user_1@localhost db_storedproc CALL sp11(); +USE db_storedproc; root@localhost db_storedproc alter procedure sp11 sql security invoker; @@ -612,6 +1608,7 @@ security_type INVOKER user_1@localhost db_storedproc +USE db_storedproc; CALL sp11(); ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1' commit work; @@ -705,6 +1702,10 @@ SELECT * from t1 where f2 = f1' at line 1 CREATE PROCEDURE function() SELECT * from t1 where f2=f1; DROP PROCEDURE function; +CREATE PROCEDURE accessible() +SELECT * from t1 where f2=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 'accessible() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE add() SELECT * from t1 where f2=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() @@ -765,9 +1766,9 @@ CREATE PROCEDURE by() SELECT * from t1 where f2=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 'by() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE CALL() +CREATE PROCEDURE call() SELECT * from t1 where f2=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 'CALL() +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call() SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE cascade() SELECT * from t1 where f2=f1; @@ -801,17 +1802,10 @@ CREATE PROCEDURE column() SELECT * from t1 where f2=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 'column() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE columns() -SELECT * from t1 where f2=f1; -DROP PROCEDURE columns; CREATE PROCEDURE condition() SELECT * from t1 where f2=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 'condition() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE connection() -SELECT * from t1 where f2=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 'connection() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE constraint() SELECT * from t1 where f2=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 'constraint() @@ -995,9 +1989,6 @@ CREATE PROCEDURE foreign() SELECT * from t1 where f2=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 'foreign() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE found() -SELECT * from t1 where f2=f1; -DROP PROCEDURE found; CREATE PROCEDURE from() SELECT * from t1 where f2=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 'from() @@ -1006,9 +1997,6 @@ CREATE PROCEDURE fulltext() SELECT * from t1 where f2=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 'fulltext() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE goto() -SELECT * from t1 where f2=f1; -DROP PROCEDURE goto; CREATE PROCEDURE grant() SELECT * from t1 where f2=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 'grant() @@ -1077,6 +2065,26 @@ CREATE PROCEDURE int() SELECT * from t1 where f2=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 'int() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int1() +SELECT * from t1 where f2=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 'int1() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int2() +SELECT * from t1 where f2=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 'int2() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int3() +SELECT * from t1 where f2=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 'int3() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int4() +SELECT * from t1 where f2=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 'int4() +SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE int8() +SELECT * from t1 where f2=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 'int8() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE integer() SELECT * from t1 where f2=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 'integer() @@ -1133,6 +2141,10 @@ CREATE PROCEDURE limit() SELECT * from t1 where f2=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 'limit() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE linear() +SELECT * from t1 where f2=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 'linear() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE lines() SELECT * from t1 where f2=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 'lines() @@ -1173,6 +2185,10 @@ CREATE PROCEDURE low_priority() SELECT * from t1 where f2=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 'low_priority() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE master_ssl_verify_server_cert() +SELECT * from t1 where f2=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 'master_ssl_verify_server_cert() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE match() SELECT * from t1 where f2=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 'match() @@ -1273,9 +2289,6 @@ CREATE PROCEDURE primary() SELECT * from t1 where f2=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 'primary() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE privileges() -SELECT * from t1 where f2=f1; -DROP PROCEDURE privileges; CREATE PROCEDURE procedure() SELECT * from t1 where f2=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 'procedure() @@ -1284,6 +2297,10 @@ CREATE PROCEDURE purge() SELECT * from t1 where f2=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 'purge() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE range() +SELECT * from t1 where f2=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 'range() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE read() SELECT * from t1 where f2=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 'read() @@ -1304,6 +2321,10 @@ CREATE PROCEDURE regexp() SELECT * from t1 where f2=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 'regexp() SELECT * from t1 where f2=f1' at line 1 +CREATE PROCEDURE release() +SELECT * from t1 where f2=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 'release() +SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE rename() SELECT * from t1 where f2=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 'rename() @@ -1376,10 +2397,6 @@ CREATE PROCEDURE smallint() SELECT * from t1 where f2=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 'smallint() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE soname() -SELECT * from t1 where f2=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 'soname() -SELECT * from t1 where f2=f1' at line 1 CREATE PROCEDURE spatial() SELECT * from t1 where f2=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 'spatial() @@ -1432,9 +2449,6 @@ CREATE PROCEDURE table() SELECT * from t1 where f2=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 'table() SELECT * from t1 where f2=f1' at line 1 -CREATE PROCEDURE tables() -SELECT * from t1 where f2=f1; -DROP PROCEDURE tables; CREATE PROCEDURE terminated() SELECT * from t1 where f2=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 'terminated() @@ -1725,6 +2739,26 @@ CREATE FUNCTION int(f1 int) returns int return 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 'int(f1 int) returns int return f1' at line 1 +CREATE FUNCTION int1(f1 int1) returns int1 +return 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 'int1(f1 int1) returns int1 +return f1' at line 1 +CREATE FUNCTION int2(f1 int2) returns int2 +return 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 'int2(f1 int2) returns int2 +return f1' at line 1 +CREATE FUNCTION int3(f1 int3) returns int3 +return 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 'int3(f1 int3) returns int3 +return f1' at line 1 +CREATE FUNCTION int4(f1 int4) returns int4 +return 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 'int4(f1 int4) returns int4 +return f1' at line 1 +CREATE FUNCTION int8(f1 int8) returns int8 +return 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 'int8(f1 int8) returns int8 +return f1' at line 1 CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned return 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 'int unsigned(f1 int unsigned) returns int unsigned @@ -1846,485 +2880,291 @@ return f' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char f1 ) returns char +CREATE FUNCTION fn1(f1 char ) returns char return 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 'char f1 ) returns char -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary f1 ) returns char binary +CREATE FUNCTION fn1(f1 char binary ) returns char binary return 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 'char binary f1 ) returns char binary -return f1' at line 1 +ERROR 42000: This version of MySQL doesn't yet support 'return value collation' DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii f1 ) returns char ascii +CREATE FUNCTION fn1(f1 char ascii ) returns char ascii return 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 'char ascii f1 ) returns char ascii -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char not null f1 ) returns char not null +CREATE FUNCTION fn1(f1 char not null ) returns char not null return 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 'char not null f1 ) returns char not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char binary not null f1 ) returns char binary not null +CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null return 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 'char binary not null f1 ) returns char binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(char ascii not null f1 ) returns char ascii not null +CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null return 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 'char ascii not null f1 ) returns char ascii not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns char ascii not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext f1 ) returns tinytext +CREATE FUNCTION fn1(f1 tinytext ) returns tinytext return 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 'tinytext f1 ) returns tinytext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text f1 ) returns text +CREATE FUNCTION fn1(f1 text ) returns text return 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 'f1 ) returns text -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext f1 ) returns mediumtext +CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext return 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 'mediumtext f1 ) returns mediumtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext f1 ) returns longtext +CREATE FUNCTION fn1(f1 longtext ) returns longtext return 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 'longtext f1 ) returns longtext -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinytext not null f1 ) returns tinytext not null +CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null return 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 'tinytext not null f1 ) returns tinytext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinytext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(text not null f1 ) returns text not null +CREATE FUNCTION fn1(f1 text not null ) returns text not null return 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 'not null f1 ) returns text not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns text not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumtext not null f1 ) returns mediumtext not null +CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null return 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 'mediumtext not null f1 ) returns mediumtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longtext not null f1 ) returns longtext not null +CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null return 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 'longtext not null f1 ) returns longtext not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longtext not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob f1 ) returns tinyblob +CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob return 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 'tinyblob f1 ) returns tinyblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob f1 ) returns blob +CREATE FUNCTION fn1(f1 blob ) returns blob return 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 'blob f1 ) returns blob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob f1 ) returns mediumblob +CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob return 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 'mediumblob f1 ) returns mediumblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob f1 ) returns longblob +CREATE FUNCTION fn1(f1 longblob ) returns longblob return 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 'longblob f1 ) returns longblob -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyblob not null f1 ) returns tinyblob not null +CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null return 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 'tinyblob not null f1 ) returns tinyblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns tinyblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(blob not null f1 ) returns blob not null +CREATE FUNCTION fn1(f1 blob not null ) returns blob not null return 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 'blob not null f1 ) returns blob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns blob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumblob not null f1 ) returns mediumblob not null +CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null return 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 'mediumblob not null f1 ) returns mediumblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns mediumblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(longblob not null f1 ) returns longblob not null +CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null return 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 'longblob not null f1 ) returns longblob not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns longblob not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary f1 ) returns binary +CREATE FUNCTION fn1(f1 binary ) returns binary return 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 'binary f1 ) returns binary -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(binary not null f1 ) returns binary not null +CREATE FUNCTION fn1(f1 binary not null ) returns binary not null return 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 'binary not null f1 ) returns binary not null +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'not null ) returns binary not null return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint f1 ) returns tinyint +CREATE FUNCTION fn1(f1 tinyint ) returns tinyint return 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 'tinyint f1 ) returns tinyint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned f1 ) returns tinyint unsigned +CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned return 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 'tinyint unsigned f1 ) returns tinyint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint zerofill f1 ) returns tinyint zerofill +CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill return 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 'tinyint zerofill f1 ) returns tinyint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill +CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill return 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 'tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint f1 ) returns smallint +CREATE FUNCTION fn1(f1 smallint ) returns smallint return 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 'smallint f1 ) returns smallint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned f1 ) returns smallint unsigned +CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned return 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 'smallint unsigned f1 ) returns smallint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint zerofill f1 ) returns smallint zerofill +CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill return 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 'smallint zerofill f1 ) returns smallint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(smallint unsigned zerofill f1 ) returns smallint unsigned zerofill +CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill return 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 'smallint unsigned zerofill f1 ) returns smallint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint f1 ) returns mediumint +CREATE FUNCTION fn1(f1 mediumint ) returns mediumint return 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 'mediumint f1 ) returns mediumint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned f1 ) returns mediumint unsigned +CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned return 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 'mediumint unsigned f1 ) returns mediumint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint zerofill f1 ) returns mediumint zerofill +CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill return 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 'mediumint zerofill f1 ) returns mediumint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill +CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill return 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 'mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int f1 ) returns int +CREATE FUNCTION fn1(f1 int ) returns int return 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 'int f1 ) returns int -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned f1 ) returns int unsigned +CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned return 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 'int unsigned f1 ) returns int unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int zerofill f1 ) returns int zerofill +CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned return 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 'int zerofill f1 ) returns int zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(int unsigned zerofill f1 ) returns int unsigned zerofill +CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned return 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 'int unsigned zerofill f1 ) returns int unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint f1 ) returns bigint +CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned return 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 'bigint f1 ) returns bigint -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned f1 ) returns bigint unsigned +CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned return 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 'bigint unsigned f1 ) returns bigint unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint zerofill f1 ) returns bigint zerofill +CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned return 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 'bigint zerofill f1 ) returns bigint zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(bigint unsigned zerofill f1 ) returns bigint unsigned zerofill +CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill return 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 'bigint unsigned zerofill f1 ) returns bigint unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal f1 ) returns decimal +CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill return 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 'decimal f1 ) returns decimal -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned f1 ) returns decimal unsigned +CREATE FUNCTION fn1(f1 bigint ) returns bigint return 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 'decimal unsigned f1 ) returns decimal unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal zerofill f1 ) returns decimal zerofill +CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned return 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 'decimal zerofill f1 ) returns decimal zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(decimal unsigned zerofill f1 ) returns decimal unsigned zerofill +CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill return 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 'decimal unsigned zerofill f1 ) returns decimal unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric f1 ) returns numeric +CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill return 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 'numeric f1 ) returns numeric -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned f1 ) returns numeric unsigned +CREATE FUNCTION fn1(f1 decimal ) returns decimal return 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 'numeric unsigned f1 ) returns numeric unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric zerofill f1 ) returns numeric zerofill +CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned return 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 'numeric zerofill f1 ) returns numeric zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(numeric unsigned zerofill f1 ) returns numeric unsigned zerofill +CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill return 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 'numeric unsigned zerofill f1 ) returns numeric unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real f1 ) returns real +CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill return 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 'real f1 ) returns real -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned f1 ) returns real unsigned +CREATE FUNCTION fn1(f1 numeric ) returns numeric return 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 'real unsigned f1 ) returns real unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real zerofill f1 ) returns real zerofill +CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned return 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 'real zerofill f1 ) returns real zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(real unsigned zerofill f1 ) returns real unsigned zerofill +CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill return 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 'real unsigned zerofill f1 ) returns real unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float f1 ) returns float +CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill return 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 'float f1 ) returns float -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned f1 ) returns float unsigned +CREATE FUNCTION fn1(f1 real ) returns real return 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 'float unsigned f1 ) returns float unsigned -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float zerofill f1 ) returns float zerofill +CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned return 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 'float zerofill f1 ) returns float zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(float unsigned zerofill f1 ) returns float unsigned zerofill +CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill return 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 'float unsigned zerofill f1 ) returns float unsigned zerofill -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(date f1 ) returns date +CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill return 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 'f1 ) returns date -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(time f1 ) returns time +CREATE FUNCTION fn1(f1 float ) returns float return 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 'f1 ) returns time -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(datetime f1 ) returns datetime +CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned return 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 'f1 ) returns datetime -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(timestamp f1 ) returns timestamp +CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill return 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 'f1 ) returns timestamp -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year f1 ) returns year +CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill return 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 'f1 ) returns year -return f1' at line 1 DROP FUNCTION IF EXISTS fn1; -Warnings: -Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(3) f1 ) returns year(3) +CREATE FUNCTION fn1(f1 date ) returns date +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 time ) returns time +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 datetime ) returns datetime +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 timestamp ) returns timestamp +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year ) returns year +return f1; +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3) return 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 '(3) f1 ) returns year(3) +ERROR 42000: You 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 3) ) returns year(3) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(year(4) f1 ) returns year(4) +CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4) return 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 '(4) f1 ) returns year(4) +ERROR 42000: You 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 4) ) returns year(4) return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(enum("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum") return 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 '("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +ERROR 42000: You 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 "1enum", "2enum") ) returns enum("1enum", "2enum") return f1' at line 1 DROP FUNCTION IF EXISTS fn1; Warnings: Note 1305 FUNCTION fn1 does not exist -CREATE FUNCTION fn1(set("1set", "2set") f1 ) returns set("1set", "2set") +CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set") return 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 'set("1set", "2set") f1 ) returns set("1set", "2set") +ERROR 42000: You 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 "1set", "2set") ) returns set("1set", "2set") return f1' at line 1 Testcase 4.1.16: @@ -2564,15 +3404,15 @@ alter function sp1 sql security invoker comment 'this is a function'; alter procedure sp1 sql security definer; alter function sp1 sql security definer; show CREATE PROCEDURE sp1; -Procedure sql_mode Create Procedure -sp1 CREATE PROCEDURE `sp1`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() COMMENT 'this is a procedure' -set @x= 3 +set @x= 3 latin1 modified created show CREATE FUNCTION sp1; -Function sql_mode Create Function -sp1 CREATE FUNCTION `sp1`() RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +sp1 CREATE DEFINER=`root`@`localhost` FUNCTION `sp1`() RETURNS int(11) COMMENT 'this is a function' -return 4 +return 4 latin1 modified created USE db_storedproc; DROP DATABASE db_storedproc_3122; DROP FUNCTION db_storedproc.sp1; @@ -2789,7 +3629,7 @@ SELECT count(*) into cnt from t2; set @count = cnt; SELECT @count; 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 'SELECT count(*) into cnt from t2; +ERROR 42000: You 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 @count = cnt; SELECT @count; END' at line 2 @@ -2841,6 +3681,14 @@ Testcase ....: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +accessible:BEGIN +SELECT @x; +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 'accessible:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() add:BEGIN SELECT @x; END// @@ -2860,9 +3708,7 @@ CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; 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 ':BEGIN -SELECT @x; -END' at line 2 +ERROR 0A000: ALTER VIEW is not allowed in stored procedures DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() analyze:BEGIN @@ -2961,7 +3807,7 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -CALL:BEGIN +call:BEGIN SELECT @x; 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 ':BEGIN @@ -3033,11 +3879,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -columns:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() condition:BEGIN SELECT @x; END// @@ -3046,14 +3887,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -connection:BEGIN -SELECT @x; -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 'connection:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() constraint:BEGIN SELECT @x; END// @@ -3382,11 +4215,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -fields:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() float:BEGIN SELECT @x; END// @@ -3395,6 +4223,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +float4:BEGIN +SELECT @x; +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 'float4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +float8:BEGIN +SELECT @x; +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 'float8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() for:BEGIN SELECT @x; END// @@ -3419,11 +4263,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -found:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() from:BEGIN SELECT @x; END// @@ -3440,11 +4279,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -goto:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() grant:BEGIN SELECT @x; END// @@ -3581,6 +4415,46 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +int1:BEGIN +SELECT @x; +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 'int1:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int2:BEGIN +SELECT @x; +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 'int2:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int3:BEGIN +SELECT @x; +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 'int3:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int4:BEGIN +SELECT @x; +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 'int4:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +int8:BEGIN +SELECT @x; +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 'int8:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() integer:BEGIN SELECT @x; END// @@ -3693,6 +4567,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +linear:BEGIN +SELECT @x; +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 'linear:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() lines:BEGIN SELECT @x; END// @@ -3773,6 +4655,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +master_ssl_verify_server_cert:BEGIN +SELECT @x; +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 'master_ssl_verify_server_cert:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() match:BEGIN SELECT @x; END// @@ -3973,11 +4863,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -privileges:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() procedure:BEGIN SELECT @x; END// @@ -3994,6 +4879,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +range:BEGIN +SELECT @x; +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 'range:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() read:BEGIN SELECT @x; END// @@ -4010,6 +4903,22 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +read_only:BEGIN +SELECT @x; +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 'read_only:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +read_write:BEGIN +SELECT @x; +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 'read_write:BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() real:BEGIN SELECT @x; END// @@ -4034,6 +4943,14 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() +release:BEGIN +SELECT @x; +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 ':BEGIN +SELECT @x; +END' at line 2 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() rename:BEGIN SELECT @x; END// @@ -4178,14 +5095,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -soname:BEGIN -SELECT @x; -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 'soname:BEGIN -SELECT @x; -END' at line 2 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() spatial:BEGIN SELECT @x; END// @@ -4290,11 +5199,6 @@ SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() -tables:BEGIN -SELECT @x; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() terminated:BEGIN SELECT @x; END// @@ -4587,6 +5491,9 @@ END begin_label// CALL sp1(); @v1 @v2 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 sp1; Testcase 4.2.7: @@ -4621,6 +5528,9 @@ declare y char; SELECT f1, f2 into x, y from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 +Warning 1265 Data truncated for column 'y' at row 1 DROP PROCEDURE sp1; Testcase 4.2.9: @@ -4684,8 +5594,6 @@ Ensure that the variables, cursors, conditions, and handlers declared for a stored procedure (with the declare statement) may only be properly defined -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: DECIMAL(255,255) is not rejected CREATE PROCEDURE sp6( ) BEGIN declare x char default 'a'; @@ -4703,9 +5611,9 @@ fetch cur1 into e; SELECT x, y, z, a, b, c, d, e; close cur1; END// +ERROR 42000: Too big scale 255 specified for column ''. Maximum is 30. CALL sp6(); -x y z a b c d e -a 1 1.1 value1 1200000000000 mediumtext 2005-02-02 12:12:12 a` +ERROR 42000: PROCEDURE db_storedproc.sp6 does not exist DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5828,13 +6736,6 @@ declare continue handler for sqlstate '23000' set @x2 = 1; declare x char; END// ERROR 42000: Variable or condition declaration after cursor or handler declaration -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN -declare continue handler for sqlstate '23000' set @x2 = 1; -declare x char; -END// -ERROR 42000: Variable or condition declaration after cursor or handler declaration DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( ) BEGIN @@ -5864,6 +6765,15 @@ Ensure that the declare statement can declare multiple variables both separately and all at once from a variable list. (multiple declaration) -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +DECLARE x1 CHAR(100) DEFAULT 'outer'; +BEGIN +DECLARE x1 CHAR(100) DEFAULT x1; +END; +END// +CALL sp1(); +DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z char default null; @@ -5988,7 +6898,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +000 000 000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -5997,7 +6911,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +001 001 001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6024,7 +6938,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000 00000 00000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6033,7 +6951,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00001 00001 00001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6060,7 +6978,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000 00000000 00000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6069,7 +6991,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000001 00000001 00000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6096,7 +7018,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6105,7 +7031,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +0000000001 0000000001 0000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6123,7 +7049,7 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +18446744073709551615 18446744073709551615 18446744073709551615 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6132,7 +7058,11 @@ SELECT x, y, z; END// CALL sp1(); x y z --1 -1 -1 +00000000000000000000 00000000000000000000 00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6141,7 +7071,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1 1 1 +00000000000000000001 00000000000000000001 00000000000000000001 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6150,18 +7080,24 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +-9999999999 -9999999999 -9999999999 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6170,62 +7106,76 @@ SELECT x, y, z; END// CALL sp1(); x y z --34028234660123456789012345678901234567 -34028234660123456789012345678901234567 -34028234660123456789012345678901234567 +0000000000 0000000000 0000000000 +Warnings: +Warning 1264 Out of range value for column 'x' at row 1 +Warning 1264 Out of range value for column 'y' at row 1 +Warning 1264 Out of range value for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z decimal unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0 0 0 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare x, y, z numeric unsigned zerofill default 1.175494351e-38; SELECT x, y, z; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked CALL sp1(); x y z -0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 0.00000000000000000000000000000000000001175494351 +0000000000 0000000000 0000000000 +Warnings: +Note 1265 Data truncated for column 'x' at row 1 +Note 1265 Data truncated for column 'y' at row 1 +Note 1265 Data truncated for column 'z' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6252,7 +7202,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6261,7 +7211,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +00000001.175494351e-38 00000001.175494351e-38 00000001.175494351e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6270,7 +7220,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6279,7 +7229,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +1.17549e-38 1.17549e-38 1.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6288,7 +7238,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6297,7 +7247,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -1.175494351e-38 1.175494351e-38 1.175494351e-38 +01.17549e-38 01.17549e-38 01.17549e-38 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6333,7 +7283,7 @@ SELECT x, y, z; END// CALL sp1(); x y z -20050202122012 20050202122012 20050202122012 +2005-02-02 12:20:12 2005-02-02 12:20:12 2005-02-02 12:20:12 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN @@ -6419,6 +7369,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare accessible char; +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 'accessible char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare add char; 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 'add char; @@ -6524,9 +7481,9 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare CALL char; +declare call char; 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 'CALL char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() @@ -6587,11 +7544,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare columns char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare condition char; 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 'condition char; @@ -6599,13 +7551,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare connection char; -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 'connection char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare constraint char; 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 'constraint char; @@ -6893,11 +7838,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare fields char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare float char; 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 'float char; @@ -6905,6 +7845,20 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare float4 char; +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 'float4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare float8 char; +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 'float8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare for char; 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 'for char; @@ -6926,11 +7880,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare found char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare from char; 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 'from char; @@ -6945,11 +7894,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare goto char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare grant char; 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 'grant char; @@ -7069,6 +8013,41 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare int1 char; +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 'int1 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int2 char; +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 'int2 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int3 char; +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 'int3 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int4 char; +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 'int4 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare int8 char; +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 'int8 char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare integer char; 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 'integer char; @@ -7167,6 +8146,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare linear char; +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 'linear char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare lines char; 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 'lines char; @@ -7237,6 +8223,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare master_ssl_verify_server_cert char; +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 'master_ssl_verify_server_cert char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare match char; 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 'match char; @@ -7412,11 +8405,6 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN -declare privileges char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare procedure char; 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 'procedure char; @@ -7431,6 +8419,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare range char; +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 'range char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare read char; 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 'read char; @@ -7445,6 +8440,18 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare read_only char; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN +declare read_write char; +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 'read_write char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare real char; 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 'real char; @@ -7466,6 +8473,13 @@ END' at line 3 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN +declare release char; +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 'release char; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1() +BEGIN declare rename char; 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 'rename char; @@ -7624,15 +8638,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare soname char; -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 'soname char; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1() -BEGIN declare spatial char; 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 'spatial char; @@ -7750,11 +8755,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare tables char; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -BEGIN declare terminated char; 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 'terminated char; @@ -7899,9 +8899,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1() BEGIN -declare USE char; +declare use char; 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 'USE char; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use char; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8150,6 +9150,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'accessible condition for sqlstate '02000'; +declare exit handler for add set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add condition for sqlstate '02000'; declare exit handler for add set @var2 = 1; END// @@ -8306,10 +9316,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL condition for sqlstate '02000'; +declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 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 'CALL condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -8409,11 +9419,7 @@ BEGIN declare connection condition for sqlstate '02000'; declare exit handler for connection set @var2 = 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 'connection condition for sqlstate '02000'; -declare exit handler for connection s' at line 3 DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN declare constraint condition for sqlstate '02000'; @@ -8829,12 +9835,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields condition for sqlstate '02000'; -declare exit handler for fields set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare float condition for sqlstate '02000'; declare exit handler for float set @var2 = 1; END// @@ -8845,6 +9845,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float4 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = 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 'float8 condition for sqlstate '02000'; +declare exit handler for add set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare for condition for sqlstate '02000'; declare exit handler for for set @var2 = 1; END// @@ -8876,12 +9896,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found condition for sqlstate '02000'; -declare exit handler for found set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare from condition for sqlstate '02000'; declare exit handler for from set @var2 = 1; END// @@ -8902,12 +9916,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto condition for sqlstate '02000'; -declare exit handler for goto set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare grant condition for sqlstate '02000'; declare exit handler for grant set @var2 = 1; END// @@ -9081,6 +10089,56 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int1 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int2 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int3 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int4 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int8 condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1;' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer condition for sqlstate '02000'; declare exit handler for integer set @var2 = 1; END// @@ -9223,6 +10281,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'linear condition for sqlstate '02000'; +declare exit handler for int set @var2 = ' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines condition for sqlstate '02000'; declare exit handler for lines set @var2 = 1; END// @@ -9323,6 +10391,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'master_ssl_verify_server_cert condition for sqlstate '02000'; +declare exit handl' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match condition for sqlstate '02000'; declare exit handler for match set @var2 = 1; END// @@ -9578,12 +10656,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare privileges condition for sqlstate '02000'; -declare exit handler for privileges set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare procedure condition for sqlstate '02000'; declare exit handler for procedure set @var2 = 1; END// @@ -9604,6 +10676,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'range condition for sqlstate '02000'; +declare exit handler for int set @var2 = 1' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read condition for sqlstate '02000'; declare exit handler for read set @var2 = 1; END// @@ -9624,6 +10706,26 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'int set @var2 = 1; +END' at line 4 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'read_write condition for sqlstate '02000'; +declare exit handler for int set @var' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real condition for sqlstate '02000'; declare exit handler for real set @var2 = 1; END// @@ -9654,6 +10756,16 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release condition for sqlstate '02000'; +declare exit handler for int set @var2 = 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 'release condition for sqlstate '02000'; +declare exit handler for int set @var2 =' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename condition for sqlstate '02000'; declare exit handler for rename set @var2 = 1; END// @@ -9774,10 +10886,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT condition for sqlstate '02000'; +declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 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 'SELECT condition for sqlstate '02000'; +ERROR 42000: You 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 condition for sqlstate '02000'; declare exit handler for SELECT set @var2' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -9835,16 +10947,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname condition for sqlstate '02000'; -declare exit handler for soname set @var2 = 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 'soname condition for sqlstate '02000'; -declare exit handler for soname set @var2' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial condition for sqlstate '02000'; declare exit handler for spatial set @var2 = 1; END// @@ -9977,12 +11079,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables condition for sqlstate '02000'; -declare exit handler for tables set @var2 = 1; -END// -DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1( ) -BEGIN declare terminated condition for sqlstate '02000'; declare exit handler for terminated set @var2 = 1; END// @@ -10144,10 +11240,10 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE condition for sqlstate '02000'; +declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 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 'USE condition for sqlstate '02000'; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; ' at line 3 DROP PROCEDURE IF EXISTS sp1; @@ -10409,6 +11505,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare accessible handler for sqlstate '02000' set @var2 = 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 'accessible handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare add handler for sqlstate '02000' set @var2 = 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 'add handler for sqlstate '02000' set @var2 = 1; @@ -10544,9 +11649,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare CALL handler for sqlstate '02000' set @var2 = 1; +declare call handler for sqlstate '02000' set @var2 = 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 'CALL handler for sqlstate '02000' set @var2 = 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 'call handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -10625,15 +11730,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare columns handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare condition handler for sqlstate '02000' set @var2 = 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 'condition handler for sqlstate '02000' set @var2 = 1; @@ -10643,15 +11739,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare connection handler for sqlstate '02000' set @var2 = 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 'connection handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare constraint handler for sqlstate '02000' set @var2 = 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 'constraint handler for sqlstate '02000' set @var2 = 1; @@ -10661,6 +11748,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare continue handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare convert handler for sqlstate '02000' set @var2 = 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 'convert handler for sqlstate '02000' set @var2 = 1; @@ -10976,6 +12068,11 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare exit handler for sqlstate '02000' set @var2 = 1; +END// +DROP PROCEDURE IF EXISTS sp1; +CREATE PROCEDURE sp1( ) +BEGIN declare explain handler for sqlstate '02000' set @var2 = 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 'explain handler for sqlstate '02000' set @var2 = 1; @@ -11003,18 +12100,27 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare fields handler for sqlstate '02000' set @var2 = 1; +declare float handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare float handler for sqlstate '02000' set @var2 = 1; +declare float4 handler for sqlstate '02000' set @var2 = 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 'float handler for sqlstate '02000' set @var2 = 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 'float4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare float8 handler for sqlstate '02000' set @var2 = 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 'float8 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11048,15 +12154,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare found handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare from handler for sqlstate '02000' set @var2 = 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 'from handler for sqlstate '02000' set @var2 = 1; @@ -11075,15 +12172,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare goto handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare grant handler for sqlstate '02000' set @var2 = 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 'grant handler for sqlstate '02000' set @var2 = 1; @@ -11237,6 +12325,51 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare int1 handler for sqlstate '02000' set @var2 = 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 'int1 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int2 handler for sqlstate '02000' set @var2 = 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 'int2 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int3 handler for sqlstate '02000' set @var2 = 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 'int3 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int4 handler for sqlstate '02000' set @var2 = 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 'int4 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare int8 handler for sqlstate '02000' set @var2 = 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 'int8 handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare integer handler for sqlstate '02000' set @var2 = 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 'integer handler for sqlstate '02000' set @var2 = 1; @@ -11363,6 +12496,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare linear handler for sqlstate '02000' set @var2 = 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 'linear handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare lines handler for sqlstate '02000' set @var2 = 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 'lines handler for sqlstate '02000' set @var2 = 1; @@ -11453,6 +12595,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 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 'master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare match handler for sqlstate '02000' set @var2 = 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 'match handler for sqlstate '02000' set @var2 = 1; @@ -11705,6 +12856,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare range handler for sqlstate '02000' set @var2 = 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 'range handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare read handler for sqlstate '02000' set @var2 = 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 'read handler for sqlstate '02000' set @var2 = 1; @@ -11723,6 +12883,24 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare read_only handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN +declare read_write handler for sqlstate '02000' set @var2 = 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 'read_write handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare real handler for sqlstate '02000' set @var2 = 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 'real handler for sqlstate '02000' set @var2 = 1; @@ -11750,6 +12928,15 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN +declare release handler for sqlstate '02000' set @var2 = 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 'release handler for sqlstate '02000' set @var2 = 1; +END' at line 3 +DROP PROCEDURE IF EXISTS sp1; +Warnings: +Note 1305 PROCEDURE sp1 does not exist +CREATE PROCEDURE sp1( ) +BEGIN declare rename handler for sqlstate '02000' set @var2 = 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 'rename handler for sqlstate '02000' set @var2 = 1; @@ -11858,9 +13045,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare SELECT handler for sqlstate '02000' set @var2 = 1; +declare select handler for sqlstate '02000' set @var2 = 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 'SELECT handler for sqlstate '02000' set @var2 = 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 handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -11912,15 +13099,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare soname handler for sqlstate '02000' set @var2 = 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 'soname handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare spatial handler for sqlstate '02000' set @var2 = 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 'spatial handler for sqlstate '02000' set @var2 = 1; @@ -12038,15 +13216,6 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare tables handler for sqlstate '02000' set @var2 = 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 'handler for sqlstate '02000' set @var2 = 1; -END' at line 3 -DROP PROCEDURE IF EXISTS sp1; -Warnings: -Note 1305 PROCEDURE sp1 does not exist -CREATE PROCEDURE sp1( ) -BEGIN declare terminated handler for sqlstate '02000' set @var2 = 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 'terminated handler for sqlstate '02000' set @var2 = 1; @@ -12191,9 +13360,9 @@ Warnings: Note 1305 PROCEDURE sp1 does not exist CREATE PROCEDURE sp1( ) BEGIN -declare USE handler for sqlstate '02000' set @var2 = 1; +declare use handler for sqlstate '02000' set @var2 = 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 'USE handler for sqlstate '02000' set @var2 = 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 'use handler for sqlstate '02000' set @var2 = 1; END' at line 3 DROP PROCEDURE IF EXISTS sp1; Warnings: @@ -12384,10 +13553,13 @@ set @v2 = y; END// CALL sp1(); x y @x -NULL abaa 3 +NULL a 3 +Warnings: +Warning 1265 Data truncated for column 'y' at row 3 +Warning 1265 Data truncated for column 'y' at row 1 SELECT @v1, @v2; @v1 @v2 -4 a` +4 a DROP PROCEDURE sp1; Testcase 4.2.28: @@ -12454,7 +13626,7 @@ CALL sp1(); @xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12481,9 +13653,11 @@ set xx = 'temp'; set @xx = xx; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'xx' at row 1 SELECT @xx; @xx -temp +t DROP PROCEDURE sp1; Testcase 4.2.31 - b: @@ -12501,7 +13675,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect DOUBLE value: 'asd' +Warning 1265 Data truncated for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12527,7 +13701,9 @@ SELECT xx; END// CALL sp1(); xx -asd +0000-00-00 00:00:00 +Warnings: +Warning 1264 Out of range value for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12571,7 +13747,7 @@ CALL sp1(); xx 0 Warnings: -Warning 1292 Truncated incorrect INTEGER value: 'asd' +Warning 1366 Incorrect integer value: 'asd' for column 'xx' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12602,6 +13778,8 @@ declare x char ascii; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12665,6 +13843,8 @@ declare x binary; SELECT f1 into x from t2 limit 1; END// CALL sp1(); +Warnings: +Warning 1265 Data truncated for column 'x' at row 1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12812,8 +13992,6 @@ declare x decimal; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12821,8 +13999,6 @@ declare x decimal unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12830,8 +14006,6 @@ declare x decimal zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12839,8 +14013,6 @@ declare x decimal unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12848,8 +14020,6 @@ declare x numeric; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12857,8 +14027,6 @@ declare x numeric unsigned; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12866,8 +14034,6 @@ declare x numeric zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -12875,8 +14041,6 @@ declare x numeric unsigned zerofill; SELECT f1 into x from t2 limit 1; END// CALL sp1(); -Warnings: -Error 1366 Incorrect decimal value: '' for column '' at row -1 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() BEGIN @@ -13254,7 +14418,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13279,7 +14443,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; END while; @@ -13306,7 +14470,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13330,7 +14494,7 @@ open cur1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13358,7 +14522,7 @@ BEGIN open cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13388,7 +14552,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13416,7 +14580,7 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13430,7 +14594,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 10; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13441,7 +14605,7 @@ open cur1; BEGIN declare cur1 cursor for SELECT f1, f2, f3, f4 from t2; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -13473,7 +14637,7 @@ BEGIN open cur1; close cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13485,7 +14649,7 @@ DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; -declare count integer default 0; +declare count integer default 20; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -13514,13 +14678,13 @@ BEGIN declare done int default 0; declare count integer default 20; declare newf2 char(20); -declare newf1 date; +declare newf1 int1; declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2; set @x = newf1; set @y = newf2; @@ -13590,7 +14754,7 @@ BEGIN close cur1; open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13643,7 +14807,7 @@ fetch cur1 into newf1, newf2, newf4, newf3; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.65: @@ -13669,7 +14833,7 @@ commit; END; END// CALL sp1(); -ERROR 02000: No data to FETCH +ERROR 02000: No data - zero rows fetched, selected, or processed DROP PROCEDURE sp1; Testcase 4.2.66: @@ -13690,7 +14854,7 @@ declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13719,12 +14883,13 @@ declare cur1 cursor for SELECT f1, f2, f4, f5 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; -set count = count - 1; -while count <> 0 do +# set count = count - 1; +# while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; -set count = count - 1; -END while; +# set count = count - 1; +# END while; END; +fetch cur1 into newf1, newf2, newf4, newf3; END// CALL sp1(); DROP PROCEDURE sp1; @@ -13756,7 +14921,7 @@ BEGIN set count = 10; BEGIN open cur2; -while count <> 0 do +while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -13765,7 +14930,8 @@ insert into temp1 values(newf1, newf2, newf4, newf3); close cur1; END; BEGIN -while count <> 0 do +set count = 10; +while count > 0 do fetch cur2 into newf21, newf22, newf24, newf23; set count = count - 1; END while; @@ -13774,9 +14940,9 @@ insert into temp2 values(newf21, newf22, newf24, newf23); close cur2; END// CALL sp1(); -SELECT * from temp1; -f1 f2 f3 f4 -agaaaaaaa agaaaaaaa -4993 agaaaaaaa +SELECT count(*) from temp1; +count(*) +1 SELECT * from temp2; f1 f2 f3 f4 NULL NULL NULL NULL @@ -13798,6 +14964,8 @@ middleinitial CHAR, lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 int, COMMENT TEXT) ENGINE=ndb; +Warnings: +Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); CREATE PROCEDURE sp1(a int) @@ -13924,23 +15092,23 @@ CALL sp2( 'insert' ); SELECT * from t3 where f3 <=5 && f3 >= 0; f1 f2 f3 f1 address 1 -f1 address 2 f1 address 3 f1 address 4 f1 address 5 +f1 address 3 +f1 address 2 +f1 address 4 +f1 address 2 +f1 address 2 f1 address 1 f1 address 2 -f1 address 3 +f1 address 1 f1 address 4 +f1 address 1 f1 address 5 -f1 address 1 -f1 address 2 f1 address 3 f1 address 4 -f1 address 1 -f1 address 2 f1 address 3 -f1 address 4 SELECT count(*) from t3; count(*) 28 @@ -14023,7 +15191,7 @@ delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; END case; 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 'when 'delete' then -delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 10 +delete from res_t3_itisalongname_1381742_itsaverylongname_13' at line 11 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( action char(20) ) BEGIN @@ -14041,8 +15209,9 @@ label2: while count < 10 do BEGIN insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count); -if done=1 then -set count=10; +set count = count + 1; +if count= 10 then +set done=1; END if; END; END while label2; @@ -14056,6 +15225,19 @@ END if; END loop label1; SELECT count, done; END// +CALL sp3('insert'); +count done +10 1 +Warnings: +Warning 1265 Data truncated for column 'name' at row 1 +Warning 1265 Data truncated for column 'name' at row 2 +Warning 1265 Data truncated for column 'name' at row 3 +Warning 1265 Data truncated for column 'name' at row 4 +Warning 1265 Data truncated for column 'name' at row 5 +Warning 1265 Data truncated for column 'name' at row 6 +Warning 1265 Data truncated for column 'name' at row 7 +Warning 1265 Data truncated for column 'name' at row 8 +Warning 1265 Data truncated for column 'name' at row 9 DROP PROCEDURE sp3; drop table res_t3_itisalongname_1381742_itsaverylongname_1381742; @@ -14330,11 +15512,14 @@ CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; label1: repeat -set count1 = count1; +set count1 = count1-1; until count1 < 0 END repeat label1; SELECT count1; END// +CALL sp6(); +count1 +-1 DROP PROCEDURE sp6; Testcase 4.3.7: @@ -14403,7 +15588,7 @@ do v1 > 0 while set v1 = v1 - 1; END while; 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 'do v1 > 0 while +ERROR 42000: You 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 set v1 = v1 - 1; END while; END' at line 4 @@ -14606,7 +15791,7 @@ until count1 < 3 END repeat label1; 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 'label1; -END' at line 7 +END' at line 8 Testcase 4.3.21: -------------------------------------------------------------------------------- @@ -14789,15 +15974,15 @@ insert into t43 values('abcde', 'a!@#$%^&*('); CREATE PROCEDURE d1.sp4() SELECT * from d1.t43; SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp4 PROCEDURE sp4 SQL CONTAINS_SQL NO DEFINER SELECT * from d1.t43 root@localhost modified created latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from d1.t43 USE db_storedproc; DROP DATABASE d1; CREATE DATABASE d1; USE d1; create table t44(a char(5), b char(10)); SELECT * from mysql.proc where specific_name = 'sp4'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; @@ -14839,8 +16024,8 @@ CREATE PROCEDURE sp8 ( n char(20) ) sql security definer comment 'initial' USE d2; alter procedure d1.sp8 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='sp8' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment -d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 +d1 sp8 PROCEDURE sp8 SQL CONTAINS_SQL NO DEFINER n char(20) SELECT * from t1 where t1.f1 = n root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci SELECT * from t1 where t1.f1 = n Testcase 4.4.9: -------------------------------------------------------------------------------- @@ -14856,12 +16041,16 @@ END// USE d2; alter function d1.fn2 sql security definer comment 'updated'; SELECT * from mysql.proc where specific_name='fn2' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 d1 fn2 FUNCTION fn2 SQL CONTAINS_SQL NO DEFINER n int int(11) BEGIN declare a int; set a = 0.9 * n; return a; -END root@localhost modified created updated +END root@localhost modified created updated latin1 latin1_swedish_ci latin1_swedish_ci BEGIN +declare a int; +set a = 0.9 * n; +return a; +END Testcase 4.4.10: -------------------------------------------------------------------------------- @@ -14871,7 +16060,7 @@ SELECT * from t1 where t1.f1 = n; USE d2; DROP PROCEDURE d1.sp9; SELECT * from mysql.proc where specific_name='sp9' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 Testcase 4.4.11: -------------------------------------------------------------------------------- @@ -14885,7 +16074,7 @@ END// USE d2; DROP FUNCTION d1.fn3; SELECT * from mysql.proc where specific_name='fn3' and db='d1'; -db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment +db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8 USE db_storedproc; DROP DATABASE d1; DROP DATABASE d2; @@ -14893,19 +16082,6 @@ DROP DATABASE d2; Section 3.1.5 - Parameter use checks: Functions with all data types -------------------------------------------------------------------------------- -SELECT 1 as 'bug_dec_num'; -bug_dec_num -1 - -. -FIXME: There are differences with datatypes DECIMAL and NUMERIC if large -FIXME: exponent values are used. The diffs are shown only on some machines like -FIXME: AIX52 and HPUX11. Until this has been solved we use numbers that -FIXME: *should* be equal to the exponent representation but have no exponents -FIXME: and use the specified count of *0*s instead. -FIXME: In the source file these tests are marked with the comment hpux11 -. --------------------------------------------------------------------------------- DROP DATABASE IF EXISTS d1; CREATE DATABASE d1; USE d1; @@ -14926,7 +16102,7 @@ return f1; END// SELECT fn2(1.84e+19); fn2(1.84e+19) -0 +18400000000000000000 DROP FUNCTION IF EXISTS fn3; CREATE FUNCTION fn3( f1 bigint unsigned zerofill) returns bigint unsigned zerofill BEGIN @@ -14945,6 +16121,8 @@ END// SELECT fn4(-9.22e+15); fn4(-9.22e+15) 0 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn5; CREATE FUNCTION fn5( f1 decimal) returns decimal BEGIN @@ -14972,6 +16150,10 @@ END// SELECT fn7(99999999999); fn7(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn8; CREATE FUNCTION fn8( f1 decimal (0) unsigned zerofill) returns decimal (0) unsigned zerofill BEGIN @@ -14980,7 +16162,9 @@ return f1; END// SELECT fn8(999999999); fn8(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn9; CREATE FUNCTION fn9( f1 decimal (0) zerofill) returns decimal (0) zerofill BEGIN @@ -14989,7 +16173,10 @@ return f1; END// SELECT fn9(-1.00e+09); fn9(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn10; CREATE FUNCTION fn10( f1 decimal (0, 0)) returns decimal (0, 0) BEGIN @@ -15008,6 +16195,10 @@ END// SELECT fn11(99999999999); fn11(99999999999) 9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn12; CREATE FUNCTION fn12( f1 decimal (0, 0) unsigned zerofill) returns decimal (0, 0) unsigned zerofill BEGIN @@ -15016,7 +16207,9 @@ return f1; END// SELECT fn12(999999999); fn12(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn13; CREATE FUNCTION fn13( f1 decimal (0, 0) zerofill) returns decimal (0, 0) zerofill BEGIN @@ -15025,7 +16218,10 @@ return f1; END// SELECT fn13(-1.00e+09); fn13(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn14; CREATE FUNCTION fn14( f1 decimal (63, 30)) returns decimal (63, 30) BEGIN @@ -15061,7 +16257,10 @@ return f1; END// SELECT fn17(-1.00e+21); fn17(-1.00e+21) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn18_d; CREATE FUNCTION fn18_d( f1 decimal (64)) returns decimal (64) BEGIN @@ -15097,7 +16296,10 @@ return f1; END// SELECT fn21_d_z(1.00e+00); fn21_d_z(1.00e+00) -0000000000000000000000000000000000000000000000000000000000000001 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn22; CREATE FUNCTION fn22( f1 decimal unsigned) returns decimal unsigned BEGIN @@ -15106,7 +16308,10 @@ return f1; END// SELECT fn22(1.00e+00); fn22(1.00e+00) -1 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn23; CREATE FUNCTION fn23( f1 decimal unsigned zerofill) returns decimal unsigned zerofill BEGIN @@ -15115,7 +16320,10 @@ return f1; END// SELECT fn23(1.00e+00); fn23(1.00e+00) -0000000001 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn24; CREATE FUNCTION fn24( f1 decimal zerofill) returns decimal zerofill BEGIN @@ -15124,7 +16332,10 @@ return f1; END// SELECT fn24(-1.00e+09); fn24(-1.00e+09) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn25; CREATE FUNCTION fn25( f1 double) returns double BEGIN @@ -15142,7 +16353,9 @@ return f1; END// SELECT fn26(1.00e+00); fn26(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn27; CREATE FUNCTION fn27( f1 double unsigned zerofill) returns double unsigned zerofill BEGIN @@ -15151,7 +16364,9 @@ return f1; END// SELECT fn27(1.00e+00); fn27(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn28; CREATE FUNCTION fn28( f1 double zerofill) returns double zerofill BEGIN @@ -15160,7 +16375,9 @@ return f1; END// SELECT fn28(1.00e+00); fn28(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn29; CREATE FUNCTION fn29( f1 float) returns float BEGIN @@ -15178,7 +16395,9 @@ return f1; END// SELECT fn30(1.00e+00); fn30(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn31; CREATE FUNCTION fn31( f1 float unsigned zerofill) returns float unsigned zerofill BEGIN @@ -15187,7 +16406,9 @@ return f1; END// SELECT fn31(1.00e+00); fn31(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn32; CREATE FUNCTION fn32( f1 float zerofill) returns float zerofill BEGIN @@ -15196,7 +16417,9 @@ return f1; END// SELECT fn32(1.00e+00); fn32(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn33; CREATE FUNCTION fn33( f1 float(0)) returns float(0) BEGIN @@ -15214,7 +16437,9 @@ return f1; END// SELECT fn34(1.00e+00); fn34(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn35; CREATE FUNCTION fn35( f1 float(0) unsigned zerofill) returns float(0) unsigned zerofill BEGIN @@ -15223,7 +16448,9 @@ return f1; END// SELECT fn35(1.00e+00); fn35(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn36; CREATE FUNCTION fn36( f1 float(0) zerofill) returns float(0) zerofill BEGIN @@ -15232,7 +16459,9 @@ return f1; END// SELECT fn36(1.00e+00); fn36(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn37; CREATE FUNCTION fn37( f1 float(23)) returns float(23) BEGIN @@ -15250,7 +16479,9 @@ return f1; END// SELECT fn38(1.00e+00); fn38(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn39; CREATE FUNCTION fn39( f1 float(23) unsigned zerofill) returns float(23) unsigned zerofill BEGIN @@ -15259,7 +16490,9 @@ return f1; END// SELECT fn39(1.00e+00); fn39(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn40; CREATE FUNCTION fn40( f1 float(23) zerofill) returns float(23) zerofill BEGIN @@ -15268,7 +16501,9 @@ return f1; END// SELECT fn40(1.00e+00); fn40(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn41; CREATE FUNCTION fn41( f1 float(24)) returns float(24) BEGIN @@ -15286,7 +16521,9 @@ return f1; END// SELECT fn42(1.00e+00); fn42(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn43; CREATE FUNCTION fn43( f1 float(24) unsigned zerofill) returns float(24) unsigned zerofill BEGIN @@ -15295,7 +16532,9 @@ return f1; END// SELECT fn43(1.00e+00); fn43(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn44; CREATE FUNCTION fn44( f1 float(24) zerofill) returns float(24) zerofill BEGIN @@ -15304,7 +16543,9 @@ return f1; END// SELECT fn44(1.00e+00); fn44(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn45; CREATE FUNCTION fn45( f1 float(53)) returns float(53) BEGIN @@ -15322,7 +16563,9 @@ return f1; END// SELECT fn46(1.00e+00); fn46(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn47; CREATE FUNCTION fn47( f1 float(53) unsigned zerofill) returns float(53) unsigned zerofill BEGIN @@ -15331,7 +16574,9 @@ return f1; END// SELECT fn47(1.00e+00); fn47(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn48; CREATE FUNCTION fn48( f1 float(53) zerofill) returns float(53) zerofill BEGIN @@ -15340,7 +16585,9 @@ return f1; END// SELECT fn48(1.00e+00); fn48(1.00e+00) -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn49; CREATE FUNCTION fn49( f1 int) returns int BEGIN @@ -15349,7 +16596,10 @@ return f1; END// SELECT fn49(-2.15e+09); fn49(-2.15e+09) --2147483648 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn50; CREATE FUNCTION fn50( f1 int unsigned) returns int unsigned BEGIN @@ -15385,7 +16635,9 @@ return f1; END// SELECT fn53(-8388600); fn53(-8388600) --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn54; CREATE FUNCTION fn54( f1 mediumint unsigned) returns mediumint unsigned BEGIN @@ -15412,7 +16664,11 @@ return f1; END// SELECT fn56(-8388601); fn56(-8388601) -0 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn57; CREATE FUNCTION fn57( f1 numeric) returns numeric BEGIN @@ -15421,7 +16677,9 @@ return f1; END// SELECT fn57(-999999999); fn57(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn58; CREATE FUNCTION fn58( f1 numeric (0)) returns numeric (0) BEGIN @@ -15430,7 +16688,9 @@ return f1; END// SELECT fn58(-999999999); fn58(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn59; CREATE FUNCTION fn59( f1 numeric (0) unsigned) returns numeric (0) unsigned BEGIN @@ -15440,6 +16700,9 @@ END// SELECT fn59(9999999999); fn59(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn60; CREATE FUNCTION fn60( f1 numeric (0) unsigned zerofill) returns numeric (0) unsigned zerofill BEGIN @@ -15448,7 +16711,9 @@ return f1; END// SELECT fn60(99999999); fn60(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn61; CREATE FUNCTION fn61( f1 numeric (0) zerofill) returns numeric (0) zerofill BEGIN @@ -15457,7 +16722,10 @@ return f1; END// SELECT fn61(-99999999); fn61(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn62; CREATE FUNCTION fn62( f1 numeric (0, 0)) returns numeric (0, 0) BEGIN @@ -15466,7 +16734,9 @@ return f1; END// SELECT fn62(-999999999); fn62(-999999999) --999999999 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn63; CREATE FUNCTION fn63( f1 numeric (0, 0) unsigned) returns numeric (0, 0) unsigned BEGIN @@ -15476,6 +16746,9 @@ END// SELECT fn63(9999999999); fn63(9999999999) 9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn64; CREATE FUNCTION fn64( f1 numeric (0, 0) unsigned zerofill) returns numeric (0, 0) unsigned zerofill BEGIN @@ -15484,7 +16757,9 @@ return f1; END// SELECT fn64(99999999); fn64(99999999) -0099999999 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn65; CREATE FUNCTION fn65( f1 numeric (0, 0) zerofill) returns numeric (0, 0) zerofill BEGIN @@ -15493,7 +16768,10 @@ return f1; END// SELECT fn65(-99999999); fn65(-99999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn66; CREATE FUNCTION fn66( f1 numeric (63, 30)) returns numeric (63, 30) BEGIN @@ -15502,7 +16780,12 @@ return f1; END// SELECT fn66(-1e+36); fn66(-1e+36) --999999999999999999999999999999999.999999999999999999999999999999 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn67; CREATE FUNCTION fn67( f1 numeric (63, 30) unsigned) returns numeric (63, 30) unsigned BEGIN @@ -15512,6 +16795,10 @@ END// SELECT fn67(1e+36); fn67(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn68; CREATE FUNCTION fn68( f1 numeric (63, 30) unsigned zerofill) returns numeric (63, 30) unsigned zerofill BEGIN @@ -15521,6 +16808,10 @@ END// SELECT fn68(1e+36); fn68(1e+36) 999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn69; CREATE FUNCTION fn69( f1 numeric (63, 30) zerofill) returns numeric (63, 30) zerofill BEGIN @@ -15529,7 +16820,10 @@ return f1; END// SELECT fn69(-1e+36); fn69(-1e+36) -000000000000000000000000000000000.000000000000000000000000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn70_n; CREATE FUNCTION fn70_n( f1 numeric (64)) returns numeric (64) BEGIN @@ -15577,7 +16871,9 @@ return f1; END// SELECT fn74(999999999); fn74(999999999) -999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn75; CREATE FUNCTION fn75( f1 numeric unsigned zerofill) returns numeric unsigned zerofill BEGIN @@ -15586,7 +16882,9 @@ return f1; END// SELECT fn75(999999999); fn75(999999999) -0999999999 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn76; CREATE FUNCTION fn76( f1 numeric zerofill) returns numeric zerofill BEGIN @@ -15595,7 +16893,10 @@ return f1; END// SELECT fn76(-999999999); fn76(-999999999) -0000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn77; CREATE FUNCTION fn77( f1 real) returns real BEGIN @@ -15613,7 +16914,9 @@ return f1; END// SELECT fn78(1.1); fn78(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn79; CREATE FUNCTION fn79( f1 real unsigned zerofill) returns real unsigned zerofill BEGIN @@ -15622,7 +16925,9 @@ return f1; END// SELECT fn79(1.1); fn79(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn80; CREATE FUNCTION fn80( f1 real zerofill) returns real zerofill BEGIN @@ -15631,7 +16936,9 @@ return f1; END// SELECT fn80(1.1); fn80(1.1) -1.1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn81; CREATE FUNCTION fn81( f1 smallint) returns smallint BEGIN @@ -15667,7 +16974,11 @@ return f1; END// SELECT fn84(-32601); fn84(-32601) -0 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn85; CREATE FUNCTION fn85( f1 tinyint) returns tinyint BEGIN @@ -15703,45 +17014,37 @@ return f1; END// SELECT fn88(-101); fn88(-101) -0 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn89; CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN -if f1 eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; +IF f1 = '1enum' THEN +SET f1 = '2enum'; +ELSE +SET f1 = '1enum'; +END IF; +RETURN f1; 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 'eq "1enum" then -set f1 = '2enum'; -else -set f1 = '1enum'; -END if; -return f1; -END' at line 3 SELECT fn89( '1enum'); -ERROR 42000: FUNCTION d1.fn89 does not exist +fn89( '1enum') +2enum DROP FUNCTION IF EXISTS fn90; -CREATE FUNCTION fn90( f1 set("1set", "2set")) returns set("1set", "2set") +CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set') BEGIN -if(f1 == "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; +IF f1 = '1set' THEN +SET f1 = '2set'; +ELSE +SET f1 = '1set'; +END IF; +RETURN f1; 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 '== "1set") then -set f1 = "2set"; -else -set f1 = "1set"; -END if; -return f1; -END' at line 3 SELECT fn90( '1set'); -ERROR 42000: FUNCTION d1.fn90 does not exist +fn90( '1set') +2set DROP FUNCTION IF EXISTS fn91; CREATE FUNCTION fn91( f1 date) returns date BEGIN @@ -15759,7 +17062,7 @@ return f1; END// SELECT fn92( '23:59:59.999999'); fn92( '23:59:59.999999') -26:00:00 +25:59:59 DROP FUNCTION IF EXISTS fn93; CREATE FUNCTION fn93( f1 datetime) returns datetime BEGIN @@ -15768,7 +17071,7 @@ return f1; END// SELECT fn93('1997-12-31 23:59:59.999999'); fn93('1997-12-31 23:59:59.999999') -1998-01-02 01:01:01 +1998-01-02 01:01:00 DROP FUNCTION IF EXISTS fn94; CREATE FUNCTION fn94( f1 char) returns char BEGIN @@ -15778,6 +17081,8 @@ END// SELECT fn94( 'h'); fn94( 'h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn95; CREATE FUNCTION fn95( f1 char ascii) returns char ascii BEGIN @@ -15787,15 +17092,19 @@ END// SELECT fn95('h'); fn95('h') a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn96; -CREATE FUNCTION fn96( f1 char binary) returns char binary +CREATE FUNCTION fn96( f1 binary) returns binary(2) BEGIN set f1 = concat('a', f1); return f1; END// SELECT fn96( 'h'); fn96( 'h') -a +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP FUNCTION IF EXISTS fn97; CREATE FUNCTION fn97( f1 longtext) returns longtext BEGIN @@ -15917,7 +17226,7 @@ SELECT f1; END// CALL sp2(1.84e+19); f1 --9223372036854775808 +18400000000000000000 DROP PROCEDURE IF EXISTS sp3; CREATE PROCEDURE sp3( f1 bigint unsigned zerofill) BEGIN @@ -15926,7 +17235,7 @@ SELECT f1; END// CALL sp3(1.84e+17); f1 -184000000000000000 +00184000000000000000 DROP PROCEDURE IF EXISTS sp4; CREATE PROCEDURE sp4( f1 bigint zerofill) BEGIN @@ -15935,31 +17244,27 @@ SELECT f1; END// CALL sp4(-9.22e+15); f1 --9220000000000000 +00000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp5; CREATE PROCEDURE sp5( f1 decimal) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: default (10) for DECIMAL not checked, decimal digits shown although not defined CALL sp5(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp6; CREATE PROCEDURE sp6( f1 decimal (0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp6(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp7; CREATE PROCEDURE sp7( f1 decimal (0) unsigned) BEGIN @@ -15968,7 +17273,11 @@ SELECT f1; END// CALL sp7(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp8; CREATE PROCEDURE sp8( f1 decimal (0) unsigned zerofill) BEGIN @@ -15977,199 +17286,201 @@ SELECT f1; END// CALL sp8(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp9; CREATE PROCEDURE sp9( f1 decimal (0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp9(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp10; CREATE PROCEDURE sp10( f1 decimal (0, 0)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp10(-1.00e+09); f1 --1000000000.000000000 +-1000000000 DROP PROCEDURE IF EXISTS sp11; CREATE PROCEDURE sp11( f1 decimal (0, 0) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp11(99999999999); f1 -99999999999.000000000 +9999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp12; CREATE PROCEDURE sp12( f1 decimal (0, 0) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp12(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp13; CREATE PROCEDURE sp13( f1 decimal (0, 0) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp13(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp14; CREATE PROCEDURE sp14( f1 decimal (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp14(-1.00e+21); f1 --1000000000000000000000.000000000 +-1000000000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp15; CREATE PROCEDURE sp15( f1 decimal (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp15(1.00e+16); f1 -10000000000000000.000000000 +10000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp16; CREATE PROCEDURE sp16( f1 decimal (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp16(1.00e+16); f1 -10000000000000000.000000000 +000000000000000010000000000000000.000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp17; CREATE PROCEDURE sp17( f1 decimal (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: wrong number of decimal digits shown CALL sp17(-1.00e+21); f1 --1000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp18_d; CREATE PROCEDURE sp18_d( f1 decimal (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp18_d(-1.00e+30); +f1 +-1000000000000000000000000000000 CALL sp18_d( -1000000000000000000000000000000 ); f1 --1000000000000000000000000000000.000000000 +-1000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp19_du; CREATE PROCEDURE sp19_du( f1 decimal (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp19_du(1.00e+20); +f1 +100000000000000000000 CALL sp19_du( 100000000000000000000 ); f1 -100000000000000000000.000000000 +100000000000000000000 +CALL sp19_du(1.00e+24); +f1 +1000000000000000000000000 CALL sp19_du( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +1000000000000000000000000 DROP PROCEDURE IF EXISTS sp20_duz; CREATE PROCEDURE sp20_duz( f1 decimal (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined +CALL sp20_duz(1.00e+20); +f1 +0000000000000000000000000000000000000000000100000000000000000000 CALL sp20_duz( 100000000000000000000 ); f1 -100000000000000000000.000000000 +0000000000000000000000000000000000000000000100000000000000000000 +CALL sp20_duz(1.00e+24); +f1 +0000000000000000000000000000000000000001000000000000000000000000 CALL sp20_duz( 1000000000000000000000000 ); f1 -1000000000000000000000000.000000000 +0000000000000000000000000000000000000001000000000000000000000000 DROP PROCEDURE IF EXISTS sp21; CREATE PROCEDURE sp21( f1 decimal (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp21(1.00e+00); f1 -1.000000000 +0000000000000000000000000000000000000000000000000000000000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp22; CREATE PROCEDURE sp22( f1 decimal unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp22(1.00e+00); f1 -1.000000000 +10 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp23; CREATE PROCEDURE sp23( f1 decimal unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp23(1.00e+00); f1 -1.000000000 +0000000010 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp24; CREATE PROCEDURE sp24( f1 decimal zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// -FIXME: Following test contains a known problem that will be checked again -FIXME: after WL#2984 has been completed: -FIXME: decimal digits shown although not defined CALL sp24(-1.00e+09); f1 --1000000000.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp25; CREATE PROCEDURE sp25( f1 double) BEGIN @@ -16187,7 +17498,9 @@ SELECT f1; END// CALL sp26(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp27; CREATE PROCEDURE sp27( f1 double unsigned zerofill) BEGIN @@ -16196,7 +17509,9 @@ SELECT f1; END// CALL sp27(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp28; CREATE PROCEDURE sp28( f1 double zerofill) BEGIN @@ -16205,7 +17520,9 @@ SELECT f1; END// CALL sp28(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp29; CREATE PROCEDURE sp29( f1 float) BEGIN @@ -16223,7 +17540,9 @@ SELECT f1; END// CALL sp30(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp31; CREATE PROCEDURE sp31( f1 float unsigned zerofill) BEGIN @@ -16232,7 +17551,9 @@ SELECT f1; END// CALL sp31(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp32; CREATE PROCEDURE sp32( f1 float zerofill) BEGIN @@ -16241,7 +17562,9 @@ SELECT f1; END// CALL sp32(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp33; CREATE PROCEDURE sp33( f1 float(0)) BEGIN @@ -16259,7 +17582,9 @@ SELECT f1; END// CALL sp34(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp35; CREATE PROCEDURE sp35( f1 float(0) unsigned zerofill) BEGIN @@ -16268,7 +17593,9 @@ SELECT f1; END// CALL sp35(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp36; CREATE PROCEDURE sp36( f1 float(0) zerofill) BEGIN @@ -16277,7 +17604,9 @@ SELECT f1; END// CALL sp36(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp37; CREATE PROCEDURE sp37( f1 float(23)) BEGIN @@ -16295,7 +17624,9 @@ SELECT f1; END// CALL sp38(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp39; CREATE PROCEDURE sp39( f1 float(23) unsigned zerofill) BEGIN @@ -16304,7 +17635,9 @@ SELECT f1; END// CALL sp39(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp40; CREATE PROCEDURE sp40( f1 float(23) zerofill) BEGIN @@ -16313,7 +17646,9 @@ SELECT f1; END// CALL sp40(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp41; CREATE PROCEDURE sp41( f1 float(24)) BEGIN @@ -16331,7 +17666,9 @@ SELECT f1; END// CALL sp42(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp43; CREATE PROCEDURE sp43( f1 float(24) unsigned zerofill) BEGIN @@ -16340,7 +17677,9 @@ SELECT f1; END// CALL sp43(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp44; CREATE PROCEDURE sp44( f1 float(24) zerofill) BEGIN @@ -16349,7 +17688,9 @@ SELECT f1; END// CALL sp44(1.00e+00); f1 -1 +000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp45; CREATE PROCEDURE sp45( f1 float(53)) BEGIN @@ -16367,7 +17708,9 @@ SELECT f1; END// CALL sp46(1.00e+00); f1 -1 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp47; CREATE PROCEDURE sp47( f1 float(53) unsigned zerofill) BEGIN @@ -16376,7 +17719,9 @@ SELECT f1; END// CALL sp47(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp48; CREATE PROCEDURE sp48( f1 float(53) zerofill) BEGIN @@ -16385,7 +17730,9 @@ SELECT f1; END// CALL sp48(1.00e+00); f1 -1 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp49; CREATE PROCEDURE sp49( f1 int) BEGIN @@ -16394,7 +17741,10 @@ SELECT f1; END// CALL sp49(-2.15e+09); f1 --2150000000 +-2147483638 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp50; CREATE PROCEDURE sp50( f1 int unsigned) BEGIN @@ -16421,7 +17771,7 @@ SELECT f1; END// CALL sp52(2.15e+08); f1 -215000000 +0215000000 DROP PROCEDURE IF EXISTS sp53; CREATE PROCEDURE sp53( f1 mediumint) BEGIN @@ -16430,7 +17780,9 @@ SELECT f1; END// CALL sp53(-8388600); f1 --8388600 +-8388598 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp54; CREATE PROCEDURE sp54( f1 mediumint unsigned) BEGIN @@ -16457,7 +17809,11 @@ SELECT f1; END// CALL sp56(-8388601); f1 --8388602 +16777215 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp57; CREATE PROCEDURE sp57( f1 numeric) BEGIN @@ -16466,7 +17822,9 @@ SELECT f1; END// CALL sp57(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp58; CREATE PROCEDURE sp58( f1 numeric (0)) BEGIN @@ -16475,7 +17833,9 @@ SELECT f1; END// CALL sp58(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp59; CREATE PROCEDURE sp59( f1 numeric (0) unsigned) BEGIN @@ -16484,7 +17844,10 @@ SELECT f1; END// CALL sp59(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp60; CREATE PROCEDURE sp60( f1 numeric (0) unsigned zerofill) BEGIN @@ -16493,7 +17856,9 @@ SELECT f1; END// CALL sp60(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp61; CREATE PROCEDURE sp61( f1 numeric (0) zerofill) BEGIN @@ -16502,7 +17867,10 @@ SELECT f1; END// CALL sp61(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp62; CREATE PROCEDURE sp62( f1 numeric (0, 0)) BEGIN @@ -16511,7 +17879,9 @@ SELECT f1; END// CALL sp62(-999999999); f1 --999999999.000000000 +-1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp63; CREATE PROCEDURE sp63( f1 numeric (0, 0) unsigned) BEGIN @@ -16520,7 +17890,10 @@ SELECT f1; END// CALL sp63(9999999999); f1 -9999999999.000000000 +9999999999 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp64; CREATE PROCEDURE sp64( f1 numeric (0, 0) unsigned zerofill) BEGIN @@ -16529,7 +17902,9 @@ SELECT f1; END// CALL sp64(99999999); f1 -99999999.000000000 +0100000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp65; CREATE PROCEDURE sp65( f1 numeric (0, 0) zerofill) BEGIN @@ -16538,79 +17913,146 @@ SELECT f1; END// CALL sp65(-99999999); f1 --99999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp66_n; CREATE PROCEDURE sp66_n( f1 numeric (63, 30)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp66_n(-1e+36); +f1 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp66_n( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +-999999999999999999999999999999989.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp67_nu; CREATE PROCEDURE sp67_nu( f1 numeric (63, 30) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp67_nu(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp67_nu( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp68_nuz; CREATE PROCEDURE sp68_nuz( f1 numeric (63, 30) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp68_nuz(1e+36); +f1 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp68_nuz( 1000000000000000000000000000000000000 ); f1 -1000000000000000000000000000000000000.000000000 +999999999999999999999999999999999.999999999999999999999999999999 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Note 1265 Data truncated for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp69_n_z; CREATE PROCEDURE sp69_n_z( f1 numeric (63, 30) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp69_n_z(-1e+36); +f1 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 CALL sp69_n_z( -1000000000000000000000000000000000000 ); f1 --1000000000000000000000000000000000000.000000000 +000000000000000000000000000000010.000000000000000000000000000000 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp70_n; CREATE PROCEDURE sp70_n( f1 numeric (64)) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp70_n(-1e+40); +f1 +-10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp70_n( -10000000000000000000000000000000000000000 ); f1 --10000000000000000000000000000000000000000.000000000 +-10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp71_nu; CREATE PROCEDURE sp71_nu( f1 numeric (64) unsigned) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp71_nu(1.00e+40); +f1 +10000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp71_nu( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +10000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp72_nuz; CREATE PROCEDURE sp72_nuz( f1 numeric (64) unsigned zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp72_nuz(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp72_nuz( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp73_n_z; CREATE PROCEDURE sp73_n_z( f1 numeric (64) zerofill) BEGIN set f1 = (f1 / 2); set f1 = (f1 * 2); set f1 = (f1 - 10); set f1 = (f1 + 10); SELECT f1; END// +CALL sp73_n_z(1.00e+40); +f1 +0000000000000000000000010000000000000000000000000000000000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 CALL sp73_n_z( 10000000000000000000000000000000000000000 ); f1 -10000000000000000000000000000000000000000.000000000 +0000000000000000000000010000000000000000000000000000000000000000 DROP PROCEDURE IF EXISTS sp74; CREATE PROCEDURE sp74( f1 numeric unsigned) BEGIN @@ -16619,7 +18061,9 @@ SELECT f1; END// CALL sp74(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp75; CREATE PROCEDURE sp75( f1 numeric unsigned zerofill) BEGIN @@ -16628,7 +18072,9 @@ SELECT f1; END// CALL sp75(999999999); f1 -999999999.000000000 +1000000000 +Warnings: +Note 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp76; CREATE PROCEDURE sp76( f1 numeric zerofill) BEGIN @@ -16637,7 +18083,10 @@ SELECT f1; END// CALL sp76(-999999999); f1 --999999999.000000000 +0000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp77; CREATE PROCEDURE sp77( f1 real) BEGIN @@ -16646,7 +18095,7 @@ SELECT f1; END// CALL sp77(1.1); f1 -1.10000 +1.1 DROP PROCEDURE IF EXISTS sp78; CREATE PROCEDURE sp78( f1 real unsigned) BEGIN @@ -16655,7 +18104,9 @@ SELECT f1; END// CALL sp78(1.1); f1 -1.10000 +10 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp79; CREATE PROCEDURE sp79( f1 real unsigned zerofill) BEGIN @@ -16664,7 +18115,9 @@ SELECT f1; END// CALL sp79(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp80; CREATE PROCEDURE sp80( f1 real zerofill) BEGIN @@ -16673,7 +18126,9 @@ SELECT f1; END// CALL sp80(1.1); f1 -1.10000 +0000000000000000000010 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp81; CREATE PROCEDURE sp81( f1 smallint) BEGIN @@ -16709,7 +18164,11 @@ SELECT f1; END// CALL sp84(-32601); f1 --32602 +65535 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp85; CREATE PROCEDURE sp85( f1 tinyint) BEGIN @@ -16745,9 +18204,23 @@ SELECT f1; END// CALL sp88(-101); f1 --102 +255 +Warnings: +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 +Warning 1264 Out of range value for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp89; +CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) +BEGIN +IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF; +END// +CALL sp89( '1enum'); DROP PROCEDURE IF EXISTS sp90; +CREATE PROCEDURE sp90( f1 set('1set', '2set')) +BEGIN +IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF; +END// +CALL sp90( '1set'); DROP PROCEDURE IF EXISTS sp91; CREATE PROCEDURE sp91( f1 date) BEGIN @@ -16765,7 +18238,7 @@ SELECT f1; END// CALL sp92( '23:59:59.999999'); f1 -26:00:00.999997 +25:59:59 DROP PROCEDURE IF EXISTS sp93; CREATE PROCEDURE sp93( f1 datetime) BEGIN @@ -16774,7 +18247,7 @@ SELECT f1; END// CALL sp93('1997-12-31 23:59:59.999999'); f1 -1998-01-02 01:01:01.000001 +1998-01-02 01:01:00 DROP PROCEDURE IF EXISTS sp94; CREATE PROCEDURE sp94( f1 char) BEGIN @@ -16783,7 +18256,9 @@ SELECT f1; END// CALL sp94( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp95; CREATE PROCEDURE sp95( f1 char ascii) BEGIN @@ -16792,7 +18267,9 @@ SELECT f1; END// CALL sp95( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp96; CREATE PROCEDURE sp96( f1 char binary) BEGIN @@ -16801,7 +18278,9 @@ SELECT f1; END// CALL sp96( 'h'); f1 -ah +a +Warnings: +Warning 1265 Data truncated for column 'f1' at row 1 DROP PROCEDURE IF EXISTS sp97; CREATE PROCEDURE sp97( f1 longtext) BEGIN @@ -16846,7 +18325,7 @@ SELECT f1; END// CALL sp101(51); f1 -61 +2061 DROP PROCEDURE IF EXISTS sp102; CREATE PROCEDURE sp102( f1 year(4)) BEGIN @@ -16901,6 +18380,8 @@ END// CALL sp107(2.00e+13); f1 returned +Warnings: +returned 1265 Data truncated for column 'f1' at row 1 USE db_storedproc; DROP DATABASE db1; DROP DATABASE IF EXISTS db1; @@ -16937,9 +18418,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute01(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 2033 2033 2084 2033 2033 2084 +2061 2061 2071 2061 2061 2071 2033 2033 2084 2033 2033 2084 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 2033 2084 2033 2084 +2061 2071 2061 2071 2033 2084 2033 2084 DROP PROCEDURE spexecute01; DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS sp2; @@ -17010,9 +18491,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute03(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah helloworld helloworld NULL helloworld helloworld hellohelloworld +a a a a a a helloworld helloworld NULL helloworld helloworld hellohelloworld var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah helloworld NULL helloworld hellohelloworld +a a a a helloworld NULL helloworld hellohelloworld DROP PROCEDURE spexecute03; DROP PROCEDURE sp3; DROP PROCEDURE IF EXISTS sp4; @@ -17155,7 +18636,7 @@ SELECT var7, var8; END// CALL spexecute07(); var1 var2 -9223372036854775807 NULL +18400000000000000000 NULL var3 var4 -9220000000000000000 NULL var5 var6 @@ -17163,7 +18644,7 @@ var5 var6 var7 var8 -9220000000000000000 NULL f1 f2 f3 -9223372036854775807 9223372036854775807 NULL +18400000000000000000 18400000000000000000 NULL f4 f5 f6 -9220000000000000000 -9220000000000000000 NULL f7 f8 f9 @@ -17171,7 +18652,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 -9220000000000000000 NULL f1 f2 f3 --2 -2 -2 +18353255926290448384 18353255926290448384 18353255926290448384 f4 f5 f6 -9220000000000000000 6744073709551616 6744073709551616 f7 f8 f9 @@ -17179,7 +18660,7 @@ f7 f8 f9 f10 f11 f12 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 --2 -2 +18353255926290448384 18353255926290448384 var3 var4 6744073709551616 6744073709551616 var5 var6 @@ -17237,9 +18718,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute08(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -368000000000000000 368000000000000000 368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000000 00368000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -368000000000000000 368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00368000000000000000 00368000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute08; DROP PROCEDURE sp8; DROP PROCEDURE IF EXISTS sp9; @@ -17291,9 +18772,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute09(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --18440000000000000 -18440000000000000 -18439999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000000 00000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --18440000000000000 -18439999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +00000000000000000000 00000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute09; DROP PROCEDURE sp9; DROP PROCEDURE IF EXISTS sp10; @@ -17337,9 +18818,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute10(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute10; DROP PROCEDURE sp10; DROP PROCEDURE IF EXISTS sp11; @@ -17372,9 +18853,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute11(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute11; DROP PROCEDURE sp11; DROP PROCEDURE IF EXISTS sp12; @@ -17407,9 +18888,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute12(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999999.000000000 99999999999.000000000 100000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999999.000000000 100000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute12; DROP PROCEDURE sp12; DROP PROCEDURE IF EXISTS sp13; @@ -17442,9 +18923,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute13(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute13; DROP PROCEDURE sp13; DROP PROCEDURE IF EXISTS sp14; @@ -17477,9 +18958,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute14(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000000000000000.000000000000000000000000000000 -999999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute14; DROP PROCEDURE sp14; DROP PROCEDURE IF EXISTS sp15; @@ -17545,9 +19026,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute16(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute16; DROP PROCEDURE sp16; DROP PROCEDURE IF EXISTS sp17; @@ -17579,9 +19060,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute17(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute17; DROP PROCEDURE sp17; DROP PROCEDURE IF EXISTS sp18; @@ -17613,9 +19094,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute18(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute18; DROP PROCEDURE sp18; DROP PROCEDURE IF EXISTS sp19; @@ -17647,9 +19128,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute19(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute19; DROP PROCEDURE sp19; DROP PROCEDURE IF EXISTS sp20; @@ -17681,9 +19162,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute20(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute20; DROP PROCEDURE sp20; DROP PROCEDURE IF EXISTS sp21; @@ -17715,9 +19196,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute21(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute21; DROP PROCEDURE sp21; DROP PROCEDURE IF EXISTS sp22; @@ -17783,9 +19264,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute23(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute23; DROP PROCEDURE sp23; DROP PROCEDURE IF EXISTS sp24; @@ -17817,9 +19298,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute24(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1.1 1.1 11.1 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1.1 11.1 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute24; DROP PROCEDURE sp24; DROP PROCEDURE IF EXISTS sp25; @@ -17851,9 +19332,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute25(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --65402 -65402 -65392 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-32758 -32758 -32748 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --65402 -65392 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-32758 -32748 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute25; DROP PROCEDURE sp25; DROP PROCEDURE IF EXISTS sp26; @@ -17919,9 +19400,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute27(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -26:00:00.999997 26:00:00.999997 28:00:01.999995 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +25:59:59 25:59:59 27:59:59 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -26:00:00.999997 28:00:01.999995 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +25:59:59 27:59:59 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute27; DROP PROCEDURE sp27; DROP PROCEDURE IF EXISTS sp28; @@ -17953,9 +19434,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute28(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1998-01-02 01:01:01.000001 1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-02 01:01:00 1998-01-03 02:02:01 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1998-01-02 01:01:01.000001 1998-01-03 02:02:02.000003 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1998-01-02 01:01:00 1998-01-03 02:02:01 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute28; DROP PROCEDURE sp28; DROP PROCEDURE IF EXISTS sp29; @@ -17987,9 +19468,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute29(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute29; DROP PROCEDURE sp29; DROP PROCEDURE IF EXISTS sp30; @@ -18021,9 +19502,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute30(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute30; DROP PROCEDURE sp30; DROP PROCEDURE IF EXISTS sp31; @@ -18089,9 +19570,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute32(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute32; DROP PROCEDURE sp32; DROP PROCEDURE IF EXISTS sp33; @@ -18123,9 +19604,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute33(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute33; DROP PROCEDURE sp33; DROP PROCEDURE IF EXISTS sp34; @@ -18191,9 +19672,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute35(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute35; DROP PROCEDURE sp35; DROP PROCEDURE IF EXISTS sp36; @@ -18225,9 +19706,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute36(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute36; DROP PROCEDURE sp36; DROP PROCEDURE IF EXISTS sp37; @@ -18293,9 +19774,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute38(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute38; DROP PROCEDURE sp38; DROP PROCEDURE IF EXISTS sp39; @@ -18327,9 +19808,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute39(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute39; DROP PROCEDURE sp39; DROP PROCEDURE IF EXISTS sp40; @@ -18361,9 +19842,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute40(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute40; DROP PROCEDURE sp40; DROP PROCEDURE IF EXISTS sp41; @@ -18395,9 +19876,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute41(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute41; DROP PROCEDURE sp41; DROP PROCEDURE IF EXISTS sp42; @@ -18429,9 +19910,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute42(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.10000 1.10000 11.10000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.10000 11.10000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute42; DROP PROCEDURE sp42; DROP PROCEDURE IF EXISTS sp43; @@ -18463,9 +19944,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute43(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute43; DROP PROCEDURE sp43; DROP PROCEDURE IF EXISTS sp44; @@ -18497,9 +19978,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute44(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute44; DROP PROCEDURE sp44; DROP PROCEDURE IF EXISTS sp45; @@ -18531,9 +20012,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute45(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute45; DROP PROCEDURE sp45; DROP PROCEDURE IF EXISTS sp46; @@ -18565,9 +20046,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute46(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-1000000000 -1000000000 -999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-1000000000 -999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute46; DROP PROCEDURE sp46; DROP PROCEDURE IF EXISTS sp47; @@ -18599,9 +20080,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute47(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute47; DROP PROCEDURE sp47; DROP PROCEDURE IF EXISTS sp48; @@ -18633,9 +20114,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute48(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute48; DROP PROCEDURE sp48; DROP PROCEDURE IF EXISTS sp49; @@ -18667,9 +20148,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute49(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --999999999.000000000 -999999999.000000000 -999999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --999999999.000000000 -999999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute49; DROP PROCEDURE sp49; DROP PROCEDURE IF EXISTS sp50; @@ -18701,9 +20182,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute50(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -9999999999.000000000 9999999999.000000000 10000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +9999999999 9999999999 9999999999 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -9999999999.000000000 10000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +9999999999 9999999999 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute50; DROP PROCEDURE sp50; DROP PROCEDURE IF EXISTS sp51; @@ -18735,9 +20216,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute51(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --99999999.000000000 -99999999.000000000 -99999989.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --99999999.000000000 -99999989.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute51; DROP PROCEDURE sp51; DROP PROCEDURE IF EXISTS sp52; @@ -18769,9 +20250,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute52(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000.000000000000000000000000000000 -10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000.000000000000000000000000000000 -99999999999999999990.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute52; DROP PROCEDURE sp52; DROP PROCEDURE IF EXISTS sp53; @@ -18803,9 +20284,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute53(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute53; DROP PROCEDURE sp53; DROP PROCEDURE IF EXISTS sp54; @@ -18837,9 +20318,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute54(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute54; DROP PROCEDURE sp54; DROP PROCEDURE IF EXISTS sp55; @@ -18871,9 +20352,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute55(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute55; DROP PROCEDURE sp55; DROP PROCEDURE IF EXISTS sp56; @@ -18905,9 +20386,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute56(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -61 61 71 61 61 71 61 61 71 61 61 71 +2061 2061 2071 2061 2061 2071 2061 2061 2071 2061 2061 2071 var1 var2 var3 var4 var5 var6 var7 var8 -61 71 61 71 61 71 61 71 +2061 2071 2061 2071 2061 2071 2061 2071 DROP PROCEDURE spexecute56; DROP PROCEDURE sp56; DROP PROCEDURE IF EXISTS sp57; @@ -19041,9 +20522,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute60(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah aah ah ah aah +a a a a a a a a a a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah aah ah aah +a a a a a a a a DROP PROCEDURE spexecute60; DROP PROCEDURE sp60; DROP PROCEDURE IF EXISTS sp61; @@ -19075,9 +20556,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute61(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -ah ah aah ah ah aah ah ah NULL ah ah aah +a a a a a a a a NULL a a a var1 var2 var3 var4 var5 var6 var7 var8 -ah aah ah aah ah NULL ah aah +a a a a a NULL a a DROP PROCEDURE spexecute61; DROP PROCEDURE sp61; DROP PROCEDURE IF EXISTS sp62; @@ -19177,9 +20658,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute64(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 1000000000 1000000000 1000000010 var1 var2 var3 var4 var5 var6 var7 var8 -1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 1000000000.000000000 1000000010.000000000 +1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 1000000000 1000000010 DROP PROCEDURE spexecute64; DROP PROCEDURE sp64; DROP PROCEDURE IF EXISTS sp65; @@ -19211,9 +20692,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute65(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -999999999.000000000 999999999.000000000 1000000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +1000000000 1000000000 1000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -999999999.000000000 1000000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +1000000000 1000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute65; DROP PROCEDURE sp65; DROP PROCEDURE IF EXISTS sp66; @@ -19245,9 +20726,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute66(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000.000000000000000000000000000000 10000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute66; DROP PROCEDURE sp66; DROP PROCEDURE IF EXISTS sp67; @@ -19279,9 +20760,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute67(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -10000000000000000.000000000 10000000000000000.000000000 10000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000.000000000 10000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000010000000000000000.000000000000000000000000000000 000000000000000010000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute67; DROP PROCEDURE sp67; DROP PROCEDURE IF EXISTS sp68; @@ -19313,9 +20794,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute68(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000000000000000.000000000 -1000000000000000000000.000000000 -999999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000000000000000.000000000 -999999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute68; DROP PROCEDURE sp68; DROP PROCEDURE IF EXISTS sp69; @@ -19347,9 +20828,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute69(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-100000000000000000000 -10000000000000000000000 -99999999999999999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-10000000000000000000000 -99999999999999999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute69; DROP PROCEDURE sp69; DROP PROCEDURE IF EXISTS sp70; @@ -19381,9 +20862,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute70(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000 10000000000000000000000 100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000 100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute70; DROP PROCEDURE sp70; DROP PROCEDURE IF EXISTS sp71; @@ -19415,9 +20896,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute71(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute71; DROP PROCEDURE sp71; DROP PROCEDURE IF EXISTS sp72; @@ -19449,9 +20930,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute72(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000000000000000000000010 0000000000000000000000000000000000000000000000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute72; DROP PROCEDURE sp72; DROP PROCEDURE IF EXISTS sp73; @@ -19483,9 +20964,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute73(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +10 10 20 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10 20 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute73; DROP PROCEDURE sp73; DROP PROCEDURE IF EXISTS sp74; @@ -19517,9 +20998,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute74(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1.000000000 1.000000000 11.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1.000000000 11.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute74; DROP PROCEDURE sp74; DROP PROCEDURE IF EXISTS sp75; @@ -19551,9 +21032,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute75(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --1000000000.000000000 -1000000000.000000000 -999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000010 0000000010 0000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --1000000000.000000000 -999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000010 0000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute75; DROP PROCEDURE sp75; DROP PROCEDURE IF EXISTS sp76; @@ -19585,9 +21066,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute76(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute76; DROP PROCEDURE sp76; DROP PROCEDURE IF EXISTS sp77; @@ -19619,9 +21100,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute77(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute77; DROP PROCEDURE sp77; DROP PROCEDURE IF EXISTS sp78; @@ -19653,9 +21134,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute78(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000010 000000000010 000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010 000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute78; DROP PROCEDURE sp78; DROP PROCEDURE IF EXISTS sp79; @@ -19687,9 +21168,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute79(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -1 1 11 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000010 0000000000000000000020 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -1 11 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000010 0000000000000000000020 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute79; DROP PROCEDURE sp79; DROP PROCEDURE IF EXISTS sp80; @@ -19721,9 +21202,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute80(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --2150000000 -2150000000 -2149999990 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-2147483638 -2147483638 -2147483628 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --2150000000 -2149999990 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-2147483638 -2147483628 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute80; DROP PROCEDURE sp80; DROP PROCEDURE IF EXISTS sp81; @@ -19823,9 +21304,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute83(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -215000000 215000000 215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0215000000 0215000000 0215000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -215000000 215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0215000000 0215000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute83; DROP PROCEDURE sp83; DROP PROCEDURE IF EXISTS sp84; @@ -19857,9 +21338,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute84(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388600 -8388600 -8388590 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +-8388598 -8388598 -8388588 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388600 -8388590 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +-8388598 -8388588 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute84; DROP PROCEDURE sp84; DROP PROCEDURE IF EXISTS sp85; @@ -19925,9 +21406,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute86(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -16777210 16777210 16777220 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777210 16777210 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -16777210 16777220 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777210 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute86; DROP PROCEDURE sp86; DROP PROCEDURE IF EXISTS sp87; @@ -19959,9 +21440,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute87(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --8388602 -8388602 -8388592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +16777215 16777215 16777215 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --8388602 -8388592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +16777215 16777215 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute87; DROP PROCEDURE sp87; DROP PROCEDURE IF EXISTS sp88; @@ -19993,9 +21474,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute88(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute88; DROP PROCEDURE sp88; DROP PROCEDURE IF EXISTS sp89; @@ -20027,9 +21508,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute89(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -99999999.000000000 99999999.000000000 100000009.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0100000000 0100000000 0100000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -99999999.000000000 100000009.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0100000000 0100000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute89; DROP PROCEDURE sp89; DROP PROCEDURE IF EXISTS sp90; @@ -20061,9 +21542,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute90(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +100000000000000000000.000000000000000000000000000000 10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +10000000000000000000000.000000000000000000000000000000 100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute90; DROP PROCEDURE sp90; DROP PROCEDURE IF EXISTS sp91; @@ -20095,9 +21576,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute91(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000100000000000000000000.000000000000000000000000000000 000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000010000000000000000000000.000000000000000000000000000000 000000000000100000000000000000010.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute91; DROP PROCEDURE sp91; DROP PROCEDURE IF EXISTS sp92; @@ -20129,9 +21610,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute92(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --100000000000000000000.000000000 -10000000000000000000000.000000000 -99999999999999999990.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --10000000000000000000000.000000000 -99999999999999999990.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +000000000000000000000000000000010.000000000000000000000000000000 000000000000000000000000000000020.000000000000000000000000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute92; DROP PROCEDURE sp92; DROP PROCEDURE IF EXISTS sp93; @@ -20163,9 +21644,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute93(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -100000000000000000000.000000000 10000000000000000000000.000000000 100000000000000000010.000000000 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000000100000000000000000000 0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -10000000000000000000000.000000000 100000000000000000010.000000000 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +0000000000000000000000000000000000000000010000000000000000000000 0000000000000000000000000000000000000000000100000000000000000010 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute93; DROP PROCEDURE sp93; DROP PROCEDURE IF EXISTS sp94; @@ -20231,9 +21712,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute95(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute95; DROP PROCEDURE sp95; DROP PROCEDURE IF EXISTS sp96; @@ -20265,9 +21746,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute96(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -65532 65532 65542 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65532 65532 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -65532 65542 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65532 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute96; DROP PROCEDURE sp96; DROP PROCEDURE IF EXISTS sp97; @@ -20299,9 +21780,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute97(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --32602 -32602 -32592 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +65535 65535 65535 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --32602 -32592 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +65535 65535 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute97; DROP PROCEDURE sp97; DROP PROCEDURE IF EXISTS sp98; @@ -20367,9 +21848,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute99(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 -252 252 262 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +252 252 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 -252 262 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +252 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute99; DROP PROCEDURE sp99; DROP PROCEDURE IF EXISTS sp100; @@ -20435,9 +21916,9 @@ SELECT var1, var2, var3, var4, var5, var6, var7, var8; END// CALL spexecute101(); f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 --102 -102 -92 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 +255 255 255 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 -9220000000000000000 6744073709551616 6744073709551616 var1 var2 var3 var4 var5 var6 var7 var8 --102 -92 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 +255 255 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 6744073709551616 DROP PROCEDURE spexecute101; DROP PROCEDURE sp101; USE db_storedproc; @@ -20462,13 +21943,13 @@ set a = '2005-03-14 01:01:02'; insert into temp_table values(a); END// show CREATE PROCEDURE sp2; -Procedure sql_mode Create Procedure -sp2 ALLOW_INVALID_DATES CREATE PROCEDURE `sp2`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp2 ALLOW_INVALID_DATES CREATE DEFINER=`root`@`localhost` PROCEDURE `sp2`() BEGIN declare a datetime; set a = '2005-03-14 01:01:02'; insert into temp_table values(a); -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode = 'traditional'; CALL sp2 (); SELECT * from temp_table; @@ -20498,15 +21979,15 @@ set b = 5; SELECT not 1 between a and b; END// show CREATE PROCEDURE sp3; -Procedure sql_mode Create Procedure -sp3 HIGH_NOT_PRECEDENCE CREATE PROCEDURE `sp3`() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp3 HIGH_NOT_PRECEDENCE CREATE DEFINER=`root`@`localhost` PROCEDURE `sp3`() BEGIN declare a int signed; declare b int unsigned; set a = -5; set b = 5; SELECT not 1 between a and b; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp3(); not 1 between a and b @@ -20541,8 +22022,8 @@ set c = b/a; show warnings; END// show CREATE PROCEDURE sp4; -Procedure sql_mode Create Procedure -sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE PROCEDURE "sp4"() +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp4 REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,ERROR_FOR_DIVISION_BY_ZERO CREATE DEFINER="root"@"localhost" PROCEDURE "sp4"() BEGIN declare a int; declare b int; @@ -20551,7 +22032,7 @@ set a = 0; set b = 1; set c = b/a; show warnings; -END +END latin1 latin1_swedish_ci latin1_swedish_ci set @@sql_mode=''; CALL sp4(); Level Code Message @@ -20589,37 +22070,37 @@ set @x=i1; set @y=@x; END// show CREATE PROCEDURE sp6a; -Procedure sql_mode Create Procedure -sp6a CREATE PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6a CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6a`(i1 longtext, out i2 mediumint , inout i3 longblob, in i4 year, out i5 real) BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6b; -Procedure sql_mode Create Procedure -sp6b CREATE PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6b CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6b`(out i1 longtext, out i2 mediumint , out i3 longblob, out i4 year, out i5 real) DETERMINISTIC BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci show CREATE PROCEDURE sp6c; -Procedure sql_mode Create Procedure -sp6c CREATE PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6c CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6c`(inout i1 longtext, inout i2 mediumint , inout i3 longblob, inout i4 year, inout i5 real) COMMENT 'this is a comment' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6a'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6a PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6b'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6b PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci SHOW PROCEDURE status like 'sp6c'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6c PROCEDURE root@localhost modified created DEFINER this is a comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6a; DROP PROCEDURE sp6b; DROP PROCEDURE sp6c; @@ -20633,8 +22114,8 @@ set @x=i1; set @y=@x; END// SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.3: @@ -20659,8 +22140,8 @@ set @y=@x; return 0; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION sp6; Testcase 4.8.5: @@ -20673,7 +22154,7 @@ Testcase 4.8.6: -------------------------------------------------------------------------------- DROP PROCEDURE IF EXISTS sp6; show procedure status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.7: -------------------------------------------------------------------------------- @@ -20694,7 +22175,7 @@ BEGIN return i1; END// show procedure status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP FUNCTION fn1; Testcase 4.8.9: @@ -20708,8 +22189,8 @@ BEGIN return i1; END// SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created DEFINER +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created DEFINER latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.11: @@ -20738,7 +22219,7 @@ Testcase 4.8.13: -------------------------------------------------------------------------------- DROP FUNCTION IF EXISTS f1000; SHOW FUNCTION STATUS LIKE 'f1000'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.14: -------------------------------------------------------------------------------- @@ -20760,7 +22241,7 @@ set @x=i1; set @y=@x; END// show function status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation DROP PROCEDURE sp6; Testcase 4.8.16: @@ -20777,8 +22258,8 @@ END// alter procedure sp6 sql security invoker; alter procedure sp6 comment 'this is a new comment'; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc sp6 PROCEDURE root@localhost modified created INVOKER this is a new comment latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.18: @@ -20790,12 +22271,12 @@ return x; END// alter function fn1 sql security invoker; show create function fn1; -Function sql_mode Create Function -fn1 CREATE FUNCTION `fn1`(x int) RETURNS int(11) +Function sql_mode Create Function character_set_client collation_connection Database Collation +fn1 CREATE DEFINER=`root`@`localhost` FUNCTION `fn1`(x int) RETURNS int(11) SQL SECURITY INVOKER BEGIN return x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.19: @@ -20808,8 +22289,8 @@ END// alter function fn1 sql security invoker; alter function fn1 comment 'this is a function 3242#@%$#@'; show function status like 'fn1'; -Db Name Type Definer Modified Created Security_type Comment -db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation +db_storedproc fn1 FUNCTION root@localhost modified created INVOKER this is a function 3242#@%$#@ latin1 latin1_swedish_ci latin1_swedish_ci DROP FUNCTION fn1; Testcase 4.8.20: @@ -20822,13 +22303,13 @@ set @y=@x; END// alter procedure sp6 comment 'this is simple'; show CREATE PROCEDURE sp6; -Procedure sql_mode Create Procedure -sp6 CREATE PROCEDURE `sp6`(i1 int , i2 int) +Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation +sp6 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp6`(i1 int , i2 int) COMMENT 'this is simple' BEGIN set @x=i1; set @y=@x; -END +END latin1 latin1_swedish_ci latin1_swedish_ci DROP PROCEDURE sp6; Testcase 4.8.21: @@ -20853,7 +22334,7 @@ set @y=@x; END// DROP PROCEDURE sp6; SHOW PROCEDURE status like 'sp6'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Testcase 4.8.23: -------------------------------------------------------------------------------- @@ -20875,7 +22356,7 @@ return i1; END// DROP FUNCTION fn1; SHOW FUNCTION STATUS LIKE 'fn1'; -Db Name Type Definer Modified Created Security_type Comment +Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation Section 3.1.9 - Routine body checks: -------------------------------------------------------------------------------- @@ -20894,16 +22375,16 @@ SELECT * from t9 limit 0, 100; END// CALL sp6 (10, 20, 30, 40, 50); f1 f2 f3 --5000 a` -5000 --4999 aaa -4999 --4998 abaa -4998 --4997 acaaa -4997 --4996 adaaaa -4996 --4995 aeaaaaa -4995 --4994 afaaaaaa -4994 --4993 agaaaaaaa -4993 --4992 a^aaaaaaaa -4992 -4991 a_aaaaaaaaa -4991 +-4992 a^aaaaaaaa -4992 +-4993 agaaaaaaa -4993 +-4994 afaaaaaa -4994 +-4995 aeaaaaa -4995 +-4996 adaaaa -4996 +-4997 acaaa -4997 +-4998 abaa -4998 +-4999 aaa -4999 +-5000 a` -5000 DROP PROCEDURE sp6; Testcase 4.9.2: @@ -21363,9 +22844,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.14: -------------------------------------------------------------------------------- @@ -21392,9 +22880,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +done +1 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.15: -------------------------------------------------------------------------------- @@ -21422,9 +22917,16 @@ until done END repeat; SELECT done; close cur1; END// -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +CALL h1(); +done +0 +@x=1 +0 +done +1 +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.16: -------------------------------------------------------------------------------- @@ -21452,17 +22954,16 @@ until done END repeat; SELECT done; close cur1; END// -CALL h1() -# cleanup; +CALL h1(); done 0 @x=1 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.17: -------------------------------------------------------------------------------- @@ -21490,9 +22991,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.18: -------------------------------------------------------------------------------- @@ -21520,9 +23021,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.19: -------------------------------------------------------------------------------- @@ -21550,9 +23051,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.20: -------------------------------------------------------------------------------- @@ -21580,9 +23081,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.21: -------------------------------------------------------------------------------- @@ -21610,9 +23111,9 @@ done 0 done 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.22: -------------------------------------------------------------------------------- @@ -21641,9 +23142,9 @@ done 0 done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.23: -------------------------------------------------------------------------------- @@ -21671,9 +23172,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.24: -------------------------------------------------------------------------------- @@ -21701,9 +23202,9 @@ END// CALL h1(); done 0 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.25: -------------------------------------------------------------------------------- @@ -21728,9 +23229,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.26: -------------------------------------------------------------------------------- @@ -21755,9 +23256,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.27: -------------------------------------------------------------------------------- @@ -21780,9 +23281,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.28: -------------------------------------------------------------------------------- @@ -21805,9 +23306,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.29: -------------------------------------------------------------------------------- @@ -21835,9 +23336,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.30: -------------------------------------------------------------------------------- @@ -21865,9 +23366,9 @@ END// CALL h1(); done @x 1 1 -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.31: -------------------------------------------------------------------------------- @@ -21893,9 +23394,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; Testcase 4.11.32: -------------------------------------------------------------------------------- @@ -21921,9 +23422,9 @@ set @x=1; SELECT done, @x; END// CALL h1(); -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; Testcase 4.11.33: -------------------------------------------------------------------------------- @@ -21948,7 +23449,7 @@ set @x=1; SELECT done, @x; END// ERROR 42000: Duplicate condition: condname -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.35: -------------------------------------------------------------------------------- @@ -21973,7 +23474,21 @@ insert into res_t1 values (3, 'c'); END begin2_label; END begin1_label// ERROR 42000: Bad SQLSTATE: '020' -drop table res_t1; +CREATE PROCEDURE h1 () +begin1_label:BEGIN +declare condname1 condition for sqlstate '020'; +declare condname2 condition for sqlstate 'wewe'; +declare condname3 condition for 9999; +set @var2 = 1; +insert into res_t1 values (2, 'b'); +begin2_label: BEGIN +declare continue handler for sqlstate '90000023' set @var3= 1; +set @var4 = 1; +insert into res_t1 values (3, 'c'); +END begin2_label; +END begin1_label// +ERROR 42000: Bad SQLSTATE: '020' +DROP TABLE IF EXISTS res_t1; Testcase 4.11.36: -------------------------------------------------------------------------------- @@ -21989,7 +23504,7 @@ set x1 = 2; END; SELECT @x, x1; END// -DROP PROCEDURE h1; +DROP PROCEDURE IF EXISTS h1; Testcase 4.11.40: -------------------------------------------------------------------------------- @@ -22010,7 +23525,7 @@ declare exit handler for condname2 set x5 = 1; END// ERROR 42000: Duplicate handler declared in the same block DROP PROCEDURE IF EXISTS h1; -drop table res_t1; +DROP TABLE IF EXISTS res_t1; Testcase 4.11.41: -------------------------------------------------------------------------------- @@ -22026,6 +23541,9 @@ set x1 = 2; END; SELECT @x, x1; END// +CALL h1(); +@x x1 +0 2 DROP PROCEDURE IF EXISTS h1; * Testcase 3.1.2.53 (4.11.42): @@ -22076,8 +23594,8 @@ CALL h1(); SELECT @done, @x; @done @x 1 1 -DROP PROCEDURE h1; -DROP TABLE res_t1; +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result index ffedbec83fe..9fb78f108b4 100644 --- a/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/ndb_storedproc_10.result @@ -58,6 +58,7 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' into table t11; Section 3.1.10 - CALL checks: -------------------------------------------------------------------------------- +USE db_storedproc; Testcase 3.1.10.2 + 3.1.10.5: ----------------------------- @@ -94,6 +95,7 @@ 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 @@ -114,6 +116,7 @@ a` a` 1000-01-01 -5000 a` -5000 SELECT fn31105( 9 ); fn31105( 9 ) 81 +connection default; USE db_storedproc; root@localhost db_storedproc @@ -180,6 +183,8 @@ 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() @@ -207,49 +212,72 @@ 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 ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 -abc abc 2005-10-03 100 uvw 1000 CALL sp_ins_3(); SELECT row_count(); row_count() 1 -SELECT * FROM temp ORDER BY f4; +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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 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 ORDER BY f4; +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 @@ -258,8 +286,6 @@ 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 -a^aaaaaaaa a^aaaaaaaa 1000-01-09 -4992 a^aaaaaaaa -4992 -a_aaaaaaaaa a_aaaaaaaaa 1000-01-10 -4991 a_aaaaaaaaa -4991 updated abc 2005-10-03 100 uvw 1000 updated xyz 1949-05-23 100 uvw 1000 updated xyz 1989-11-09 100 uvw 1000 @@ -281,8 +307,10 @@ COUNT( f1 ) f1 SELECT row_count(); row_count() 3 -SELECT * FROM temp ORDER BY f4; +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 @@ -291,20 +319,67 @@ 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 -updated_2 abc 2000-11-09 100 uvw 1000 -qwe xyz 1998-03-26 100 uvw 1000 -updated_2 abc 1989-11-09 100 uvw 1000 -updated xyz 2005-10-24 100 uvw 1000 -updated xyz 1989-11-09 100 uvw 1000 -updated xyz 1949-05-23 100 uvw 1000 +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_2 abc 2005-11-07 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() +-1 +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: diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_03.result b/mysql-test/suite/funcs_1/r/ndb_trig_03.result index fa86acedcb7..f69ffd20597 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_03.result @@ -185,15 +185,14 @@ 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 - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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 -insert 3.5.3.7-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes drop trigger trg4a_1; @@ -211,7 +210,6 @@ 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-1a trig 3.5.3.2_2-yes trig 3.5.3.2_2-yes trig 3.5.3.7-2a @@ -240,29 +238,27 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a 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-1a +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 3.5.3.7-1b drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost @@ -276,23 +272,21 @@ 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-1a +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 3.5.3.7-1b 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-1a +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 -update 3.5.3.7-1b drop trigger trg4b_2; Testcase 3.5.3.7c @@ -318,21 +312,19 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost @@ -346,14 +338,12 @@ 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-1a -insert 3.5.3.7-1c +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 -update 3.5.3.7-1b drop trigger trg4c_2; Testcase 3.5.3.7d: @@ -377,23 +367,20 @@ 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; - -Trigger create disabled - should fail - Bug 8884 ------------------------------------------------- +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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost @@ -407,16 +394,13 @@ 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-1a -insert 3.5.3.7-1c -insert 3.5.3.7-1d +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 -update 3.5.3.7-1b drop trigger trg4d_2; Testcase 3.5.3.8a: @@ -441,14 +425,14 @@ 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 ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -496,15 +480,15 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -551,11 +535,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 @@ -597,11 +581,11 @@ 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; - -Trigger create disabled - should fail - Bug 8887 ------------------------------------------------- +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 diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_08.result b/mysql-test/suite/funcs_1/r/ndb_trig_08.result index 63bb50c37eb..ae84a31b170 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result @@ -140,10 +140,10 @@ 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 order by i120; +select * from db_test.t1_i; i120 i136 i144 i163 1 00222 0000023456 1.050000000000000000000000000000 -select * from db_test.t1_u order by u120; +select * from db_test.t1_u; u120 u136 u144 u163 a 00111 0000099999 999.990000000000000000000000000000 b 00222 0000023456 1.050000000000000000000000000000 @@ -151,7 +151,7 @@ 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 order by d120; +select * from db_test.t1_d; d120 d136 d144 d163 a 00111 0000099999 999.990000000000000000000000000000 c 00333 0000099999 999.990000000000000000000000000000 @@ -344,20 +344,20 @@ 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; +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; +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; +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 @@ -367,7 +367,7 @@ 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; +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 @@ -378,7 +378,7 @@ 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; +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 @@ -388,7 +388,7 @@ 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; +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 @@ -500,9 +500,38 @@ 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: (Disabled as a result of bug _____) ------------------------------------------------------ +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; diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result index 4d063ff2acf..a371d2d4fda 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result @@ -295,8 +295,8 @@ drop table t2; drop table t3; drop table t4; -Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889) ----------------------------------------------------------------------- +Testcase y.y.y.4: Recursive trigger/SP references +------------------------------------------------- set @sql_mode='traditional'; create table t1_sp ( count integer, diff --git a/mysql-test/suite/funcs_1/r/ndb_views.result b/mysql-test/suite/funcs_1/r/ndb_views.result index 1f8b00a695b..486887686c9 100644 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ b/mysql-test/suite/funcs_1/r/ndb_views.result @@ -123,11 +123,7 @@ USE test; -------------------------------------------------------------------------------- There are some statements where the ps-protocol is switched off. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- - -! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables +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); @@ -403,71 +399,3069 @@ f59 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 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 +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 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 +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; @@ -931,9 +3925,108 @@ 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 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 +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 @@ -994,10 +4087,58 @@ 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 ORDER BY f59,f60,f61 LIMIT 2; +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 @@ -1140,17 +4281,17 @@ Drop view if exists test.v1 ; Testcase 3.3.1.22 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2; -SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2; +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 LIMIT 2; +SELECT * FROM test.v1; product 2 CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1 LIMIT 2; +SELECT * FROM test.v1; product root@localhost Drop view if exists test.v1 ; @@ -1228,10 +4369,58 @@ Testcase 3.3.1.26 -------------------------------------------------------------------------------- DROP VIEW IF EXISTS v1; Create view test.v1 AS Select * from test.tb2; -Select * from test.v1 order by f59, f60, f61 limit 2; +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 @@ -1255,57 +4444,2556 @@ 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 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 +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 ; @@ -1896,12 +7584,110 @@ 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 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 -122 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 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 -3000 432 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -1926,16 +7712,214 @@ 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 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 -30 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 -30 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 +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 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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 ; @@ -9721,13 +15705,2557 @@ 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 limit 5; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -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 +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; @@ -9784,28 +18312,2557 @@ F59 F61 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 limit 20; -f59 f60 f61 f62 f63 f64 f65 f66 f67 f68 f69 f70 f71 f72 f73 f74 f75 f76 f77 f78 f79 f80 f81 f82 f83 f84 f85 f86 f87 f88 f89 f90 f91 f92 f93 f94 f95 f96 f97 f98 f99 f100 f101 f102 f103 f104 f105 f106 f107 f108 f109 -1 1 0000000001 0000000000000000000000000000000000000000000000000000000000000001 0000000001 0000000000000000000000000000000000000000000000000000000000000001 -5 0.000000000000000000000000000000 1 0.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 0000000001 000000000000000000000000000000000.000000000000000000000000000000 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549435e-38 1.175494352e-38 00000001.175494352e-38 00000001.175494352e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549435e-38 1.17549e-38 1.175494352e-38 01.17549e-38 00000001.175494352e-38 01.17549e-38 00000001.175494352e-38 1000-01-01 838:59:58 1970-01-02 00:00:01 1970-01-02 00:00:01 1902 1902 1902 2enum 2set -2 2 0000000002 0000000000000000000000000000000000000000000000000000000000000002 0000000002 0000000000000000000000000000000000000000000000000000000000000002 -4 1.100000000000000000000000000000 2 1.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 0000000002 000000000000000000000000000000001.100000000000000000000000000000 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.175494349e-38 1.175494353e-38 00000001.175494353e-38 00000001.175494353e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494349e-38 1.17549e-38 1.175494353e-38 01.17549e-38 00000001.175494353e-38 01.17549e-38 00000001.175494353e-38 1000-01-02 838:59:57 1970-01-03 00:00:02 1970-01-03 00:00:02 1903 1903 1903 1enum 1set,2set -3 3 0000000003 0000000000000000000000000000000000000000000000000000000000000003 0000000003 0000000000000000000000000000000000000000000000000000000000000003 -3 2.200000000000000000000000000000 3 2.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 0000000003 000000000000000000000000000000002.200000000000000000000000000000 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.175494348e-38 1.175494354e-38 00000001.175494354e-38 00000001.175494354e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494348e-38 1.17549e-38 1.175494354e-38 01.17549e-38 00000001.175494354e-38 01.17549e-38 00000001.175494354e-38 1000-01-03 838:59:56 1970-01-04 00:00:03 1970-01-04 00:00:03 1904 1904 1904 2enum 1set -5 5 0000000005 0000000000000000000000000000000000000000000000000000000000000005 0000000005 0000000000000000000000000000000000000000000000000000000000000005 -1 4.400000000000000000000000000000 5 4.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 0000000005 000000000000000000000000000000004.400000000000000000000000000000 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.175494346e-38 1.175494356e-38 00000001.175494356e-38 00000001.175494356e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494346e-38 1.17549e-38 1.175494356e-38 01.17549e-38 00000001.175494356e-38 01.17549e-38 00000001.175494356e-38 1000-01-05 838:59:54 1970-01-06 00:00:05 1970-01-06 00:00:05 1906 1906 1906 2enum 1set,2set -6 6 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0000000006 0000000000000000000000000000000000000000000000000000000000000006 0 5.500000000000000000000000000000 6 5.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 0000000006 000000000000000000000000000000005.500000000000000000000000000000 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.175494345e-38 1.175494357e-38 00000001.175494357e-38 00000001.175494357e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494345e-38 1.17549e-38 1.175494357e-38 01.17549e-38 00000001.175494357e-38 01.17549e-38 00000001.175494357e-38 1000-01-06 838:59:53 1970-01-07 00:00:06 1970-01-07 00:00:06 1907 1907 1907 1enum 1set -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 -100 4 0000000004 0000000000000000000000000000000000000000000000000000000000000004 0000000004 0000000000000000000000000000000000000000000000000000000000000004 -2 3.300000000000000000000000000000 4 3.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 0000000004 000000000000000000000000000000003.300000000000000000000000000000 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.175494347e-38 1.175494355e-38 00000001.175494355e-38 00000001.175494355e-38 -1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.17549e-38 1.17549e-38 1.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 01.17549e-38 -1.17549e-38 -1.175494347e-38 1.17549e-38 1.175494355e-38 01.17549e-38 00000001.175494355e-38 01.17549e-38 00000001.175494355e-38 1000-01-04 838:59:55 1970-01-05 00:00:04 1970-01-05 00:00:04 1905 1905 1905 1enum 2set -100 74 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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; @@ -10180,8 +21237,57 @@ F59 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 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 -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 +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 @@ -10543,8 +21649,57 @@ 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 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 -2005 101 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL 7.7 7.7 00000000000000000007.7 00000000000000000008.8 8.8 8.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 0000000008.8 0000000008.8 0000000008.8 8.8 8.8 8.8 8.8 0000000008.8 00000000000000000008.8 0000000008.8 00000000000000000008.8 2000-01-01 00:00:20 0002-02-02 00:00:00 2000-12-31 23:59:59 2000 2000 2000 1enum 1set +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 @@ -10560,8 +21715,57 @@ 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 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 -8 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 +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 @@ -10576,11 +21780,210 @@ 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 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 -891 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 -891 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 -891 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 -891 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 +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 @@ -10929,10 +22332,6 @@ 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'; - -Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view --------------------------------------------------------------------------------- SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1; @@ -11464,21 +22863,24 @@ ABC 0 ABC 1.7320508075689 CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; SELECT * FROM t2 order by 2; -f1 my_sqrt -ABC 0 -ABC 1.73205080756888 +f1 ABC +my_sqrt 0 +f1 ABC +my_sqrt 1.73205080756888 DROP TABLE t1; DROP TABLE t2; DROP VIEW v1; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc index 2c2e99dc8f4..e839a86eb26 100755 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc @@ -21,6 +21,7 @@ let $message= Section 3.1.10 - CALL checks:; --source include/show_msg80.inc +USE db_storedproc; # ------------------------------------------------------------------------------ let $message= Testcase 3.1.10.2 + 3.1.10.5:; @@ -73,11 +74,12 @@ connect (user2_2, localhost, user_2, , db_storedproc); --source suite/funcs_1/include/show_connection.inc # no privileges exist ---error 1370 +--error ER_PROCACCESS_DENIED_ERROR CALL sp31102(); SELECT fn31105( 9 ); # now 'add' EXECUTE to INVOKER +--echo connection default; connection default; USE db_storedproc; --source suite/funcs_1/include/show_connection.inc @@ -97,6 +99,7 @@ SELECT fn31105( 9 ); disconnect user2_3; # now 'remove' SELECT from INVOKER +--echo connection default; connection default; USE db_storedproc; --source suite/funcs_1/include/show_connection.inc @@ -144,7 +147,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL fn1(); # cleanup @@ -170,7 +173,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT sp1(); # cleanup @@ -184,26 +187,32 @@ let $message= Ensure that the ROW_COUNT() SQL function always returns the correct number of rows affected by the execution of a stored procedure.; --source include/show_msg80.inc +# Note(mleich): Information taken from a comments in +# Bug#21818 Return value of ROW_COUNT() is incorrect for +# ALTER TABLE, LOAD DATA +# ROW_COUNT() is -1 following any statement which is not DELETE, INSERT +# or UPDATE. +# Also, after a CALL statement, ROW_COUNT() will return the value of the +# last statement in the stored procedure. --disable_warnings 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; --enable_warnings CREATE TABLE temp(f1 CHAR(20),f2 CHAR(25),f3 DATE,f4 INT,f5 CHAR(25),f6 INT); INSERT INTO temp SELECT * FROM t10; delimiter //; -#FIXME: add to proc: SELECT row_count() 'ins'; CREATE PROCEDURE sp_ins_1() BEGIN INSERT INTO temp VALUES ('abc', 'abc', '20051003', 100, 'uvw', 1000); END// - -#FIXME: add to proc: SELECT row_count() 'ins_3'; CREATE PROCEDURE sp_ins_3() BEGIN INSERT INTO temp VALUES ('abc', 'xyz', '19490523', 100, 'uvw', 1000); @@ -211,26 +220,11 @@ BEGIN INSERT INTO temp VALUES ('abc', 'xyz', '2005-10-24', 100, 'uvw', 1000); END// -# FIXME: add to proc: SELECT row_count() AS 'updated'; CREATE PROCEDURE sp_upd() BEGIN UPDATE temp SET temp.f1 = 'updated' WHERE temp.f1 ='abc'; END// -# FIXME: use commented proc -# 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 row_count() AS 'insert "qwe"'; -# SELECT COUNT( f1 ), f1 FROM temp GROUP BY f1; -# UPDATE temp SET temp.f1 = 'updated_2' WHERE temp.f1 ='qwe' AND temp.f2 = 'abc'; -# SELECT row_count() AS 'update "qwe" AND "abc"'; -# END// CREATE PROCEDURE sp_ins_upd() BEGIN BEGIN @@ -242,31 +236,70 @@ BEGIN 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// delimiter ;// CALL sp_ins_1(); SELECT row_count(); -SELECT * FROM temp ORDER BY f4; +--sorted_result +SELECT * FROM temp; CALL sp_ins_3(); -#FIXME: check is 1 correct here? I expect 3 for 3 inserted rows inside the procedure SELECT row_count(); -SELECT * FROM temp ORDER BY f4; +--sorted_result +SELECT * FROM temp; CALL sp_upd(); SELECT row_count(); -SELECT * FROM temp ORDER BY f4; +--sorted_result +SELECT * FROM temp; -#FIXME: check is 3 correct here? I expect 7 for 4 inserted and then 3 updated rows inside the procedure CALL sp_ins_upd(); SELECT row_count(); -SELECT * FROM temp ORDER BY f4; +--sorted_result +SELECT * FROM temp; + +CALL sp_del(); +SELECT row_count(); +--sorted_result +SELECT * FROM temp; + +DELETE FROM temp; +CALL sp_with_rowcount(); +SELECT row_count(); +--sorted_result +SELECT * FROM temp; + # cleanup 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; diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc index 49bd5b98401..370bf275ac9 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc @@ -1,77 +1,15 @@ #### suite/funcs_1/storedproc/storedproc_master.inc -# +########################################################################### +# WL4084: Review and fix all disabled test +# enabled this test. +# 2007-Oct-04 Hhunger +############################################################################ --enable_query_log -let $message= . - . IMPORTANT NOTICE: - . ----------------- - . - . FIXME: The .result files are still NOT CHECKED for correctness! - . - . FIXME: Several tests are affected by known problems around DECIMAL - . FIXME: and NUMERIC that will be checked again after WL#2984 once - . FIXME: has been completed. Some of them are marked in the result. - . - . Currently (Dec 06, 2005) this .result file is checked OK for Linux - . with 5.0.17-bk (ChangeSet@1.1975.1.2, 2005-12-05 18:33:48+01:00). - . Using the available Windows version 5.0.16 there are differences - . that can be ignored (e.g. WL#2984). - .; ---source include/show_msg80.inc - -#FIXME-START------------------------------------------------------------------- -# -# remove this section prior releasing the test, then we may stop at the first -# error we get ('passed' or 'not passed' - that's the question). ---disable_abort_on_error - - # having ALWAYS a .reject from the changing TIME makes it easier to work with - # the GUI diff program until the testcase is finished for pushing. - # - # let $message= FIXME: Show some information when / where the .result has been created; - # --source include/show_msg.inc - --vertical_results - # SELECT version(), @@version_compile_os AS 'vers_comp_os', current_date, current_time; - - let $message= FIXME: There are subtests that are switched off due to known bugs:; - --source include/show_msg.inc - #set a variable here to be able to switch all crashing sub tests with ONE change HERE. - #change the corresponding variable to '1' to enable the crashing parts. - --disable_query_log - - let $check_wl2984= 0; - eval SELECT $check_wl2984 AS 'WL#2984: DECIMAL and NUMERIC problems with differences on some machines'; - - --horizontal_results - --enable_query_log - -# As long as -# Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill -# is not fixed, we must switch the ps-protocol for some statements off. -# If this bug is fixed, please -# 1. set the following variable to 0 -# 2. check, if the test passes -# 3. remove the workarounds -let $have_bug_11589= 1; -if ($have_bug_11589) -{ - let $message= There are some statements where the ps-protocol is switched off. - Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill; - --source include/show_msg80.inc -} - -# -#FIXME-END--------------------------------------------------------------------- - - # prepare a variable to be able to suppress machine dependant diffs #let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user WHERE host LIKE "%\%" AND host NOT In ("localhost", "127.0.0.1", "%")`; # can be used in: --replace_result $SERVER_NAME -# ------------------------------------------------------------------------------ ---source suite/funcs_1/storedproc/load_sp_tb.inc - - # ============================================================================== let $message= Section 3.1.1 - Syntax checks for the CREATE PROCEDURE, CREATE FUNCTION, ALTER PROCEDURE, ALTER FUNCTION, DROP PROCEDURE, DROP FUNCTION, SHOW @@ -90,18 +28,23 @@ let $message= Testcase 4.1.1: USE db_storedproc; --disable_warnings +--error ER_TOO_LONG_IDENT DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934; --enable_warnings +--error ER_TOO_LONG_IDENT CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934 (f1 char(20) ) SELECT * from t1 where f2 = f1; +--error ER_TOO_LONG_IDENT CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongname234872934('aaaa'); --disable_warnings +--error ER_TOO_LONG_IDENT DROP PROCEDURE IF EXISTS sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde; --enable_warnings delimiter //; +--error ER_TOO_LONG_IDENT CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( f1 tinytext ) language sql deterministic sql security definer comment 'this is simple' BEGIN set @v1 = f1; @@ -109,6 +52,7 @@ CREATE PROCEDURE sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabc END// delimiter ;// +--error ER_TOO_LONG_IDENT CALL sp1_thisisaveryverylongname234872934_thisisaveryverylongnameabcde( 'abc' ); --replace_column 5 modified 6 created @@ -170,9 +114,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: SP definition accepted with m>60 in DECIMAL(m,n) -#FIXME --error 4711 +--error ER_TOO_BIG_PRECISION CREATE PROCEDURE sp1( f1 decimal(256, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -180,8 +122,7 @@ BEGIN END// DROP PROCEDURE IF EXISTS sp1// -# should fail: 66 is not allowed; maximum is 65. -#FIXME --error 4711 +--error ER_TOO_BIG_PRECISION CREATE PROCEDURE sp1( f1 decimal(66, 30) ) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set @v1 = f1; @@ -198,28 +139,22 @@ delimiter ;// CALL sp1( 17976931340000 ); -if ($check_wl2984) +# switched off due to big differences with (e.g....) sol10-sparc-b +CALL sp1( 1.797693134e+13 ); +--error ER_ILLEGAL_VALUE_FOR_TYPE +CALL sp1( 1.7976931348623157493578e+308 ); + +# check all ...E+100 to E-100 +let $digits= 100; +while ($digits) { - # switched off due to big differences with (e.g....) sol10-sparc-b - CALL sp1( 1.797693134e+13 ); - CALL sp1( 1.7976931348623157493578e+308 ); - - -- echo FIXME: Following test contains a known problem that will be checked again - -- echo FIXME: after WL#2984 has been completed: - -- echo FIXME: values accepted without warning although m>60 in DECIMAL(m,n) - - # check all ...E+100 to E-100 - let $digits= 100; - while ($digits) - { - eval CALL sp1( 0.1234567890987654321e+$digits ); - eval CALL sp1( 0.1234567890987654321e-$digits ); - dec $digits; - } - # check the 2 values which cannot be handled easy in the loop: - eval CALL sp1( 0.1234567890987654321e+0 ); - eval CALL sp1( 0.1234567890987654321e-0 ); + eval CALL sp1( 0.1234567890987654321e+$digits ); + eval CALL sp1( 0.1234567890987654321e-$digits ); + dec $digits; } +# check the 2 values which cannot be handled easy in the loop: +eval CALL sp1( 0.1234567890987654321e+0 ); +eval CALL sp1( 0.1234567890987654321e-0 ); --replace_column 5 modified 6 created SHOW PROCEDURE status; @@ -395,7 +330,7 @@ DROP FUNCTION IF EXISTS fn1; delimiter //; # 1425: Too big scale 63 specified for column ''. Maximum is 30. ---error 1425 +--error ER_TOO_BIG_SCALE CREATE FUNCTION fn1( f1 decimal(63, 31) ) returns decimal(63, 31) language sql not deterministic sql security invoker comment 'this is simple' BEGIN set f1 = 1000000 + f1; @@ -403,7 +338,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT fn1( 1.3326e+8 ); delimiter //; @@ -430,7 +365,14 @@ CREATE FUNCTION fn1( f1 enum("value1", "value1") ) returns decimal(63, 30) lang END// delimiter ;// +# warnings for this select disabled due to diffs with/without --ps-protocol: +# without ps-protocol the following warning is shown: +# +Note 1291 Column '' has duplicated value 'value1' in SET +# +Warning 1265 Data truncated for column 'f1' at row 1 +# Reported as BUG#33396 +--disable_warnings SELECT fn1( "value1" ); +--enable_warnings --replace_column 5 modified 6 created SHOW FUNCTION STATUS LIKE 'fn1'; @@ -446,7 +388,14 @@ CREATE FUNCTION fn1( f1 set("value1", "value1") ) returns decimal(63, 30) langua END// delimiter ;// +# warnings for this select disabled due to diffs with/without --ps-protocol: +# without ps-protocol the following warning is shown: +# +Note 1291 Column '' has duplicated value 'value1' in SET +# +Warning 1265 Data truncated for column 'f1' at row 1 +# Reported as BUG#33396 +--disable_warnings SELECT fn1( "value1, value1" ); +--enable_warnings --replace_column 5 modified 6 created SHOW FUNCTION STATUS LIKE 'fn1'; @@ -666,10 +615,12 @@ SELECT f2 into c from t1 where t1.f2=999; END// delimiter ;// +--disable_warnings set @c=1; CALL sp7c('xyz', @out_param, @c); SELECT @out_param; SELECT @c; +--enable_warnings # cleanup DROP PROCEDURE sp7a; @@ -697,7 +648,7 @@ let $message= Testcase 4.1.9: drop procedure; --source include/show_msg80.inc - +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; @@ -705,31 +656,34 @@ SELECT * from mysql.proc where specific_name='sp9'; DROP PROCEDURE IF EXISTS sp9; --enable_warnings +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; CREATE PROCEDURE sp9()SELECT * from t1; +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; DROP PROCEDURE sp9; +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; CREATE PROCEDURE sp9()SELECT * from t1; +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; DROP PROCEDURE IF EXISTS sp9; +--sorted_result --replace_column 13 created 14 modified SELECT * from mysql.proc where specific_name='sp9'; - - # ------------------------------------------------------------------------------ let $message= Testcase 4.1.10: ---------------- @@ -792,6 +746,7 @@ connect (u_1, localhost, user_1, , db_storedproc); CALL sp11(); connection default; +USE db_storedproc; --source suite/funcs_1/include/show_connection.inc alter procedure sp11 sql security invoker; @@ -801,8 +756,9 @@ SELECT security_type from mysql.proc where specific_name='sp11'; --replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK connection u_1; --source suite/funcs_1/include/show_connection.inc +USE db_storedproc; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR CALL sp11(); commit work; @@ -897,900 +853,900 @@ appropriate error message is returned when the name is rejected; --source include/show_msg80.inc ---error 1357 +--error ER_SP_NO_DROP_SP CREATE PROCEDURE sp1() DROP PROCEDURE sp1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE !_sp1( f1 char(20) ) SELECT * from t1 where f2 = f1; -#FIXME: this was what I found in this file ... : -#CREATE PROCEDURE !_sp1( f1 char(20) ) -# SELECT * from t1 where f2 = f1; ^a^kcd '/usr/mysql/mysql-test/t' -#/t'ql/mysql-test -#t]# t@localhost t - ---error 0,1064 CREATE PROCEDURE function() SELECT * from t1 where f2=f1; DROP PROCEDURE function; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE accessible() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE add() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE all() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE alter() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE analyze() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE and() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE as() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE asc() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE asensitive() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE before() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE between() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE bigint() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE binary() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE blob() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE both() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE by() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE CALL() +--error ER_PARSE_ERROR +CREATE PROCEDURE call() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE cascade() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE case() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE change() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE char() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE character() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE check() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE collate() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE column() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE columns() - SELECT * from t1 where f2=f1; -DROP PROCEDURE columns; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE condition() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE connection() - SELECT * from t1 where f2=f1; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE constraint() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE continue() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE convert() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE create() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE cross() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE current_date() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE current_time() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE current_timestamp() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE current_user() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE cursor() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE database() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE databases() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE day_hour() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE day_microsecond() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE day_minute() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE day_second() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE dec() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE decimal() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE declare() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE default() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE delayed() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE delete() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE desc() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE describe() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE deterministic() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE distinct() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE distinctrow() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE div() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE double() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE drop() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE dual() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE each() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE else() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE elseif() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE enclosed() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE escaped() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE exists() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE exit() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE explain() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE false() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE fetch() SELECT * from t1 where f2=f1; ---error 1064 +#--error ER_PARSE_ERROR CREATE PROCEDURE fields() SELECT * from t1 where f2=f1; DROP PROCEDURE fields; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE float() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE for() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE force() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE foreign() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE found() - SELECT * from t1 where f2=f1; -DROP PROCEDURE found; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE from() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE fulltext() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE goto() - SELECT * from t1 where f2=f1; -DROP PROCEDURE goto; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE grant() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE group() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE having() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE high_priority() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE hour_microsecond() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE hour_minute() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE hour_second() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE if() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE ignore() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE in() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE index() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE infile() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE inner() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE inout() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE insensitive() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE insert() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE int() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE int1() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR +CREATE PROCEDURE int2() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR +CREATE PROCEDURE int3() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR +CREATE PROCEDURE int4() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR +CREATE PROCEDURE int8() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE integer() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE interval() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE into() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE is() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE iterate() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE join() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE key() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE keys() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE kill() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE leading() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE leave() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE left() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE like() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE limit() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE linear() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE lines() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE load() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE localtime() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE localtimestamp() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE lock() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE long() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE longblob() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE longtext() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE loop() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE low_priority() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE master_ssl_verify_server_cert() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE match() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE mediumblob() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE mediumint() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE mediumtext() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE middleint() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE minute_microsecond() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE minute_second() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE mod() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE modifies() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE natural() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE not() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE no_write_to_binlog() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE null() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE numeric() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE on() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE optimize() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE option() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE optionally() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE or() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE order() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE out() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE outer() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE outfile() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE precision() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE primary() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE privileges() - SELECT * from t1 where f2=f1; -DROP PROCEDURE privileges; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE procedure() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE purge() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE range() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE read() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE reads() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE real() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE references() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE regexp() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE release() + SELECT * from t1 where f2=f1; + +--error ER_PARSE_ERROR CREATE PROCEDURE rename() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE repeat() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE replace() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE require() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE restrict() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE return() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE revoke() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE right() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE rlike() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE schema() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE schemas() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE second_microsecond() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE select() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sensitive() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE separator() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE set() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE show() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE smallint() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE soname() - SELECT * from t1 where f2=f1; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE spatial() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE specific() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sql() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sqlexception() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sqlstate() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sqlwarning() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sql_big_result() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sql_calc_found_rows() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sql_small_result() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE ssl() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE starting() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE straight_join() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE table() SELECT * from t1 where f2=f1; ---error 1064 -CREATE PROCEDURE tables() - SELECT * from t1 where f2=f1; -DROP PROCEDURE tables; - ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE terminated() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE then() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE tinyblob() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE tinyint() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE tinytext() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE to() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE trailing() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE trigger() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE true() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE undo() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE union() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE unique() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE unlock() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE unsigned() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE update() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE usage() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE use() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE using() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE utc_date() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE utc_time() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE utc_timestamp() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE values() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE varbinary() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE varchar() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE varcharacter() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE varying() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE when() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE where() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE while() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE with() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE write() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE xor() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE year_month() SELECT * from t1 where f2=f1; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE zerofill() SELECT * from t1 where f2=f1; @@ -1803,635 +1759,619 @@ error message is returned when the name is rejected; --source include/show_msg80.inc ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION !_fn1(f1 char) returns char return f1; ---error 1064 +--disable_warnings +--error ER_PARSE_ERROR CREATE FUNCTION char(f1 char) returns char return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION char binary(f1 char binary) returns char binary return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION char ascii(f1 char ascii) returns char ascii return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION char not null(f1 char not null) returns char not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION char binary not null(f1 char binary not null) returns char binary not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION char ascii not null(f1 char ascii not null) returns char ascii not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinytext(f1 tinytext) returns tinytext return f1; ---error 1064 +#--error ER_PARSE_ERROR CREATE FUNCTION text(f1 text) returns text return f1; DROP FUNCTION text; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumtext(f1 mediumtext) returns mediumtext return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION longtext(f1 longtext) returns longtext return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinytext not null(f1 tinytext not null) returns tinytext not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION text not null(f1 text not null) returns text not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumtext not null(f1 mediumtext not null) returns mediumtext not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION longtext not null(f1 longtext not null) returns longtext not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyblob(f1 tinyblob) returns tinyblob return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION blob(f1 blob) returns blob return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumblob(f1 mediumblob) returns mediumblob return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION longblob(f1 longblob) returns longblob return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyblob not null(f1 tinyblob not null) returns tinyblob not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION blob not null(f1 blob not null) returns blob not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumblob not null(f1 mediumblob not null) returns mediumblob not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION longblob not null(f1 longblob not null) returns longblob not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION binary(f1 binary) returns binary return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION binary not null(f1 binary not null) returns binary not null return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyint(f1 tinyint) returns tinyint return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyint unsigned(f1 tinyint unsigned) returns tinyint unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyint zerofill(f1 tinyint zerofill) returns tinyint zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION tinyint unsigned zerofill(f1 tinyint unsigned zerofill) returns tinyint unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION smallint(f1 smallint) returns smallint return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION smallint unsigned(f1 smallint unsigned) returns smallint unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION smallint zerofill(f1 smallint zerofill) returns smallint zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION smallint unsigned zerofill(f1 smallint unsigned zerofill) returns smallint unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumint(f1 mediumint) returns mediumint return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumint unsigned(f1 mediumint unsigned) returns mediumint unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumint zerofill(f1 mediumint zerofill) returns mediumint zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION mediumint unsigned zerofill(f1 mediumint unsigned zerofill) returns mediumint unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION int(f1 int) returns int return f1; ---error 1064 +--error ER_PARSE_ERROR +CREATE FUNCTION int1(f1 int1) returns int1 + return f1; + +--error ER_PARSE_ERROR +CREATE FUNCTION int2(f1 int2) returns int2 + return f1; + +--error ER_PARSE_ERROR +CREATE FUNCTION int3(f1 int3) returns int3 + return f1; + +--error ER_PARSE_ERROR +CREATE FUNCTION int4(f1 int4) returns int4 + return f1; + +--error ER_PARSE_ERROR +CREATE FUNCTION int8(f1 int8) returns int8 + return f1; + +--error ER_PARSE_ERROR CREATE FUNCTION int unsigned(f1 int unsigned) returns int unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION int zerofill(f1 int zerofill) returns int zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION int unsigned zerofill(f1 int unsigned zerofill) returns int unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION bigint(f1 bigint) returns bigint return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION bigint unsigned(f1 bigint unsigned) returns bigint unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION bigint zerofill(f1 bigint zerofill) returns bigint zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION bigint unsigned zerofill(f1 bigint unsigned zerofill) returns bigint unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION decimal(f1 decimal) returns decimal return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION decimal unsigned(f1 decimal unsigned) returns decimal unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION decimal zerofill(f1 decimal zerofill) returns decimal zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION decimal unsigned zerofill(f1 decimal unsigned zerofill) returns decimal unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION numeric(f1 numeric) returns numeric return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION numeric unsigned(f1 numeric unsigned) returns numeric unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION numeric zerofill(f1 numeric zerofill) returns numeric zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION numeric unsigned zerofill(f1 numeric unsigned zerofill) returns numeric unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION real(f1 real) returns real return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION real unsigned(f1 real unsigned) returns real unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION real zerofill(f1 real zerofill) returns real zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION real unsigned zerofill(f1 real unsigned zerofill) returns real unsigned zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION float(f1 float) returns float return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION float unsigned(f1 float unsigned) returns float unsigned return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION float zerofill(f1 float zerofill) returns float zerofill return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION float unsigned zerofill(f1 float unsigned zerofill) returns float unsigned zerofill return f1; -#FIXME check this is OK:--error 1064 CREATE FUNCTION date(f1 date) returns date return f1; DROP FUNCTION date; -#FIXME check this is OK:--error 1064 CREATE FUNCTION time(f1 time) returns time return f1; DROP FUNCTION time; -#FIXME check this is OK:--error 1064 CREATE FUNCTION datetime(f1 datetime) returns datetime return f1; DROP FUNCTION datetime; -#FIXME check this is OK:--error 1064 CREATE FUNCTION timestamp(f1 timestamp) returns timestamp return f1; DROP FUNCTION timestamp; -#FIXME check this is OK:--error 1064 CREATE FUNCTION year(f1 year) returns year return f1; DROP FUNCTION year; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION year(3)(f1 year(3)) returns year(3) return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION year(4)(f1 year(4)) returns year(4) return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION enum("1enum", "2enum")(f1 enum("1enum", "2enum")) returns enum("1enum", "2enum") return f1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION set("1set", "2set")(f1 set("1set", "2set")) returns set("1set", "2set") return f1; +--enable_warnings +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 char ) returns char + return f1; + +DROP FUNCTION IF EXISTS fn1; +--error ER_NOT_SUPPORTED_YET +CREATE FUNCTION fn1(f1 char binary ) returns char binary + return f1; + +DROP FUNCTION IF EXISTS fn1; +CREATE FUNCTION fn1(f1 char ascii ) returns char ascii + return f1; + +DROP FUNCTION IF EXISTS fn1; +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 char not null ) returns char not null + return f1; + +DROP FUNCTION IF EXISTS fn1; +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 char binary not null ) returns char binary not null + return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char f1 ) returns char +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 char ascii not null ) returns char ascii not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char binary f1 ) returns char binary +CREATE FUNCTION fn1(f1 tinytext ) returns tinytext return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char ascii f1 ) returns char ascii +CREATE FUNCTION fn1(f1 text ) returns text return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char not null f1 ) returns char not null +CREATE FUNCTION fn1(f1 mediumtext ) returns mediumtext return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char binary not null f1 ) returns char binary not null +CREATE FUNCTION fn1(f1 longtext ) returns longtext return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(char ascii not null f1 ) returns char ascii not null +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 tinytext not null ) returns tinytext not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinytext f1 ) returns tinytext +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 text not null ) returns text not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(text f1 ) returns text +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 mediumtext not null ) returns mediumtext not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumtext f1 ) returns mediumtext +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 longtext not null ) returns longtext not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(longtext f1 ) returns longtext +CREATE FUNCTION fn1(f1 tinyblob ) returns tinyblob return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinytext not null f1 ) returns tinytext not null +CREATE FUNCTION fn1(f1 blob ) returns blob return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(text not null f1 ) returns text not null +CREATE FUNCTION fn1(f1 mediumblob ) returns mediumblob return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumtext not null f1 ) returns mediumtext not null +CREATE FUNCTION fn1(f1 longblob ) returns longblob return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(longtext not null f1 ) returns longtext not null +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 tinyblob not null ) returns tinyblob not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyblob f1 ) returns tinyblob +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 blob not null ) returns blob not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(blob f1 ) returns blob +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 mediumblob not null ) returns mediumblob not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumblob f1 ) returns mediumblob +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 longblob not null ) returns longblob not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(longblob f1 ) returns longblob +CREATE FUNCTION fn1(f1 binary ) returns binary return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyblob not null f1 ) returns tinyblob not null +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 binary not null ) returns binary not null return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(blob not null f1 ) returns blob not null +CREATE FUNCTION fn1(f1 tinyint ) returns tinyint return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumblob not null f1 ) returns mediumblob not null +CREATE FUNCTION fn1(f1 tinyint unsigned ) returns tinyint unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(longblob not null f1 ) returns longblob not null +CREATE FUNCTION fn1(f1 tinyint zerofill ) returns tinyint zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(binary f1 ) returns binary +CREATE FUNCTION fn1(f1 tinyint unsigned zerofill ) returns tinyint unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(binary not null f1 ) returns binary not null +CREATE FUNCTION fn1(f1 smallint ) returns smallint return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyint f1 ) returns tinyint +CREATE FUNCTION fn1(f1 smallint unsigned ) returns smallint unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyint unsigned f1 ) returns tinyint unsigned +CREATE FUNCTION fn1(f1 smallint zerofill ) returns smallint zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyint zerofill f1 ) returns tinyint zerofill +CREATE FUNCTION fn1(f1 smallint unsigned zerofill ) returns smallint unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(tinyint unsigned zerofill f1 ) returns tinyint unsigned zerofill +CREATE FUNCTION fn1(f1 mediumint ) returns mediumint return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(smallint f1 ) returns smallint +CREATE FUNCTION fn1(f1 mediumint unsigned ) returns mediumint unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(smallint unsigned f1 ) returns smallint unsigned +CREATE FUNCTION fn1(f1 mediumint zerofill ) returns mediumint zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(smallint zerofill f1 ) returns smallint zerofill +CREATE FUNCTION fn1(f1 mediumint unsigned zerofill ) returns mediumint unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(smallint unsigned zerofill f1 ) returns smallint unsigned zerofill +CREATE FUNCTION fn1(f1 int ) returns int return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumint f1 ) returns mediumint +CREATE FUNCTION fn1(f1 int unsigned ) returns int unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumint unsigned f1 ) returns mediumint unsigned +CREATE FUNCTION fn1(f1 int1 unsigned ) returns int1 unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumint zerofill f1 ) returns mediumint zerofill +CREATE FUNCTION fn1(f1 int2 unsigned ) returns int2 unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(mediumint unsigned zerofill f1 ) returns mediumint unsigned zerofill +CREATE FUNCTION fn1(f1 int3 unsigned ) returns int3 unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(int f1 ) returns int +CREATE FUNCTION fn1(f1 int4 unsigned ) returns int4 unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(int unsigned f1 ) returns int unsigned +CREATE FUNCTION fn1(f1 int8 unsigned ) returns int8 unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(int zerofill f1 ) returns int zerofill +CREATE FUNCTION fn1(f1 int zerofill ) returns int zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(int unsigned zerofill f1 ) returns int unsigned zerofill +CREATE FUNCTION fn1(f1 int unsigned zerofill ) returns int unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(bigint f1 ) returns bigint +CREATE FUNCTION fn1(f1 bigint ) returns bigint return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(bigint unsigned f1 ) returns bigint unsigned +CREATE FUNCTION fn1(f1 bigint unsigned ) returns bigint unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(bigint zerofill f1 ) returns bigint zerofill +CREATE FUNCTION fn1(f1 bigint zerofill ) returns bigint zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(bigint unsigned zerofill f1 ) returns bigint unsigned zerofill +CREATE FUNCTION fn1(f1 bigint unsigned zerofill ) returns bigint unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(decimal f1 ) returns decimal +CREATE FUNCTION fn1(f1 decimal ) returns decimal return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(decimal unsigned f1 ) returns decimal unsigned +CREATE FUNCTION fn1(f1 decimal unsigned ) returns decimal unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(decimal zerofill f1 ) returns decimal zerofill +CREATE FUNCTION fn1(f1 decimal zerofill ) returns decimal zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(decimal unsigned zerofill f1 ) returns decimal unsigned zerofill +CREATE FUNCTION fn1(f1 decimal unsigned zerofill ) returns decimal unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(numeric f1 ) returns numeric +CREATE FUNCTION fn1(f1 numeric ) returns numeric return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(numeric unsigned f1 ) returns numeric unsigned +CREATE FUNCTION fn1(f1 numeric unsigned ) returns numeric unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(numeric zerofill f1 ) returns numeric zerofill +CREATE FUNCTION fn1(f1 numeric zerofill ) returns numeric zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(numeric unsigned zerofill f1 ) returns numeric unsigned zerofill +CREATE FUNCTION fn1(f1 numeric unsigned zerofill ) returns numeric unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(real f1 ) returns real +CREATE FUNCTION fn1(f1 real ) returns real return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(real unsigned f1 ) returns real unsigned +CREATE FUNCTION fn1(f1 real unsigned ) returns real unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(real zerofill f1 ) returns real zerofill +CREATE FUNCTION fn1(f1 real zerofill ) returns real zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(real unsigned zerofill f1 ) returns real unsigned zerofill +CREATE FUNCTION fn1(f1 real unsigned zerofill ) returns real unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(float f1 ) returns float +CREATE FUNCTION fn1(f1 float ) returns float return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(float unsigned f1 ) returns float unsigned +CREATE FUNCTION fn1(f1 float unsigned ) returns float unsigned return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(float zerofill f1 ) returns float zerofill +CREATE FUNCTION fn1(f1 float zerofill ) returns float zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(float unsigned zerofill f1 ) returns float unsigned zerofill +CREATE FUNCTION fn1(f1 float unsigned zerofill ) returns float unsigned zerofill return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(date f1 ) returns date +CREATE FUNCTION fn1(f1 date ) returns date return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(time f1 ) returns time +CREATE FUNCTION fn1(f1 time ) returns time return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(datetime f1 ) returns datetime +CREATE FUNCTION fn1(f1 datetime ) returns datetime return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(timestamp f1 ) returns timestamp +CREATE FUNCTION fn1(f1 timestamp ) returns timestamp return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(year f1 ) returns year +CREATE FUNCTION fn1(f1 year ) returns year return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(year(3) f1 ) returns year(3) +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3) return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(year(4) f1 ) returns year(4) +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4) return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(enum("1enum", "2enum") f1 ) returns enum("1enum", "2enum") +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 enum(f1 "1enum", "2enum") ) returns enum("1enum", "2enum") return f1; DROP FUNCTION IF EXISTS fn1; ---error 1064 -CREATE FUNCTION fn1(set("1set", "2set") f1 ) returns set("1set", "2set") +--error ER_PARSE_ERROR +CREATE FUNCTION fn1(f1 set(f1 "1set", "2set") ) returns set("1set", "2set") return f1; @@ -2444,7 +2384,7 @@ appropriate error message; DROP PROCEDURE IF EXISTS sp16; ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL sp16( 'xyz' ); CREATE DATABASE db1; @@ -2458,7 +2398,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL db_storedproc.sp16(); # cleanup @@ -2501,15 +2441,15 @@ SELECT db_storedproc.sp1( 'a' ); DROP FUNCTION db_storedproc.sp1; USE db_storedproc; ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT sp1('a'); DROP PROCEDURE sp1; ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL sp1(); ---error 1305 +--error ER_SP_DOES_NOT_EXIST SELECT sp1('a'); # cleanup @@ -2546,9 +2486,11 @@ DROP DATABASE IF EXISTS db1; CREATE DATABASE db1; USE db1; alter procedure db_storedproc.sp1 sql security invoker; +--sorted_result SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1'; alter function db_storedproc.sp1 sql security invoker; +--sorted_result SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1'; CALL db_storedproc.sp1(); @@ -2562,7 +2504,7 @@ CALL db_storedproc.sp1(); SELECT db_storedproc.sp1(); alter function sp1 sql security definer; - +--sorted_result SELECT name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1'; CALL db_storedproc.sp1(); @@ -2701,20 +2643,20 @@ CREATE DATABASE db1; DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1 () set @x=1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE PROCEDURE sp1 () set @x=2; CALL sp1(); SELECT @x; USE db1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE PROCEDURE db_storedproc.sp1 () set @x=3; CALL db_storedproc.sp1(); SELECT @x; DROP PROCEDURE IF EXISTS db_storedproc.sp1; CREATE PROCEDURE db_storedproc.sp1 () set @x=1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE PROCEDURE db_storedproc.sp1 () set @x=2; CALL db_storedproc.sp1(); SELECT @x; @@ -2738,16 +2680,16 @@ DROP DATABASE IF EXISTS db1; CREATE DATABASE db1; DROP FUNCTION IF EXISTS fn1; CREATE FUNCTION fn1 () returns int return 1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE FUNCTION fn1 () returns int return 2; SELECT fn1(); USE db1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE FUNCTION db_storedproc.fn1 () returns int return 3; SELECT db_storedproc.fn1(); DROP FUNCTION IF EXISTS db_storedproc.fn1; CREATE FUNCTION db_storedproc.fn1 () returns int return 1; ---error 1304 +--error ER_SP_ALREADY_EXISTS CREATE FUNCTION db_storedproc.fn1 () returns int return 2; SELECT db_storedproc.fn1(); @@ -2818,7 +2760,7 @@ error message is returned when the name is rejected. (invalid func name); --source include/show_msg80.inc delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION !_fn1( f1 char(20) ) returns int BEGIN SELECT * from t1 where f2 = f1; @@ -2827,7 +2769,7 @@ END// delimiter ;// delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION fn1( f1 char(20) ) return int BEGIN SELECT * from t1 where f2 = f1; @@ -2838,20 +2780,20 @@ delimiter ;// CREATE FUNCTION fn1() returns int return 'a'; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION procedure() returns int return 1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION fn1(a char) returns int lang sql return 1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION fn1(a char) returns int deterministic( return 1); ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION fn1(a char) returns int non deterministic return 1; ---error 1064 +--error ER_PARSE_ERROR CREATE FUNCTION fn1(a char) returns int not deterministic comment 'abc' language sql sql security refiner return 1; # clean up @@ -2924,7 +2866,7 @@ DROP PROCEDURE IF EXISTS sp1; # missing BEGIN delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( cnt int(20) ) SELECT count(*) into cnt from t2; set @count = cnt; @@ -2932,7 +2874,7 @@ CREATE PROCEDURE sp1( cnt int(20) ) END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL sp1( 10 ); --disable_warnings @@ -2941,7 +2883,7 @@ DROP PROCEDURE IF EXISTS sp1; # wrong order of BEGIN and END delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( cnt int(20) ) END SELECT count(*) into cnt from t2; @@ -2950,7 +2892,7 @@ END BEGIN// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST CALL sp1( 10 ); --disable_warnings @@ -2959,7 +2901,7 @@ DROP PROCEDURE IF EXISTS sp1; # invalid usage of BEGIN + END delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( cnt int(20) ) BEGIN SELECT count(*) into cnt from t2; @@ -3003,7 +2945,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + accessible:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() add:BEGIN SELECT @x; @@ -3015,7 +2969,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() all:BEGIN SELECT @x; @@ -3027,7 +2981,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_SP_BADSTATEMENT CREATE PROCEDURE sp1() alter:BEGIN SELECT @x; @@ -3039,7 +2993,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() analyze:BEGIN SELECT @x; @@ -3051,7 +3005,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() and:BEGIN SELECT @x; @@ -3063,7 +3017,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() as:BEGIN SELECT @x; @@ -3075,7 +3029,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() asc:BEGIN SELECT @x; @@ -3087,7 +3041,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() asensitive:BEGIN SELECT @x; @@ -3099,7 +3053,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() before:BEGIN SELECT @x; @@ -3111,7 +3065,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() between:BEGIN SELECT @x; @@ -3123,7 +3077,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() bigint:BEGIN SELECT @x; @@ -3135,7 +3089,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() binary:BEGIN SELECT @x; @@ -3147,7 +3101,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() blob:BEGIN SELECT @x; @@ -3159,7 +3113,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() both:BEGIN SELECT @x; @@ -3171,7 +3125,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() by:BEGIN SELECT @x; @@ -3183,9 +3137,9 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() - CALL:BEGIN + call:BEGIN SELECT @x; END// delimiter ;// @@ -3195,7 +3149,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() cascade:BEGIN SELECT @x; @@ -3207,7 +3161,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() case:BEGIN SELECT @x; @@ -3219,7 +3173,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() change:BEGIN SELECT @x; @@ -3231,7 +3185,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() char:BEGIN SELECT @x; @@ -3243,7 +3197,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() character:BEGIN SELECT @x; @@ -3255,7 +3209,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() check:BEGIN SELECT @x; @@ -3267,7 +3221,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() collate:BEGIN SELECT @x; @@ -3279,7 +3233,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() column:BEGIN SELECT @x; @@ -3291,19 +3245,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - columns:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() condition:BEGIN SELECT @x; @@ -3315,19 +3257,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 -CREATE PROCEDURE sp1() - connection:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() constraint:BEGIN SELECT @x; @@ -3339,7 +3269,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() continue:BEGIN SELECT @x; @@ -3351,7 +3281,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() convert:BEGIN SELECT @x; @@ -3363,7 +3293,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() create:BEGIN SELECT @x; @@ -3375,7 +3305,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() cross:BEGIN SELECT @x; @@ -3387,7 +3317,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() current_date:BEGIN SELECT @x; @@ -3399,7 +3329,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() current_time:BEGIN SELECT @x; @@ -3411,7 +3341,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() current_timestamp:BEGIN SELECT @x; @@ -3423,7 +3353,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() current_user:BEGIN SELECT @x; @@ -3435,7 +3365,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() cursor:BEGIN SELECT @x; @@ -3447,7 +3377,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() database:BEGIN SELECT @x; @@ -3459,7 +3389,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() databases:BEGIN SELECT @x; @@ -3471,7 +3401,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() day_hour:BEGIN SELECT @x; @@ -3483,7 +3413,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() day_microsecond:BEGIN SELECT @x; @@ -3495,7 +3425,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() day_minute:BEGIN SELECT @x; @@ -3507,7 +3437,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() day_second:BEGIN SELECT @x; @@ -3519,7 +3449,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() dec:BEGIN SELECT @x; @@ -3531,7 +3461,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() decimal:BEGIN SELECT @x; @@ -3543,7 +3473,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() declare:BEGIN SELECT @x; @@ -3555,7 +3485,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() default:BEGIN SELECT @x; @@ -3567,7 +3497,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() delayed:BEGIN SELECT @x; @@ -3579,7 +3509,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() delete:BEGIN SELECT @x; @@ -3591,7 +3521,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() desc:BEGIN SELECT @x; @@ -3603,7 +3533,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() describe:BEGIN SELECT @x; @@ -3615,7 +3545,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() deterministic:BEGIN SELECT @x; @@ -3627,7 +3557,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() distinct:BEGIN SELECT @x; @@ -3639,7 +3569,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() distinctrow:BEGIN SELECT @x; @@ -3651,7 +3581,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() div:BEGIN SELECT @x; @@ -3663,7 +3593,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() double:BEGIN SELECT @x; @@ -3675,7 +3605,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() drop:BEGIN SELECT @x; @@ -3687,7 +3617,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() dual:BEGIN SELECT @x; @@ -3699,7 +3629,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() each:BEGIN SELECT @x; @@ -3711,7 +3641,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() else:BEGIN SELECT @x; @@ -3723,7 +3653,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() elseif:BEGIN SELECT @x; @@ -3735,7 +3665,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() enclosed:BEGIN SELECT @x; @@ -3747,7 +3677,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() escaped:BEGIN SELECT @x; @@ -3759,7 +3689,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() exists:BEGIN SELECT @x; @@ -3771,7 +3701,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() exit:BEGIN SELECT @x; @@ -3783,7 +3713,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() explain:BEGIN SELECT @x; @@ -3795,7 +3725,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() false:BEGIN SELECT @x; @@ -3807,7 +3737,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() fetch:BEGIN SELECT @x; @@ -3819,19 +3749,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - fields:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() float:BEGIN SELECT @x; @@ -3843,7 +3761,31 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + float4:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + float8:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() for:BEGIN SELECT @x; @@ -3855,7 +3797,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() force:BEGIN SELECT @x; @@ -3867,7 +3809,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() foreign:BEGIN SELECT @x; @@ -3879,19 +3821,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - found:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() from:BEGIN SELECT @x; @@ -3903,7 +3833,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() fulltext:BEGIN SELECT @x; @@ -3915,19 +3845,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - goto:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() grant:BEGIN SELECT @x; @@ -3939,7 +3857,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() group:BEGIN SELECT @x; @@ -3951,7 +3869,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() having:BEGIN SELECT @x; @@ -3963,7 +3881,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() high_priority:BEGIN SELECT @x; @@ -3975,7 +3893,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() hour_microsecond:BEGIN SELECT @x; @@ -3987,7 +3905,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() hour_minute:BEGIN SELECT @x; @@ -3999,7 +3917,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() hour_second:BEGIN SELECT @x; @@ -4011,7 +3929,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() if:BEGIN SELECT @x; @@ -4023,7 +3941,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() ignore:BEGIN SELECT @x; @@ -4035,7 +3953,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() in:BEGIN SELECT @x; @@ -4047,7 +3965,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() index:BEGIN SELECT @x; @@ -4059,7 +3977,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() infile:BEGIN SELECT @x; @@ -4071,7 +3989,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() inner:BEGIN SELECT @x; @@ -4083,7 +4001,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() inout:BEGIN SELECT @x; @@ -4095,7 +4013,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() insensitive:BEGIN SELECT @x; @@ -4107,7 +4025,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() insert:BEGIN SELECT @x; @@ -4119,7 +4037,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() int:BEGIN SELECT @x; @@ -4131,7 +4049,67 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + int1:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + int2:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + int3:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + int4:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + int8:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() integer:BEGIN SELECT @x; @@ -4143,7 +4121,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() interval:BEGIN SELECT @x; @@ -4155,7 +4133,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() into:BEGIN SELECT @x; @@ -4167,7 +4145,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() is:BEGIN SELECT @x; @@ -4179,7 +4157,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() iterate:BEGIN SELECT @x; @@ -4191,7 +4169,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() join:BEGIN SELECT @x; @@ -4203,7 +4181,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() key:BEGIN SELECT @x; @@ -4215,7 +4193,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() keys:BEGIN SELECT @x; @@ -4227,7 +4205,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() kill:BEGIN SELECT @x; @@ -4239,7 +4217,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() leading:BEGIN SELECT @x; @@ -4251,7 +4229,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() leave:BEGIN SELECT @x; @@ -4263,7 +4241,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() left:BEGIN SELECT @x; @@ -4275,7 +4253,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() like:BEGIN SELECT @x; @@ -4287,7 +4265,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() limit:BEGIN SELECT @x; @@ -4299,7 +4277,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + linear:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() lines:BEGIN SELECT @x; @@ -4311,7 +4301,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() load:BEGIN SELECT @x; @@ -4323,7 +4313,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() localtime:BEGIN SELECT @x; @@ -4335,7 +4325,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() localtimestamp:BEGIN SELECT @x; @@ -4347,7 +4337,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() lock:BEGIN SELECT @x; @@ -4359,7 +4349,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() long:BEGIN SELECT @x; @@ -4371,7 +4361,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() longblob:BEGIN SELECT @x; @@ -4383,7 +4373,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() longtext:BEGIN SELECT @x; @@ -4395,7 +4385,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() loop:BEGIN SELECT @x; @@ -4407,7 +4397,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() low_priority:BEGIN SELECT @x; @@ -4419,7 +4409,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + master_ssl_verify_server_cert:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() match:BEGIN SELECT @x; @@ -4431,7 +4433,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() mediumblob:BEGIN SELECT @x; @@ -4443,7 +4445,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() mediumint:BEGIN SELECT @x; @@ -4455,7 +4457,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() mediumtext:BEGIN SELECT @x; @@ -4467,7 +4469,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() middleint:BEGIN SELECT @x; @@ -4479,7 +4481,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() minute_microsecond:BEGIN SELECT @x; @@ -4491,7 +4493,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() minute_second:BEGIN SELECT @x; @@ -4503,7 +4505,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() mod:BEGIN SELECT @x; @@ -4515,7 +4517,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() modifies:BEGIN SELECT @x; @@ -4527,7 +4529,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() natural:BEGIN SELECT @x; @@ -4539,7 +4541,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() not:BEGIN SELECT @x; @@ -4551,7 +4553,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() no_write_to_binlog:BEGIN SELECT @x; @@ -4563,7 +4565,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() null:BEGIN SELECT @x; @@ -4576,7 +4578,7 @@ DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() numeric:BEGIN SELECT @x; @@ -4588,7 +4590,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() on:BEGIN SELECT @x; @@ -4600,7 +4602,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() optimize:BEGIN SELECT @x; @@ -4612,7 +4614,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() option:BEGIN SELECT @x; @@ -4624,7 +4626,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() optionally:BEGIN SELECT @x; @@ -4636,7 +4638,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() or:BEGIN SELECT @x; @@ -4648,7 +4650,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() order:BEGIN SELECT @x; @@ -4660,7 +4662,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() out:BEGIN SELECT @x; @@ -4672,7 +4674,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() outer:BEGIN SELECT @x; @@ -4684,7 +4686,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() outfile:BEGIN SELECT @x; @@ -4696,7 +4698,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() precision:BEGIN SELECT @x; @@ -4708,7 +4710,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() primary:BEGIN SELECT @x; @@ -4720,19 +4722,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - privileges:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() procedure:BEGIN SELECT @x; @@ -4744,7 +4734,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() purge:BEGIN SELECT @x; @@ -4756,7 +4746,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + range:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() read:BEGIN SELECT @x; @@ -4768,7 +4770,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() reads:BEGIN SELECT @x; @@ -4780,7 +4782,31 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + read_only:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + read_write:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() real:BEGIN SELECT @x; @@ -4792,7 +4818,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() references:BEGIN SELECT @x; @@ -4804,7 +4830,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() regexp:BEGIN SELECT @x; @@ -4816,7 +4842,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() + release:BEGIN + SELECT @x; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() rename:BEGIN SELECT @x; @@ -4828,7 +4866,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() repeat:BEGIN SELECT @x; @@ -4840,7 +4878,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() replace:BEGIN SELECT @x; @@ -4852,7 +4890,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() require:BEGIN SELECT @x; @@ -4864,7 +4902,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() restrict:BEGIN SELECT @x; @@ -4876,7 +4914,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() return:BEGIN SELECT @x; @@ -4888,7 +4926,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() revoke:BEGIN SELECT @x; @@ -4900,7 +4938,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() right:BEGIN SELECT @x; @@ -4912,7 +4950,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() rlike:BEGIN SELECT @x; @@ -4924,7 +4962,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() schema:BEGIN SELECT @x; @@ -4936,7 +4974,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() schemas:BEGIN SELECT @x; @@ -4948,7 +4986,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() second_microsecond:BEGIN SELECT @x; @@ -4960,7 +4998,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() select:BEGIN SELECT @x; @@ -4972,7 +5010,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sensitive:BEGIN SELECT @x; @@ -4984,7 +5022,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() separator:BEGIN SELECT @x; @@ -4996,7 +5034,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() set:BEGIN SELECT @x; @@ -5008,7 +5046,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() show:BEGIN SELECT @x; @@ -5020,7 +5058,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() smallint:BEGIN SELECT @x; @@ -5032,19 +5070,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 -CREATE PROCEDURE sp1() - soname:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() spatial:BEGIN SELECT @x; @@ -5056,7 +5082,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() specific:BEGIN SELECT @x; @@ -5068,7 +5094,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sql:BEGIN SELECT @x; @@ -5080,7 +5106,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sqlexception:BEGIN SELECT @x; @@ -5092,7 +5118,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sqlstate:BEGIN SELECT @x; @@ -5103,9 +5129,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings - delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sqlwarning:BEGIN SELECT @x; @@ -5116,9 +5141,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings - delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sql_big_result:BEGIN SELECT @x; @@ -5130,7 +5154,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sql_calc_found_rows:BEGIN SELECT @x; @@ -5142,7 +5166,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() sql_small_result:BEGIN SELECT @x; @@ -5154,7 +5178,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() ssl:BEGIN SELECT @x; @@ -5166,7 +5190,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() starting:BEGIN SELECT @x; @@ -5178,7 +5202,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() straight_join:BEGIN SELECT @x; @@ -5190,7 +5214,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() table:BEGIN SELECT @x; @@ -5202,19 +5226,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME: is it OK that this now succeeds? --error 1064 -CREATE PROCEDURE sp1() - tables:BEGIN - SELECT @x; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() terminated:BEGIN SELECT @x; @@ -5226,7 +5238,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() then:BEGIN SELECT @x; @@ -5238,7 +5250,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() tinyblob:BEGIN SELECT @x; @@ -5250,7 +5262,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() tinyint:BEGIN SELECT @x; @@ -5262,7 +5274,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() tinytext:BEGIN SELECT @x; @@ -5274,7 +5286,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() to:BEGIN SELECT @x; @@ -5285,9 +5297,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings - delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() trailing:BEGIN SELECT @x; @@ -5299,7 +5310,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() trigger:BEGIN SELECT @x; @@ -5311,7 +5322,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() true:BEGIN SELECT @x; @@ -5323,7 +5334,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() undo:BEGIN SELECT @x; @@ -5335,7 +5346,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() union:BEGIN SELECT @x; @@ -5347,7 +5358,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() unique:BEGIN SELECT @x; @@ -5359,7 +5370,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1314 +--error ER_SP_BADSTATEMENT CREATE PROCEDURE sp1() unlock:BEGIN SELECT @x; @@ -5371,7 +5382,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() unsigned:BEGIN SELECT @x; @@ -5383,7 +5394,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() update:BEGIN SELECT @x; @@ -5395,7 +5406,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() usage:BEGIN SELECT @x; @@ -5407,7 +5418,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() use:BEGIN SELECT @x; @@ -5419,7 +5430,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() using:BEGIN SELECT @x; @@ -5431,7 +5442,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() utc_date:BEGIN SELECT @x; @@ -5443,7 +5454,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() utc_time:BEGIN SELECT @x; @@ -5455,7 +5466,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() utc_timestamp:BEGIN SELECT @x; @@ -5467,7 +5478,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() values:BEGIN SELECT @x; @@ -5479,7 +5490,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() varbinary:BEGIN SELECT @x; @@ -5491,7 +5502,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() varchar:BEGIN SELECT @x; @@ -5503,7 +5514,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() varcharacter:BEGIN SELECT @x; @@ -5515,7 +5526,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() varying:BEGIN SELECT @x; @@ -5527,7 +5538,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() when:BEGIN SELECT @x; @@ -5539,7 +5550,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() where:BEGIN SELECT @x; @@ -5551,7 +5562,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() while:BEGIN SELECT @x; @@ -5563,7 +5574,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() with:BEGIN SELECT @x; @@ -5575,7 +5586,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() write:BEGIN SELECT @x; @@ -5587,7 +5598,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() xor:BEGIN SELECT @x; @@ -5599,7 +5610,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() year_month:BEGIN SELECT @x; @@ -5611,7 +5622,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() zerofill:BEGIN SELECT @x; @@ -5663,7 +5674,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1310 +--error ER_SP_LABEL_MISMATCH CREATE PROCEDURE sp1( ) begin1_label: BEGIN declare x char; @@ -5716,7 +5727,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare x char; @@ -5736,7 +5747,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) begin_label BEGIN declare x char; @@ -5757,7 +5768,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1309 +--error ER_SP_LABEL_REDEFINE CREATE PROCEDURE sp6( ) begin_samelabel: BEGIN declare x char; @@ -5788,10 +5799,8 @@ a stored procedure (with the declare statement) may only be properly defined; DROP PROCEDURE IF EXISTS sp6; --enable_warnings --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: DECIMAL(255,255) is not rejected - delimiter //; +--error ER_TOO_BIG_SCALE CREATE PROCEDURE sp6( ) BEGIN declare x char default 'a'; @@ -5842,7 +5851,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare x default '0' char; @@ -5855,7 +5864,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare x char, integer default '0'; @@ -5868,7 +5877,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare x1, x2 char, integer default '0', 1; @@ -5881,7 +5890,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char x; @@ -5895,7 +5904,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char x, y1 integer default 0; @@ -5909,7 +5918,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare x default 'a' char; @@ -5921,7 +5930,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare condition notable for sqlstate '42s22'; @@ -5933,7 +5942,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare condition for notable sqlstate '42s22'; @@ -5945,7 +5954,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare condition for sqlstate notable '42s22'; @@ -5957,7 +5966,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare condition for sqlstate '42s22' notable; @@ -5969,7 +5978,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare cursor cur1 for SELECT f1 from db_storedproc.t2; @@ -5981,7 +5990,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare cursor for cur1 SELECT f1 from db_storedproc.t2; @@ -5993,7 +6002,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare cursor for SELECT cur1 f1 from db_storedproc.t2; @@ -6005,7 +6014,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare handler continue for sqlstate '02000' set @x2 = 1; @@ -6017,7 +6026,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare handler exit for sqlstate '02000' set @x2 = 1; @@ -6029,7 +6038,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6( ) BEGIN declare handler undo for sqlstate '02000' set @x2 = 1; @@ -6041,7 +6050,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char x; @@ -6054,7 +6063,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char binary x; @@ -6067,7 +6076,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char ascii x; @@ -6080,7 +6089,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinytext x; @@ -6093,7 +6102,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare x; @@ -6106,7 +6115,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumtext x; @@ -6119,7 +6128,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longtext x; @@ -6132,7 +6141,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyblob x; @@ -6145,7 +6154,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare blob x; @@ -6158,7 +6167,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumblob x; @@ -6171,7 +6180,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longblob x; @@ -6184,7 +6193,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare binary x; @@ -6197,7 +6206,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint x; @@ -6210,7 +6219,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint unsigned x; @@ -6223,7 +6232,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint zerofill x; @@ -6236,7 +6245,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint unsigned zerofill x; @@ -6249,7 +6258,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint x; @@ -6262,7 +6271,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint unsigned x; @@ -6275,7 +6284,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint zerofill x; @@ -6288,7 +6297,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint unsigned zerofill x; @@ -6301,7 +6310,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint x; @@ -6314,7 +6323,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint unsigned x; @@ -6327,7 +6336,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint zerofill x; @@ -6340,7 +6349,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint unsigned zerofill x; @@ -6353,7 +6362,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int x; @@ -6366,7 +6375,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int unsigned x; @@ -6379,7 +6388,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int zerofill x; @@ -6392,7 +6401,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int unsigned zerofill x; @@ -6405,7 +6414,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint x; @@ -6418,7 +6427,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint unsigned x; @@ -6432,7 +6441,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint zerofill x; @@ -6445,7 +6454,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint unsigned zerofill x; @@ -6458,7 +6467,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal x; @@ -6471,7 +6480,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal unsigned x; @@ -6484,7 +6493,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal zerofill x; @@ -6497,7 +6506,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal unsigned zerofill not null x; @@ -6510,7 +6519,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (0) not null x; @@ -6523,7 +6532,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (64) not null x; @@ -6536,7 +6545,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (0) unsigned not null x; @@ -6549,7 +6558,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (64) unsigned not null x; @@ -6562,7 +6571,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (0) zerofill not null x; @@ -6575,7 +6584,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (64) zerofill not null x; @@ -6588,7 +6597,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (0) unsigned zerofill not null x; @@ -6601,7 +6610,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (64) unsigned zerofill not null x; @@ -6614,7 +6623,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (00) not null x; @@ -6627,7 +6636,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (63, 30) not null x; @@ -6640,7 +6649,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (00) unsigned not null x; @@ -6653,7 +6662,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (63, 30) unsigned not null x; @@ -6666,7 +6675,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (00) zerofill not null x; @@ -6679,7 +6688,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (63, 30) zerofill not null x; @@ -6692,7 +6701,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (00) unsigned zerofill not null x; @@ -6705,7 +6714,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal (63, 30) unsigned zerofill not null x; @@ -6718,7 +6727,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric not null x; @@ -6731,7 +6740,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric unsigned not null x; @@ -6744,7 +6753,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric zerofill not null x; @@ -6757,7 +6766,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric unsigned zerofill not null x; @@ -6770,7 +6779,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (0) not null x; @@ -6783,7 +6792,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (64) not nul x; @@ -6796,7 +6805,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (0) unsigned x; @@ -6809,7 +6818,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (64) unsigned x; @@ -6822,7 +6831,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (0) zerofill x; @@ -6835,7 +6844,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (64) zerofill x; @@ -6848,7 +6857,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (0) unsigned zerofill x; @@ -6861,7 +6870,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (64) unsigned zerofill x; @@ -6874,7 +6883,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (00) x; @@ -6887,7 +6896,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (63, 30) x; @@ -6901,7 +6910,7 @@ DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (00) unsigned x; @@ -6914,7 +6923,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (63, 30) unsigned x; @@ -6927,7 +6936,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (00) zerofill x; @@ -6940,7 +6949,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (63, 30) zerofill x; @@ -6953,7 +6962,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (00) unsigned zerofill x; @@ -6966,7 +6975,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric (63, 30) unsigned zerofill x; @@ -6979,7 +6988,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real x; @@ -6992,7 +7001,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real unsigned x; @@ -7005,7 +7014,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real zerofill x; @@ -7018,7 +7027,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real unsigned zerofill x; @@ -7031,7 +7040,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double x; @@ -7044,7 +7053,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double unsigned x; @@ -7057,7 +7066,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double zerofill x; @@ -7070,7 +7079,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double unsigned zerofill x; @@ -7083,7 +7092,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float not null x; @@ -7096,7 +7105,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float unsigned not null x; @@ -7109,7 +7118,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float zerofill not null x; @@ -7122,7 +7131,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float unsigned zerofill not null x; @@ -7135,7 +7144,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(0) not null x; @@ -7148,7 +7157,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(23) not null x; @@ -7161,7 +7170,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(0) unsigned not null x; @@ -7174,7 +7183,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(23) unsigned not null x; @@ -7187,7 +7196,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(0) zerofill not null x; @@ -7200,7 +7209,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(23) zerofill not null x; @@ -7213,7 +7222,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(0) unsigned zerofill not null x; @@ -7226,7 +7235,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(23) unsigned zerofill not null x; @@ -7239,7 +7248,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(24) not null x; @@ -7252,7 +7261,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(53) not null x; @@ -7265,7 +7274,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(24) unsigned not null x; @@ -7278,7 +7287,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(53) unsigned not null x; @@ -7291,7 +7300,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(24) zerofill not null x; @@ -7304,7 +7313,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(53) zerofill not null x; @@ -7317,7 +7326,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(24) unsigned zerofill not null x; @@ -7330,7 +7339,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float(53) unsigned zerofill not null x; @@ -7343,7 +7352,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare date not null x; @@ -7356,7 +7365,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare time not null x; @@ -7369,7 +7378,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare datetime not null x; @@ -7382,7 +7391,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare timestamp not null x; @@ -7395,7 +7404,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare year not null x; @@ -7408,7 +7417,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare year(3) not null x; @@ -7421,7 +7430,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare year(4) not null x; @@ -7434,7 +7443,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare enum("1enum", "2enum") not null x; @@ -7447,7 +7456,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare set("1set", "2set") not nul x; @@ -7468,20 +7477,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1337 -CREATE PROCEDURE sp1() -BEGIN - declare continue handler for sqlstate '23000' set @x2 = 1; - declare x char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1337 +--error ER_SP_VARCOND_AFTER_CURSHNDLR CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '23000' set @x2 = 1; @@ -7494,7 +7490,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1337 +--error ER_SP_VARCOND_AFTER_CURSHNDLR CREATE PROCEDURE sp6( ) BEGIN declare cursor1 cursor for SELECT f1 from tb1; @@ -7507,7 +7503,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1337 +--error ER_SP_VARCOND_AFTER_CURSHNDLR CREATE PROCEDURE sp6( ) BEGIN declare cursor1 cursor for SELECT f1 from tb1; @@ -7520,7 +7516,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1338 +--error ER_SP_CURSOR_AFTER_HANDLER CREATE PROCEDURE sp6( ) BEGIN declare sqlcondition condition for sqlstate '02000'; @@ -7536,27 +7532,21 @@ Ensure that the declare statement can declare multiple variables both separately and all at once from a variable list. (multiple declaration); --source include/show_msg80.inc -#FIXME 4.2.15: switched off until bug is fixed: -#FIXME 4.2.15: Bug #14376 MySQL crash on scoped variable (re)initialization +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + delimiter //; -if (0) -{ - --disable_warnings - DROP PROCEDURE IF EXISTS sp_14376// - --enable_warnings - #--error 4711 - CREATE PROCEDURE sp_14376() +CREATE PROCEDURE sp1() BEGIN DECLARE x1 CHAR(100) DEFAULT 'outer'; BEGIN DECLARE x1 CHAR(100) DEFAULT x1; END; END// - CALL sp_14376()// - DROP PROCEDURE sp_14376()// -} delimiter ;// +CALL sp1(); --disable_warnings DROP PROCEDURE IF EXISTS sp1; @@ -8022,9 +8012,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8054,9 +8041,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8071,9 +8055,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8088,9 +8069,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8105,9 +8083,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8122,9 +8097,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: default (10,0) for DECIMAL not checked - CALL sp1(); --disable_warnings @@ -8417,7 +8389,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare @x char; @@ -8430,7 +8402,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare accessible char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare add char; @@ -8442,7 +8426,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare all char; @@ -8454,7 +8438,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare alter char; @@ -8466,7 +8450,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare analyze char; @@ -8478,7 +8462,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare and char; @@ -8490,7 +8474,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare as char; @@ -8502,7 +8486,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare asc char; @@ -8514,7 +8498,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare asensitive char; @@ -8526,7 +8510,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare before char; @@ -8538,7 +8522,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare between char; @@ -8550,7 +8534,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare bigint char; @@ -8562,7 +8546,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare binary char; @@ -8574,7 +8558,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare blob char; @@ -8586,7 +8570,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare both char; @@ -8598,7 +8582,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare by char; @@ -8610,10 +8594,10 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN - declare CALL char; + declare call char; END// delimiter ;// @@ -8622,7 +8606,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare cascade char; @@ -8634,7 +8618,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare case char; @@ -8646,7 +8630,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare change char; @@ -8658,7 +8642,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare char char; @@ -8670,7 +8654,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare character char; @@ -8682,7 +8666,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare check char; @@ -8694,7 +8678,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare collate char; @@ -8706,7 +8690,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare column char; @@ -8717,21 +8701,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings -#FIXME: check why _was_ this switched off delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare columns char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare condition char; @@ -8743,19 +8714,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare connection char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare constraint char; @@ -8767,7 +8726,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare continue char; @@ -8779,7 +8738,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare convert char; @@ -8791,7 +8750,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare create char; @@ -8803,7 +8762,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare cross char; @@ -8815,7 +8774,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare current_date char; @@ -8827,7 +8786,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare current_time char; @@ -8839,7 +8798,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare current_timestamp char; @@ -8851,7 +8810,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare current_user char; @@ -8863,7 +8822,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare cursor char; @@ -8875,7 +8834,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare database char; @@ -8887,7 +8846,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare databases char; @@ -8899,7 +8858,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare day_hour char; @@ -8911,7 +8870,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare day_microsecond char; @@ -8923,7 +8882,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare day_minute char; @@ -8935,7 +8894,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare day_second char; @@ -8947,7 +8906,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare dec char; @@ -8959,7 +8918,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare decimal char; @@ -8971,7 +8930,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare declare char; @@ -8983,7 +8942,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare default char; @@ -8995,7 +8954,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare delayed char; @@ -9007,7 +8966,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare delete char; @@ -9019,7 +8978,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare desc char; @@ -9031,7 +8990,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare describe char; @@ -9043,7 +9002,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare deterministic char; @@ -9055,7 +9014,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare distinct char; @@ -9067,7 +9026,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare distinctrow char; @@ -9079,7 +9038,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare div char; @@ -9091,7 +9050,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare double char; @@ -9103,7 +9062,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare drop char; @@ -9115,7 +9074,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare dual char; @@ -9127,7 +9086,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare each char; @@ -9139,7 +9098,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare else char; @@ -9151,7 +9110,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare elseif char; @@ -9163,7 +9122,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare enclosed char; @@ -9175,7 +9134,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare escaped char; @@ -9187,7 +9146,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare exists char; @@ -9199,7 +9158,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare exit char; @@ -9211,7 +9170,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare explain char; @@ -9223,7 +9182,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare false char; @@ -9235,7 +9194,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare fetch char; @@ -9246,21 +9205,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings -#FIXME: check why _was_ this switched off delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare fields char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare float char; @@ -9272,7 +9218,31 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare float4 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare float8 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare for char; @@ -9284,7 +9254,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare force char; @@ -9296,7 +9266,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare foreign char; @@ -9307,21 +9277,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; --enable_warnings -#FIXME: check why _was_ this switched off delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare found char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare from char; @@ -9333,7 +9290,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare fulltext char; @@ -9345,19 +9302,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare goto char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare grant char; @@ -9369,7 +9314,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare group char; @@ -9381,7 +9326,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare having char; @@ -9393,7 +9338,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare high_priority char; @@ -9405,7 +9350,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare hour_microsecond char; @@ -9417,7 +9362,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare hour_minute char; @@ -9429,7 +9374,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare hour_second char; @@ -9441,7 +9386,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare if char; @@ -9453,7 +9398,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare ignore char; @@ -9465,7 +9410,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare in char; @@ -9477,7 +9422,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare index char; @@ -9489,7 +9434,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare infile char; @@ -9501,7 +9446,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare inner char; @@ -9513,7 +9458,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare inout char; @@ -9525,7 +9470,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare insensitive char; @@ -9537,7 +9482,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare insert char; @@ -9549,7 +9494,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare int char; @@ -9561,7 +9506,67 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare int1 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare int2 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare int3 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare int4 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare int8 char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare integer char; @@ -9573,7 +9578,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare interval char; @@ -9585,7 +9590,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare into char; @@ -9597,7 +9602,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare is char; @@ -9609,7 +9614,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare iterate char; @@ -9621,7 +9626,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare join char; @@ -9633,7 +9638,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare key char; @@ -9645,7 +9650,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare keys char; @@ -9657,7 +9662,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare kill char; @@ -9669,7 +9674,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare leading char; @@ -9681,7 +9686,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare leave char; @@ -9693,7 +9698,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare left char; @@ -9705,7 +9710,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare like char; @@ -9717,7 +9722,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare limit char; @@ -9729,7 +9734,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare linear char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare lines char; @@ -9741,7 +9758,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare load char; @@ -9753,7 +9770,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare localtime char; @@ -9765,7 +9782,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare localtimestamp char; @@ -9777,7 +9794,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare lock char; @@ -9789,7 +9806,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare long char; @@ -9801,7 +9818,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare longblob char; @@ -9813,7 +9830,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare longtext char; @@ -9825,7 +9842,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare loop char; @@ -9837,7 +9854,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare low_priority char; @@ -9849,7 +9866,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare master_ssl_verify_server_cert char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare match char; @@ -9861,7 +9890,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare mediumblob char; @@ -9873,7 +9902,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare mediumint char; @@ -9885,7 +9914,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare mediumtext char; @@ -9897,7 +9926,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare middleint char; @@ -9909,7 +9938,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare minute_microsecond char; @@ -9921,7 +9950,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare minute_second char; @@ -9933,7 +9962,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare mod char; @@ -9945,7 +9974,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare modifies char; @@ -9957,7 +9986,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare natural char; @@ -9969,7 +9998,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare not char; @@ -9981,7 +10010,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare no_write_to_binlog char; @@ -9993,7 +10022,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare null char; @@ -10005,7 +10034,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare numeric char; @@ -10017,7 +10046,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare on char; @@ -10029,7 +10058,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare optimize char; @@ -10041,7 +10070,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare option char; @@ -10053,7 +10082,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare optionally char; @@ -10065,7 +10094,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare or char; @@ -10077,7 +10106,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare order char; @@ -10089,7 +10118,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare out char; @@ -10101,7 +10130,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare outer char; @@ -10113,7 +10142,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare outfile char; @@ -10125,7 +10154,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME check this is OK:--error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare precision char; @@ -10137,7 +10166,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare primary char; @@ -10149,19 +10178,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare privileges char; -END// -delimiter ;// - ---disable_warnings -DROP PROCEDURE IF EXISTS sp1; ---enable_warnings - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare procedure char; @@ -10173,7 +10190,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare purge char; @@ -10185,7 +10202,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare range char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare read char; @@ -10197,7 +10226,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare reads char; @@ -10209,7 +10238,32 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +# FIXME 31947 +#--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare read_only char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare read_write char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare real char; @@ -10221,7 +10275,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare references char; @@ -10233,7 +10287,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare regexp char; @@ -10245,7 +10299,19 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1() +BEGIN + declare release char; +END// +delimiter ;// + +--disable_warnings +DROP PROCEDURE IF EXISTS sp1; +--enable_warnings + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare rename char; @@ -10257,7 +10323,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare repeat char; @@ -10269,7 +10335,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare replace char; @@ -10278,7 +10344,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare require char; @@ -10287,7 +10353,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare restrict char; @@ -10297,7 +10363,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare return char; @@ -10307,7 +10373,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare revoke char; @@ -10317,7 +10383,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare right char; @@ -10327,7 +10393,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare rlike char; @@ -10337,7 +10403,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare schema char; @@ -10347,7 +10413,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare schemas char; @@ -10357,7 +10423,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare second_microsecond char; @@ -10367,7 +10433,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare SELECT char; @@ -10377,7 +10443,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sensitive char; @@ -10387,7 +10453,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare separator char; @@ -10397,7 +10463,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare set char; @@ -10407,7 +10473,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare show char; @@ -10417,7 +10483,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare smallint char; @@ -10427,17 +10493,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare soname char; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare spatial char; @@ -10447,7 +10503,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare specific char; @@ -10457,7 +10513,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sql char; @@ -10467,7 +10523,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sqlexception char; @@ -10477,7 +10533,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sqlstate char; @@ -10487,7 +10543,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sqlwarning char; @@ -10497,7 +10553,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sql_big_result char; @@ -10507,7 +10563,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sql_calc_found_rows char; @@ -10517,7 +10573,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare sql_small_result char; @@ -10527,7 +10583,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare ssl char; @@ -10537,7 +10593,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare starting char; @@ -10547,7 +10603,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare straight_join char; @@ -10557,7 +10613,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare table char; @@ -10566,19 +10622,8 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; -#FIXME: check why _was_ this switched off delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1() -BEGIN - declare tables char; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare terminated char; @@ -10588,7 +10633,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare then char; @@ -10598,7 +10643,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare tinyblob char; @@ -10608,7 +10653,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare tinyint char; @@ -10618,7 +10663,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare tinytext char; @@ -10628,7 +10673,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare to char; @@ -10638,7 +10683,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare trailing char; @@ -10647,7 +10692,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare trigger char; @@ -10656,7 +10701,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare true char; @@ -10666,7 +10711,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare undo char; @@ -10676,7 +10721,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare union char; @@ -10686,7 +10731,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare unique char; @@ -10696,7 +10741,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare unlock char; @@ -10706,7 +10751,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare unsigned char; @@ -10716,7 +10761,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare update char; @@ -10726,7 +10771,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare usage char; @@ -10736,17 +10781,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN - declare USE char; + declare use char; END// delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare using char; @@ -10756,7 +10801,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare utc_date char; @@ -10766,7 +10811,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare utc_time char; @@ -10776,7 +10821,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare utc_timestamp char; @@ -10786,7 +10831,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare values char; @@ -10796,7 +10841,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare varbinary char; @@ -10806,7 +10851,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare varchar char; @@ -10816,7 +10861,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare varcharacter char; @@ -10826,7 +10871,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare varying char; @@ -10836,7 +10881,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare when char; @@ -10846,7 +10891,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare where char; @@ -10856,7 +10901,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare while char; @@ -10866,7 +10911,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare with char; @@ -10876,7 +10921,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare write char; @@ -10886,7 +10931,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare xor char; @@ -10896,7 +10941,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare year_month char; @@ -10906,7 +10951,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare zerofill char; @@ -11053,7 +11098,7 @@ DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare @x char; @@ -11063,7 +11108,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare x char1; @@ -11072,7 +11117,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare accessible condition for sqlstate '02000'; + declare exit handler for add set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare add condition for sqlstate '02000'; @@ -11083,7 +11139,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare all condition for sqlstate '02000'; @@ -11094,7 +11150,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare alter condition for sqlstate '02000'; @@ -11105,7 +11161,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare analyze condition for sqlstate '02000'; @@ -11116,7 +11172,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare and condition for sqlstate '02000'; @@ -11127,7 +11183,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare as condition for sqlstate '02000'; @@ -11138,7 +11194,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare asc condition for sqlstate '02000'; @@ -11149,7 +11205,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare asensitive condition for sqlstate '02000'; @@ -11160,7 +11216,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare before condition for sqlstate '02000'; @@ -11171,7 +11227,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare between condition for sqlstate '02000'; @@ -11182,7 +11238,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint condition for sqlstate '02000'; @@ -11193,7 +11249,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare binary condition for sqlstate '02000'; @@ -11204,7 +11260,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare blob condition for sqlstate '02000'; @@ -11215,7 +11271,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare both condition for sqlstate '02000'; @@ -11226,7 +11282,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare by condition for sqlstate '02000'; @@ -11237,10 +11293,10 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare CALL condition for sqlstate '02000'; + declare call condition for sqlstate '02000'; declare exit handler for CALL set @var2 = 1; END// delimiter ;// @@ -11248,7 +11304,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cascade condition for sqlstate '02000'; @@ -11259,7 +11315,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare case condition for sqlstate '02000'; @@ -11270,7 +11326,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare change condition for sqlstate '02000'; @@ -11281,7 +11337,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char condition for sqlstate '02000'; @@ -11292,7 +11348,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare character condition for sqlstate '02000'; @@ -11303,7 +11359,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare check condition for sqlstate '02000'; @@ -11314,7 +11370,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +#--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare collate condition for sqlstate '02000'; @@ -11325,7 +11381,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare column condition for sqlstate '02000'; @@ -11334,19 +11390,8 @@ END// delimiter ;// DROP PROCEDURE IF EXISTS sp1; -#FIXME: check why this is switched off -#--error 1064 -#delimiter //; -#CREATE PROCEDURE sp1( ) -# BEGIN -# declare columns condition for sqlstate '02000'; -# declare exit handler for columns set @var2 = 1; -#END// -#delimiter ;// -#DROP PROCEDURE IF EXISTS sp1; - delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare condition condition for sqlstate '02000'; @@ -11356,7 +11401,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +#--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare connection condition for sqlstate '02000'; @@ -11366,7 +11411,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare constraint condition for sqlstate '02000'; @@ -11377,7 +11422,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare continue condition for sqlstate '02000'; @@ -11388,7 +11433,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare convert condition for sqlstate '02000'; @@ -11399,7 +11444,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare create condition for sqlstate '02000'; @@ -11410,7 +11455,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cross condition for sqlstate '02000'; @@ -11421,7 +11466,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_date condition for sqlstate '02000'; @@ -11432,7 +11477,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_time condition for sqlstate '02000'; @@ -11443,7 +11488,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_timestamp condition for sqlstate '02000'; @@ -11454,7 +11499,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_user condition for sqlstate '02000'; @@ -11465,7 +11510,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cursor condition for sqlstate '02000'; @@ -11476,7 +11521,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare database condition for sqlstate '02000'; @@ -11487,7 +11532,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare databases condition for sqlstate '02000'; @@ -11498,7 +11543,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_hour condition for sqlstate '02000'; @@ -11509,7 +11554,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_microsecond condition for sqlstate '02000'; @@ -11520,7 +11565,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_minute condition for sqlstate '02000'; @@ -11531,7 +11576,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_second condition for sqlstate '02000'; @@ -11542,7 +11587,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare dec condition for sqlstate '02000'; @@ -11553,7 +11598,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal condition for sqlstate '02000'; @@ -11564,7 +11609,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare declare condition for sqlstate '02000'; @@ -11575,7 +11620,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare default condition for sqlstate '02000'; @@ -11586,7 +11631,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare delayed condition for sqlstate '02000'; @@ -11597,7 +11642,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare delete condition for sqlstate '02000'; @@ -11608,7 +11653,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare desc condition for sqlstate '02000'; @@ -11619,7 +11664,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare describe condition for sqlstate '02000'; @@ -11630,7 +11675,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare deterministic condition for sqlstate '02000'; @@ -11641,7 +11686,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare distinct condition for sqlstate '02000'; @@ -11652,7 +11697,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare distinctrow condition for sqlstate '02000'; @@ -11663,7 +11708,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare div condition for sqlstate '02000'; @@ -11674,7 +11719,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double condition for sqlstate '02000'; @@ -11685,7 +11730,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare drop condition for sqlstate '02000'; @@ -11696,7 +11741,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare dual condition for sqlstate '02000'; @@ -11707,7 +11752,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare each condition for sqlstate '02000'; @@ -11718,7 +11763,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare else condition for sqlstate '02000'; @@ -11729,7 +11774,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare elseif condition for sqlstate '02000'; @@ -11740,7 +11785,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare enclosed condition for sqlstate '02000'; @@ -11751,7 +11796,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare escaped condition for sqlstate '02000'; @@ -11762,7 +11807,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare exists condition for sqlstate '02000'; @@ -11773,7 +11818,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare exit condition for sqlstate '02000'; @@ -11784,7 +11829,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare explain condition for sqlstate '02000'; @@ -11795,7 +11840,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare false condition for sqlstate '02000'; @@ -11806,7 +11851,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare fetch condition for sqlstate '02000'; @@ -11817,17 +11862,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1( ) - BEGIN - declare fields condition for sqlstate '02000'; - declare exit handler for fields set @var2 = 1; -END// -delimiter ;// -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float condition for sqlstate '02000'; @@ -11838,7 +11873,29 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare float4 condition for sqlstate '02000'; + declare exit handler for add set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare float8 condition for sqlstate '02000'; + declare exit handler for add set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare for condition for sqlstate '02000'; @@ -11849,7 +11906,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare force condition for sqlstate '02000'; @@ -11860,7 +11917,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare foreign condition for sqlstate '02000'; @@ -11871,19 +11928,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME: check why _was_ this switched off -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare found condition for sqlstate '02000'; - declare exit handler for found set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare from condition for sqlstate '02000'; @@ -11894,7 +11939,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare fulltext condition for sqlstate '02000'; @@ -11905,18 +11950,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare goto condition for sqlstate '02000'; - declare exit handler for goto set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare grant condition for sqlstate '02000'; @@ -11927,7 +11961,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare group condition for sqlstate '02000'; @@ -11938,7 +11972,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare having condition for sqlstate '02000'; @@ -11949,7 +11983,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare high_priority condition for sqlstate '02000'; @@ -11960,7 +11994,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_microsecond condition for sqlstate '02000'; @@ -11971,7 +12005,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_minute condition for sqlstate '02000'; @@ -11982,7 +12016,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_second condition for sqlstate '02000'; @@ -11993,7 +12027,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare if condition for sqlstate '02000'; @@ -12004,7 +12038,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare ignore condition for sqlstate '02000'; @@ -12015,7 +12049,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare in condition for sqlstate '02000'; @@ -12026,7 +12060,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare index condition for sqlstate '02000'; @@ -12037,7 +12071,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare infile condition for sqlstate '02000'; @@ -12048,7 +12082,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare inner condition for sqlstate '02000'; @@ -12059,7 +12093,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare inout condition for sqlstate '02000'; @@ -12070,7 +12104,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare insensitive condition for sqlstate '02000'; @@ -12081,7 +12115,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare insert condition for sqlstate '02000'; @@ -12092,7 +12126,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int condition for sqlstate '02000'; @@ -12103,7 +12137,62 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int1 condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int2 condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int3 condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int4 condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int8 condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare integer condition for sqlstate '02000'; @@ -12114,7 +12203,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare interval condition for sqlstate '02000'; @@ -12125,7 +12214,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare into condition for sqlstate '02000'; @@ -12136,7 +12225,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare is condition for sqlstate '02000'; @@ -12147,7 +12236,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare iterate condition for sqlstate '02000'; @@ -12158,7 +12247,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare join condition for sqlstate '02000'; @@ -12169,7 +12258,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare key condition for sqlstate '02000'; @@ -12180,7 +12269,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare keys condition for sqlstate '02000'; @@ -12191,7 +12280,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare kill condition for sqlstate '02000'; @@ -12202,7 +12291,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare leading condition for sqlstate '02000'; @@ -12213,7 +12302,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare leave condition for sqlstate '02000'; @@ -12224,7 +12313,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare left condition for sqlstate '02000'; @@ -12235,7 +12324,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare like condition for sqlstate '02000'; @@ -12246,7 +12335,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare limit condition for sqlstate '02000'; @@ -12257,7 +12346,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare linear condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare lines condition for sqlstate '02000'; @@ -12268,7 +12368,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare load condition for sqlstate '02000'; @@ -12279,7 +12379,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare localtime condition for sqlstate '02000'; @@ -12290,7 +12390,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare localtimestamp condition for sqlstate '02000'; @@ -12301,7 +12401,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare lock condition for sqlstate '02000'; @@ -12312,7 +12412,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare long condition for sqlstate '02000'; @@ -12323,7 +12423,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longblob condition for sqlstate '02000'; @@ -12334,7 +12434,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longtext condition for sqlstate '02000'; @@ -12345,7 +12445,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare loop condition for sqlstate '02000'; @@ -12356,7 +12456,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare low_priority condition for sqlstate '02000'; @@ -12367,7 +12467,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare master_ssl_verify_server_cert condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare match condition for sqlstate '02000'; @@ -12378,7 +12489,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumblob condition for sqlstate '02000'; @@ -12389,7 +12500,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint condition for sqlstate '02000'; @@ -12400,7 +12511,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumtext condition for sqlstate '02000'; @@ -12411,7 +12522,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare middleint condition for sqlstate '02000'; @@ -12422,7 +12533,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare minute_microsecond condition for sqlstate '02000'; @@ -12433,7 +12544,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare minute_second condition for sqlstate '02000'; @@ -12444,7 +12555,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mod condition for sqlstate '02000'; @@ -12455,7 +12566,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare modifies condition for sqlstate '02000'; @@ -12466,7 +12577,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare natural condition for sqlstate '02000'; @@ -12477,7 +12588,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare not condition for sqlstate '02000'; @@ -12488,7 +12599,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare no_write_to_binlog condition for sqlstate '02000'; @@ -12499,7 +12610,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare null condition for sqlstate '02000'; @@ -12510,7 +12621,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric condition for sqlstate '02000'; @@ -12521,7 +12632,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare on condition for sqlstate '02000'; @@ -12532,7 +12643,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare optimize condition for sqlstate '02000'; @@ -12543,7 +12654,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare option condition for sqlstate '02000'; @@ -12554,7 +12665,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare optionally condition for sqlstate '02000'; @@ -12565,7 +12676,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare or condition for sqlstate '02000'; @@ -12576,7 +12687,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare order condition for sqlstate '02000'; @@ -12587,7 +12698,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare out condition for sqlstate '02000'; @@ -12598,7 +12709,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare outer condition for sqlstate '02000'; @@ -12609,7 +12720,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare outfile condition for sqlstate '02000'; @@ -12620,7 +12731,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare precision condition for sqlstate '02000'; @@ -12631,7 +12742,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare primary condition for sqlstate '02000'; @@ -12642,19 +12753,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME: why was this switched off ? -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare privileges condition for sqlstate '02000'; - declare exit handler for privileges set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare procedure condition for sqlstate '02000'; @@ -12665,7 +12764,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare purge condition for sqlstate '02000'; @@ -12676,7 +12775,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare range condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare read condition for sqlstate '02000'; @@ -12687,7 +12797,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare reads condition for sqlstate '02000'; @@ -12698,7 +12808,29 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare read_only condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare read_write condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real condition for sqlstate '02000'; @@ -12709,7 +12841,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare references condition for sqlstate '02000'; @@ -12720,7 +12852,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare regexp condition for sqlstate '02000'; @@ -12731,7 +12863,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare release condition for sqlstate '02000'; + declare exit handler for int set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare rename condition for sqlstate '02000'; @@ -12742,7 +12885,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare repeat condition for sqlstate '02000'; @@ -12753,7 +12896,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare replace condition for sqlstate '02000'; @@ -12764,7 +12907,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare require condition for sqlstate '02000'; @@ -12775,7 +12918,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare restrict condition for sqlstate '02000'; @@ -12786,7 +12929,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare return condition for sqlstate '02000'; @@ -12797,7 +12940,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare revoke condition for sqlstate '02000'; @@ -12808,7 +12951,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare right condition for sqlstate '02000'; @@ -12819,7 +12962,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare rlike condition for sqlstate '02000'; @@ -12830,7 +12973,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare schema condition for sqlstate '02000'; @@ -12841,7 +12984,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare schemas condition for sqlstate '02000'; @@ -12852,7 +12995,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare second_microsecond condition for sqlstate '02000'; @@ -12863,10 +13006,10 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare SELECT condition for sqlstate '02000'; + declare select condition for sqlstate '02000'; declare exit handler for SELECT set @var2 = 1; END// delimiter ;// @@ -12874,7 +13017,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sensitive condition for sqlstate '02000'; @@ -12885,7 +13028,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare separator condition for sqlstate '02000'; @@ -12896,7 +13039,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare set condition for sqlstate '02000'; @@ -12907,7 +13050,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare show condition for sqlstate '02000'; @@ -12918,7 +13061,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint condition for sqlstate '02000'; @@ -12929,18 +13072,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare soname condition for sqlstate '02000'; - declare exit handler for soname set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare spatial condition for sqlstate '02000'; @@ -12951,7 +13083,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare specific condition for sqlstate '02000'; @@ -12962,7 +13094,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql condition for sqlstate '02000'; @@ -12973,7 +13105,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlexception condition for sqlstate '02000'; @@ -12984,7 +13116,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlstate condition for sqlstate '02000'; @@ -12995,7 +13127,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlwarning condition for sqlstate '02000'; @@ -13006,7 +13138,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_big_result condition for sqlstate '02000'; @@ -13017,7 +13149,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_calc_found_rows condition for sqlstate '02000'; @@ -13028,7 +13160,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_small_result condition for sqlstate '02000'; @@ -13039,7 +13171,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare ssl condition for sqlstate '02000'; @@ -13050,7 +13182,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare starting condition for sqlstate '02000'; @@ -13061,7 +13193,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare straight_join condition for sqlstate '02000'; @@ -13072,7 +13204,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare table condition for sqlstate '02000'; @@ -13083,19 +13215,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; -#FIXME: why was this switched off ? -#FIXME check this is OK:--error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare tables condition for sqlstate '02000'; - declare exit handler for tables set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare terminated condition for sqlstate '02000'; @@ -13106,7 +13226,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare then condition for sqlstate '02000'; @@ -13117,7 +13237,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyblob condition for sqlstate '02000'; @@ -13128,7 +13248,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint condition for sqlstate '02000'; @@ -13139,7 +13259,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinytext condition for sqlstate '02000'; @@ -13150,7 +13270,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare to condition for sqlstate '02000'; @@ -13161,7 +13281,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare trailing condition for sqlstate '02000'; @@ -13172,7 +13292,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare trigger condition for sqlstate '02000'; @@ -13183,7 +13303,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare true condition for sqlstate '02000'; @@ -13194,7 +13314,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare undo condition for sqlstate '02000'; @@ -13205,7 +13325,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare union condition for sqlstate '02000'; @@ -13216,7 +13336,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unique condition for sqlstate '02000'; @@ -13227,7 +13347,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unlock condition for sqlstate '02000'; @@ -13238,7 +13358,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unsigned condition for sqlstate '02000'; @@ -13249,7 +13369,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare update condition for sqlstate '02000'; @@ -13260,7 +13380,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare usage condition for sqlstate '02000'; @@ -13271,10 +13391,10 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare USE condition for sqlstate '02000'; + declare use condition for sqlstate '02000'; declare exit handler for USE set @var2 = 1; END// delimiter ;// @@ -13282,7 +13402,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare using condition for sqlstate '02000'; @@ -13293,7 +13413,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_date condition for sqlstate '02000'; @@ -13304,7 +13424,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_time condition for sqlstate '02000'; @@ -13315,7 +13435,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_timestamp condition for sqlstate '02000'; @@ -13326,7 +13446,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare values condition for sqlstate '02000'; @@ -13337,7 +13457,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varbinary condition for sqlstate '02000'; @@ -13348,7 +13468,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varchar condition for sqlstate '02000'; @@ -13359,7 +13479,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varcharacter condition for sqlstate '02000'; @@ -13370,7 +13490,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varying condition for sqlstate '02000'; @@ -13381,7 +13501,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare when condition for sqlstate '02000'; @@ -13392,7 +13512,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare where condition for sqlstate '02000'; @@ -13403,7 +13523,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare while condition for sqlstate '02000'; @@ -13414,7 +13534,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare with condition for sqlstate '02000'; @@ -13425,7 +13545,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare write condition for sqlstate '02000'; @@ -13436,7 +13556,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare xor condition for sqlstate '02000'; @@ -13447,7 +13567,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare year_month condition for sqlstate '02000'; @@ -13458,7 +13578,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare zerofill condition for sqlstate '02000'; @@ -13507,7 +13627,7 @@ DROP PROCEDURE sp1; DROP PROCEDURE IF EXISTS handler1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE handler1() BEGIN declare undo handler for sqlstate '23000' set @x2 = 1; @@ -13531,7 +13651,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS handler1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE handler1() BEGIN declare continueinv handler for sqlstate '2300' set @x2 = 1; @@ -13555,7 +13675,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS handler1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE handler1() BEGIN declare undoinv handler for sqlstate '2300' set @x2 = 1; @@ -13579,7 +13699,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS handler1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE handler1 () BEGIN declare exitinv handler for sqlstate '2300' set @x2 = 1; @@ -13599,7 +13719,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare accessible handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare add handler for sqlstate '02000' set @var2 = 1; @@ -13609,7 +13739,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare all handler for sqlstate '02000' set @var2 = 1; @@ -13619,7 +13749,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare alter handler for sqlstate '02000' set @var2 = 1; @@ -13629,7 +13759,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare analyze handler for sqlstate '02000' set @var2 = 1; @@ -13639,7 +13769,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare and handler for sqlstate '02000' set @var2 = 1; @@ -13649,7 +13779,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare as handler for sqlstate '02000' set @var2 = 1; @@ -13659,7 +13789,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare asc handler for sqlstate '02000' set @var2 = 1; @@ -13669,7 +13799,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare asensitive handler for sqlstate '02000' set @var2 = 1; @@ -13679,7 +13809,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare before handler for sqlstate '02000' set @var2 = 1; @@ -13689,7 +13819,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare between handler for sqlstate '02000' set @var2 = 1; @@ -13699,7 +13829,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare bigint handler for sqlstate '02000' set @var2 = 1; @@ -13709,7 +13839,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare binary handler for sqlstate '02000' set @var2 = 1; @@ -13719,7 +13849,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare blob handler for sqlstate '02000' set @var2 = 1; @@ -13729,7 +13859,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare both handler for sqlstate '02000' set @var2 = 1; @@ -13739,7 +13869,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare by handler for sqlstate '02000' set @var2 = 1; @@ -13749,17 +13879,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare CALL handler for sqlstate '02000' set @var2 = 1; + declare call handler for sqlstate '02000' set @var2 = 1; END// delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cascade handler for sqlstate '02000' set @var2 = 1; @@ -13769,7 +13899,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare case handler for sqlstate '02000' set @var2 = 1; @@ -13779,7 +13909,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare change handler for sqlstate '02000' set @var2 = 1; @@ -13789,7 +13919,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare char handler for sqlstate '02000' set @var2 = 1; @@ -13799,7 +13929,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare character handler for sqlstate '02000' set @var2 = 1; @@ -13809,7 +13939,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare check handler for sqlstate '02000' set @var2 = 1; @@ -13819,7 +13949,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare collate handler for sqlstate '02000' set @var2 = 1; @@ -13829,7 +13959,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare column handler for sqlstate '02000' set @var2 = 1; @@ -13839,17 +13969,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare columns handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare condition handler for sqlstate '02000' set @var2 = 1; @@ -13859,17 +13979,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare connection handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare constraint handler for sqlstate '02000' set @var2 = 1; @@ -13878,18 +13988,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; -#FIXME: check why this is switched off -#--error 1064 -#delimiter //; -#CREATE PROCEDURE sp1( ) -# BEGIN -# declare continue handler for sqlstate '02000' set @var2 = 1; -#END// -#delimiter ;// -#DROP PROCEDURE IF EXISTS sp1; +--error ER_PARSE_ERROR +delimiter //; +CREATE PROCEDURE sp1( ) + BEGIN + declare continue handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare convert handler for sqlstate '02000' set @var2 = 1; @@ -13899,7 +14009,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare create handler for sqlstate '02000' set @var2 = 1; @@ -13909,7 +14019,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cross handler for sqlstate '02000' set @var2 = 1; @@ -13919,7 +14029,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_date handler for sqlstate '02000' set @var2 = 1; @@ -13929,7 +14039,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_time handler for sqlstate '02000' set @var2 = 1; @@ -13939,7 +14049,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_timestamp handler for sqlstate '02000' set @var2 = 1; @@ -13949,7 +14059,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare current_user handler for sqlstate '02000' set @var2 = 1; @@ -13959,7 +14069,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare cursor handler for sqlstate '02000' set @var2 = 1; @@ -13969,7 +14079,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare database handler for sqlstate '02000' set @var2 = 1; @@ -13979,7 +14089,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare databases handler for sqlstate '02000' set @var2 = 1; @@ -13989,7 +14099,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_hour handler for sqlstate '02000' set @var2 = 1; @@ -13999,7 +14109,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_microsecond handler for sqlstate '02000' set @var2 = 1; @@ -14009,7 +14119,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_minute handler for sqlstate '02000' set @var2 = 1; @@ -14019,7 +14129,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare day_second handler for sqlstate '02000' set @var2 = 1; @@ -14029,7 +14139,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare dec handler for sqlstate '02000' set @var2 = 1; @@ -14039,7 +14149,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare decimal handler for sqlstate '02000' set @var2 = 1; @@ -14049,7 +14159,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare declare handler for sqlstate '02000' set @var2 = 1; @@ -14059,7 +14169,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare default handler for sqlstate '02000' set @var2 = 1; @@ -14069,7 +14179,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare delayed handler for sqlstate '02000' set @var2 = 1; @@ -14079,7 +14189,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare delete handler for sqlstate '02000' set @var2 = 1; @@ -14089,7 +14199,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare desc handler for sqlstate '02000' set @var2 = 1; @@ -14099,7 +14209,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare describe handler for sqlstate '02000' set @var2 = 1; @@ -14109,7 +14219,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare deterministic handler for sqlstate '02000' set @var2 = 1; @@ -14119,7 +14229,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare distinct handler for sqlstate '02000' set @var2 = 1; @@ -14129,7 +14239,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare distinctrow handler for sqlstate '02000' set @var2 = 1; @@ -14139,7 +14249,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare div handler for sqlstate '02000' set @var2 = 1; @@ -14149,7 +14259,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare double handler for sqlstate '02000' set @var2 = 1; @@ -14159,7 +14269,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare drop handler for sqlstate '02000' set @var2 = 1; @@ -14169,7 +14279,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare dual handler for sqlstate '02000' set @var2 = 1; @@ -14179,7 +14289,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare each handler for sqlstate '02000' set @var2 = 1; @@ -14189,7 +14299,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare else handler for sqlstate '02000' set @var2 = 1; @@ -14199,7 +14309,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare elseif handler for sqlstate '02000' set @var2 = 1; @@ -14209,7 +14319,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare enclosed handler for sqlstate '02000' set @var2 = 1; @@ -14219,7 +14329,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare escaped handler for sqlstate '02000' set @var2 = 1; @@ -14229,7 +14339,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare exists handler for sqlstate '02000' set @var2 = 1; @@ -14238,18 +14348,18 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; -#FIXME: check why this is switched off -#--error 1064 -#delimiter //; -#CREATE PROCEDURE sp1( ) -# BEGIN -# declare exit handler for sqlstate '02000' set @var2 = 1; -#END// -#delimiter ;// -#DROP PROCEDURE IF EXISTS sp1; +--error ER_PARSE_ERROR +delimiter //; +CREATE PROCEDURE sp1( ) + BEGIN + declare exit handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare explain handler for sqlstate '02000' set @var2 = 1; @@ -14259,7 +14369,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare false handler for sqlstate '02000' set @var2 = 1; @@ -14269,7 +14379,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare fetch handler for sqlstate '02000' set @var2 = 1; @@ -14279,17 +14389,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare fields handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare float handler for sqlstate '02000' set @var2 = 1; @@ -14299,7 +14399,27 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare float4 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare float8 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare for handler for sqlstate '02000' set @var2 = 1; @@ -14309,7 +14429,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare force handler for sqlstate '02000' set @var2 = 1; @@ -14319,7 +14439,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare foreign handler for sqlstate '02000' set @var2 = 1; @@ -14329,17 +14449,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare found handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare from handler for sqlstate '02000' set @var2 = 1; @@ -14349,7 +14459,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare fulltext handler for sqlstate '02000' set @var2 = 1; @@ -14359,17 +14469,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare goto handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare grant handler for sqlstate '02000' set @var2 = 1; @@ -14379,7 +14479,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare group handler for sqlstate '02000' set @var2 = 1; @@ -14389,7 +14489,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare having handler for sqlstate '02000' set @var2 = 1; @@ -14399,7 +14499,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare high_priority handler for sqlstate '02000' set @var2 = 1; @@ -14409,7 +14509,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_microsecond handler for sqlstate '02000' set @var2 = 1; @@ -14419,7 +14519,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_minute handler for sqlstate '02000' set @var2 = 1; @@ -14429,7 +14529,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare hour_second handler for sqlstate '02000' set @var2 = 1; @@ -14439,7 +14539,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare if handler for sqlstate '02000' set @var2 = 1; @@ -14449,7 +14549,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare ignore handler for sqlstate '02000' set @var2 = 1; @@ -14459,7 +14559,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare in handler for sqlstate '02000' set @var2 = 1; @@ -14469,7 +14569,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare index handler for sqlstate '02000' set @var2 = 1; @@ -14479,7 +14579,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare infile handler for sqlstate '02000' set @var2 = 1; @@ -14489,7 +14589,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare inner handler for sqlstate '02000' set @var2 = 1; @@ -14499,7 +14599,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare inout handler for sqlstate '02000' set @var2 = 1; @@ -14509,7 +14609,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare insensitive handler for sqlstate '02000' set @var2 = 1; @@ -14519,7 +14619,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare insert handler for sqlstate '02000' set @var2 = 1; @@ -14529,7 +14629,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare int handler for sqlstate '02000' set @var2 = 1; @@ -14539,7 +14639,57 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int1 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int2 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int3 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int4 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare int8 handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare integer handler for sqlstate '02000' set @var2 = 1; @@ -14549,7 +14699,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare interval handler for sqlstate '02000' set @var2 = 1; @@ -14559,7 +14709,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare into handler for sqlstate '02000' set @var2 = 1; @@ -14569,7 +14719,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare is handler for sqlstate '02000' set @var2 = 1; @@ -14579,7 +14729,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare iterate handler for sqlstate '02000' set @var2 = 1; @@ -14589,7 +14739,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare join handler for sqlstate '02000' set @var2 = 1; @@ -14599,7 +14749,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare key handler for sqlstate '02000' set @var2 = 1; @@ -14609,7 +14759,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare keys handler for sqlstate '02000' set @var2 = 1; @@ -14619,7 +14769,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare kill handler for sqlstate '02000' set @var2 = 1; @@ -14629,7 +14779,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare leading handler for sqlstate '02000' set @var2 = 1; @@ -14639,7 +14789,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare leave handler for sqlstate '02000' set @var2 = 1; @@ -14649,7 +14799,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare left handler for sqlstate '02000' set @var2 = 1; @@ -14659,7 +14809,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare like handler for sqlstate '02000' set @var2 = 1; @@ -14669,7 +14819,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare limit handler for sqlstate '02000' set @var2 = 1; @@ -14679,7 +14829,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare linear handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare lines handler for sqlstate '02000' set @var2 = 1; @@ -14689,7 +14849,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare load handler for sqlstate '02000' set @var2 = 1; @@ -14699,7 +14859,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare localtime handler for sqlstate '02000' set @var2 = 1; @@ -14709,7 +14869,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare localtimestamp handler for sqlstate '02000' set @var2 = 1; @@ -14719,7 +14879,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare lock handler for sqlstate '02000' set @var2 = 1; @@ -14729,7 +14889,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare long handler for sqlstate '02000' set @var2 = 1; @@ -14739,7 +14899,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longblob handler for sqlstate '02000' set @var2 = 1; @@ -14749,7 +14909,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare longtext handler for sqlstate '02000' set @var2 = 1; @@ -14759,7 +14919,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare loop handler for sqlstate '02000' set @var2 = 1; @@ -14769,7 +14929,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare low_priority handler for sqlstate '02000' set @var2 = 1; @@ -14779,7 +14939,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare master_ssl_verify_server_cert handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare match handler for sqlstate '02000' set @var2 = 1; @@ -14789,7 +14959,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumblob handler for sqlstate '02000' set @var2 = 1; @@ -14799,7 +14969,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumint handler for sqlstate '02000' set @var2 = 1; @@ -14809,7 +14979,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mediumtext handler for sqlstate '02000' set @var2 = 1; @@ -14819,7 +14989,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare middleint handler for sqlstate '02000' set @var2 = 1; @@ -14829,7 +14999,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare minute_microsecond handler for sqlstate '02000' set @var2 = 1; @@ -14839,7 +15009,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare minute_second handler for sqlstate '02000' set @var2 = 1; @@ -14849,7 +15019,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare mod handler for sqlstate '02000' set @var2 = 1; @@ -14859,7 +15029,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare modifies handler for sqlstate '02000' set @var2 = 1; @@ -14869,7 +15039,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare natural handler for sqlstate '02000' set @var2 = 1; @@ -14879,7 +15049,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare not handler for sqlstate '02000' set @var2 = 1; @@ -14889,7 +15059,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare no_write_to_binlog handler for sqlstate '02000' set @var2 = 1; @@ -14899,7 +15069,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare null handler for sqlstate '02000' set @var2 = 1; @@ -14909,7 +15079,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare numeric handler for sqlstate '02000' set @var2 = 1; @@ -14919,7 +15089,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare on handler for sqlstate '02000' set @var2 = 1; @@ -14929,7 +15099,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare optimize handler for sqlstate '02000' set @var2 = 1; @@ -14939,7 +15109,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare option handler for sqlstate '02000' set @var2 = 1; @@ -14949,7 +15119,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare optionally handler for sqlstate '02000' set @var2 = 1; @@ -14959,7 +15129,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare or handler for sqlstate '02000' set @var2 = 1; @@ -14969,7 +15139,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare order handler for sqlstate '02000' set @var2 = 1; @@ -14979,7 +15149,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare out handler for sqlstate '02000' set @var2 = 1; @@ -14989,7 +15159,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare outer handler for sqlstate '02000' set @var2 = 1; @@ -14999,7 +15169,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare outfile handler for sqlstate '02000' set @var2 = 1; @@ -15009,7 +15179,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare precision handler for sqlstate '02000' set @var2 = 1; @@ -15019,7 +15189,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare primary handler for sqlstate '02000' set @var2 = 1; @@ -15029,7 +15199,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare privileges handler for sqlstate '02000' set @var2 = 1; @@ -15039,7 +15209,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare procedure handler for sqlstate '02000' set @var2 = 1; @@ -15049,7 +15219,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare purge handler for sqlstate '02000' set @var2 = 1; @@ -15059,7 +15229,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare range handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare read handler for sqlstate '02000' set @var2 = 1; @@ -15069,7 +15249,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare reads handler for sqlstate '02000' set @var2 = 1; @@ -15079,7 +15259,27 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare read_only handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare read_write handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare real handler for sqlstate '02000' set @var2 = 1; @@ -15089,7 +15289,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare references handler for sqlstate '02000' set @var2 = 1; @@ -15099,7 +15299,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare regexp handler for sqlstate '02000' set @var2 = 1; @@ -15109,7 +15309,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR +CREATE PROCEDURE sp1( ) +BEGIN + declare release handler for sqlstate '02000' set @var2 = 1; +END// +delimiter ;// + +DROP PROCEDURE IF EXISTS sp1; + +delimiter //; +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare rename handler for sqlstate '02000' set @var2 = 1; @@ -15119,7 +15329,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare repeat handler for sqlstate '02000' set @var2 = 1; @@ -15129,7 +15339,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare replace handler for sqlstate '02000' set @var2 = 1; @@ -15139,7 +15349,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare require handler for sqlstate '02000' set @var2 = 1; @@ -15149,7 +15359,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare restrict handler for sqlstate '02000' set @var2 = 1; @@ -15159,7 +15369,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare return handler for sqlstate '02000' set @var2 = 1; @@ -15169,7 +15379,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare revoke handler for sqlstate '02000' set @var2 = 1; @@ -15179,7 +15389,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare right handler for sqlstate '02000' set @var2 = 1; @@ -15189,7 +15399,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare rlike handler for sqlstate '02000' set @var2 = 1; @@ -15199,7 +15409,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare schema handler for sqlstate '02000' set @var2 = 1; @@ -15209,7 +15419,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare schemas handler for sqlstate '02000' set @var2 = 1; @@ -15219,7 +15429,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare second_microsecond handler for sqlstate '02000' set @var2 = 1; @@ -15229,17 +15439,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare SELECT handler for sqlstate '02000' set @var2 = 1; + declare select handler for sqlstate '02000' set @var2 = 1; END// delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sensitive handler for sqlstate '02000' set @var2 = 1; @@ -15249,7 +15459,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare separator handler for sqlstate '02000' set @var2 = 1; @@ -15259,7 +15469,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare set handler for sqlstate '02000' set @var2 = 1; @@ -15269,7 +15479,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare show handler for sqlstate '02000' set @var2 = 1; @@ -15279,7 +15489,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare smallint handler for sqlstate '02000' set @var2 = 1; @@ -15289,17 +15499,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare soname handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare spatial handler for sqlstate '02000' set @var2 = 1; @@ -15309,7 +15509,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare specific handler for sqlstate '02000' set @var2 = 1; @@ -15319,7 +15519,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql handler for sqlstate '02000' set @var2 = 1; @@ -15329,7 +15529,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlexception handler for sqlstate '02000' set @var2 = 1; @@ -15339,7 +15539,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlstate handler for sqlstate '02000' set @var2 = 1; @@ -15349,7 +15549,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sqlwarning handler for sqlstate '02000' set @var2 = 1; @@ -15359,7 +15559,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_big_result handler for sqlstate '02000' set @var2 = 1; @@ -15369,7 +15569,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_calc_found_rows handler for sqlstate '02000' set @var2 = 1; @@ -15379,7 +15579,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare sql_small_result handler for sqlstate '02000' set @var2 = 1; @@ -15389,7 +15589,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare ssl handler for sqlstate '02000' set @var2 = 1; @@ -15399,7 +15599,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare starting handler for sqlstate '02000' set @var2 = 1; @@ -15409,7 +15609,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare straight_join handler for sqlstate '02000' set @var2 = 1; @@ -15419,7 +15619,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare table handler for sqlstate '02000' set @var2 = 1; @@ -15429,17 +15629,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 -CREATE PROCEDURE sp1( ) -BEGIN - declare tables handler for sqlstate '02000' set @var2 = 1; -END// -delimiter ;// - -DROP PROCEDURE IF EXISTS sp1; - -delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare terminated handler for sqlstate '02000' set @var2 = 1; @@ -15449,7 +15639,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare then handler for sqlstate '02000' set @var2 = 1; @@ -15459,7 +15649,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyblob handler for sqlstate '02000' set @var2 = 1; @@ -15469,7 +15659,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinyint handler for sqlstate '02000' set @var2 = 1; @@ -15479,7 +15669,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare tinytext handler for sqlstate '02000' set @var2 = 1; @@ -15489,7 +15679,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare to handler for sqlstate '02000' set @var2 = 1; @@ -15499,7 +15689,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare trailing handler for sqlstate '02000' set @var2 = 1; @@ -15509,7 +15699,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare trigger handler for sqlstate '02000' set @var2 = 1; @@ -15519,7 +15709,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare true handler for sqlstate '02000' set @var2 = 1; @@ -15529,7 +15719,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare undo handler for sqlstate '02000' set @var2 = 1; @@ -15539,7 +15729,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare union handler for sqlstate '02000' set @var2 = 1; @@ -15549,7 +15739,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unique handler for sqlstate '02000' set @var2 = 1; @@ -15559,7 +15749,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unlock handler for sqlstate '02000' set @var2 = 1; @@ -15569,7 +15759,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare unsigned handler for sqlstate '02000' set @var2 = 1; @@ -15579,7 +15769,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare update handler for sqlstate '02000' set @var2 = 1; @@ -15589,7 +15779,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare usage handler for sqlstate '02000' set @var2 = 1; @@ -15599,17 +15789,17 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN - declare USE handler for sqlstate '02000' set @var2 = 1; + declare use handler for sqlstate '02000' set @var2 = 1; END// delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare using handler for sqlstate '02000' set @var2 = 1; @@ -15619,7 +15809,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_date handler for sqlstate '02000' set @var2 = 1; @@ -15629,7 +15819,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_time handler for sqlstate '02000' set @var2 = 1; @@ -15639,7 +15829,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare utc_timestamp handler for sqlstate '02000' set @var2 = 1; @@ -15649,7 +15839,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare values handler for sqlstate '02000' set @var2 = 1; @@ -15659,7 +15849,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varbinary handler for sqlstate '02000' set @var2 = 1; @@ -15669,7 +15859,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varchar handler for sqlstate '02000' set @var2 = 1; @@ -15679,7 +15869,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varcharacter handler for sqlstate '02000' set @var2 = 1; @@ -15689,7 +15879,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare varying handler for sqlstate '02000' set @var2 = 1; @@ -15699,7 +15889,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare when handler for sqlstate '02000' set @var2 = 1; @@ -15709,7 +15899,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare where handler for sqlstate '02000' set @var2 = 1; @@ -15719,7 +15909,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare while handler for sqlstate '02000' set @var2 = 1; @@ -15729,7 +15919,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare with handler for sqlstate '02000' set @var2 = 1; @@ -15739,7 +15929,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare write handler for sqlstate '02000' set @var2 = 1; @@ -15749,7 +15939,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare xor handler for sqlstate '02000' set @var2 = 1; @@ -15759,7 +15949,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare year_month handler for sqlstate '02000' set @var2 = 1; @@ -15769,7 +15959,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1( ) BEGIN declare zerofill handler for sqlstate '02000' set @var2 = 1; @@ -16240,6 +16430,7 @@ delimiter ;// CALL sp1(); +--disable_warnings DROP PROCEDURE IF EXISTS sp1; @@ -16782,7 +16973,7 @@ CALL sp1(); # cleanup DROP PROCEDURE sp1; - +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.2.38:; @@ -16823,7 +17014,7 @@ let $message= Testcase 4.2.39:; DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1332 +--error ER_SP_DUP_COND CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '42000'; @@ -16844,7 +17035,7 @@ let $message= Testcase 4.2.41:; DROP PROCEDURE IF EXISTS sp1; delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '1'; @@ -16858,7 +17049,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '12'; @@ -16872,7 +17063,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '123'; @@ -16886,7 +17077,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '1234'; @@ -16900,7 +17091,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '123456'; @@ -16915,7 +17106,7 @@ let $message= Testcase 4.2.42:; --source include/show_msg80.inc # testcase: ensure that the declare condition for statement cannot declare a -# condition for an invalid sqlstate. (bug associated) (Bug#8760) +# condition for an invalid sqlstate. --disable_warnings @@ -16923,7 +17114,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate 'abcdefghi'; @@ -16937,7 +17128,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '42000test'; @@ -16951,7 +17142,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '00000@#$%^&'; @@ -16965,7 +17156,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890'; @@ -16979,7 +17170,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate 'null'; @@ -16993,7 +17184,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate ' '; @@ -17007,7 +17198,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate 1234567890; @@ -17021,7 +17212,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare cond1 condition for sqlstate '2005-03-03'; @@ -17036,7 +17227,7 @@ let $message= Testcase 4.2.43:; --source include/show_msg80.inc # testcase: ensure that the declare condition for statement cannot declare a -# condition for the successful completion sqlstate: 00000. (bug associated) +# condition for the successful completion sqlstate: 00000. --disable_warnings DROP PROCEDURE IF EXISTS sp1; @@ -17070,7 +17261,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1413 +--error ER_SP_DUP_HANDLER CREATE PROCEDURE handler1 () BEGIN declare continue handler for sqlstate '23000' set @varr1 = 5; @@ -17081,7 +17272,7 @@ delimiter ;// DROP PROCEDURE IF EXISTS handler1; delimiter //; ---error 1413 +--error ER_SP_DUP_HANDLER CREATE PROCEDURE handler1 () BEGIN declare mycondition condition for sqlstate '23000'; @@ -17096,14 +17287,14 @@ let $message= Testcase 4.2.46:; --source include/show_msg80.inc # testcase: ensure that every sqlstate value declared with a declare handler for -# statement is a character string that is 5 characters long (bug associated). +# statement is a character string that is 5 characters long. --disable_warnings DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '1' set @var2 = 1; @@ -17115,7 +17306,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '12' set @var2 = 1; @@ -17127,7 +17318,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '123' set @var2 = 1; @@ -17139,7 +17330,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '1234' set @var2 = 1; @@ -17151,7 +17342,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '123456' set @var2 = 1; @@ -17164,14 +17355,14 @@ let $message= Testcase 4.2.47:; --source include/show_msg80.inc # testcase: ensure that the declare handler for statement cannot declare a condition -# for an invalid sqlstate. (bug associated) +# for an invalid sqlstate. --disable_warnings DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE sp1() BEGIN declare continue handler for sqlstate '42s0200test' set @var2 = 1; @@ -17189,7 +17380,7 @@ let $message= Testcase 4.2.48:; --source include/show_msg80.inc # testcase: ensure that the declare handler for statement cannot declare a condition -# for the successful completion sqlstate: 00000. (bug associated) +# for the successful completion sqlstate: 00000. --disable_warnings DROP PROCEDURE IF EXISTS sp1; @@ -17222,7 +17413,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1333 +--error ER_SP_DUP_CURS CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; @@ -17237,11 +17428,11 @@ BEGIN BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; - END while; - close cur1; + END while; + close cur1; END; END// delimiter ;// @@ -17258,7 +17449,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1323 +--error ER_SP_BAD_CURSOR_SELECT CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; @@ -17272,12 +17463,12 @@ BEGIN BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newlf1, newf3, newsal; set count = count - 1; - END while; - close cur1; - END; + END while; + close cur1; + END; END// delimiter ;// @@ -17303,7 +17494,7 @@ DROP PROCEDURE IF EXISTS sp1; --enable_warnings delimiter //; ---error 1324 +--error ER_SP_CURSOR_MISMATCH CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; @@ -17316,7 +17507,7 @@ BEGIN BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17345,7 +17536,7 @@ BEGIN BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; @@ -17355,8 +17546,7 @@ BEGIN END// delimiter ;// -#suppressed (Bug# 8892) ---error 1325 +--error ER_SP_CURSOR_ALREADY_OPEN CALL sp1(); @@ -17383,7 +17573,7 @@ BEGIN open cur1; open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17392,7 +17582,7 @@ BEGIN END// delimiter ;// ---error 1325 +--error ER_SP_CURSOR_ALREADY_OPEN CALL sp1(); # cleanup @@ -17423,7 +17613,7 @@ BEGIN BEGIN open cur2; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17432,7 +17622,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17466,7 +17656,7 @@ BEGIN declare continue handler for sqlstate '02000' set done = 1; BEGIN set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17476,7 +17666,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); DROP PROCEDURE IF EXISTS sp1; @@ -17485,7 +17675,7 @@ delimiter //; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; - declare count integer default 0; + declare count integer default 10; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -17496,18 +17686,18 @@ BEGIN BEGIN declare cur1 cursor for SELECT f1, f2, f3, f4 from t2; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf3, newf4; set count = count - 1; END while; open cur1; close cur1; - END; + END; close cur1; END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17538,15 +17728,15 @@ BEGIN open cur1; close cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; - set count = count - 1; + set count = count - 1; END while; - END; + END; END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); DROP PROCEDURE IF EXISTS sp1; @@ -17555,7 +17745,7 @@ delimiter //; CREATE PROCEDURE sp1( ) BEGIN declare done int default 0; - declare count integer default 0; + declare count integer default 20; declare newf1 char(20); declare newf2 char(20); declare newf3 char(20); @@ -17572,7 +17762,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17597,13 +17787,13 @@ BEGIN declare done int default 0; declare count integer default 20; declare newf2 char(20); - declare newf1 date; + declare newf1 int1; declare cur1 cursor for SELECT f1, f3 from t2 limit 20, 10; declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2; set @x = newf1; set @y = newf2; @@ -17615,8 +17805,8 @@ BEGIN END// delimiter ;// -#FIXME check that here NO error occurs: suppressed for bug (Bug# 8702) -#--error 1146 +#This test seems to make no sense, as always NULL may be set. +#--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17647,7 +17837,7 @@ BEGIN close cur1; open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17656,7 +17846,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); DROP PROCEDURE IF EXISTS sp1; @@ -17680,7 +17870,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17716,9 +17906,7 @@ CREATE PROCEDURE sp1( ) END// delimiter ;// -#FIXME check this error, in 5.0.11 the error occurs. Is this wanted? -# suppressed for bug (Bug#8756) ---error 1329 +--error ER_SP_FETCH_NO_DATA CALL sp1(); # cleanup @@ -17755,9 +17943,7 @@ BEGIN END// delimiter ;// -#FIXME check this error, in 5.0.11 the error occurs. Is this wanted? -##suppressed for bug (Bug#8756) ---error 1329 +--error ER_SP_FETCH_NO_DATA CALL sp1(); # cleanup @@ -17788,7 +17974,7 @@ BEGIN BEGIN open cur1; set count = count - 1; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17798,7 +17984,7 @@ BEGIN END// delimiter ;// ---error 1326 +--error ER_SP_CURSOR_NOT_OPEN CALL sp1(); # cleanup @@ -17829,15 +18015,17 @@ BEGIN declare continue handler for sqlstate '02000' set done = 1; BEGIN open cur1; - set count = count - 1; - while count <> 0 do +# set count = count - 1; +# while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; - set count = count - 1; - END while; +# set count = count - 1; +# END while; END; + fetch cur1 into newf1, newf2, newf4, newf3; END// delimiter ;// +#--error ER_SP_FETCH_NO_DATA CALL sp1(); # cleanup @@ -17881,7 +18069,7 @@ BEGIN set count = 10; BEGIN open cur2; - while count <> 0 do + while count > 0 do fetch cur1 into newf1, newf2, newf4, newf3; set count = count - 1; END while; @@ -17890,7 +18078,8 @@ BEGIN close cur1; END; BEGIN - while count <> 0 do + set count = 10; + while count > 0 do fetch cur2 into newf21, newf22, newf24, newf23; set count = count - 1; END while; @@ -17902,7 +18091,7 @@ delimiter ;// CALL sp1(); -SELECT * from temp1; +SELECT count(*) from temp1; SELECT * from temp2; # cleanup @@ -17934,8 +18123,7 @@ eval CREATE TABLE res_t3_itisalongname_1381742_itsaverylongname_1381742( middleinitial CHAR, lastname VARCHAR(50), age_averylongfieldname_averylongname_1234569 int, - COMMENT TEXT) ENGINE=innodb; -# COMMENT TEXT) ENGINE=$engine_type; + COMMENT TEXT) ENGINE=$engine_type; INSERT INTO res_t3_itisalongname_1381742_itsaverylongname_1381742 VALUES('a', 'aaaaaaaaaabbbbbbbbc', 0, 'default'); @@ -18081,7 +18269,7 @@ DROP PROCEDURE IF EXISTS sp3; create table res_t3_itisalongname_1381742_itsaverylongname_1381742 (name char, address varchar(50), age_averylongfieldname_averylongname_1234569 smallint); delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp3( action char(20) ) BEGIN label1: case @@ -18099,7 +18287,7 @@ DROP PROCEDURE IF EXISTS sp3; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp3( action char(20) ) BEGIN label1: BEGIN @@ -18119,7 +18307,7 @@ DROP PROCEDURE IF EXISTS sp3; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp3( action char(20) ) BEGIN case @@ -18139,7 +18327,7 @@ DROP PROCEDURE IF EXISTS sp3; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp3( action char(20) ) BEGIN declare v1 char(20); @@ -18178,8 +18366,9 @@ BEGIN BEGIN insert into res_t3_itisalongname_1381742_itsaverylongname_1381742 values('xxxxxxxxxxxxxxxxxxx', '1231230981(*&(*&)(*&(', count); - if done=1 then - set count=10; + set count = count + 1; + if count= 10 then + set done=1; END if; END; END while label2; @@ -18195,8 +18384,7 @@ BEGIN END// delimiter ;// -# results in lost connection hence suppressed--error 2013 -#CALL sp3('insert'); +CALL sp3('insert'); # cleanup DROP PROCEDURE sp3; @@ -18214,7 +18402,7 @@ DROP PROCEDURE IF EXISTS sp4; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp4() BEGIN declare count int; @@ -18236,7 +18424,7 @@ DROP PROCEDURE IF EXISTS sp4; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp4() BEGIN declare count int; @@ -18257,7 +18445,7 @@ DROP PROCEDURE IF EXISTS sp4; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp4() BEGIN declare count int; @@ -18278,7 +18466,7 @@ DROP PROCEDURE IF EXISTS sp4; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp4() BEGIN declare count int; @@ -18299,7 +18487,7 @@ DROP PROCEDURE IF EXISTS sp4; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp4() BEGIN declare i int default 10; @@ -18347,7 +18535,7 @@ BEGIN END// delimiter ;// ---error 1054 +--error ER_BAD_FIELD_ERROR CALL sp4(); # cleanup @@ -18365,7 +18553,7 @@ DROP PROCEDURE IF EXISTS sp5; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp5() BEGIN declare count integer default 1; @@ -18384,7 +18572,7 @@ DROP PROCEDURE IF EXISTS sp5; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp5(count int) BEGIN when case count = 1 then @@ -18400,7 +18588,7 @@ DROP PROCEDURE IF EXISTS sp5; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp5(count int) BEGIN END case; @@ -18417,7 +18605,7 @@ DROP PROCEDURE IF EXISTS sp5; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp5(count int) BEGIN when count = 1 then @@ -18440,7 +18628,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; @@ -18457,7 +18645,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; @@ -18474,7 +18662,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; @@ -18491,7 +18679,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; @@ -18507,7 +18695,7 @@ DROP PROCEDURE IF EXISTS sp6; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; @@ -18529,15 +18717,14 @@ CREATE PROCEDURE sp6() BEGIN declare count1 integer default 1; label1: repeat - set count1 = count1; + set count1 = count1-1; until count1 < 0 END repeat label1; SELECT count1; END// delimiter ;// -# results in lost connection hence suppressed--error 2013 -# CALL sp6(); +CALL sp6(); # cleanup DROP PROCEDURE sp6; @@ -18555,7 +18742,7 @@ DROP PROCEDURE IF EXISTS sp7; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp7() BEGIN label1: loop @@ -18572,7 +18759,7 @@ DROP PROCEDURE IF EXISTS sp7; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp7() BEGIN label1: END loop; @@ -18589,7 +18776,7 @@ DROP PROCEDURE IF EXISTS sp7; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp7() BEGIN label1: iterate label1; @@ -18615,7 +18802,7 @@ DROP PROCEDURE IF EXISTS sp8; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp8() BEGIN declare v1 int default 5; @@ -18630,7 +18817,7 @@ DROP PROCEDURE IF EXISTS sp8; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp8() BEGIN declare v1 int default 5; @@ -18645,7 +18832,7 @@ DROP PROCEDURE IF EXISTS sp8; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp8() BEGIN declare v1 int default 5; @@ -18655,11 +18842,6 @@ BEGIN END// delimiter ;// - - - - - # ------------------------------------------------------------------------------ let $message= Testcase 4.3.12:; --source include/show_msg80.inc @@ -18674,7 +18856,7 @@ DROP PROCEDURE IF EXISTS sp12; create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint); delimiter //; ---error 1310 +--error ER_SP_LABEL_MISMATCH CREATE PROCEDURE sp12( ) BEGIN declare count1 integer default 1; @@ -18750,7 +18932,7 @@ DROP PROCEDURE IF EXISTS sp14; create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint); delimiter //; ---error 1308 +--error ER_SP_LILABEL_MISMATCH CREATE PROCEDURE sp14( ) BEGIN declare count1 integer default 1; @@ -18782,7 +18964,7 @@ DROP PROCEDURE IF EXISTS sp15; create table res_t3_itisalongname_1381742_itsaverylongname_1381742( f1 char(20), f2 varchar(20), f3 smallint); delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp15( ) BEGIN declare count1 integer default 1; @@ -18810,7 +18992,7 @@ DROP PROCEDURE IF EXISTS sp16; delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; delimiter //; ---error 1309 +--error ER_SP_LABEL_REDEFINE CREATE PROCEDURE sp16( ) BEGIN declare count1 integer default 1; @@ -18833,7 +19015,7 @@ DROP PROCEDURE IF EXISTS sp16; --enable_warnings delimiter //; ---error 1309 +--error ER_SP_LABEL_REDEFINE CREATE PROCEDURE sp16( ) BEGIN declare count1 integer default 1; @@ -18880,7 +19062,7 @@ DROP PROCEDURE IF EXISTS sp18; delete from res_t3_itisalongname_1381742_itsaverylongname_1381742; delimiter //; ---error 1310 +--error ER_SP_LABEL_MISMATCH CREATE PROCEDURE sp18( ) BEGIN declare count1 integer default 1; @@ -18941,7 +19123,7 @@ DROP PROCEDURE IF EXISTS sp20; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp20( ) BEGIN declare count1 integer default 1; @@ -18976,7 +19158,7 @@ DROP PROCEDURE IF EXISTS sp22; --enable_warnings delimiter //; ---error 1310 +--error ER_SP_LABEL_MISMATCH CREATE PROCEDURE sp22( ) BEGIN declare count1 integer default 1; @@ -19008,7 +19190,7 @@ DROP PROCEDURE IF EXISTS sp23; --enable_warnings delimiter //; ---error 1064 +--error ER_PARSE_ERROR CREATE PROCEDURE sp23( ) BEGIN declare count1 integer default 1; @@ -19111,7 +19293,7 @@ let $message= Testcase 4.4.2:; DROP FUNCTION IF EXISTS fn1; DROP FUNCTION IF EXISTS fn11; DROP DATABASE IF EXISTS d40402; ---enable warnings +--enable_warnings delimiter //; CREATE FUNCTION fn1(n int) returns int @@ -19218,7 +19400,7 @@ DROP DATABASE IF EXISTS d1; USE d1; delimiter //; ---error 1314 +--error ER_SP_BADSTATEMENT CREATE PROCEDURE sp3() BEGIN USE d1; @@ -19261,7 +19443,6 @@ DROP DATABASE d1; USE d1; create table t44(a char(5), b char(10)); -#FIXME: check why here no rows are shown --replace_column 13 modified 14 created SELECT * from mysql.proc where specific_name = 'sp4'; @@ -19455,45 +19636,26 @@ let $procvar01_30= 1.00e+30; let $procvar01_36= 1.00e+36; let $procvar01_40= 1.00e+40; -let $bug_dec_num= 1; +#################123456789-123456789-123456789-123456789- +let $plus_20= 100000000000000000000; +let $plus_24= 1000000000000000000000000; +let $plus_30= 1000000000000000000000000000000; +let $plus_36= 1000000000000000000000000000000000000; +let $plus_40= 10000000000000000000000000000000000000000; +let $minus_30= -1000000000000000000000000000000; +let $minus_36= -1000000000000000000000000000000000000; +let $minus_40= -10000000000000000000000000000000000000000; -eval SELECT $bug_dec_num as 'bug_dec_num'; - -if ($bug_dec_num) -{ - let $message= - . - FIXME: There are differences with datatypes DECIMAL and NUMERIC if large - FIXME: exponent values are used. The diffs are shown only on some machines like - FIXME: AIX52 and HPUX11. Until this has been solved we use numbers that - FIXME: *should* be equal to the exponent representation but have no exponents - FIXME: and use the specified count of *0*s instead. - FIXME: In the source file these tests are marked with the comment hpux11 - .; - --source include/show_msg80.inc - # FIXME values above changed to values below to fix DECIMAL/NUMERIC issues on hpux11 - - #################123456789-123456789-123456789-123456789- - let $plus_20= 100000000000000000000; - let $plus_24= 1000000000000000000000000; - let $plus_30= 1000000000000000000000000000000; - let $plus_36= 1000000000000000000000000000000000000; - let $plus_40= 10000000000000000000000000000000000000000; - let $minus_30= -1000000000000000000000000000000; - let $minus_36= -1000000000000000000000000000000000000; - let $minus_40= -10000000000000000000000000000000000000000; - - let $procvar_m00= -1.00e+22; - let $procvar_00= 1.00e+22; - let $procvar01_m30= $procvar_m00; - let $procvar01_m36= $procvar_m00; - let $procvar01_m40= $procvar_m00; - let $procvar01_20= $procvar_00; - let $procvar01_24= $procvar_00; - let $procvar01_30= $procvar_00; - let $procvar01_36= $procvar_00; - let $procvar01_40= $procvar_00; -} +let $procvar_m00= -1.00e+22; +let $procvar_00= 1.00e+22; +let $procvar01_m30= $procvar_m00; +let $procvar01_m36= $procvar_m00; +let $procvar01_m40= $procvar_m00; +let $procvar01_20= $procvar_00; +let $procvar01_24= $procvar_00; +let $procvar01_30= $procvar_00; +let $procvar01_36= $procvar_00; +let $procvar01_40= $procvar_00; let $procvar03= -9.22e+18; let $procvar05= -9.22e+18; let $procvar07= -9.22e+18; @@ -19548,10 +19710,7 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ --disable_ps_protocol -} SELECT fn3(1.84e+17); --enable_ps_protocol @@ -19567,14 +19726,10 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ --disable_ps_protocol -} SELECT fn4(-9.22e+15); --enable_ps_protocol - --disable_warnings DROP FUNCTION IF EXISTS fn5; --enable_warnings @@ -19693,7 +19848,6 @@ delimiter ;// SELECT fn12(999999999); - --disable_warnings DROP FUNCTION IF EXISTS fn13; --enable_warnings @@ -19797,10 +19951,8 @@ BEGIN END// delimiter ;// -#FIXME hpux11 eval SELECT fn19_du( $plus_20 ); - --disable_warnings DROP FUNCTION IF EXISTS fn20_duz; --enable_warnings @@ -19813,10 +19965,8 @@ BEGIN END// delimiter ;// -#FIXME hpux11 eval SELECT fn20_duz( $plus_24 ); - --disable_warnings DROP FUNCTION IF EXISTS fn21_d_z; --enable_warnings @@ -19916,7 +20066,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn27(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -19931,13 +20083,16 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn28(1.00e+00); +--enable_ps_protocol --disable_warnings DROP FUNCTION IF EXISTS fn29; --enable_warnings + delimiter //; CREATE FUNCTION fn29( f1 float) returns float BEGIN @@ -19976,7 +20131,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn31(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -19991,7 +20148,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn32(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20036,7 +20195,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn35(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20051,7 +20212,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn36(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20096,7 +20259,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn39(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20111,7 +20276,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn40(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20155,7 +20322,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn43(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20170,7 +20339,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn44(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20214,7 +20385,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn47(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20229,7 +20402,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn48(1.00e+00); +--enable_ps_protocol --disable_warnings @@ -20289,10 +20464,7 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ --disable_ps_protocol -} SELECT fn52(2.15e+08); --enable_ps_protocol @@ -20352,13 +20524,7 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ ---disable_ps_protocol -} SELECT fn56(-8388601); ---enable_ps_protocol - --disable_warnings DROP FUNCTION IF EXISTS fn57; @@ -20709,7 +20875,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn79(1.1); +--enable_ps_protocol --disable_warnings @@ -20724,7 +20892,9 @@ BEGIN END// delimiter ;// +--disable_ps_protocol SELECT fn80(1.1); +--enable_ps_protocol --disable_warnings @@ -20784,13 +20954,7 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ ---disable_ps_protocol -} SELECT fn84(-32601); ---enable_ps_protocol - --disable_warnings DROP FUNCTION IF EXISTS fn85; @@ -20849,62 +21013,44 @@ BEGIN END// delimiter ;// -if ($have_bug_11589) -{ ---disable_ps_protocol -} SELECT fn88(-101); ---enable_ps_protocol --disable_warnings DROP FUNCTION IF EXISTS fn89; --enable_warnings - -#FIXME why was fn89 switched off ? delimiter //; -#FIXME: check whether this error 1064 is OK! ---error 1064 CREATE FUNCTION fn89( f1 enum('1enum', '2enum')) returns enum('1enum', '2enum') BEGIN - if f1 eq "1enum" then - set f1 = '2enum'; - else - set f1 = '1enum'; - END if; - return f1; + IF f1 = '1enum' THEN + SET f1 = '2enum'; + ELSE + SET f1 = '1enum'; + END IF; + RETURN f1; END// delimiter ;// -#FIXME: this is OK as long as the error 1064 above is OK! ---error 1305 SELECT fn89( '1enum'); --disable_warnings DROP FUNCTION IF EXISTS fn90; --enable_warnings - -#FIXME: wah was fn90 switched off ? delimiter //; -#FIXME: check whether this error 1064 is OK! ---error 1064 -CREATE FUNCTION fn90( f1 set("1set", "2set")) returns set("1set", "2set") +CREATE FUNCTION fn90( f1 set('1set', '2set')) returns set('1set', '2set') BEGIN - if(f1 == "1set") then - set f1 = "2set"; - else - set f1 = "1set"; - END if; - return f1; + IF f1 = '1set' THEN + SET f1 = '2set'; + ELSE + SET f1 = '1set'; + END IF; + RETURN f1; END// delimiter ;// -#FIXME: this is OK as long as the error 1064 above is OK! ---error 1305 SELECT fn90( '1set'); - --disable_warnings DROP FUNCTION IF EXISTS fn91; --enable_warnings @@ -20986,17 +21132,13 @@ DROP FUNCTION IF EXISTS fn96; --enable_warnings delimiter //; -#FIXME: check whether this error 1064 is OK! -#--error 1064 -CREATE FUNCTION fn96( f1 char binary) returns char binary +CREATE FUNCTION fn96( f1 binary) returns binary(2) BEGIN set f1 = concat('a', f1); return f1; END// delimiter ;// -#FIXME: this is OK as long as the error 1064 above is OK! -#--error 1305 SELECT fn96( 'h'); @@ -21090,9 +21232,7 @@ SELECT fn102(1982); DROP FUNCTION IF EXISTS fn103; --enable_warnings -#FIXME Bug: (Bug#10499) delimiter //; -#--error 1178 CREATE FUNCTION fn103( f1 geometrycollection) returns geometrycollection BEGIN set f1 = f1; @@ -21100,7 +21240,6 @@ BEGIN END// delimiter ;// -#FIXME Bug: (Bug#10499) SELECT fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@'); @@ -21108,9 +21247,7 @@ SELECT fn103('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0 DROP FUNCTION IF EXISTS fn104; --enable_warnings -#FIXME Bug: (Bug#10499) delimiter //; -#--error 1178 CREATE FUNCTION fn104( f1 linestring) returns linestring BEGIN set f1 = f1; @@ -21118,7 +21255,6 @@ BEGIN END// delimiter ;// -#FIXME Bug: (Bug#10499) SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0@'); @@ -21126,9 +21262,7 @@ SELECT fn104('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0@\0 DROP FUNCTION IF EXISTS fn105; --enable_warnings -#FIXME Bug: (Bug#10499) delimiter //; -#--error 1178 CREATE FUNCTION fn105( f1 point) returns point BEGIN set f1 = f1; @@ -21136,7 +21270,6 @@ BEGIN END// delimiter ;// -#FIXME Bug: (Bug#10499) SELECT fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@'); @@ -21144,9 +21277,7 @@ SELECT fn105('\0\0\0\0\0\0\0\0\0\0\0\0\04@\0\0\0\0\0\04@'); DROP FUNCTION IF EXISTS fn106; --enable_warnings -#FIXME Bug: (Bug#10499) delimiter //; -#--error 1178 CREATE FUNCTION fn106( f1 polygon) returns polygon BEGIN set f1 = f1; @@ -21154,7 +21285,6 @@ BEGIN END// delimiter ;// -#FIXME Bug: (Bug#10499) SELECT fn106('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\04@\0\0\0\0\0\0?\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0@\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0 @\0\0\0\0\0\0@\0\0\0\0\0\0@'); @@ -21260,10 +21390,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: default (10) for DECIMAL not checked, decimal digits shown although not defined - CALL sp5(-1.00e+09); @@ -21279,10 +21405,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp6(-1.00e+09); --disable_warnings @@ -21326,10 +21448,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp9(-1.00e+09); --disable_warnings @@ -21344,10 +21462,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp10(-1.00e+09); --disable_warnings @@ -21362,10 +21476,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp11(99999999999); --disable_warnings @@ -21380,10 +21490,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp12(999999999); --disable_warnings @@ -21398,10 +21504,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp13(-1.00e+09); --disable_warnings @@ -21416,10 +21518,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: wrong number of decimal digits shown - CALL sp14(-1.00e+21); @@ -21435,10 +21533,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: wrong number of decimal digits shown - CALL sp15(1.00e+16); @@ -21454,10 +21548,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: wrong number of decimal digits shown - CALL sp16(1.00e+16); @@ -21473,10 +21563,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: wrong number of decimal digits shown - CALL sp17(-1.00e+21); --disable_warnings @@ -21491,8 +21577,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp18_d(-1.00e+30); +CALL sp18_d(-1.00e+30); eval CALL sp18_d( $minus_30 ); --disable_warnings @@ -21507,10 +21592,9 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp19_du(1.00e+20); +CALL sp19_du(1.00e+20); eval CALL sp19_du( $plus_20 ); -#CALL sp19_du(1.00e+24); +CALL sp19_du(1.00e+24); eval CALL sp19_du( $plus_24 ); --disable_warnings @@ -21525,14 +21609,9 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - -# hpux11 -#CALL sp20_duz(1.00e+20); +CALL sp20_duz(1.00e+20); eval CALL sp20_duz( $plus_20 ); -#CALL sp20_duz(1.00e+24); +CALL sp20_duz(1.00e+24); eval CALL sp20_duz( $plus_24 ); --disable_warnings @@ -21547,10 +21626,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp21(1.00e+00); --disable_warnings @@ -21565,10 +21640,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp22(1.00e+00); --disable_warnings @@ -21583,10 +21654,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp23(1.00e+00); --disable_warnings @@ -21601,10 +21668,6 @@ BEGIN END// delimiter ;// --- echo FIXME: Following test contains a known problem that will be checked again --- echo FIXME: after WL#2984 has been completed: --- echo FIXME: decimal digits shown although not defined - CALL sp24(-1.00e+09); --disable_warnings @@ -22196,8 +22259,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp66_n(-1e+36); +CALL sp66_n(-1e+36); eval CALL sp66_n( $minus_36 ); --disable_warnings @@ -22212,8 +22274,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp67_nu(1e+36); +CALL sp67_nu(1e+36); eval CALL sp67_nu( $plus_36 ); @@ -22229,8 +22290,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp68_nuz(1e+36); +CALL sp68_nuz(1e+36); eval CALL sp68_nuz( $plus_36 ); @@ -22246,8 +22306,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp69_n_z(-1e+36); +CALL sp69_n_z(-1e+36); eval CALL sp69_n_z( $minus_36 ); @@ -22263,8 +22322,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp70_n(-1e+40); +CALL sp70_n(-1e+40); eval CALL sp70_n( $minus_40 ); @@ -22280,8 +22338,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp71_nu(1.00e+40); +CALL sp71_nu(1.00e+40); eval CALL sp71_nu( $plus_40 ); @@ -22297,8 +22354,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp72_nuz(1.00e+40); +CALL sp72_nuz(1.00e+40); eval CALL sp72_nuz( $plus_40 ); @@ -22314,8 +22370,7 @@ BEGIN END// delimiter ;// -# hpux11 -#CALL sp73_n_z(1.00e+40); +CALL sp73_n_z(1.00e+40); eval CALL sp73_n_z( $plus_40 ); @@ -22533,31 +22588,27 @@ CALL sp88(-101); DROP PROCEDURE IF EXISTS sp89; --enable_warnings -#FIXME: check why this is switched off -#delimiter //; -#CREATE PROCEDURE sp89( f1 enum("1enum", "2enum")) -#BEGIN -# if(f1 == "1enum") { set f1 = "2enum"; } else { set f1 = "1enum"; } -# SELECT f1; -#END// -#delimiter ;// +delimiter //; +CREATE PROCEDURE sp89( f1 enum('1enum', '2enum')) +BEGIN + IF f1 = '1enum' THEN set f1 = '2enum'; ELSE set f1 = '1enum'; END IF; +END// +delimiter ;// -#CALL sp89( '1enum'); +CALL sp89( '1enum'); --disable_warnings DROP PROCEDURE IF EXISTS sp90; --enable_warnings -#FIXME: check why this is switched off -#delimiter //; -#CREATE PROCEDURE sp90( f1 set("1set", "2set")) -#BEGIN -# if(f1 == "1set") { set f1 = "2set"; } else { set f1 = "1set"; } -# SELECT f1; -#END// -#delimiter ;// +delimiter //; +CREATE PROCEDURE sp90( f1 set('1set', '2set')) +BEGIN + IF f1 = '1set' THEN set f1 = '2set'; ELSE set f1 = '1set'; END IF; +END// +delimiter ;// -#CALL sp90( '1set'); +CALL sp90( '1set'); --disable_warnings DROP PROCEDURE IF EXISTS sp91; @@ -23094,10 +23145,6 @@ BEGIN END// delimiter ;// -#let $message= FIXME: CALL of spexecute07 temporarily switched off due to differences -# FIXME: between Linux and Solaris; -#--source include/show_msg80.inc -#FIXME CALL spexecute07(); CALL spexecute07(); DROP PROCEDURE spexecute07; DROP PROCEDURE sp07; @@ -24864,7 +24911,6 @@ BEGIN END// delimiter ;// -#FIXME: check later again with E+40 CALL spexecute52(); DROP PROCEDURE spexecute52; DROP PROCEDURE sp52; @@ -24903,7 +24949,6 @@ BEGIN END// delimiter ;// -#FIXME: check later again with E+40 CALL spexecute53(); DROP PROCEDURE spexecute53; DROP PROCEDURE sp53; @@ -24942,7 +24987,6 @@ BEGIN END// delimiter ;// -#FIXME: check later again with E+40 CALL spexecute54(); DROP PROCEDURE spexecute54; DROP PROCEDURE sp54; @@ -24981,7 +25025,6 @@ BEGIN END// delimiter ;// -#FIXME: check later again with E+40 CALL spexecute55(); DROP PROCEDURE spexecute55; DROP PROCEDURE sp55; @@ -25516,7 +25559,6 @@ BEGIN END// delimiter ;// -#FIXME: hpux11 - check later again with E+40 CALL spexecute69(); DROP PROCEDURE spexecute69; DROP PROCEDURE sp69; @@ -25593,7 +25635,6 @@ BEGIN END// delimiter ;// -#FIXME: hpux11 - check later again with E+40 CALL spexecute71(); DROP PROCEDURE spexecute71; DROP PROCEDURE sp71; @@ -26394,7 +26435,6 @@ BEGIN END// delimiter ;// -#FIXME: hpux11 - check later again with E+40 CALL spexecute92(); DROP PROCEDURE spexecute92; DROP PROCEDURE sp92; @@ -26433,7 +26473,6 @@ BEGIN END// delimiter ;// -#FIXME: hpux11 - check later again with E+40 CALL spexecute93(); DROP PROCEDURE spexecute93; DROP PROCEDURE sp93; @@ -26839,8 +26878,6 @@ check for combination of server sql modes DROP PROCEDURE IF EXISTS sp4; --enable_warnings -#FIXME 4.7.4: check it is correct that having a blank after the comma lets this fail: ---error 1231 set @@sql_mode = 'ansi, error_for_division_by_zero'; # now set the corrent value: @@ -26986,7 +27023,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST SHOW CREATE FUNCTION sp6; # cleanup @@ -27031,7 +27068,7 @@ let $message= Testcase 4.8.5:; DROP PROCEDURE IF EXISTS sp7; --enable_warnings ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE PROCEDURE sp7; @@ -27068,7 +27105,7 @@ CREATE FUNCTION fn1 (i1 real) returns real END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE PROCEDURE fn1; # cleanup @@ -27153,7 +27190,7 @@ CREATE FUNCTION fn1 (x int) returns int END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE PROCEDURE fn1; # cleanup @@ -27181,7 +27218,7 @@ delimiter ;// DROP FUNCTION fn1; ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE FUNCTION fn1; @@ -27196,7 +27233,7 @@ let $message= Testcase 4.8.13:; --disable_warnings DROP FUNCTION IF EXISTS f1000; ---enable warnings +--enable_warnings SHOW FUNCTION STATUS LIKE 'f1000'; @@ -27210,7 +27247,7 @@ let $message= Testcase 4.8.14:; --disable_warnings DROP PROCEDURE IF EXISTS sp1; ---enable_warnibgs +--enable_warnings delimiter //; CREATE PROCEDURE sp1() @@ -27219,7 +27256,7 @@ BEGIN END// delimiter ;// ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE FUNCTION sp1; # cleanup @@ -27341,7 +27378,6 @@ delimiter ;// alter function fn1 sql security invoker; alter function fn1 comment 'this is a function 3242#@%$#@'; -#FIXME: check why here no rows are shown --replace_column 5 modified 6 created show function status like 'fn1'; @@ -27397,7 +27433,7 @@ delimiter ;// DROP PROCEDURE sp6; ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE PROCEDURE sp6; # ------------------------------------------------------------------------------ @@ -27446,7 +27482,7 @@ delimiter ;// DROP FUNCTION fn1; ---error 1305 +--error ER_SP_DOES_NOT_EXIST show CREATE FUNCTION fn1; @@ -27471,7 +27507,6 @@ delimiter ;// DROP FUNCTION fn1; -#FIXME: check why here no rows are shown --replace_column 5 modified 6 created SHOW FUNCTION STATUS LIKE 'fn1'; @@ -27504,6 +27539,7 @@ BEGIN END// delimiter ;// +--sorted_result CALL sp6 (10, 20, 30, 40, 50); # cleanup @@ -27640,9 +27676,6 @@ BEGIN END// delimiter ;// -#FIXME Bug: (Bug#9079) -# suppressed: currenlty the table creation from within sproc fails! -#FIXME check why this NOW works--error 1146 CALL sp6 (10, 20, 30, 40, 50); # cleanup @@ -27661,8 +27694,7 @@ let $message= Testcase 4.9.6:; DROP FUNCTION IF EXISTS fn1; delimiter //; -#FIXME: check this is OK: failed: 1415: Not allowed to return a result set from a function ---error 1415 +--error ER_SP_NO_RETSET CREATE FUNCTION fn1(i1 longtext) returns longtext BEGIN SELECT * from t9 limit 0, 100; @@ -27677,8 +27709,7 @@ create table res_t9 (f1 int, f2 char(25), f3 int); insert into res_t9 values (10, 'abc', 20); delimiter //; -#FIXME: check this is OK: failed: 1422: Explicit or implicit commit is not allowed in stored function or trigger. ---error 1422 +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG CREATE FUNCTION fn1(i1 longtext) returns longtext BEGIN delete from res_t9; @@ -27691,8 +27722,7 @@ DROP FUNCTION IF EXISTS fn1; drop table IF EXISTS res_t9; delimiter //; -#FIXME: check this is OK: failed: 1422: Explicit or implicit commit is not allowed in stored function or trigger. ---error 1422 +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG CREATE FUNCTION fn1(i1 longtext) returns longtext BEGIN create table res_t9 (f1 longtext, f2 longblob, f3 real); @@ -27707,8 +27737,7 @@ drop table IF EXISTS res_t9; create table res_t9 (f1 int, f2 char(25), f3 int); delimiter //; -#FIXME: check this is OK: failed: 1422: Explicit or implicit commit is not allowed in stored function or trigger. ---error 1422 +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG CREATE FUNCTION fn1(i1 longtext) returns longtext BEGIN insert into res_t9 values (100, 'abc', 300); @@ -27724,8 +27753,7 @@ create table res_t9 (f1 int, f2 char(25), f3 int); insert into res_t9 values (10, 'abc', 20); delimiter //; -#FIXME: check this is OK: failed: 1422: Explicit or implicit commit is not allowed in stored function or trigger. ---error 1422 +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG CREATE FUNCTION fn1(i1 longtext) returns longtext BEGIN update res_t9 set f1 = 20; @@ -28130,7 +28158,6 @@ let $message= Testcase 4.11.11:; --source include/show_msg80.inc # testcase: verify undo handler for sql state 42000 (er_sp_wrong_no_of_args) -# ????????????? --disable_warnings DROP PROCEDURE IF EXISTS h1; @@ -28236,10 +28263,14 @@ BEGIN END// delimiter ;// +CALL h1(); + # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings @@ -28279,10 +28310,14 @@ BEGIN END// delimiter ;// +CALL h1(); + # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings @@ -28324,10 +28359,14 @@ BEGIN END// delimiter ;// +CALL h1(); + # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28368,12 +28407,14 @@ BEGIN END// delimiter ;// -CALL h1() +CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28413,9 +28454,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28455,9 +28498,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.19:; @@ -28498,9 +28543,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.20:; @@ -28541,9 +28588,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28583,9 +28632,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.22:; @@ -28625,9 +28676,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.23:; @@ -28668,9 +28721,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.24:; @@ -28711,9 +28766,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.25:; @@ -28751,9 +28808,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings @@ -28793,9 +28852,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28834,9 +28895,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28875,9 +28938,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28919,9 +28984,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -28963,9 +29030,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -29007,9 +29076,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +drop table IF EXISTS res_t1; +drop table IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ @@ -29051,9 +29122,11 @@ delimiter ;// CALL h1(); # cleanup -DROP PROCEDURE h1; -drop table res_t1; -drop table res_t2; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +DROP TABLE IF EXISTS res_t2; +--enable_warnings # ------------------------------------------------------------------------------ let $message= Testcase 4.11.33:; @@ -29073,7 +29146,7 @@ drop table IF EXISTS res_t1; insert into res_t1 values('c', 'd'); delimiter //; ---error 1332 +--error ER_SP_DUP_COND CREATE PROCEDURE h1() BEGIN declare condname condition for sqlstate '20000'; @@ -29092,7 +29165,9 @@ END// delimiter ;// # cleanup -drop table res_t1; +--disable_warnings +DROP TABLE IF EXISTS res_t1; +--enable_warnings # ------------------------------------------------------------------------------ @@ -29115,7 +29190,7 @@ insert into res_t1 values (1, 'a'); delimiter //; ---error 1407 +--error ER_SP_BAD_SQLSTATE CREATE PROCEDURE h1 () begin1_label:BEGIN declare condname1 condition for sqlstate '020'; @@ -29133,25 +29208,26 @@ begin1_label:BEGIN END begin2_label; END begin1_label// -# FIXME: same statement except the 3 lines containing 'exit' -#-# --error 1407 -#-# CREATE PROCEDURE h1 () -#-# begin1_label:BEGIN -#-# declare condname1 condition for sqlstate '020'; -#-# declare condname2 condition for sqlstate 'wewe'; -#-# declare condname3 condition for 9999; -#-# set @var2 = 1; -#-# insert into res_t1 values (2, 'b'); -#-# begin2_label: BEGIN -#-# declare continue handler for sqlstate '90000023 set @var3= 1; -#-# set @var4 = 1; -#-# insert into res_t1 values (3, 'c'); -#-# END begin2_label; -#-# END begin1_label// +--error ER_SP_BAD_SQLSTATE +CREATE PROCEDURE h1 () +begin1_label:BEGIN + declare condname1 condition for sqlstate '020'; + declare condname2 condition for sqlstate 'wewe'; + declare condname3 condition for 9999; + set @var2 = 1; + insert into res_t1 values (2, 'b'); + begin2_label: BEGIN + declare continue handler for sqlstate '90000023' set @var3= 1; + set @var4 = 1; + insert into res_t1 values (3, 'c'); + END begin2_label; +END begin1_label// delimiter ;// # cleanup -drop table res_t1; +--disable_warnings +DROP TABLE IF EXISTS res_t1; +--enable_warnings # ------------------------------------------------------------------------------ @@ -29181,7 +29257,9 @@ END// delimiter ;// # cleanup -DROP PROCEDURE h1; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +--enable_warnings @@ -29193,8 +29271,6 @@ let $message= Testcase 4.11.40:; --source include/show_msg80.inc # testcase: ensure that within the same scope, no two handlers may be declared for the same condition -# Bug ( - --disable_warnings DROP PROCEDURE IF EXISTS h1; @@ -29207,8 +29283,7 @@ drop table IF EXISTS res_t1; # suppressed--error for having two similar handlers in the same scope delimiter //; -#FIXME 3.1.11.40: check whether error 1413 is OK ---error 1413 +--error ER_SP_DUP_HANDLER CREATE PROCEDURE h1 () BEGIN declare x1, x2, x3, x4, x5 int default 0; @@ -29222,13 +29297,13 @@ BEGIN END// delimiter ;// -#FIXME 3.1.11.40: CALL h1(); +#CALL h1(); # cleanup --disable_warnings DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; --enable_warnings -drop table res_t1; # ------------------------------------------------------------------------------ @@ -29237,13 +29312,11 @@ let $message= Testcase 4.11.41:; # testcase: ensure that the declare handler for statement cannot declare a condition for the successful # completion sqlstate: 00000. -#FIXME Bug: (Bug#8759) --disable_warnings DROP PROCEDURE IF EXISTS h1; --enable_warnings -# supressed should actually fail --error delimiter //; CREATE PROCEDURE h1 () BEGIN @@ -29258,8 +29331,12 @@ BEGIN END// delimiter ;// +CALL h1(); + # cleanup +--disable_warnings DROP PROCEDURE IF EXISTS h1; +--enable_warnings # ------------------------------------------------------------------------------ @@ -29287,7 +29364,7 @@ END// delimiter ;// # table doesn't exist ---error 1146 +--error ER_NO_SUCH_TABLE CALL h1(); SELECT @done, @x; @@ -29316,7 +29393,7 @@ END// delimiter ;// # table doesn't exist ---error 1146 +--error ER_NO_SUCH_TABLE CALL h1(); SELECT @done, @x; @@ -29329,8 +29406,10 @@ CALL h1(); SELECT @done, @x; # cleanup -DROP PROCEDURE h1; -DROP TABLE res_t1; +--disable_warnings +DROP PROCEDURE IF EXISTS h1; +DROP TABLE IF EXISTS res_t1; +--enable_warnings # ============================================================================== diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 47d50365968..1d08d3506bc 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,7 +10,4 @@ # ############################################################################## -innodb_storedproc: (changes of WL#2984, using storeproc_nn instead) -memory_storedproc: (changes of WL#2984, using storeproc_nn instead) -myisam_storedproc: (changes of WL#2984, using storeproc_nn instead) ndb__datadict: 2007-10-08 mleich Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results diff --git a/mysql-test/suite/funcs_1/t/innodb__load.test b/mysql-test/suite/funcs_1/t/innodb__load.test index d03672b31ff..388a3ee6f40 100644 --- a/mysql-test/suite/funcs_1/t/innodb__load.test +++ b/mysql-test/suite/funcs_1/t/innodb__load.test @@ -18,11 +18,9 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb1.inc @@ -41,7 +39,5 @@ while ($run) # These tables are needed for the stored procedure testscases --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; } diff --git a/mysql-test/suite/funcs_1/t/innodb_bitdata.test b/mysql-test/suite/funcs_1/t/innodb_bitdata.test index 24d5f077d96..19a66f10732 100644 --- a/mysql-test/suite/funcs_1/t/innodb_bitdata.test +++ b/mysql-test/suite/funcs_1/t/innodb_bitdata.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb4.inc - - let $run= 0; } --source suite/funcs_1/bitdata/bitdata_master.test diff --git a/mysql-test/suite/funcs_1/t/innodb_cursors.test b/mysql-test/suite/funcs_1/t/innodb_cursors.test index 8d77045f2e7..6a73cf64890 100644 --- a/mysql-test/suite/funcs_1/t/innodb_cursors.test +++ b/mysql-test/suite/funcs_1/t/innodb_cursors.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb1.inc - - let $run= 0; } --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc.test b/mysql-test/suite/funcs_1/t/innodb_storedproc.test index cd94577e79b..a675d8e37ef 100644 --- a/mysql-test/suite/funcs_1/t/innodb_storedproc.test +++ b/mysql-test/suite/funcs_1/t/innodb_storedproc.test @@ -1,6 +1,9 @@ #### suite/funcs_1/t/innodb_storedproc.test # +--source include/have_innodb.inc let $engine_type= innodb; +--source suite/funcs_1/storedproc/load_sp_tb.inc + --source suite/funcs_1/storedproc/storedproc_master.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test index edd706b9e5d..426108de8be 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03.test b/mysql-test/suite/funcs_1/t/innodb_trig_03.test index 5f931e1be47..a4c98609698 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_03.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_03.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_03.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test index 242981e25fa..56024e422fe 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test @@ -18,14 +18,11 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; - let $run= 0; } --source suite/funcs_1/triggers/triggers_03e_db_level.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test index da8a074bab6..3035357cc0b 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_08.test b/mysql-test/suite/funcs_1/t/innodb_trig_08.test index 05aabe8b0f5..0f264abc13f 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_08.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_08.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_08.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_09.test b/mysql-test/suite/funcs_1/t/innodb_trig_09.test index ac21142779e..7d651a11195 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_09.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_09.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_09.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test index a507a488ca9..75980b3ab68 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test index e99273672cd..70d4cba14a3 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test @@ -18,16 +18,12 @@ let $engine_type= innodb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/trig_frkey.inc diff --git a/mysql-test/suite/funcs_1/t/innodb_views.test b/mysql-test/suite/funcs_1/t/innodb_views.test index 1a835779762..6179d95e5ba 100644 --- a/mysql-test/suite/funcs_1/t/innodb_views.test +++ b/mysql-test/suite/funcs_1/t/innodb_views.test @@ -21,7 +21,6 @@ eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); let $run= `SELECT @NO_REFRESH = 0`; if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/innodb_tb2.inc @@ -32,7 +31,6 @@ if ($run) USE test1; --source suite/funcs_1/include/innodb_tb2.inc USE test; - } --source suite/funcs_1/views/views_master.inc diff --git a/mysql-test/suite/funcs_1/t/memory__load.test b/mysql-test/suite/funcs_1/t/memory__load.test index 44bd054f420..340875a243a 100644 --- a/mysql-test/suite/funcs_1/t/memory__load.test +++ b/mysql-test/suite/funcs_1/t/memory__load.test @@ -16,11 +16,9 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb1.inc @@ -39,7 +37,5 @@ while ($run) # These tables are needed for the stored procedure testscases --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; } diff --git a/mysql-test/suite/funcs_1/t/memory_bitdata.test b/mysql-test/suite/funcs_1/t/memory_bitdata.test index 3aa30c2d835..faef96a2c3a 100644 --- a/mysql-test/suite/funcs_1/t/memory_bitdata.test +++ b/mysql-test/suite/funcs_1/t/memory_bitdata.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb4.inc - - let $run= 0; } --source suite/funcs_1/bitdata/bitdata_master.test diff --git a/mysql-test/suite/funcs_1/t/memory_cursors.test b/mysql-test/suite/funcs_1/t/memory_cursors.test index 1361c83ecb0..ef33d1776bf 100644 --- a/mysql-test/suite/funcs_1/t/memory_cursors.test +++ b/mysql-test/suite/funcs_1/t/memory_cursors.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb1.inc - - let $run= 0; } --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc.test b/mysql-test/suite/funcs_1/t/memory_storedproc.test index df73fe6815b..405f4d49fd1 100644 --- a/mysql-test/suite/funcs_1/t/memory_storedproc.test +++ b/mysql-test/suite/funcs_1/t/memory_storedproc.test @@ -3,4 +3,6 @@ let $engine_type= memory; +--source suite/funcs_1/storedproc/load_sp_tb.inc + --source suite/funcs_1/storedproc/storedproc_master.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0102.test b/mysql-test/suite/funcs_1/t/memory_trig_0102.test index efa739cfb14..a24afb54754 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0102.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03.test b/mysql-test/suite/funcs_1/t/memory_trig_03.test index 76980b6b1b0..4f4b7440213 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_03.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_03.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_03.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03e.test b/mysql-test/suite/funcs_1/t/memory_trig_03e.test index 58b2eade4a1..6a172df4580 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_03e.test @@ -16,14 +16,11 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; - let $run= 0; } --source suite/funcs_1/triggers/triggers_03e_db_level.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0407.test b/mysql-test/suite/funcs_1/t/memory_trig_0407.test index 05217a7f97f..ac36b2f5a99 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0407.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0407.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_08.test b/mysql-test/suite/funcs_1/t/memory_trig_08.test index 8caae1ec45f..e857be59dee 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_08.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_08.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_08.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_09.test b/mysql-test/suite/funcs_1/t/memory_trig_09.test index 95a7fefbe90..370e51d0d39 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_09.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_09.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_09.inc diff --git a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test index 726b878854e..3547fd7de9a 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test @@ -16,16 +16,12 @@ let $engine_type= memory; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_1011ext.inc diff --git a/mysql-test/suite/funcs_1/t/memory_views.test b/mysql-test/suite/funcs_1/t/memory_views.test index 303d0bb2ac1..eab1800ca48 100644 --- a/mysql-test/suite/funcs_1/t/memory_views.test +++ b/mysql-test/suite/funcs_1/t/memory_views.test @@ -19,7 +19,6 @@ eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); let $run= `SELECT @NO_REFRESH = 0`; if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/memory_tb2.inc @@ -30,7 +29,6 @@ if ($run) USE test1; --source suite/funcs_1/include/memory_tb2.inc USE test; - } --source suite/funcs_1/views/views_master.inc diff --git a/mysql-test/suite/funcs_1/t/myisam__load.test b/mysql-test/suite/funcs_1/t/myisam__load.test index b63044f128c..6cac47174cb 100644 --- a/mysql-test/suite/funcs_1/t/myisam__load.test +++ b/mysql-test/suite/funcs_1/t/myisam__load.test @@ -16,11 +16,9 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb1.inc @@ -39,7 +37,5 @@ while ($run) # These tables are needed for the stored procedure testscases --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; } diff --git a/mysql-test/suite/funcs_1/t/myisam_bitdata.test b/mysql-test/suite/funcs_1/t/myisam_bitdata.test index 7ee15e02ea0..cfcd2faece4 100644 --- a/mysql-test/suite/funcs_1/t/myisam_bitdata.test +++ b/mysql-test/suite/funcs_1/t/myisam_bitdata.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb4.inc - - let $run= 0; } --source suite/funcs_1/bitdata/bitdata_master.test + diff --git a/mysql-test/suite/funcs_1/t/myisam_cursors.test b/mysql-test/suite/funcs_1/t/myisam_cursors.test index 841903148cd..4b23ecba610 100644 --- a/mysql-test/suite/funcs_1/t/myisam_cursors.test +++ b/mysql-test/suite/funcs_1/t/myisam_cursors.test @@ -16,9 +16,8 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { # Create some objects needed in many testcases diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc.test b/mysql-test/suite/funcs_1/t/myisam_storedproc.test index 64fba295907..3925775d4e1 100644 --- a/mysql-test/suite/funcs_1/t/myisam_storedproc.test +++ b/mysql-test/suite/funcs_1/t/myisam_storedproc.test @@ -3,4 +3,6 @@ let $engine_type= myisam; +--source suite/funcs_1/storedproc/load_sp_tb.inc + --source suite/funcs_1/storedproc/storedproc_master.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test index 77bde5f99ef..7cba273a4b1 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test @@ -16,16 +16,12 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0102.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03.test b/mysql-test/suite/funcs_1/t/myisam_trig_03.test index 6edaaf7d14c..2e14cc7a28f 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_03.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_03.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_03.inc + diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test index b0bc4a495ea..a299f226a9a 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test @@ -16,14 +16,11 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; - let $run= 0; } --source suite/funcs_1/triggers/triggers_03e_db_level.inc diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test index a28959b407e..90eb4f75213 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_0407.inc + diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_08.test b/mysql-test/suite/funcs_1/t/myisam_trig_08.test index dda01314052..5ff16ee5190 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_08.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_08.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_08.inc + diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_09.test b/mysql-test/suite/funcs_1/t/myisam_trig_09.test index 9f2c932e608..8bd041b31e5 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_09.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_09.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_09.inc + diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test index b4d29476aa5..7290c22eb84 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test @@ -16,17 +16,14 @@ let $engine_type= myisam; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; } --source suite/funcs_1/triggers/triggers_1011ext.inc + diff --git a/mysql-test/suite/funcs_1/t/myisam_views.test b/mysql-test/suite/funcs_1/t/myisam_views.test index 3fa50a3a2a0..dad532955f5 100644 --- a/mysql-test/suite/funcs_1/t/myisam_views.test +++ b/mysql-test/suite/funcs_1/t/myisam_views.test @@ -19,7 +19,6 @@ eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); let $run= `SELECT @NO_REFRESH = 0`; if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb2.inc @@ -30,7 +29,6 @@ if ($run) USE test1; --source suite/funcs_1/include/myisam_tb2.inc USE test; - } let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6 @@ -47,3 +45,4 @@ if ($run) DROP DATABASE IF EXISTS test1; } + diff --git a/mysql-test/suite/funcs_1/t/ndb__load.test b/mysql-test/suite/funcs_1/t/ndb__load.test index 4f95065b285..b586dfa4b3a 100644 --- a/mysql-test/suite/funcs_1/t/ndb__load.test +++ b/mysql-test/suite/funcs_1/t/ndb__load.test @@ -18,11 +18,9 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb1.inc @@ -41,7 +39,5 @@ while ($run) # These tables are needed for the stored procedure testscases --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; } diff --git a/mysql-test/suite/funcs_1/t/ndb_bitdata.test b/mysql-test/suite/funcs_1/t/ndb_bitdata.test index bd5072e123d..26c454d70f7 100644 --- a/mysql-test/suite/funcs_1/t/ndb_bitdata.test +++ b/mysql-test/suite/funcs_1/t/ndb_bitdata.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/ndb_bitdata.test -# InnoDB tables should be used +# NDB tables should be used # # 1. Check if InnoDB is available --source include/have_ndb.inc @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb4.inc - - let $run= 0; } --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 index 178622f4f48..fd9060b3e8f 100644 --- a/mysql-test/suite/funcs_1/t/ndb_cursors.test +++ b/mysql-test/suite/funcs_1/t/ndb_cursors.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/ndb_cursors.test -# Innodb tables should be used +# NDB tables should be used # # 1. Check if ndb is available --source include/have_ndb.inc @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb1.inc - - let $run= 0; } --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/ndb_storedproc.test b/mysql-test/suite/funcs_1/t/ndb_storedproc.test new file mode 100644 index 00000000000..69d214c97ed --- /dev/null +++ b/mysql-test/suite/funcs_1/t/ndb_storedproc.test @@ -0,0 +1,9 @@ +#### suite/funcs_1/t/ndb_storedproc.test +# + +--source include/have_ndb.inc +let $engine_type= ndb; + +--source suite/funcs_1/storedproc/load_sp_tb.inc + +--source suite/funcs_1/storedproc/storedproc_master.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 index cda1048631f..b5add9d9806 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index e8478d4f0fc..65aa138495d 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_03.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/ndb_triggers.test -# InnoDB tables should be used +# NDB tables should be used # # 1. Check if NDB is available --source include/have_ndb.inc @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index 3d6c73cfe24..118ea99e890 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_03e.test @@ -1,6 +1,6 @@ #### suite/funcs_1/t/ndb_triggers.test -# InnoDB tables should be used +# NDB tables should be used # # 1. Check if NDB is available --source include/have_ndb.inc @@ -18,14 +18,11 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; - let $run= 0; } --source suite/funcs_1/triggers/triggers_03e_db_level.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 index 2825102643c..2c07cf329d9 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index 9c763c71b35..497ea523027 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_08.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_08.test @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index 7cc63e47f8a..d735d125fd0 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_09.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_09.test @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index 9b0b966deaf..4d298da3260 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test @@ -18,16 +18,12 @@ let $engine_type= ndb; eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); -# FIXME Replace the following, when "if" for mysqltest is available let $run= `SELECT @NO_REFRESH = 0`; -while ($run) +if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb3.inc - - let $run= 0; } --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 index 55b8f4757fe..317c8ffff23 100644 --- a/mysql-test/suite/funcs_1/t/ndb_views.test +++ b/mysql-test/suite/funcs_1/t/ndb_views.test @@ -21,7 +21,6 @@ eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); let $run= `SELECT @NO_REFRESH = 0`; if ($run) { - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/ndb_tb2.inc @@ -32,7 +31,6 @@ if ($run) USE test1; --source suite/funcs_1/include/ndb_tb2.inc USE test; - } --source suite/funcs_1/views/views_master.inc diff --git a/mysql-test/suite/funcs_1/triggers/triggers_03.inc b/mysql-test/suite/funcs_1/triggers/triggers_03.inc index 4821b47099a..4039699c754 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_03.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_03.inc @@ -3,6 +3,7 @@ # Trigger Tests # (test case numbering refer to requirement document TP v1.1) #====================================================================== +# WL#4084: enable disabled parts. 2007-11-15, hhunger --disable_abort_on_error @@ -157,16 +158,13 @@ let $message=Testcase 3.5.3.7a:; show grants; select f1 from t1 order by f1; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4a_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1a'; + create trigger trg4a_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1a'; connection default; + --error ER_COLUMNACCESS_DENIED_ERROR insert into t1 (f1) values ('insert 3.5.3.7-1a'); select f1 from t1 order by f1; - --error 0, 1360 drop trigger trg4a_1; connection yes_privs_424a; @@ -213,18 +211,14 @@ let $message= Testcase 3.5.3.7b:; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4b_1 before UPDATE on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1b'; + create trigger trg4b_1 before UPDATE on t1 for each row + set new.f1 = 'trig 3.5.3.7-1b'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1b'); select f1 from t1 order by f1; update t1 set f1 = 'update 3.5.3.7-1b' where f1 = 'insert 3.5.3.7-1b'; select f1 from t1 order by f1; - --error 0, 1360 drop trigger trg4b_1; connection yes_privs_424b; @@ -271,16 +265,12 @@ let $message= Testcase 3.5.3.7c; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4c_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1c'; + create trigger trg4c_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1c'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1c'); select f1 from t1 order by f1; - --error 0, 1360 drop trigger trg4c_1; connection yes_privs_424c; @@ -327,16 +317,12 @@ let $message= Testcase 3.5.3.7d:; connection no_privs_424d; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8884; ---source include/show_msg.inc -# --error 1227 -# create trigger trg4d_1 before INSERT on t1 for each row -# set new.f1 = 'trig 3.5.3.7-1d'; + create trigger trg4d_1 before INSERT on t1 for each row + set new.f1 = 'trig 3.5.3.7-1d'; connection default; insert into t1 (f1) values ('insert 3.5.3.7-1d'); select f1 from t1 order by f1; - --error 0, 1360 drop trigger trg4d_1; connection yes_privs_424d; @@ -386,18 +372,14 @@ let $message= Testcase 3.5.3.8a:; use priv_db; show grants; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5a_1 before INSERT on t1 for each row -# set @test_var = new.f1; + create trigger trg5a_1 before INSERT on t1 for each row + set @test_var = new.f1; connection default; set @test_var = 'before trig 3.5.3.8-1a'; select @test_var; insert into t1 (f1) values ('insert 3.5.3.8-1a'); select @test_var; - --error 0, 1360 drop trigger trg5a_1; connection yes_privs_425a; @@ -446,11 +428,8 @@ let $message= Testcase: 3.5.3.8b; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5b_1 before UPDATE on t1 for each row -# set @test_var= new.f1; + create trigger trg5b_1 before UPDATE on t1 for each row + set @test_var= new.f1; connection default; set @test_var= 'before trig 3.5.3.8-1b'; @@ -458,7 +437,6 @@ let $message= Trigger create disabled - should fail - Bug 8887; select @test_var; update t1 set f1= 'update 3.5.3.8-1b' where f1 = 'insert 3.5.3.8-1b'; select @test_var; - --error 0, 1360 drop trigger trg5b_1; connection yes_privs_425b; @@ -506,17 +484,13 @@ let $message= Testcase 3.5.3.8c:; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5c_1 before INSERT on t1 for each row -# set @test_var= new.f1; + create trigger trg5c_1 before INSERT on t1 for each row + set @test_var= new.f1; connection default; set @test_var= 'before trig 3.5.3.8-1c'; insert into t1 (f1) values ('insert 3.5.3.8-1c'); select @test_var; - --error 0, 1360 drop trigger trg5c_1; connection yes_privs_425c; @@ -561,17 +535,13 @@ let $message=Testcase: 3.5.3.8d:; connection no_privs_425d; show grants; use priv_db; -let $message= Trigger create disabled - should fail - Bug 8887; ---source include/show_msg.inc -# --error 1227 -# create trigger trg5d_1 before INSERT on t1 for each row -# set @test_var= new.f1; + create trigger trg5d_1 before INSERT on t1 for each row + set @test_var= new.f1; connection default; set @test_var='before trig 3.5.3.8-1d'; insert into t1 (f1) values ('insert 3.5.3.8-1d'); select @test_var; - --error 0, 1360 drop trigger trg5d_1; connection yes_privs_425d; @@ -591,8 +561,7 @@ let $message= Trigger create disabled - should fail - Bug 8887; drop trigger trg5d_2; --enable_warnings -# --- 3.5.3.x - additional tests following the fix to bug 5861 / WL 2818 -# to test for trigger definer privs in the case of trigger +# --- 3.5.3.x to test for trigger definer privs in the case of trigger # actions (insert/update/delete/select) performed on other # tables. let $message=Testcase: 3.5.3.x:; diff --git a/mysql-test/suite/funcs_1/triggers/triggers_08.inc b/mysql-test/suite/funcs_1/triggers/triggers_08.inc index 4a7ea486248..d63c15b33b5 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_08.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_08.inc @@ -3,6 +3,7 @@ # Trigger Tests # (test case numbering refer to requirement document TP v1.1) #====================================================================== +# WL#4084: enable disabled parts, 2007-11-15 hhunger # General setup for Trigger tests let $message= Testcase: 3.5:; @@ -34,8 +35,6 @@ let $message= Testcase: 3.5:; let $message= Testcase 3.5.8.1: (implied in previous tests); --source include/show_msg.inc -# OBN - FIXME - Missing 3.5.8.1 need to add - #Section 3.5.8.2 # Testcase: Ensure that the triggered actions of every trigger never results # in an unexpected change made to the database. @@ -111,10 +110,12 @@ let $message= 3.5.8.4 - multiple SQL; 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'; -# error in ndb - select * from db_test.t1_i order by i120; - select * from db_test.t1_u order by u120; - select * from db_test.t1_d order by d120; + --sorted_result + select * from db_test.t1_i; + --sorted_result + select * from db_test.t1_u; + --sorted_result + select * from db_test.t1_d; select @test_var; @@ -320,28 +321,28 @@ let $message= Testcase 3.5.8.5-case:; 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; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; 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; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; Insert into tb3 (f120, f122, f136) values ('d', 'Test 3.5.8.5-case', 152); select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case' order by f120; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; Insert into tb3 (f120, f122, f136, f144) values ('e', 'Test 3.5.8.5-case', 200, 8); select f120, f122, f136, f144, @test_var - from tb3 where f122 = 'Test 3.5.8.5-case' order by f120; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; --error 0, 1339 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; + from tb3 where f122 = 'Test 3.5.8.5-case' order by f120,f136; delimiter //; --error 1064 @@ -495,12 +496,25 @@ let $message= Testcase 3.5.8.5-while:; #Section 3.5.8.6 # Test case: Ensure that a trigger definition that includes a CALL to a stored # procedure fails, at CREATE TRIGGER time, with an appropriate error -# message -# OBN - requirement void since allowed -# Fails due to Bug 9909 the bug allows the trigger to be created -# and fails in execution time +# message. Not more valid requirement. let $message= Testcase 3.5.8.6: (requirement void); --source include/show_msg.inc + delimiter //; + 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// + delimiter ;// + 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; + DROP TRIGGER trg8_1; + DROP PROCEDURE sp_01; #Section 3.5.8.7 @@ -508,25 +522,26 @@ let $message= Testcase 3.5.8.6: (requirement void); # transaction-delimiting statement (e.g. COMMIT, # ROLLBACK, START TRANSACTION) fails, at CREATE TRIGGER # time, with an appropriate error message. -# OBN - Fails due to Bug ____ -let $message= Testcase 3.5.8.7: (Disabled as a result of bug _____); +let $message= Testcase 3.5.8.7; --source include/show_msg.inc + + delimiter //; + --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG + Create trigger trg9_1 before update on tb3 for each row + BEGIN + Start transaction; + Set new.f120='U'; + Commit; + END// -# --error 1314 -# Create trigger trg9_1 before update on tb3 for each row -# BEGIN -# Start transaction; -# Set new.f120='U'; -# Commit; -# END; - -# --error 1314 -# Create trigger trg9_2 before delete on tb3 for each row -# BEGIN -# Start transaction; -# Set @var2=old.f120; -# Rollback; -# END; + --error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG + Create trigger trg9_2 before delete on tb3 for each row + BEGIN + Start transaction; + Set @var2=old.f120; + Rollback; + END// + delimiter ;// # Cleanup section 3.5 diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc index 1b7505260f7..07d04ab56ee 100644 --- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc +++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc @@ -3,6 +3,7 @@ # Trigger Tests # (test case numbering refer to requirement document TP v1.1) #====================================================================== +# WL#4084: enable disabled parts, 2007-11-15, hhunger --disable_abort_on_error @@ -271,8 +272,8 @@ let $message= Testcase y.y.y.3: Circular trigger reference; create trigger tr4 after insert on t4 for each row insert into t1 (f1) values (new.f4+1); - # OBN See bug 11896 - --error 1442 + # Bug#11896 Partial locking in case of recursive trigger definittions + --error ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG insert into t1 values (1); select * from t1 order by f1; select * from t2 order by f2; @@ -294,7 +295,7 @@ let $message= Testcase y.y.y.3: Circular trigger reference; #Section y.y.y.4 # Testcase: create recursive trigger/storedprocedures conditions -let $message= Testcase y.y.y.4: Recursive trigger/SP references (disabled bug 11889); +let $message= Testcase y.y.y.4: Recursive trigger/SP references; --source include/show_msg.inc set @sql_mode='traditional'; diff --git a/mysql-test/suite/funcs_1/views/func_view.inc b/mysql-test/suite/funcs_1/views/func_view.inc index d78cfb4488a..93fdb382039 100644 --- a/mysql-test/suite/funcs_1/views/func_view.inc +++ b/mysql-test/suite/funcs_1/views/func_view.inc @@ -5,10 +5,7 @@ ################################################### # 2006-12-08 ML Maintenance + refinements # 2005-09-14 ML Create this test - -let $message= ! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables; ---source include/show_msg80.inc +# 2007-11-09 HHunger enabled all disabled parts belonging to fixed bugs. # # 0. Some notes about this test: # ################################################################# @@ -43,14 +40,7 @@ Bug#10713: mysqldump includes database in create view and referenced tables; # which was valid during VIEW creation time. This means some variations # of the SQL mode are needed. # 0.1.3 There are much more functions to be tested. -# 0.1.4 There are problems with the option "--ps-protocol". -# Double values with 15 digit mantissa are printed with 14 digit -# mantissa (Bug#11589). -# I altered the Minimum/Maximum double values to 14 digit mantissa -# to avoid these problems. But there are some other unsolved problems -# with "--ps-protocol". ---disable_ps_protocol -# 0.1.5 The result sets of some CAST sub testcases with ugly function parameter +# 0.1.4 The result sets of some CAST sub testcases with ugly function parameter # column data type combinations must be discussed. # # @@ -256,11 +246,9 @@ INSERT INTO t1_values SET my_year = '1901', my_bigint = -9223372036854775808, my_decimal = -9999999999999999999999999999999999.999999999999999999999999999999 , - my_double = -1.7976931348623E+308; -# Note(ML): Values like -# - my_timestamp = '19700101030000' do not work -# - my_double = -1.7976931348623157E+308 cause problems with -# --ps-protocol (Bug#11589) + my_double = -1.7976931348623E+308; +# shortened due to bug#32285 +# my_double = -1.7976931348623157E+308; # # 2.3 record -- everything to "maximum" # numbers, date/time types -> maximum of range @@ -281,10 +269,8 @@ INSERT INTO t1_values SET my_bigint = 9223372036854775807, my_decimal = +9999999999999999999999999999999999.999999999999999999999999999999 , my_double = 1.7976931348623E+308; -# Note(ML): Values like -# - my_timestamp = '20380101030000' do not work -# - my_double = 1.7976931348623157E+308 cause problems with -# --ps-protocol (Bug#11589) +# shortened due to bug#32285 +# my_double = -1.7976931348623157E+308; # # 2.4 record -- everything to "magic" value if available or # other interesting value @@ -430,6 +416,7 @@ eval INSERT INTO t1_values SET select_id = @select_id, # # # 1.1.1. CAST --> BINARY +--echo ##### 1.1.1. CAST --> BINARY let $target_type= BINARY; # let $col_type= my_char_30; @@ -459,6 +446,7 @@ let $col_type= my_year; # 1.1.2. CAST --> CHAR +--echo ##### 1.1.2. CAST --> CHAR let $target_type= CHAR; # let $col_type= my_char_30; @@ -488,6 +476,7 @@ let $col_type= my_year; # 1.1.3. CAST --> DATE +--echo ##### 1.1.3. CAST --> DATE let $target_type= DATE; # let $col_type= my_char_30; @@ -527,6 +516,7 @@ let $col_type= my_year; # 1.1.4. CAST --> DATETIME +--echo ##### 1.1.4. CAST --> DATETIME let $target_type= DATETIME; # let $col_type= my_char_30; @@ -566,6 +556,7 @@ let $col_type= my_year; # 1.1.5. CAST --> TIME +--echo ##### 1.1.5. CAST --> TIME let $target_type= TIME; # let $col_type= my_char_30; @@ -604,8 +595,8 @@ let $col_type= my_time; let $col_type= my_year; --source suite/funcs_1/views/fv_cast.inc - # 1.1.6. CAST --> DECIMAL +--echo ##### 1.1.6. CAST --> DECIMAL # Set the following to (37,2) since the default was changed to (10,0) - OBN let $target_type= DECIMAL(37,2); # @@ -647,6 +638,7 @@ let $col_type= my_year; # 1.1.7. CAST --> SIGNED INTEGER +--echo ##### 1.1.7. CAST --> SIGNED INTEGER let $target_type= SIGNED INTEGER; # let $message= @@ -682,6 +674,7 @@ let $col_type= my_year; # 1.1.8. CAST --> UNSIGNED INTEGER +--echo ##### 1.1.8. CAST --> UNSIGNED INTEGER let $target_type= UNSIGNED INTEGER; # let $message= @@ -703,12 +696,9 @@ let $col_type= my_decimal; let $message= some statements disabled because of Bug#5913 Traditional mode: BIGINT range not correctly delimited; --source include/show_msg80.inc -if (0) -{ -# Bugs#8663: cant use bgint unsigned as input to cast +# Bug#8663 cant use bgint unsigned as input to cast let $col_type= my_double; --source suite/funcs_1/views/fv_cast.inc -} let $col_type= my_datetime; --source suite/funcs_1/views/fv_cast.inc let $col_type= my_date; @@ -1008,38 +998,21 @@ let $col_type= my_varbinary_1000; eval SET @my_select = 'SELECT LEFT($col_type, 2), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -# -let $message= -"Attention: LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', ) - The file with expected results suffers from Bug 10963" - and the testcases with length = BIGINT or DOUBLE column are deactivated, - because there are 32/64 Bit differences; ---source include/show_msg80.inc # Bug#11728 string function LEFT, strange undocumented behaviour, strict mode # Bug#10963 LEFT string function returns wrong result with large length let $col_type= my_bigint; -if (0) -{ -# Bug#10963 LEFT string function returns wrong result with large length eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -} -# let $col_type= my_decimal; eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -# -if (0) -{ # Bug#10963 LEFT string function returns wrong result with large length let $col_type= my_double; eval SET @my_select = 'SELECT LEFT(''AaBbCcDdEeFfGgHhIiJjÄäÜüÖö'', $col_type), $col_type, id FROM t1_values'; --source suite/funcs_1/views/fv1.inc -} - # 3.20. LENGTH(str) let $col_type= my_char_30; @@ -1260,6 +1233,7 @@ SET sql_mode = ''; # let $message= "# The basic preparations end and the main test starts here"; --source include/show_msg80.inc +--disable_ps_protocol ##### The tests start here ##################################################### @@ -1370,5 +1344,7 @@ while ($select_id) dec $select_id ; } +--enable_ps_protocol + DROP TABLE t1_selects, t1_modes, t1_values; --exec rm $MYSQLTEST_VARDIR/tmp/func_view.dat diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index 6f07d4f38b3..f08082676ed 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -4,6 +4,7 @@ # 2007-10-05 mleich # 1. Fix for Bug#31237 Test "ndb_views" fails because of differing order ... # 2. Cleanup of test +# 2007-11-15 hhunger WL#4084: Review and fix all disabled tests ... let $message= ! Attention: The file with the expected results is not | thoroughly checked. @@ -13,25 +14,20 @@ let $message= ! Attention: The file with the expected results is not --source include/show_msg80.inc # As long as -# Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill -# is not fixed, we must switch the ps-protocol for some statements off. +# Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill +# is not fixed, we must switch the ps-protocol for some statements off (formerly bug#11589). # If this bug is fixed, please # 1. set the following variable to 0 # 2. check, if the test passes -# 3. remove the workarounds -let $have_bug_11589= 1; -if ($have_bug_11589) +# 3. remove the workarounds +let $have_bug_32285= 1; +if ($have_bug_32285) { let $message= There are some statements where the ps-protocol is switched off. - Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill; + Bug#32285: mysqltest, --ps-protocol, strange output, float/double/real with zerofill; --source include/show_msg80.inc } -let $message= ! Attention: The file with the expected results suffers from -Bug#10713: mysqldump includes database in create view and referenced tables; ---source include/show_msg80.inc - - # The sub testcases are nearly independend. That is the reason why # we do not want to abort after the first error. --disable_abort_on_error @@ -112,7 +108,7 @@ insert into tb2 (f59,f60,f61) values (109,108,104); INSERT INTO tb2 (f59,f60) VALUES( 299,899 ); INSERT INTO tb2 (f59,f60) VALUES( 242,79 ); INSERT INTO tb2 (f59,f60) VALUES( 424,89 ); -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } @@ -225,10 +221,11 @@ Insert into t1 values (500,9866); select * FROM v1 order by f59 limit 0,10; #(15) -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results 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; @@ -237,6 +234,7 @@ if ($have_bug_11589) 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; +--horizontal_results --enable_ps_protocol #(17) @@ -814,11 +812,13 @@ 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; +--sorted_result SELECT * FROM test.v1; # Switch the algorithm CREATE OR REPLACE ALGORITHM = TEMPTABLE VIEW test.v1 AS SELECT * FROM t1 limit 2; SHOW CREATE VIEW test.v1; +--sorted_result SELECT * FROM test.v1; # Switch the base table CREATE OR REPLACE VIEW test.v1 AS SELECT * FROM tb2 order by f59 limit 2; @@ -827,7 +827,9 @@ if ($have_bug_11589) { --disable_ps_protocol } +--vertical_results SELECT * FROM test.v1 order by f59,f60,f61,f62,f63,f64,f65; +--horizontal_results --enable_ps_protocol # Switch the SELECT but not the base table CREATE OR REPLACE VIEW test.v1 AS SELECT F59 FROM tb2; @@ -862,11 +864,12 @@ let $message= Testcase 3.3.1.15 ; Drop table if exists test.v1 ; --enable_warnings CREATE OR REPLACE view test.v1 as select * from tb2; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM test.v1 ORDER BY f59,f60,f61 LIMIT 2; +--sorted_result +SELECT * FROM test.v1; --enable_ps_protocol Drop view test.v1 ; @@ -1039,12 +1042,15 @@ let $message= Testcase 3.3.1.22 ; --disable_warnings DROP VIEW IF EXISTS v1; --enable_warnings -CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2; -SELECT * FROM test.v1 WHERE product IS NOT NULL ORDER BY product LIMIT 2; +CREATE VIEW test.v1( product ) AS SELECT f59*f60 From tb2 WHERE f59 < 3; +--sorted_result +SELECT * FROM test.v1; CREATE OR REPLACE VIEW test.v1( product ) AS SELECT 1*2; -SELECT * FROM test.v1 LIMIT 2; +--sorted_result +SELECT * FROM test.v1; CREATE OR REPLACE VIEW test.v1( product ) AS SELECT USER(); -SELECT * FROM test.v1 LIMIT 2; +--sorted_result +SELECT * FROM test.v1; Drop view if exists test.v1 ; @@ -1163,7 +1169,8 @@ if ($have_bug_11589) { --disable_ps_protocol } -Select * from test.v1 order by f59, f60, f61 limit 2; +--sorted_result +Select * from test.v1; --enable_ps_protocol Drop view test.v1 ; @@ -1198,12 +1205,15 @@ 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 ; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results Select * from v1 order by f59,f60,f61,f62,f63,f64,f65; +--horizontal_results --enable_ps_protocol +--sorted_result Select * from test2.v2 ; Drop view if exists test2.v1 ; Drop view if exists test2.v2 ; @@ -1247,6 +1257,7 @@ 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 ; +--sorted_result Select * from test.v1; Drop view test.v1 ; @@ -1271,6 +1282,7 @@ 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; +--sorted_result Select * from test2.v1; Use test; @@ -1585,7 +1597,7 @@ let $message= Testcase 3.3.1.41 ; ############################################################################### # Testcase 3.3.1.41: Ensure that a view definition within a stored procedure # definition cannot include references to any of the stored -# procedure’s parameters. +# procedures parameters. ############################################################################### --disable_warnings Drop view if exists test.v1 ; @@ -1648,20 +1660,24 @@ CREATE VIEW test.v1 AS SELECT f59,f60 FROM test.tb2; INSERT INTO test.v1 values(122,432); -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM test.tb2 where f59 = 122 and f60 = 432 limit 0,20; +--horizontal_results --enable_ps_protocol UPDATE test.v1 SET f59 = 3000 WHERE test.v1.f59 = 122 ; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM test.tb2 where f59 = 3000 limit 0,20; +--horizontal_results --enable_ps_protocol DELETE FROM test.v1 @@ -1712,21 +1728,25 @@ CREATE VIEW test.v1 AS SELECT * FROM test.tb2 where f59 = 04; UPDATE test.v1 SET f59 = 30 where F59 = 04 ; --disable_info SELECT * FROM test.v1 where f59 = 30 order by f59; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM test.tb2 where f59 = 30 ; +--horizontal_results --enable_ps_protocol --enable_info UPDATE tb2 SET f59 = 100 where f59 = 30 ; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 100 ; +--horizontal_results --enable_ps_protocol SELECT * FROM test.v1 order by f59 ; @@ -1984,10 +2004,10 @@ let $message= Testcase 3.3.1.49A ; # The annoying redundant # eval INSERT INTO t1_results VALUES (@v3_to_v1_options,@statement, # @v3_to_v1_violation,$mysql_errno); -# could not be put into a file to be sourced because of +# could not be put into a file to be sourced because of the closed # Bug#10267 mysqltest, wrong number of loops when a script is sourced # within a loop -# +# To be implemented later. USE test; --disable_warnings @@ -2298,11 +2318,13 @@ DROP VIEW IF EXISTS test.v1; # AS SELECT * FROM
. ############################################################################### CREATE VIEW test.v1 AS SELECT * FROM test.tb2; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM test.v1 order by f59 limit 5; +--vertical_results +SELECT * FROM test.v1 order by f59,f60,f61 ; +--horizontal_results --enable_ps_protocol drop view test.v1 ; ############################################################################### @@ -2327,7 +2349,9 @@ if ($have_bug_11589) { --disable_ps_protocol } -SELECT * FROM test.v1 order by f59,f60,f61 limit 20; +--vertical_results +SELECT * FROM test.v1 order by f59,f60,f61 ; +--horizontal_results --enable_ps_protocol drop view test.v1 ; ############################################################################### @@ -2684,11 +2708,13 @@ SELECT * FROM test.v1 order by f59 limit 0,10; ALTER VIEW test.v1 AS SELECT * FROM test.tb2 WHERE test.tb2.f59 = 242 ; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM test.v1 order by f59 limit 0,10; +--horizontal_results --enable_ps_protocol Drop view test.v1 ; @@ -3165,11 +3191,13 @@ Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; +--horizontal_results --enable_ps_protocol SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; @@ -3194,11 +3222,13 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 8 and f60 = 105; +--horizontal_results --enable_ps_protocol SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; @@ -3222,11 +3252,13 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 891 and f60 = 105; +--horizontal_results --enable_ps_protocol SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; @@ -3779,23 +3811,6 @@ SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f6 # For a WHERE clause sub query that refers to a table also referenced in a # FROM clause 3.3.2.18 SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; -# Attention: The attempt to UPDATE the next VIEW fails like expected, -# but the error message -# ERROR 1093 (HY000) : You can't specify target table 'v1' for -# update in FORM clause" -# is wrong. -# The server must deliver ERROR 1288 (ER_NON_UPDATABLE_TABLE). -# Bug#10773 Incorrect message is displayed while updating a view -# mleich FIXME: Remove the comment above, replace -# --error ER_NON_UPDATABLE_TABLE,ER_UPDATE_TABLE_USED -# with -# --error ER_NON_UPDATABLE_TABLE -# and update the file with expected results when the -# Bug#10773 is fixed. -# For a reference to a non-updateable view 3.3.2.19 -let $message= Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view; ---source include/show_msg80.inc SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; # For ALGORITHM = TEMPTABLE 3.3.2.20 SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; @@ -3819,9 +3834,7 @@ while ($num) UPDATE v1 SET f61=1007; --error ER_NON_UPDATABLE_TABLE DELETE FROM v1; - DROP VIEW v1; - dec $num; } @@ -3997,27 +4010,33 @@ DESCRIBE v2; SELECT * FROM v2 order by 2; # - What will be the content of base table created with AS SELECT ? CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol # DROP TABLE t1; From 0f5cf86410aa7006f70bf3dc730f2f175d0b1642 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jan 2008 23:34:30 +0100 Subject: [PATCH 048/527] NdbRepStress.cpp: Updated with suggestions from Magnus and other fixes and adjustments I found along the way DbUtil.hpp, DbUtil.cpp: fixes and adjustments I found along the way storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp: Updated with suggestions from Magnus and other fixes and adjustments I found along the way storage/ndb/test/src/DbUtil.cpp: fixes and adjustments I found along the way storage/ndb/test/include/DbUtil.hpp: fixes and adjustments I found along the way --- storage/ndb/test/include/DbUtil.hpp | 3 +- storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp | 487 ++++++++++++++++++ storage/ndb/test/src/DbUtil.cpp | 42 +- 3 files changed, 527 insertions(+), 5 deletions(-) create mode 100644 storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index 9c885531ee7..62aaaf7b5a3 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -89,7 +89,8 @@ public: void mysqlCloseStmHandle(MYSQL_STMT *my_stmt); int connect(); - int select_DB(); + int selectDb(); + int selectDb(const char * m_db); int doQuery(char * stm); int doQuery(const char * stm); int getErrorNumber(); diff --git a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp new file mode 100644 index 00000000000..7d9b66d8e72 --- /dev/null +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp @@ -0,0 +1,487 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; 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 +#include +#include +#include +#include +#include + +static BaseString sqlStm; +static BaseString db; +static int t1_records = 50000; + +/**** TOOL SECTION ****/ + +static uint +urandom() +{ + uint r = (uint)random(); + return r; +} + +static uint +urandom(uint m) +{ + if (m == 0) + return 0; + uint r = urandom(); + r = r % m; + return r; +} + +#define GETNDB(ps) ((NDBT_NdbApiStep*)ps)->getNdb() +/* +*/ + +int +syncSlaveWithMaster() +{ + /* + We need to look at the MAX epoch of the + mysql.ndb_binlog_index table so we will + know when the slave has caught up + */ + + MYSQL_RES * result; + MYSQL_ROW row; + unsigned int masterEpoch = 0; + unsigned int slaveEpoch = 0; + unsigned int slaveEpochOld = 0; + int maxLoops = 100; + int loopCnt = 0; + + //Create a DbUtil object for the master + DbUtil master("mysql",""); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + //Set the database we are wanting + if (master.selectDb()) + { + return NDBT_FAILED; + } + + //Get max epoch from master + if(master.doQuery("SELECT MAX(epoch) FROM mysql.ndb_binlog_index")) + { + return NDBT_FAILED; + } + result = mysql_use_result(master.getMysql()); + row = mysql_fetch_row(result); + masterEpoch = atoi(row[0]); + mysql_free_result(result); + master.databaseLogout(); + + /* + Now we will pull current epoch from slave. If not the + same as master, we will continue to retrieve the epoch + and compare until it matches or we reach the max loops + allowed. + */ + + //Create a dbutil object for the slave + DbUtil slave("mysql",".slave"); + + //Login to slave + if (!slave.connect()) + { + return NDBT_FAILED; + } + + //Set the database we are wanting + if (slave.selectDb()) + { + return NDBT_FAILED; + } + + while(slaveEpoch != masterEpoch && loopCnt < maxLoops) + { + if(slave.doQuery("SELECT epoch FROM mysql.ndb_apply_status")) + { + return NDBT_FAILED; + } + result = mysql_use_result(slave.getMysql()); + row = mysql_fetch_row(result); + slaveEpoch = atoi(row[0]); + mysql_free_result(result); + + if(slaveEpoch != slaveEpochOld) + { + slaveEpochOld = slaveEpoch; + if(loopCnt > 0) + loopCnt--; + sleep(3); + } + else + { + sleep(1); + loopCnt++; + } + } + + if(slaveEpoch != masterEpoch) + { + g_err << "Slave not in sync with master!" << endl; + return NDBT_FAILED; + } + return NDBT_OK; +} + +int +verifySlaveLoad(BaseString *table) +{ + //First thing to do is sync slave + if(syncSlaveWithMaster()) + { + g_err << "Verify Load -> Syncing with slave failed" << endl; + return NDBT_FAILED; + } + + //Now that slave is sync we can verify load + sqlStm.assfmt("SELECT COUNT(*) FROM %s", table); + MYSQL_RES * result; + MYSQL_ROW row; + unsigned int masterCount = 0; + unsigned int slaveCount = 0; + + //Create a DB Object for the master + DbUtil master(db.c_str()," "); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + if (master.selectDb()) + { + return NDBT_FAILED; + } + + if(master.doQuery(sqlStm.c_str())) + { + return NDBT_FAILED; + } + result = mysql_use_result(master.getMysql()); + row = mysql_fetch_row(result); + masterCount = atoi(row[0]); + mysql_free_result(result); + master.databaseLogout(); + + //Create a DB Object for slave + DbUtil slave(db.c_str(),".slave"); + + //Login to slave + if (!slave.connect()) + { + return NDBT_FAILED; + } + + if (slave.selectDb()) + { + return NDBT_FAILED; + } + + if(slave.doQuery(sqlStm.c_str())) + { + return NDBT_FAILED; + } + result = mysql_use_result(slave.getMysql()); + row = mysql_fetch_row(result); + slaveCount = atoi(row[0]); + mysql_free_result(result); + + if(slaveCount != masterCount) + { + g_err << "Verify Load -> Slave Count != Master Count " + << endl; + return NDBT_FAILED; + } + return NDBT_OK; +} + +/**** Test Section ****/ + +int +createDB(NDBT_Context* ctx, NDBT_Step* step) +{ + //Setup the BaseString db to use throughout + db.assign("TEST_DB"); + + //Create a dbutil object + DbUtil master("mysql",""); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + //Check to see if db already there + if (master.selectDb(db.c_str())) + { + return NDBT_FAILED; + } + + //Create TEST_DB + if (master.doQuery("CREATE DATABASE TEST_DB") != 0) + { + return NDBT_FAILED; + } + return NDBT_OK; +} + +int +createTable_rep1(NDBT_Context* ctx, NDBT_Step* step) +{ + BaseString table; + table.assign("rep1"); + + //Ensure slave is up and ready + if(syncSlaveWithMaster() != 0) + { + g_err << "Create Table -> Syncing with slave failed" + << endl; + return NDBT_FAILED; + } + + //Create an SQL Object + DbUtil master(db.c_str(),""); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + // Set the database we want + if(master.selectDb()) + { + return NDBT_FAILED; + } + + sqlStm.assign("CREATE TABLE rep1 (c1 MEDIUMINT NOT NULL AUTO_INCREMENT," + " c2 FLOAT, c3 CHAR(5), c4 bit(8), c5 FLOAT, c6 INT," + " c7 INT, PRIMARY KEY (c1))ENGINE=NDB"); + + if (master.doQuery(sqlStm.c_str())) + { + return NDBT_FAILED; + } + ctx->setProperty("TABLES",table.c_str()); + HugoTransactions hugoTrans(*ctx->getTab()); + + if (hugoTrans.loadTable(GETNDB(step), t1_records, 1, true, 0) != 0) + { + g_err << "Create Table -> Load failed!" << endl; + return NDBT_FAILED; + } + + if(verifySlaveLoad(&table)!= 0) + { + g_err << "Create Table -> Failed on verify slave load!" + << endl; + return NDBT_FAILED; + } + //else everything is okay + return NDBT_OK; +} + +int +stressNDB_rep1(NDBT_Context* ctx, NDBT_Step* step) +{ + const NdbDictionary::Table * table= ctx->getTab(); + HugoTransactions hugoTrans(* table); + while(!ctx->isTestStopped()) + { + if (hugoTrans.pkUpdateRecords(GETNDB(step), t1_records, 1, 30) != 0) + { + g_err << "pkUpdate Failed!" << endl; + return NDBT_FAILED; + } + if (hugoTrans.scanUpdateRecords(GETNDB(step), t1_records, 1, 30) != 0) + { + g_err << "scanUpdate Failed!" << endl; + return NDBT_FAILED; + } + } + return NDBT_OK; +} + +int +stressSQL_rep1(NDBT_Context* ctx, NDBT_Step* step) +{ + //Create an SQL Object + DbUtil master(db.c_str(),""); + int loops = ctx->getNumLoops(); + uint record = 0; + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + if(master.selectDb()) + { + ctx->stopTest(); + return NDBT_FAILED; + } + + for (int j= 0; loops == 0 || j < loops; j++) + { + record = urandom(t1_records); + sqlStm.assfmt("UPDATE TEST_DB.rep1 SET c2 = 33.3221 where c1 = %u", record); + if(master.doQuery(sqlStm.c_str())) + { + return NDBT_FAILED; + } + } + ctx->stopTest(); + return NDBT_OK; +} + +int +verifySlave_rep1(NDBT_Context* ctx, NDBT_Step* step) +{ + if(syncSlaveWithMaster() != 0) + { + g_err << "Verify Slave rep1 -> Syncing with slave failed" + << endl; + return NDBT_FAILED; + } + //Create SQL Objects + DbUtil master(db.c_str(),""); + DbUtil slave(db.c_str(),".slave"); + MYSQL_RES *resource; + MYSQL_ROW row; + float masterSum; + float slaveSum; + + sqlStm.assign("SELECT SUM(c3) FROM rep1"); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + if(master.selectDb()) + { + return NDBT_FAILED; + } + + if(master.doQuery(sqlStm.c_str())) + { + return NDBT_FAILED; + } + resource = mysql_use_result(master.getMysql()); + row = mysql_fetch_row(resource); + masterSum = atoi(row[0]); + mysql_free_result(resource); + master.databaseLogout(); + + //Login to slave + if (!slave.connect()) + { + return NDBT_FAILED; + } + + if(slave.selectDb() != 0) + { + return NDBT_FAILED; + } + + if((slave.doQuery(sqlStm.c_str())) != 0) + { + return NDBT_FAILED; + } + resource = mysql_use_result(slave.getMysql()); + row = mysql_fetch_row(resource); + slaveSum = atoi(row[0]); + mysql_free_result(resource); + + if(masterSum != slaveSum) + { + g_err << "VerifySlave -> masterSum != slaveSum..." << endl; + return NDBT_FAILED; + } + return NDBT_OK; +} + +int +dropTEST_DB(NDBT_Context* ctx, NDBT_Step* step) +{ + //Create an SQL Object + DbUtil master(db.c_str(),""); + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + if(master.selectDb() != 0) + { + return NDBT_FAILED; + } + + if(master.doQuery("DROP DATABASE TEST_DB") != 0) + { + return NDBT_FAILED; + } + + if(syncSlaveWithMaster() != 0) + { + g_err << "Drop DB -> Syncing with slave failed" + << endl; + return NDBT_FAILED; + } + return NDBT_OK; +} + +NDBT_TESTSUITE(NdbRepStress); +TESTCASE("PHASE_I_Stress","Basic Replication Stressing") +{ + INITIALIZER(createDB); + INITIALIZER(createTable_rep1); + STEP(stressNDB_rep1); + STEP(stressSQL_rep1); + FINALIZER(verifySlave_rep1); + FINALIZER(dropTEST_DB); +} +NDBT_TESTSUITE_END(NdbRepStress); + +int main(int argc, const char** argv){ + ndb_init(); + NdbRepStress.setCreateAllTables(true); + return NdbRepStress.execute(argc, argv); +} + +template class Vector; +template class Vector; +template class Vector; +template class Vector >; diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp index 0611fb2ad4a..f6c2aee4df5 100755 --- a/storage/ndb/test/src/DbUtil.cpp +++ b/storage/ndb/test/src/DbUtil.cpp @@ -215,23 +215,57 @@ DbUtil::printStError(MYSQL_STMT *stmt, const char *msg) /* Select which database to use */ int -DbUtil::select_DB() +DbUtil::selectDb() { - return mysql_select_db(this->getMysql(), this->getDbName()); + if ((this->getDbName()) != NULL) + { + if(mysql_select_db(this->getMysql(), this->getDbName())) + { + this->printError("mysql_select_db failed"); + return DBU_FAILED; + } + return DBU_OK; + } + this->printError("getDbName() == NULL"); + return DBU_FAILED; } +int +DbUtil::selectDb(const char * m_db) +{ + { + if(mysql_select_db(this->getMysql(), m_db)) + { + this->printError("mysql_select_db failed"); + return DBU_FAILED; + } + return DBU_OK; + } +} + + /* Run Simple Queries */ int DbUtil::doQuery(char * stm) { - return mysql_query(this->getMysql(), stm); + if(mysql_query(this->getMysql(), stm)) + { + this->printError(stm); + return DBU_FAILED; + } + return DBU_OK; } int DbUtil::doQuery(const char * stm) { - return mysql_query(this->getMysql(), stm); + if(mysql_query(this->getMysql(), stm)) + { + this->printError(stm); + return DBU_FAILED; + } + return DBU_OK; } /* Return MySQL Error String */ From 9b14ac8d0199e0f53fa857e85af78a7b1d715e36 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 14:51:08 +0800 Subject: [PATCH 049/527] Fix for view.test. the result should be added by 1 by the year(now()) function. mysql-test/r/view.result: SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; the above statement in test file has a year(now()) function, the result should increase by 1 from 2007 year to 2008 year. --- mysql-test/r/view.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 8d9d802949d..1a1a5f68c6c 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2698,12 +2698,12 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75; Age -43 -39 +44 +40 SELECT * FROM v1; Age -43 -39 +44 +40 DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); From 19d9e946fb645edfff6b689de427bbae6c23561c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 10:38:56 +0100 Subject: [PATCH 050/527] Disabled storedproc_06 for all engines due to bug 33464. BitKeeper/etc/ignore: Added mysql-test/funcs_1.tar mysql-test/suite/funcs_1.tar.gz to the ignore list --- .bzrignore | 2 ++ mysql-test/suite/funcs_1/t/disabled.def | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.bzrignore b/.bzrignore index b0e4d3ef18b..4477d4f1243 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3013,3 +3013,5 @@ ylwrap zlib/*.ds? zlib/*.vcproj mysql-test/funcs_1.log +mysql-test/funcs_1.tar +mysql-test/suite/funcs_1.tar.gz diff --git a/mysql-test/suite/funcs_1/t/disabled.def b/mysql-test/suite/funcs_1/t/disabled.def index 1d08d3506bc..7eab49dfd62 100644 --- a/mysql-test/suite/funcs_1/t/disabled.def +++ b/mysql-test/suite/funcs_1/t/disabled.def @@ -10,4 +10,8 @@ # ############################################################################## +innodb_storedproc_06 : bug#33464 DROP FUNCTION let server hang +myisam_storedproc_06 : bug#33464 DROP FUNCTION let server hang +memory_storedproc_06 : bug#33464 DROP FUNCTION let server hang +ndb_storedproc_06 : bug#33464 DROP FUNCTION let server hang ndb__datadict: 2007-10-08 mleich Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results From d84a0e5caa26602b282695b52417cf7d9b667e7e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 13:15:50 +0100 Subject: [PATCH 051/527] Bug#31931 Partitions: unjustified 'mix of handlers' error message Problem was that the mix of handlers was not consistent between CREATE and ALTER changed so that it works like: - All partitions must use the same engine AND it must be the same as the table. - if one does NOT specify an engine on the table level then one must either NOT specify any engine on any partition/subpartition OR for ALL partitions/subpartitions Note: that after a table have been created, the storage engine is specified for all parts of the table (table/partition/subpartition) and so when using alter, one does not need to specify it (unless one wants to change the storage engine, then one have to specify it on the table level) mysql-test/r/partition.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/r/partition_innodb.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/ndb/r/ndb_partition_key.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/ndb/t/ndb_partition_key.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case update mysql-test/suite/parts/inc/partition_engine.inc: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/suite/parts/r/ndb_partition_key.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#31931 Partitions: unjustified 'mix of handlers' error message test result updated mysql-test/suite/parts/t/ndb_partition_key.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/t/partition.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated mysql-test/t/partition_innodb.test: Bug#31931 Partitions: unjustified 'mix of handlers' error message test case updated sql/partition_info.cc: Bug#31931 Partitions: unjustified 'mix of handlers' error message moved the check_engine_condition here from sql_partition.cc created a new check_engine_mix from check_native_partitioned in sql_partition.cc sql/partition_info.h: Bug#31931 Partitions: unjustified 'mix of handlers' error message non static function check_engine_mix (now used in sql_partition.cc) sql/sql_partition.cc: Bug#31931 Partitions: unjustified 'mix of handlers' error message moved check_engine_condition to partition_info.cc and moved out some common code in check_native_partitioned to check_engine_mix in partition_info.cc --- mysql-test/r/partition.result | 2 - mysql-test/r/partition_innodb.result | 9 +- .../suite/ndb/r/ndb_partition_key.result | 7 +- mysql-test/suite/ndb/t/ndb_partition_key.test | 13 +- .../suite/parts/inc/partition_engine.inc | 50 +- .../suite/parts/r/ndb_partition_key.result | 7 +- .../parts/r/partition_engine_innodb.result | 2640 +--------------- .../parts/r/partition_engine_myisam.result | 2716 +---------------- .../suite/parts/t/ndb_partition_key.test | 12 +- mysql-test/t/partition.test | 7 +- mysql-test/t/partition_innodb.test | 7 +- sql/partition_info.cc | 247 +- sql/partition_info.h | 2 +- sql/sql_partition.cc | 144 +- 14 files changed, 360 insertions(+), 5503 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index a361a8f6bcc..2cf3cffb038 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -536,11 +536,9 @@ t1 CREATE TABLE `t1` ( alter table t1 partition by key(a) (partition p0, partition p1 engine=heap); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL alter table t1 partition by key(a) (partition p0 engine=heap, partition p1); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL alter table t1 engine=heap partition by key (a) diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 5cbe34c94ca..ac9b548b19e 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -79,8 +79,7 @@ engine = innodb partition by list (a) (partition p0 values in (0)); alter table t1 engine = x; -Warnings: -Warning 1286 Unknown table engine 'x' +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL show create table t1; Table Create Table t1 CREATE TABLE `t1` ( @@ -151,9 +150,11 @@ DROP TABLE t1; create table t1 (int_column int, char_column char(5)) PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); -alter table t1 PARTITION BY RANGE (int_column) +alter table t1 +ENGINE = MyISAM +PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 -(PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); +(PARTITION p1 VALUES LESS THAN (5)); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/ndb/r/ndb_partition_key.result b/mysql-test/suite/ndb/r/ndb_partition_key.result index 60e96ce03b6..5daa590482d 100644 --- a/mysql-test/suite/ndb/r/ndb_partition_key.result +++ b/mysql-test/suite/ndb/r/ndb_partition_key.result @@ -88,6 +88,12 @@ PARTITION BY KEY(a) 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; @@ -143,7 +149,6 @@ t1 CREATE TABLE `t1` ( alter table t1 partition by key(a) (partition p0 engine=ndb, partition p1); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL alter table t1 engine=ndb partition by key(a) diff --git a/mysql-test/suite/ndb/t/ndb_partition_key.test b/mysql-test/suite/ndb/t/ndb_partition_key.test index 78e2c9d15c2..af0852976b3 100644 --- a/mysql-test/suite/ndb/t/ndb_partition_key.test +++ b/mysql-test/suite/ndb/t/ndb_partition_key.test @@ -75,6 +75,14 @@ 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); @@ -112,7 +120,10 @@ show create table t1; alter table t1 remove partitioning; show create table t1; ---error ER_MIX_HANDLER_ERROR +# 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); diff --git a/mysql-test/suite/parts/inc/partition_engine.inc b/mysql-test/suite/parts/inc/partition_engine.inc index 769e3d71530..d2f3277cf6d 100644 --- a/mysql-test/suite/parts/inc/partition_engine.inc +++ b/mysql-test/suite/parts/inc/partition_engine.inc @@ -83,6 +83,7 @@ DROP TABLE t1; --echo # 3 Some but not all named partitions or subpartitions get a storage --echo # engine assigned --echo #------------------------------------------------------------------------ +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -90,10 +91,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 STORAGE ENGINE = $engine, PARTITION part2 ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -101,10 +99,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 , PARTITION part2 STORAGE ENGINE = $engine ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -117,10 +112,8 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +--echo # this should fail with ER_MIX_HANDLER_ERROR +--echo # after fixing Bug#33722 eval CREATE TABLE t1 ( $column_list ) @@ -142,6 +135,9 @@ DROP TABLE t1; --echo # 4 Storage engine assignment after partition name + after name of --echo # subpartitions belonging to another partition --echo #------------------------------------------------------------------------ +--echo # this should work +--echo # after fixing Bug#33722 +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -154,10 +150,13 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +#--source suite/parts/inc/partition_check.inc +#DROP TABLE t1; +--echo # this should work +--echo # after fixing Bug#33722 +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -170,10 +169,10 @@ SUBPARTITION BY HASH(f_int1) (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; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +#--source suite/parts/inc/partition_check.inc +#DROP TABLE t1; # --echo #------------------------------------------------------------------------ --echo # 5 Precedence of storage engine assignments (if there is any) @@ -210,6 +209,9 @@ DROP TABLE t1; --echo # 6.2 Storage engine assignment after partition name + after --echo # subpartition name # in partition part + in sub partition part +--echo # this should work +--echo # after fixing Bug#33722 +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -222,10 +224,10 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; ---source suite/parts/inc/partition_check.inc -DROP TABLE t1; +#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +#--source suite/parts/inc/partition_check.inc +#DROP TABLE t1; --echo #------------------------------------------------------------------------ --echo # 6 Session default engine differs from engine used within create table diff --git a/mysql-test/suite/parts/r/ndb_partition_key.result b/mysql-test/suite/parts/r/ndb_partition_key.result index daac61fb530..00565a3979d 100644 --- a/mysql-test/suite/parts/r/ndb_partition_key.result +++ b/mysql-test/suite/parts/r/ndb_partition_key.result @@ -88,6 +88,12 @@ PARTITION BY KEY(a) 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; @@ -143,7 +149,6 @@ t1 CREATE TABLE `t1` ( alter table t1 partition by key(a) (partition p0 engine=ndb, partition p1); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL alter table t1 engine=ndb partition by key(a) diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result index 04a5a492269..05242b3bf3f 100644 --- a/mysql-test/suite/parts/r/partition_engine_innodb.result +++ b/mysql-test/suite/parts/r/partition_engine_innodb.result @@ -1416,445 +1416,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 STORAGE ENGINE = 'InnoDB', PARTITION part2 ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +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, @@ -1866,445 +1428,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 , PARTITION part2 STORAGE ENGINE = 'InnoDB' ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = InnoDB, PARTITION part2 ENGINE = InnoDB) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +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, @@ -2321,443 +1445,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should fail with ER_MIX_HANDLER_ERROR +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3215,6 +1905,8 @@ DROP TABLE t1; # 4 Storage engine assignment after partition name + after name of # subpartitions belonging to another partition #------------------------------------------------------------------------ +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3231,443 +1923,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3684,443 +1942,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'InnoDB' (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 5 Precedence of storage engine assignments (if there is any) #------------------------------------------------------------------------ @@ -5031,6 +2853,8 @@ TRUNCATE t1; DROP TABLE t1; # 6.2 Storage engine assignment after partition name + after # subpartition name +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -5047,443 +2871,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ - -# 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 able 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# 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; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 6 Session default engine differs from engine used within create table #------------------------------------------------------------------------ diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result index f81becc6eea..fd21e687eb0 100644 --- a/mysql-test/suite/parts/r/partition_engine_myisam.result +++ b/mysql-test/suite/parts/r/partition_engine_myisam.result @@ -1450,455 +1450,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 STORAGE ENGINE = 'MyISAM', PARTITION part2 ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +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, @@ -1910,455 +1462,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 , PARTITION part2 STORAGE ENGINE = 'MyISAM' ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION part1 ENGINE = MyISAM, PARTITION part2 ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +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, @@ -2375,457 +1479,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should fail with ER_MIX_HANDLER_ERROR +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3297,6 +1953,8 @@ DROP TABLE t1; # 4 Storage engine assignment after partition name + after name of # subpartitions belonging to another partition #------------------------------------------------------------------------ +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3313,457 +1971,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -3780,457 +1990,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'MyISAM' (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 5 Precedence of storage engine assignments (if there is any) #------------------------------------------------------------------------ @@ -5165,6 +2925,8 @@ TRUNCATE t1; DROP TABLE t1; # 6.2 Storage engine assignment after partition name + after # subpartition name +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -5181,457 +2943,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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 status OK -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -CHECKSUM TABLE t1 EXTENDED; -Table Checksum -test.t1 -OPTIMIZE TABLE t1; -Table Op Msg_type Msg_text -test.t1 optimize status OK -# check layout success: 1 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair status OK -# check layout success: 1 -TRUNCATE t1; - -# check TRUNCATE success: 1 -# check layout success: 1 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 6 Session default engine differs from engine used within create table #------------------------------------------------------------------------ diff --git a/mysql-test/suite/parts/t/ndb_partition_key.test b/mysql-test/suite/parts/t/ndb_partition_key.test index fb0581eb6f6..36a8a1863aa 100644 --- a/mysql-test/suite/parts/t/ndb_partition_key.test +++ b/mysql-test/suite/parts/t/ndb_partition_key.test @@ -75,6 +75,14 @@ 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); @@ -112,7 +120,9 @@ show create table t1; alter table t1 remove partitioning; show create table t1; ---error ER_MIX_HANDLER_ERROR +#--error ER_MIX_HANDLER_ERROR +# after fixing bug#31931 this works +# since it already have ndb on table level alter table t1 partition by key(a) (partition p0 engine=ndb, partition p1); diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..1ba8402cdf0 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -49,6 +49,7 @@ create table t1 (id int auto_increment, s1 int, primary key (id)); insert into t1 values (null,1); insert into t1 values (null,6); +-- sorted_result select * from t1; alter table t1 partition by range (id) ( @@ -618,12 +619,14 @@ partition by key (a) (partition p0, partition p1); show create table t1; ---error ER_MIX_HANDLER_ERROR +# Since alter, it already have ENGINE=HEAP from before on table level +# -> OK alter table t1 partition by key(a) (partition p0, partition p1 engine=heap); ---error ER_MIX_HANDLER_ERROR +# Since alter, it already have ENGINE=HEAP from before on table level +# -> OK alter table t1 partition by key(a) (partition p0 engine=heap, partition p1); diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 58010f85ecf..5445be6019e 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -86,6 +86,7 @@ engine = innodb partition by list (a) (partition p0 values in (0)); +-- error ER_MIX_HANDLER_ERROR alter table t1 engine = x; show create table t1; drop table t1; @@ -164,8 +165,10 @@ DROP TABLE t1; create table t1 (int_column int, char_column char(5)) PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 (PARTITION p1 VALUES LESS THAN (5) ENGINE = InnoDB); -alter table t1 PARTITION BY RANGE (int_column) +alter table t1 +ENGINE = MyISAM +PARTITION BY RANGE (int_column) subpartition by key (char_column) subpartitions 2 - (PARTITION p1 VALUES LESS THAN (5) ENGINE = myisam); + (PARTITION p1 VALUES LESS THAN (5)); show create table t1; drop table t1; diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3b580422da1..cc7a7f17577 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -419,41 +419,167 @@ char *partition_info::has_unique_names() /* - Check that all partitions use the same storage engine. - This is currently a limitation in this version. + Check that the partition/subpartition is setup to use the correct + storage engine + SYNOPSIS + check_engine_condition() + p_elem Partition element + table_engine_set Have user specified engine on table level + inout::engine_type Current engine used + inout::first Is it first partition + RETURN VALUE + TRUE Failed check + FALSE Ok + DESCRIPTION + Specified engine for table and partitions p0 and pn + Must be correct both on CREATE and ALTER commands + table p0 pn res (0 - OK, 1 - FAIL) + - - - 0 + - - x 1 + - x - 1 + - x x 0 + x - - 0 + x - x 0 + x x - 0 + x x x 0 + i.e: + - All subpartitions must use the same engine + AND it must be the same as the partition. + - All partitions must use the same engine + AND it must be the same as the table. + - if one does NOT specify an engine on the table level + then one must either NOT specify any engine on any + partition/subpartition OR for ALL partitions/subpartitions + Note: + When ALTER a table, the engines are already set for all levels + (table, all partitions and subpartitions). So if one want to + change the storage engine, one must specify it on the table level +*/ + +static bool check_engine_condition(partition_element *p_elem, + bool table_engine_set, + handlerton **engine_type, + bool *first) +{ + DBUG_ENTER("check_engine_condition"); + + DBUG_PRINT("enter", ("p_eng %u t_eng %u t_eng_set %u first %u state %u", + ha_legacy_type(p_elem->engine_type), + ha_legacy_type(*engine_type), + table_engine_set, *first, p_elem->part_state)); + if (*first && !table_engine_set) + { + *engine_type= p_elem->engine_type; + DBUG_PRINT("info", ("setting table_engine = %u", + ha_legacy_type(*engine_type))); + } + *first= FALSE; + if ((table_engine_set && + (p_elem->engine_type != (*engine_type) && + p_elem->engine_type)) || + (!table_engine_set && + p_elem->engine_type != (*engine_type))) + { + DBUG_RETURN(TRUE); + } + else + { + DBUG_RETURN(FALSE); + } +} + + +/* + Check engine mix that it is correct + Current limitation is that all partitions and subpartitions + must use the same storage engine. SYNOPSIS check_engine_mix() - engine_array An array of engine identifiers - no_parts Total number of partitions - + inout::engine_type Current engine used + table_engine_set Have user specified engine on table level RETURN VALUE - TRUE Error, mixed engines - FALSE Ok, no mixed engines + TRUE Error, mixed engines + FALSE Ok, no mixed engines DESCRIPTION Current check verifies only that all handlers are the same. Later this check will be more sophisticated. + (specified partition handler ) specified table handler + (NDB, NDB) NDB OK + (MYISAM, MYISAM) - OK + (MYISAM, -) - NOT OK + (MYISAM, -) MYISAM OK + (- , MYISAM) - NOT OK + (- , -) MYISAM OK + (-,-) - OK + (NDB, MYISAM) * NOT OK */ -bool partition_info::check_engine_mix(handlerton **engine_array, uint no_parts) +bool partition_info::check_engine_mix(handlerton *engine_type, + bool table_engine_set) { - uint i= 0; + handlerton *old_engine_type= engine_type; + bool first= TRUE; + uint no_parts= partitions.elements; DBUG_ENTER("partition_info::check_engine_mix"); - - do + DBUG_PRINT("info", ("in: engine_type = %u, table_engine_set = %u", + ha_legacy_type(engine_type), + table_engine_set)); + if (no_parts) { - if (engine_array[i] != engine_array[0]) + List_iterator part_it(partitions); + uint i= 0; + do { - my_error(ER_MIX_HANDLER_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - } while (++i < no_parts); - if (engine_array[0]->flags & HTON_NO_PARTITION) + partition_element *part_elem= part_it++; + DBUG_PRINT("info", ("part = %d engine = %d table_engine_set %u", + i, ha_legacy_type(part_elem->engine_type), + table_engine_set)); + if (is_sub_partitioned() && + part_elem->subpartitions.elements) + { + uint no_subparts= part_elem->subpartitions.elements; + uint j= 0; + List_iterator sub_it(part_elem->subpartitions); + do + { + partition_element *sub_elem= sub_it++; + DBUG_PRINT("info", ("sub = %d engine = %u table_engie_set %u", + j, ha_legacy_type(sub_elem->engine_type), + table_engine_set)); + if (check_engine_condition(sub_elem, table_engine_set, + &engine_type, &first)) + goto error; + } while (++j < no_subparts); + /* ensure that the partition also has correct engine */ + if (check_engine_condition(part_elem, table_engine_set, + &engine_type, &first)) + goto error; + } + else if (check_engine_condition(part_elem, table_engine_set, + &engine_type, &first)) + goto error; + } while (++i < no_parts); + } + DBUG_PRINT("info", ("engine_type = %u", + ha_legacy_type(engine_type))); + if (!engine_type) + engine_type= old_engine_type; + if (engine_type->flags & HTON_NO_PARTITION) { my_error(ER_PARTITION_MERGE_ERROR, MYF(0)); DBUG_RETURN(TRUE); } + DBUG_PRINT("info", ("out: engine_type = %u", + ha_legacy_type(engine_type))); + DBUG_ASSERT(engine_type != partition_hton); DBUG_RETURN(FALSE); +error: + /* + Mixed engines not yet supported but when supported it will need + the partition handler + */ + DBUG_RETURN(TRUE); } @@ -726,12 +852,12 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, handler *file, HA_CREATE_INFO *info, bool check_partition_function) { - handlerton **engine_array= NULL; - uint part_count= 0; + handlerton *table_engine= default_engine_type; uint i, tot_partitions; - bool result= TRUE; + bool result= TRUE, table_engine_set; char *same_name; DBUG_ENTER("partition_info::check_partition_info"); + DBUG_ASSERT(default_engine_type != partition_hton); if (check_partition_function) { @@ -777,23 +903,49 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0)); goto end; } + /* + if NOT specified ENGINE = : + If Create, always use create_info->db_type + else, use previous tables db_type + either ALL or NONE partition should be set to + default_engine_type when not table_engine_set + Note: after a table is created its storage engines for + the table and all partitions/subpartitions are set. + So when ALTER it is already set on table level + */ + if (thd->lex->create_info.used_fields & HA_CREATE_USED_ENGINE) + { + table_engine_set= TRUE; + table_engine= thd->lex->create_info.db_type; + } + else + { + table_engine_set= FALSE; + if (thd->lex->sql_command != SQLCOM_CREATE_TABLE) + { + table_engine_set= TRUE; + DBUG_ASSERT(table_engine && table_engine != partition_hton); + } + } + if ((same_name= has_unique_names())) { my_error(ER_SAME_NAME_PARTITION, MYF(0), same_name); goto end; } - engine_array= (handlerton**)my_malloc(tot_partitions * sizeof(handlerton *), - MYF(MY_WME)); - if (unlikely(!engine_array)) - goto end; i= 0; { List_iterator part_it(partitions); + uint no_parts_not_set= 0; + uint prev_no_subparts_not_set= no_subparts + 1; do { partition_element *part_elem= part_it++; if (part_elem->engine_type == NULL) + { + no_parts_not_set++; part_elem->engine_type= default_engine_type; + } if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) part_elem->data_file_name= part_elem->index_file_name= 0; if (!is_sub_partitioned()) @@ -804,13 +956,13 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, my_error(ER_WRONG_PARTITION_NAME, MYF(0)); goto end; } - DBUG_PRINT("info", ("engine = %d", - ha_legacy_type(part_elem->engine_type))); - engine_array[part_count++]= part_elem->engine_type; + DBUG_PRINT("info", ("part = %d engine = %d", + i, ha_legacy_type(part_elem->engine_type))); } else { uint j= 0; + uint no_subparts_not_set= 0; List_iterator sub_it(part_elem->subpartitions); do { @@ -822,19 +974,49 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, goto end; } if (sub_elem->engine_type == NULL) + { sub_elem->engine_type= default_engine_type; - DBUG_PRINT("info", ("engine = %u", - ha_legacy_type(sub_elem->engine_type))); - engine_array[part_count++]= sub_elem->engine_type; + no_subparts_not_set++; + } + DBUG_PRINT("info", ("part = %d sub = %d engine = %u", + i, j, ha_legacy_type(sub_elem->engine_type))); } while (++j < no_subparts); + if (prev_no_subparts_not_set == (no_subparts + 1)) + prev_no_subparts_not_set= no_subparts_not_set; + if (!table_engine_set && + prev_no_subparts_not_set == no_subparts_not_set && + no_subparts_not_set != 0 && + no_subparts_not_set != no_subparts) + { + DBUG_PRINT("info", ("no_subparts_not_set = %u no_subparts = %u", + no_subparts_not_set, no_subparts)); + my_error(ER_MIX_HANDLER_ERROR, MYF(0)); + goto end; + } } } while (++i < no_parts); + if (!table_engine_set && + no_parts_not_set != 0 && + no_parts_not_set != no_parts) + { + DBUG_PRINT("info", ("no_parts_not_set = %u no_parts = %u", + no_parts_not_set, no_subparts)); + my_error(ER_MIX_HANDLER_ERROR, MYF(0)); + goto end; + } } - if (unlikely(partition_info::check_engine_mix(engine_array, part_count))) + if (unlikely(check_engine_mix(table_engine, table_engine_set))) + { + my_error(ER_MIX_HANDLER_ERROR, MYF(0)); goto end; + } + if (table_engine == partition_hton) + DBUG_PRINT("info", ("Table engine set to partition_hton")); + DBUG_ASSERT(default_engine_type == table_engine); if (eng_type) - *eng_type= (handlerton*)engine_array[0]; + *eng_type= table_engine; + /* We need to check all constant expressions that they are of the correct @@ -850,7 +1032,6 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } result= FALSE; end: - my_free((char*)engine_array,MYF(MY_ALLOW_ZERO_PTR)); DBUG_RETURN(result); } diff --git a/sql/partition_info.h b/sql/partition_info.h index b7d13e188f3..b38e572d3aa 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -269,7 +269,7 @@ public: bool set_up_defaults_for_partitioning(handler *file, HA_CREATE_INFO *info, uint start_no); char *has_unique_names(); - static bool check_engine_mix(handlerton **engine_array, uint no_parts); + bool check_engine_mix(handlerton *engine_type, bool default_engine); bool check_range_constants(); bool check_list_constants(); bool check_partition_info(THD *thd, handlerton **eng_type, diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index ce70e177a85..d10ee3fa408 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3863,6 +3863,8 @@ bool mysql_unpack_partition(THD *thd, if (!part_info->default_engine_type) part_info->default_engine_type= default_db_type; DBUG_ASSERT(part_info->default_engine_type == default_db_type); + DBUG_ASSERT(part_info->default_engine_type->db_type != DB_TYPE_UNKNOWN); + DBUG_ASSERT(part_info->default_engine_type != partition_hton); { /* @@ -3996,56 +3998,6 @@ static int fast_end_partition(THD *thd, ulonglong copied, } -/* - Check engine mix that it is correct - SYNOPSIS - check_engine_condition() - p_elem Partition element - default_engine Have user specified engine on table level - inout::engine_type Current engine used - inout::first Is it first partition - RETURN VALUE - TRUE Failed check - FALSE Ok - DESCRIPTION - (specified partition handler ) specified table handler - (NDB, NDB) NDB OK - (MYISAM, MYISAM) - OK - (MYISAM, -) - NOT OK - (MYISAM, -) MYISAM OK - (- , MYISAM) - NOT OK - (- , -) MYISAM OK - (-,-) - OK - (NDB, MYISAM) * NOT OK -*/ - -static bool check_engine_condition(partition_element *p_elem, - bool default_engine, - handlerton **engine_type, - bool *first) -{ - DBUG_ENTER("check_engine_condition"); - - DBUG_PRINT("enter", ("def_eng = %u, first = %u", default_engine, *first)); - if (*first && default_engine) - { - *engine_type= p_elem->engine_type; - } - *first= FALSE; - if ((!default_engine && - (p_elem->engine_type != (*engine_type) && - p_elem->engine_type)) || - (default_engine && - p_elem->engine_type != (*engine_type))) - { - DBUG_RETURN(TRUE); - } - else - { - DBUG_RETURN(FALSE); - } -} - /* We need to check if engine used by all partitions can handle partitioning natively. @@ -4070,52 +4022,30 @@ static bool check_engine_condition(partition_element *p_elem, static bool check_native_partitioned(HA_CREATE_INFO *create_info,bool *ret_val, partition_info *part_info, THD *thd) { - List_iterator part_it(part_info->partitions); - bool first= TRUE; - bool default_engine; - handlerton *engine_type= create_info->db_type; + bool table_engine_set; + handlerton *engine_type= part_info->default_engine_type; handlerton *old_engine_type= engine_type; - uint i= 0; - uint no_parts= part_info->partitions.elements; DBUG_ENTER("check_native_partitioned"); - default_engine= (create_info->used_fields & HA_CREATE_USED_ENGINE) ? - FALSE : TRUE; - DBUG_PRINT("info", ("engine_type = %u, default = %u", - ha_legacy_type(engine_type), - default_engine)); - if (no_parts) + if (create_info->used_fields & HA_CREATE_USED_ENGINE) { - do - { - partition_element *part_elem= part_it++; - if (part_info->is_sub_partitioned() && - part_elem->subpartitions.elements) - { - uint no_subparts= part_elem->subpartitions.elements; - uint j= 0; - List_iterator sub_it(part_elem->subpartitions); - do - { - partition_element *sub_elem= sub_it++; - if (check_engine_condition(sub_elem, default_engine, - &engine_type, &first)) - goto error; - } while (++j < no_subparts); - /* - In case of subpartitioning and defaults we allow that only - subparts have specified engines, as long as the parts haven't - specified the wrong engine it's ok. - */ - if (check_engine_condition(part_elem, FALSE, - &engine_type, &first)) - goto error; - } - else if (check_engine_condition(part_elem, default_engine, - &engine_type, &first)) - goto error; - } while (++i < no_parts); + table_engine_set= TRUE; + engine_type= create_info->db_type; } + else + { + table_engine_set= FALSE; + if (thd->lex->sql_command != SQLCOM_CREATE_TABLE) + { + table_engine_set= TRUE; + DBUG_ASSERT(engine_type && engine_type != partition_hton); + } + } + DBUG_PRINT("info", ("engine_type = %u, table_engine_set = %u", + ha_legacy_type(engine_type), + table_engine_set)); + if (part_info->check_engine_mix(engine_type, table_engine_set)) + goto error; /* All engines are of the same type. Check if this engine supports @@ -4212,7 +4142,7 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, my_error(ER_PARTITION_MGMT_ON_NONPARTITIONED, MYF(0)); DBUG_RETURN(TRUE); } - if (alter_info->flags == ALTER_TABLE_REORG) + if (alter_info->flags & ALTER_TABLE_REORG) { uint new_part_no, curr_part_no; if (tab_part_info->part_type != HASH_PARTITION || @@ -4538,7 +4468,7 @@ that are reorganised. tab_part_info->is_auto_partitioned= FALSE; } } - else if (alter_info->flags == ALTER_DROP_PARTITION) + else if (alter_info->flags & ALTER_DROP_PARTITION) { /* Drop a partition from a range partition and list partitioning is @@ -4742,7 +4672,7 @@ state of p1. tab_part_info->is_auto_partitioned= FALSE; } } - else if (alter_info->flags == ALTER_REORGANIZE_PARTITION) + else if (alter_info->flags & ALTER_REORGANIZE_PARTITION) { /* Reorganise partitions takes a number of partitions that are next @@ -4923,8 +4853,8 @@ the generated partition syntax in a correct manner. } *partition_changed= TRUE; thd->work_part_info= tab_part_info; - if (alter_info->flags == ALTER_ADD_PARTITION || - alter_info->flags == ALTER_REORGANIZE_PARTITION) + if (alter_info->flags & ALTER_ADD_PARTITION || + alter_info->flags & ALTER_REORGANIZE_PARTITION) { if (tab_part_info->use_default_subpartitions && !alt_part_info->use_default_subpartitions) @@ -5051,13 +4981,21 @@ the generated partition syntax in a correct manner. DBUG_PRINT("info", ("partition changed")); *partition_changed= TRUE; } - if (create_info->db_type == partition_hton) - { - if (!part_info->default_engine_type) - part_info->default_engine_type= table->part_info->default_engine_type; - } - else + /* + Set up partition default_engine_type either from the create_info + or from the previus table + */ + if (create_info->used_fields & HA_CREATE_USED_ENGINE) part_info->default_engine_type= create_info->db_type; + else + { + if (table->part_info) + part_info->default_engine_type= table->part_info->default_engine_type; + else + part_info->default_engine_type= create_info->db_type; + } + DBUG_ASSERT(part_info->default_engine_type && + part_info->default_engine_type != partition_hton); if (check_native_partitioned(create_info, &is_native_partitioned, part_info, thd)) { @@ -6164,7 +6102,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, goto err; } } - else if (alter_info->flags == ALTER_DROP_PARTITION) + else if (alter_info->flags & ALTER_DROP_PARTITION) { /* Now after all checks and setting state on dropped partitions we can From ed2ab9338e9c0c3aed387e3264ea40b7e792c559 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 15:50:36 +0100 Subject: [PATCH 052/527] fixed sorting differences in results. --- mysql-test/suite/funcs_1/storedproc/storedproc_master.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc index 370bf275ac9..78cb2755f7c 100644 --- a/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc +++ b/mysql-test/suite/funcs_1/storedproc/storedproc_master.inc @@ -2566,6 +2566,7 @@ SELECT db_storedproc.sp1(); alter procedure db_storedproc_3122.sp1 sql security invoker; alter function sp1 sql security invoker; +--sorted_result SELECT db, name, type, security_type from mysql.proc where db LIKE 'db_storedproc%' and specific_name='sp1'; CALL db_storedproc.sp1(); From 5e85c850accc9d9152032424c61018553324575c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 18:54:32 +0100 Subject: [PATCH 053/527] DbUtil.hpp, DbUtil.cpp, NdbRepStress.cpp: More code improvments storage/ndb/test/include/DbUtil.hpp: More code improvments storage/ndb/test/src/DbUtil.cpp: More code improvments storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp: More code improvments --- storage/ndb/test/include/DbUtil.hpp | 7 +- storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp | 309 +++++++++--------- storage/ndb/test/src/DbUtil.cpp | 26 +- 3 files changed, 177 insertions(+), 165 deletions(-) diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index 62aaaf7b5a3..5ca5fca290c 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -90,9 +90,10 @@ public: int connect(); int selectDb(); - int selectDb(const char * m_db); - int doQuery(char * stm); - int doQuery(const char * stm); + int selectDb(const char *); + int createDb(BaseString&); + int doQuery(BaseString&); + int doQuery(const char *); int getErrorNumber(); unsigned long selectCountTable(const char * table); diff --git a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp index 7d9b66d8e72..c3f3649fba1 100644 --- a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp @@ -17,16 +17,15 @@ #include #include #include -#include #include -#include +#include + +/* +Will include restart testing in future phases #include #include -#include -#include +*/ -static BaseString sqlStm; -static BaseString db; static int t1_records = 50000; /**** TOOL SECTION ****/ @@ -42,7 +41,7 @@ static uint urandom(uint m) { if (m == 0) - return 0; + return NDBT_OK; uint r = urandom(); r = r % m; return r; @@ -78,12 +77,6 @@ syncSlaveWithMaster() return NDBT_FAILED; } - //Set the database we are wanting - if (master.selectDb()) - { - return NDBT_FAILED; - } - //Get max epoch from master if(master.doQuery("SELECT MAX(epoch) FROM mysql.ndb_binlog_index")) { @@ -93,7 +86,6 @@ syncSlaveWithMaster() row = mysql_fetch_row(result); masterEpoch = atoi(row[0]); mysql_free_result(result); - master.databaseLogout(); /* Now we will pull current epoch from slave. If not the @@ -111,12 +103,6 @@ syncSlaveWithMaster() return NDBT_FAILED; } - //Set the database we are wanting - if (slave.selectDb()) - { - return NDBT_FAILED; - } - while(slaveEpoch != masterEpoch && loopCnt < maxLoops) { if(slave.doQuery("SELECT epoch FROM mysql.ndb_apply_status")) @@ -153,6 +139,16 @@ syncSlaveWithMaster() int verifySlaveLoad(BaseString *table) { + BaseString sqlStm; + BaseString db; + MYSQL_RES * result; + MYSQL_ROW row; + unsigned int masterCount = 0; + unsigned int slaveCount = 0; + + db.assign("TEST_DB"); + sqlStm.assfmt("SELECT COUNT(*) FROM %s", table); + //First thing to do is sync slave if(syncSlaveWithMaster()) { @@ -161,13 +157,6 @@ verifySlaveLoad(BaseString *table) } //Now that slave is sync we can verify load - sqlStm.assfmt("SELECT COUNT(*) FROM %s", table); - MYSQL_RES * result; - MYSQL_ROW row; - unsigned int masterCount = 0; - unsigned int slaveCount = 0; - - //Create a DB Object for the master DbUtil master(db.c_str()," "); //Login to Master @@ -176,11 +165,6 @@ verifySlaveLoad(BaseString *table) return NDBT_FAILED; } - if (master.selectDb()) - { - return NDBT_FAILED; - } - if(master.doQuery(sqlStm.c_str())) { return NDBT_FAILED; @@ -189,7 +173,6 @@ verifySlaveLoad(BaseString *table) row = mysql_fetch_row(result); masterCount = atoi(row[0]); mysql_free_result(result); - master.databaseLogout(); //Create a DB Object for slave DbUtil slave(db.c_str(),".slave"); @@ -200,11 +183,6 @@ verifySlaveLoad(BaseString *table) return NDBT_FAILED; } - if (slave.selectDb()) - { - return NDBT_FAILED; - } - if(slave.doQuery(sqlStm.c_str())) { return NDBT_FAILED; @@ -223,45 +201,141 @@ verifySlaveLoad(BaseString *table) return NDBT_OK; } -/**** Test Section ****/ - -int -createDB(NDBT_Context* ctx, NDBT_Step* step) +int +createTEST_DB(NDBT_Context* ctx, NDBT_Step* step) { - //Setup the BaseString db to use throughout - db.assign("TEST_DB"); + BaseString cdb; + cdb.assign("TEST_DB"); //Create a dbutil object DbUtil master("mysql",""); + if (master.connect()) + { + if (master.createDb(cdb) == NDBT_OK) + { + return NDBT_OK; + } + } + return NDBT_FAILED; +} + +int +dropTEST_DB(NDBT_Context* ctx, NDBT_Step* step) +{ + //Create an SQL Object + DbUtil master("mysql",""); + //Login to Master if (!master.connect()) { return NDBT_FAILED; } - //Check to see if db already there - if (master.selectDb(db.c_str())) + if(master.doQuery("DROP DATABASE TEST_DB") != NDBT_OK) { return NDBT_FAILED; } - //Create TEST_DB - if (master.doQuery("CREATE DATABASE TEST_DB") != 0) + if(syncSlaveWithMaster() != NDBT_OK) { + g_err << "Drop DB -> Syncing with slave failed" + << endl; return NDBT_FAILED; } return NDBT_OK; } +int +verifySlave(BaseString& sqlStm, BaseString& db) +{ + MYSQL_RES* resource; + MYSQL_ROW row; + float masterSum; + float slaveSum; + + //Create SQL Objects + DbUtil master(db.c_str(),""); + DbUtil slave(db.c_str(),".slave"); + + if(syncSlaveWithMaster() != NDBT_OK) + { + g_err << "Verify Slave rep1 -> Syncing with slave failed" + << endl; + return NDBT_FAILED; + } + + //Login to Master + if (!master.connect()) + { + return NDBT_FAILED; + } + + if(master.doQuery(sqlStm.c_str()) != NDBT_OK) + { + return NDBT_FAILED; + } + resource = mysql_use_result(master.getMysql()); + row = mysql_fetch_row(resource); + masterSum = atoi(row[0]); + mysql_free_result(resource); + + //Login to slave + if (!slave.connect()) + { + return NDBT_FAILED; + } + + if(slave.doQuery(sqlStm.c_str()) != NDBT_OK) + { + return NDBT_FAILED; + } + resource = mysql_use_result(slave.getMysql()); + row = mysql_fetch_row(resource); + slaveSum = atoi(row[0]); + mysql_free_result(resource); + + if(masterSum != slaveSum) + { + g_err << "VerifySlave -> masterSum != slaveSum..." << endl; + return NDBT_FAILED; + } + return NDBT_OK; +} + + +/**** Test Section ****/ + +int +createDB(NDBT_Context* ctx, NDBT_Step* step) +{ + BaseString cdb; + cdb.assign("TEST_DB"); + + //Create a dbutil object + DbUtil master("mysql",""); + + if (master.connect()) + { + if (master.createDb(cdb) == NDBT_OK) + { + return NDBT_OK; + } + } + return NDBT_FAILED; +} + int createTable_rep1(NDBT_Context* ctx, NDBT_Step* step) { BaseString table; + BaseString db; + table.assign("rep1"); + db.assign("TEST_DB"); //Ensure slave is up and ready - if(syncSlaveWithMaster() != 0) + if(syncSlaveWithMaster() != NDBT_OK) { g_err << "Create Table -> Syncing with slave failed" << endl; @@ -277,30 +351,22 @@ createTable_rep1(NDBT_Context* ctx, NDBT_Step* step) return NDBT_FAILED; } - // Set the database we want - if(master.selectDb()) - { - return NDBT_FAILED; - } - - sqlStm.assign("CREATE TABLE rep1 (c1 MEDIUMINT NOT NULL AUTO_INCREMENT," - " c2 FLOAT, c3 CHAR(5), c4 bit(8), c5 FLOAT, c6 INT," - " c7 INT, PRIMARY KEY (c1))ENGINE=NDB"); - - if (master.doQuery(sqlStm.c_str())) + if (master.doQuery("CREATE TABLE rep1 (c1 MEDIUMINT NOT NULL AUTO_INCREMENT," + " c2 FLOAT, c3 CHAR(5), c4 bit(8), c5 FLOAT, c6 INT," + " c7 INT, PRIMARY KEY (c1))ENGINE=NDB")) { return NDBT_FAILED; } ctx->setProperty("TABLES",table.c_str()); HugoTransactions hugoTrans(*ctx->getTab()); - if (hugoTrans.loadTable(GETNDB(step), t1_records, 1, true, 0) != 0) + if (hugoTrans.loadTable(GETNDB(step), t1_records, 1, true, 0) != NDBT_OK) { g_err << "Create Table -> Load failed!" << endl; return NDBT_FAILED; } - if(verifySlaveLoad(&table)!= 0) + if(verifySlaveLoad(&table)!= NDBT_OK) { g_err << "Create Table -> Failed on verify slave load!" << endl; @@ -334,18 +400,14 @@ stressNDB_rep1(NDBT_Context* ctx, NDBT_Step* step) int stressSQL_rep1(NDBT_Context* ctx, NDBT_Step* step) { - //Create an SQL Object - DbUtil master(db.c_str(),""); + BaseString sqlStm; + + DbUtil master("TEST_DB",""); int loops = ctx->getNumLoops(); uint record = 0; //Login to Master if (!master.connect()) - { - return NDBT_FAILED; - } - - if(master.selectDb()) { ctx->stopTest(); return NDBT_FAILED; @@ -367,101 +429,36 @@ stressSQL_rep1(NDBT_Context* ctx, NDBT_Step* step) int verifySlave_rep1(NDBT_Context* ctx, NDBT_Step* step) { - if(syncSlaveWithMaster() != 0) - { - g_err << "Verify Slave rep1 -> Syncing with slave failed" - << endl; - return NDBT_FAILED; - } - //Create SQL Objects - DbUtil master(db.c_str(),""); - DbUtil slave(db.c_str(),".slave"); - MYSQL_RES *resource; - MYSQL_ROW row; - float masterSum; - float slaveSum; + BaseString sql; + BaseString db; - sqlStm.assign("SELECT SUM(c3) FROM rep1"); + sql.assign("SELECT SUM(c3) FROM rep1"); + db.assign("TEST_DB"); - //Login to Master - if (!master.connect()) - { + if (verifySlave(sql,db) != NDBT_OK) return NDBT_FAILED; - } - - if(master.selectDb()) - { - return NDBT_FAILED; - } - - if(master.doQuery(sqlStm.c_str())) - { - return NDBT_FAILED; - } - resource = mysql_use_result(master.getMysql()); - row = mysql_fetch_row(resource); - masterSum = atoi(row[0]); - mysql_free_result(resource); - master.databaseLogout(); - - //Login to slave - if (!slave.connect()) - { - return NDBT_FAILED; - } - - if(slave.selectDb() != 0) - { - return NDBT_FAILED; - } - - if((slave.doQuery(sqlStm.c_str())) != 0) - { - return NDBT_FAILED; - } - resource = mysql_use_result(slave.getMysql()); - row = mysql_fetch_row(resource); - slaveSum = atoi(row[0]); - mysql_free_result(resource); - - if(masterSum != slaveSum) - { - g_err << "VerifySlave -> masterSum != slaveSum..." << endl; - return NDBT_FAILED; - } return NDBT_OK; } -int -dropTEST_DB(NDBT_Context* ctx, NDBT_Step* step) -{ - //Create an SQL Object - DbUtil master(db.c_str(),""); +/* TOOLS LIST - //Login to Master - if (!master.connect()) - { - return NDBT_FAILED; - } + syncSlaveWithMaster() + {ensures slave is at same epoch as master} - if(master.selectDb() != 0) - { - return NDBT_FAILED; - } + verifySlaveLoad(BaseString *table) + {ensures slave table has same record count as master} - if(master.doQuery("DROP DATABASE TEST_DB") != 0) - { - return NDBT_FAILED; - } + createTEST_DB() + {Creates TEST_DB database on master} - if(syncSlaveWithMaster() != 0) - { - g_err << "Drop DB -> Syncing with slave failed" - << endl; - return NDBT_FAILED; - } - return NDBT_OK; -} + dropTEST_DB() + {Drops TEST_DB database on master} + + verifySlave(BaseString& sql, BaseSting& db) + {The SQL statement must sum a column and will verify + that the sum of the column is equal on master & slave} +*/ + NDBT_TESTSUITE(NdbRepStress); TESTCASE("PHASE_I_Stress","Basic Replication Stressing") @@ -481,7 +478,3 @@ int main(int argc, const char** argv){ return NdbRepStress.execute(argc, argv); } -template class Vector; -template class Vector; -template class Vector; -template class Vector >; diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp index f6c2aee4df5..1df4f8f745e 100755 --- a/storage/ndb/test/src/DbUtil.cpp +++ b/storage/ndb/test/src/DbUtil.cpp @@ -99,6 +99,7 @@ DbUtil::databaseLogin(const char* system, const char* usr, mysql_get_server_info(mysql), (unsigned long) mysql_get_server_version(mysql)); #endif + this->selectDb(); } /* Database Connect */ @@ -132,7 +133,7 @@ DbUtil::connect() mysql_close(mysql); return DBU_FAILED; } - + this->selectDb(); m_connected = true; return DBU_OK; } @@ -243,15 +244,32 @@ DbUtil::selectDb(const char * m_db) } } +int +DbUtil::createDb(BaseString& m_db) +{ + BaseString stm; + { + if(mysql_select_db(this->getMysql(), m_db.c_str()) == DBU_OK) + { + stm.assfmt("DROP DATABASE %s", m_db.c_str()); + if(this->doQuery(m_db.c_str()) == DBU_FAILED) + return DBU_FAILED; + } + stm.assfmt("CREATE DATABASE %s", m_db.c_str()); + if(this->doQuery(m_db.c_str()) == DBU_FAILED) + return DBU_FAILED; + return DBU_OK; + } +} /* Run Simple Queries */ int -DbUtil::doQuery(char * stm) +DbUtil::doQuery(BaseString& str) { - if(mysql_query(this->getMysql(), stm)) + if(mysql_query(this->getMysql(), str.c_str())) { - this->printError(stm); + this->printError(str.c_str()); return DBU_FAILED; } return DBU_OK; From 44ccc30b030863dde6a65ac380d5e5e85e32abf6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 9 Jan 2008 19:01:31 +0100 Subject: [PATCH 054/527] NdbRepStress.cpp: More code improvments storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp: More code improvments --- storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp index c3f3649fba1..775e7ec6288 100644 --- a/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp +++ b/storage/ndb/test/ndbapi/acrt/NdbRepStress.cpp @@ -26,8 +26,6 @@ Will include restart testing in future phases #include */ -static int t1_records = 50000; - /**** TOOL SECTION ****/ static uint @@ -360,7 +358,7 @@ createTable_rep1(NDBT_Context* ctx, NDBT_Step* step) ctx->setProperty("TABLES",table.c_str()); HugoTransactions hugoTrans(*ctx->getTab()); - if (hugoTrans.loadTable(GETNDB(step), t1_records, 1, true, 0) != NDBT_OK) + if (hugoTrans.loadTable(GETNDB(step), ctx->getNumRecords(), 1, true, 0) != NDBT_OK) { g_err << "Create Table -> Load failed!" << endl; return NDBT_FAILED; @@ -383,12 +381,12 @@ stressNDB_rep1(NDBT_Context* ctx, NDBT_Step* step) HugoTransactions hugoTrans(* table); while(!ctx->isTestStopped()) { - if (hugoTrans.pkUpdateRecords(GETNDB(step), t1_records, 1, 30) != 0) + if (hugoTrans.pkUpdateRecords(GETNDB(step), ctx->getNumRecords(), 1, 30) != 0) { g_err << "pkUpdate Failed!" << endl; return NDBT_FAILED; } - if (hugoTrans.scanUpdateRecords(GETNDB(step), t1_records, 1, 30) != 0) + if (hugoTrans.scanUpdateRecords(GETNDB(step), ctx->getNumRecords(), 1, 30) != 0) { g_err << "scanUpdate Failed!" << endl; return NDBT_FAILED; @@ -415,7 +413,7 @@ stressSQL_rep1(NDBT_Context* ctx, NDBT_Step* step) for (int j= 0; loops == 0 || j < loops; j++) { - record = urandom(t1_records); + record = urandom(ctx->getNumRecords()); sqlStm.assfmt("UPDATE TEST_DB.rep1 SET c2 = 33.3221 where c1 = %u", record); if(master.doQuery(sqlStm.c_str())) { From b048153128e3fff4a8cb280be75c14c913b13acf Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Jan 2008 17:39:50 +0800 Subject: [PATCH 055/527] Shouldn't let the non-deterministic temperary filename output in result file for bug#30417 mysql-test/suite/ndb/r/ndb_autoinc.result: Temperory table name shouldn't output in result file for its name is non-deterministic mysql-test/suite/ndb/t/ndb_autoinc.test: don't output temperary file name --- mysql-test/suite/ndb/r/ndb_autoinc.result | 1 - mysql-test/suite/ndb/t/ndb_autoinc.test | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/ndb/r/ndb_autoinc.result b/mysql-test/suite/ndb/r/ndb_autoinc.result index 7ba5ab8def7..fe9d36393ad 100644 --- a/mysql-test/suite/ndb/r/ndb_autoinc.result +++ b/mysql-test/suite/ndb/r/ndb_autoinc.result @@ -18,7 +18,6 @@ KEY(id) ) ENGINE=MYISAM; ALTER TABLE t3 ENGINE NDBCLUSTER; -ERROR HY000: Can't create table 'test.#sql-7b9e_3' (errno: 4335) SHOW CREATE TABLE t3; Table Create Table t3 CREATE TABLE `t3` ( diff --git a/mysql-test/suite/ndb/t/ndb_autoinc.test b/mysql-test/suite/ndb/t/ndb_autoinc.test index 3e7ba7bdf6a..a5ae52c88d7 100644 --- a/mysql-test/suite/ndb/t/ndb_autoinc.test +++ b/mysql-test/suite/ndb/t/ndb_autoinc.test @@ -27,9 +27,11 @@ CREATE TABLE t3 ( KEY(id) ) ENGINE=MYISAM; +--disable_result_log --error 1005 ALTER TABLE t3 ENGINE NDBCLUSTER; +--enable_result_log SHOW CREATE TABLE t3; From 2f2206840d4f16ec2c30d288c498898d09f11a69 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Jan 2008 18:59:44 +0100 Subject: [PATCH 056/527] Makefile.am: Updated for name chance on dbutil storage/ndb/test/src/Makefile.am: Updated for name chance on dbutil --- storage/ndb/test/src/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/ndb/test/src/Makefile.am b/storage/ndb/test/src/Makefile.am index aa486108235..8cbe83dfbcf 100644 --- a/storage/ndb/test/src/Makefile.am +++ b/storage/ndb/test/src/Makefile.am @@ -24,9 +24,9 @@ libNDBT_a_SOURCES = \ NdbRestarter.cpp NdbRestarts.cpp NDBT_Output.cpp \ NdbBackup.cpp NdbConfig.cpp NdbGrep.cpp NDBT_Table.cpp \ NdbSchemaCon.cpp NdbSchemaOp.cpp getarg.c \ - CpcClient.cpp NdbMixRestarter.cpp NDBT_Thread.cpp dbutil.cpp + CpcClient.cpp NdbMixRestarter.cpp NDBT_Thread.cpp DbUtil.cpp -INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/common/mgmcommon -I$(top_srcdir)/storage/ndb/include/mgmcommon -I$(top_srcdir)/storage/ndb/include/kernel -I$(top_srcdir)/storage/ndb/src/mgmapi +INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/common/mgmcommon -I$(top_srcdir)/storage/ndb/include/mgmcommon -I$(top_srcdir)/storage/ndb/include/kernel -I$(top_srcdir)/storage/ndb/src/mgmapi -I$(top_srcdir)/include include $(top_srcdir)/storage/ndb/config/common.mk.am include $(top_srcdir)/storage/ndb/config/type_ndbapitest.mk.am From ed6d97c8666decf7d3a472d9736fb4360756e03e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Jan 2008 19:07:24 +0100 Subject: [PATCH 057/527] Makefile.am: Updated to build NdbRepStress storage/ndb/test/ndbapi/Makefile.am: Updated to build NdbRepStress --- storage/ndb/test/ndbapi/Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/storage/ndb/test/ndbapi/Makefile.am b/storage/ndb/test/ndbapi/Makefile.am index ad509dbbafe..9f83b061403 100644 --- a/storage/ndb/test/ndbapi/Makefile.am +++ b/storage/ndb/test/ndbapi/Makefile.am @@ -52,7 +52,8 @@ testBitfield \ DbCreate DbAsyncGenerator \ testSRBank \ test_event_merge \ -testIndexStat +testIndexStat \ +NdbRepStress EXTRA_PROGRAMS = \ test_event \ @@ -99,6 +100,7 @@ testReadPerf_SOURCES = testReadPerf.cpp testLcp_SOURCES = testLcp.cpp testPartitioning_SOURCES = testPartitioning.cpp testBitfield_SOURCES = testBitfield.cpp +NdbRepStress_SOURCES = acrt/NdbRepStress.cpp DbCreate_SOURCES = bench/mainPopulate.cpp bench/dbPopulate.cpp bench/userInterface.cpp bench/dbPopulate.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp DbAsyncGenerator_SOURCES = bench/mainAsyncGenerator.cpp bench/asyncGenerator.cpp bench/ndb_async2.cpp bench/dbGenerator.h bench/macros.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp testSRBank_SOURCES = testSRBank.cpp @@ -115,8 +117,10 @@ include $(top_srcdir)/storage/ndb/config/type_ndbapitest.mk.am ##testIndex_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel ##testSystemRestart_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel ##testTransactions_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/include/kernel +NdbRepStress_INCLUDES = $(INCLUDES) -I$(top_srcdir)/ndb/test/include -I$(top_srcdir)/include testBackup_LDADD = $(LDADD) bank/libbank.a testSRBank_LDADD = bank/libbank.a $(LDADD) +NdbRepStress_LDADD = $(LDADD) $(top_builddir)/libmysql_r/libmysqlclient_r.la # Don't update the files from bitkeeper %::SCCS/s.% From e984956385c6ee6370da97655bc217070558fbb1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Jan 2008 09:20:16 +0100 Subject: [PATCH 058/527] ndb - bug#33793 dont assume that page is "all empty" only as gci is acked, as release_gci might not have processed it yet storage/ndb/src/kernel/blocks/ERROR_codes.txt: new error codes storage/ndb/src/kernel/blocks/suma/Suma.cpp: dont assume that page is "all empty" only as gci is acked, as release_gci might not have processed it yet storage/ndb/test/ndbapi/test_event.cpp: testcase storage/ndb/test/run-test/daily-basic-tests.txt: testcase --- storage/ndb/src/kernel/blocks/ERROR_codes.txt | 2 +- storage/ndb/src/kernel/blocks/suma/Suma.cpp | 16 ++++- storage/ndb/test/ndbapi/test_event.cpp | 61 +++++++++++++++++++ .../ndb/test/run-test/daily-basic-tests.txt | 4 ++ 4 files changed, 81 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/ERROR_codes.txt b/storage/ndb/src/kernel/blocks/ERROR_codes.txt index b58eeb730f3..f80e25cc8d7 100644 --- a/storage/ndb/src/kernel/blocks/ERROR_codes.txt +++ b/storage/ndb/src/kernel/blocks/ERROR_codes.txt @@ -11,7 +11,7 @@ Next CMVMI 9000 Next BACKUP 10038 Next DBUTIL 11002 Next DBTUX 12008 -Next SUMA 13034 +Next SUMA 13036 TESTING NODE FAILURE, ARBITRATION --------------------------------- diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp index 8e6c0cd7ee7..a85bcf3e8a3 100644 --- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp +++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp @@ -4852,6 +4852,21 @@ Suma::release_gci(Signal* signal, Uint32 buck, Uint32 gci) if(gci >= head.m_max_gci) { jam(); + if (ERROR_INSERTED(13034)) + { + jam(); + SET_ERROR_INSERT_VALUE(13035); + return; + } + if (ERROR_INSERTED(13035)) + { + CLEAR_ERROR_INSERT_VALUE; + NodeReceiverGroup rg(CMVMI, c_nodes_in_nodegroup_mask); + rg.m_nodes.clear(getOwnNodeId()); + signal->theData[0] = 9999; + sendSignal(rg, GSN_NDB_TAMPER, signal, 1, JBA); + return; + } head.m_page_pos = 0; head.m_max_gci = gci; head.m_last_gci = 0; @@ -4923,7 +4938,6 @@ Suma::start_resend(Signal* signal, Uint32 buck) if(min > max) { - ndbrequire(pos.m_page_pos <= 2); ndbrequire(pos.m_page_id == bucket->m_buffer_tail); m_active_buckets.set(buck); m_gcp_complete_rep_count ++; diff --git a/storage/ndb/test/ndbapi/test_event.cpp b/storage/ndb/test/ndbapi/test_event.cpp index 18825d734a4..a7504166065 100644 --- a/storage/ndb/test/ndbapi/test_event.cpp +++ b/storage/ndb/test/ndbapi/test_event.cpp @@ -1838,6 +1838,61 @@ runBug31701(NDBT_Context* ctx, NDBT_Step* step) return NDBT_OK; } +int +runBug33793(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + + NdbRestarter restarter; + + if (restarter.getNumDbNodes() < 2){ + ctx->stopTest(); + return NDBT_OK; + } + // This should really wait for applier to start...10s is likely enough + NdbSleep_SecSleep(10); + + while (loops-- && ctx->isTestStopped() == false) + { + int nodeId = restarter.getDbNodeId(rand() % restarter.getNumDbNodes()); + int nodecount = 0; + int nodes[255]; + printf("nodeid: %u : victims: ", nodeId); + for (int i = 0; istopTest(); + return NDBT_OK; +} + + + NDBT_TESTSUITE(test_event); TESTCASE("BasicEventOperation", "Verify that we can listen to Events" @@ -1975,6 +2030,12 @@ TESTCASE("Bug31701", ""){ FINALIZER(runDropEvent); FINALIZER(runDropShadowTable); } +TESTCASE("Bug33793", ""){ + INITIALIZER(runCreateEvent); + STEP(runEventListenerUntilStopped); + STEP(runBug33793); + FINALIZER(runDropEvent); +} NDBT_TESTSUITE_END(test_event); int main(int argc, const char** argv){ diff --git a/storage/ndb/test/run-test/daily-basic-tests.txt b/storage/ndb/test/run-test/daily-basic-tests.txt index ef5082ca30c..9943cd76ac1 100644 --- a/storage/ndb/test/run-test/daily-basic-tests.txt +++ b/storage/ndb/test/run-test/daily-basic-tests.txt @@ -942,3 +942,7 @@ max-time: 300 cmd: test_event args: -n Bug31701 T1 +max-time: 300 +cmd: test_event +args: -n Bug33793 T1 + From c5f0bbd7fee8d5b612207bcedb91233ecbe73597 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Jan 2008 14:47:31 +0100 Subject: [PATCH 059/527] configure.in: adjust version string configure.in: adjust version string --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index ead2f85afb7..27329c98592 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.54) +AM_INIT_AUTOMAKE(mysql, 5.0.54a) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 From c3bf70215b4515c2fcf21bbb9a93aaf66d8c3faf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 Jan 2008 17:59:45 +0100 Subject: [PATCH 060/527] Bug#33222 - myisam-table drops rows when column is added and a char-field > 128 exists CHECK TABLE (non-QUICK) and any form of repair table did wrongly rate records as corrupted under the following conditions: 1. The table has dynamic row format and 2. it has a CHAR like column > 127 bytes (but not VARCHAR) (for multi-byte character sets this could be less than 127 characters) and 3. it has records with > 127 bytes significant length in that column (a byte beyond byte position 127 must be non-space). Affected were the statements CHECK TABLE, REPAIR TABLE, OPTIMIZE TABLE, ALTER TABLE. CHECK TABLE reported and marked the table as crashed if any record was present that fulfilled condition 3. The other statements deleted these records. The problem was a signed/unsigned compare in MyISAM code. A char to uchar change became necessary after the big byte to uchar change. mysql-test/r/myisam.result: Bug#33222 - myisam-table drops rows when column is added and a char-field > 128 exists Added test result. mysql-test/t/myisam.test: Bug#33222 - myisam-table drops rows when column is added and a char-field > 128 exists Added test. storage/myisam/mi_dynrec.c: Bug#33222 - myisam-table drops rows when column is added and a char-field > 128 exists char -> uchar became necessary after big byte -> uchar change. Fixed some small coding style violations near the changes. --- mysql-test/r/myisam.result | 162 +++++++++++++++++++++++++++++++++++ mysql-test/t/myisam.test | 170 +++++++++++++++++++++++++++++++++++++ storage/myisam/mi_dynrec.c | 32 +++---- 3 files changed, 349 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 353d66b1ad5..62220de0496 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -2001,4 +2001,166 @@ CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(130), +c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(130), +c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 repair status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(130), +c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +INSERT INTO t1 VALUES('b', 'b'); +INSERT INTO t1 VALUES('c', 'b'); +DELETE FROM t1 WHERE c1='b'; +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(130), +c2 VARCHAR(1), +KEY (c1) +) ENGINE=MyISAM; +# Insert 100 rows. Query log disabled. +UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90; +SELECT COUNT(*) FROM t1; +COUNT(*) +100 +ALTER TABLE t1 ENGINE=MyISAM; +SELECT COUNT(*) FROM t1; +COUNT(*) +100 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(50), +c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(50), +c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +REPAIR TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 repair status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +1 +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(50), +c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +INSERT INTO t1 VALUES('b', 'b'); +INSERT INTO t1 VALUES('c', 'b'); +DELETE FROM t1 WHERE c1='b'; +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +OPTIMIZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 optimize status OK +SELECT COUNT(*) FROM t1; +COUNT(*) +2 +DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(50), +c2 VARCHAR(1), +KEY (c1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +# Insert 100 rows. Query log disabled. +UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90; +SELECT COUNT(*) FROM t1; +COUNT(*) +100 +ALTER TABLE t1 ENGINE=MyISAM; +SELECT COUNT(*) FROM t1; +COUNT(*) +100 +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check status OK +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index cadab8b3b70..334ecfd02d3 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1261,5 +1261,175 @@ DELETE FROM t1 WHERE c1 >= 10; CHECK TABLE t1; DROP TABLE t1; +# +# Bug#33222 - myisam-table drops rows when column is added +# and a char-field > 128 exists +# +# Test #1 - CHECK TABLE sees wrong record, REPAR TABLE deletes it. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(130), + c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +REPAIR TABLE t1; +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +DROP TABLE t1; +# +# Test #2 - same as test #1, but using EXTENDED. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(130), + c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +SELECT COUNT(*) FROM t1; +CHECK TABLE t1 EXTENDED; +REPAIR TABLE t1 EXTENDED; +SELECT COUNT(*) FROM t1; +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; +# +# Test #3 - same as test #1, but using OPTIMIZE TABLE. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(130), + c2 VARCHAR(1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES(REPEAT("a",128), 'b'); +# Insert more rows and delete one in the middle to force optimize. +INSERT INTO t1 VALUES('b', 'b'); +INSERT INTO t1 VALUES('c', 'b'); +DELETE FROM t1 WHERE c1='b'; +SELECT COUNT(*) FROM t1; +OPTIMIZE TABLE t1; +SELECT COUNT(*) FROM t1; +DROP TABLE t1; +# +# Test #4 - ALTER TABLE deletes rows. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +# Using an index which can be disabled during bulk insert. +CREATE TABLE t1 ( + c1 CHAR(130), + c2 VARCHAR(1), + KEY (c1) +) ENGINE=MyISAM; +# +# Insert 100 rows. This turns bulk insert on during the copy phase of +# ALTER TABLE. Bulk insert disables keys before the insert and re-enables +# them by repair after the insert. +--disable_query_log +let $count= 100; +--echo # Insert $count rows. Query log disabled. +while ($count) +{ + INSERT INTO t1 VALUES ('a', 'b'); + dec $count; +} +--enable_query_log +# +# Change most of the rows into long character values with > 127 characters. +UPDATE t1 SET c1=REPEAT("a",128) LIMIT 90; +SELECT COUNT(*) FROM t1; +ALTER TABLE t1 ENGINE=MyISAM; +# +# With bug present, this shows that all long rows are gone. +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; +# +# Test #5 - same as test #1 but UTF-8. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(50), + c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +# Using Tamil Letter A, Unicode U+0B85 +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +REPAIR TABLE t1; +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +DROP TABLE t1; +# +# Test #6 - same as test #2, but UTF-8. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(50), + c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +# Using Tamil Letter A, Unicode U+0B85 +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +SELECT COUNT(*) FROM t1; +CHECK TABLE t1 EXTENDED; +REPAIR TABLE t1 EXTENDED; +SELECT COUNT(*) FROM t1; +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; +# +# Test #7 - same as test #3, but UTF-8. +# Using a CHAR column that can have > 127 characters. +# Using a VARCHAR to create a table with dynamic row format. +CREATE TABLE t1 ( + c1 CHAR(50), + c2 VARCHAR(1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +# Using Tamil Letter A, Unicode U+0B85 +INSERT INTO t1 VALUES(REPEAT(_utf8 x'e0ae85',43), 'b'); +# Insert more rows and delete one in the middle to force optimize. +INSERT INTO t1 VALUES('b', 'b'); +INSERT INTO t1 VALUES('c', 'b'); +DELETE FROM t1 WHERE c1='b'; +SELECT COUNT(*) FROM t1; +OPTIMIZE TABLE t1; +SELECT COUNT(*) FROM t1; +DROP TABLE t1; +# +# Test #8 - same as test #4, but UTF-8. +# Using a CHAR column that can have > 42 UTF-8 characters. +# Using a VARCHAR to create a table with dynamic row format. +# Using an index which can be disabled during bulk insert. +CREATE TABLE t1 ( + c1 CHAR(50), + c2 VARCHAR(1), + KEY (c1) +) ENGINE=MyISAM DEFAULT CHARSET UTF8; +# +# Insert 100 rows. This turns bulk insert on during the copy phase of +# ALTER TABLE. Bulk insert disables keys before the insert and re-enables +# them by repair after the insert. +--disable_query_log +let $count= 100; +--echo # Insert $count rows. Query log disabled. +while ($count) +{ + INSERT INTO t1 VALUES ('a', 'b'); + dec $count; +} +--enable_query_log +# +# Change most of the rows into long character values with > 42 characters. +# Using Tamil Letter A, Unicode U+0B85 +UPDATE t1 SET c1=REPEAT(_utf8 x'e0ae85',43) LIMIT 90; +SELECT COUNT(*) FROM t1; +ALTER TABLE t1 ENGINE=MyISAM; +# +# With bug present, this shows that all long rows are gone. +SELECT COUNT(*) FROM t1; +CHECK TABLE t1; +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index 9940cf62204..22fa3d18802 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -1006,12 +1006,12 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, { if (rec->length > 255 && new_length > 127) { - to[0]=(char) ((new_length & 127)+128); - to[1]=(char) (new_length >> 7); - to+=2; - } - else - *to++= (char) new_length; + to[0]= (uchar) ((new_length & 127) + 128); + to[1]= (uchar) (new_length >> 7); + to+=2; + } + else + *to++= (uchar) new_length; memcpy((uchar*) to,pos,(size_t) new_length); to+=new_length; flag|=bit; } @@ -1045,7 +1045,7 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, } if ((bit= bit << 1) >= 256) { - *packpos++ = (char) (uchar) flag; + *packpos++= (uchar) flag; bit=1; flag=0; } } @@ -1055,9 +1055,9 @@ uint _mi_rec_pack(MI_INFO *info, register uchar *to, } } if (bit != 1) - *packpos= (char) (uchar) flag; + *packpos= (uchar) flag; if (info->s->calc_checksum) - *to++=(char) info->checksum; + *to++= (uchar) info->checksum; DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos))); DBUG_RETURN((uint) (to-startpos)); } /* _mi_rec_pack */ @@ -1128,12 +1128,14 @@ my_bool _mi_rec_check(MI_INFO *info,const uchar *record, uchar *rec_buff, goto err; if (rec->length > 255 && new_length > 127) { - if (to[0] != (char) ((new_length & 127)+128) || - to[1] != (char) (new_length >> 7)) - goto err; - to+=2; - } - else if (*to++ != (char) new_length) + /* purecov: begin inspected */ + if (to[0] != (uchar) ((new_length & 127) + 128) || + to[1] != (uchar) (new_length >> 7)) + goto err; + to+=2; + /* purecov: end */ + } + else if (*to++ != (uchar) new_length) goto err; to+=new_length; } From d39f204876338a8f31c2334ac2d315062af709fb Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 14 Jan 2008 22:55:50 -0700 Subject: [PATCH 061/527] Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots. Fixes: Bug #18942: DROP DATABASE does not drop an orphan FOREIGN KEY constraint Fix Bug#18942 by dropping all foreign key constraints at the end of DROP DATABASE. Usually, by then, there are no foreign constraints left because all of them are dropped when the relevant tables are dropped. This code is to ensure that any orphaned FKs are wiped too. Bug #29157: UPDATE, changed rows incorrect Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no columns were updated. Bug #32440: InnoDB free space info does not appear in SHOW TABLE STATUS or I_S Put information about the free space in a tablespace in INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has removed it from there recently. The stored value is in kilobytes. This can be considered as a permanent workaround to http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the data missing from TABLE_COMMENT and this is actually not solved. mysql-test/r/innodb.result: New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178 mysql-test/r/partition_innodb.result: Update results - InnoDB now sets Data_length (show table status) mysql-test/t/innodb.test: New tests for bugs fixed as part of snapshots innodb-5.1-ss2146 and innodb-5.1-ss2178 mysql-test/t/partition_innodb.test: Mask out Data_Free in show table status, because it varies depending on which tests have been run. storage/innobase/handler/ha_innodb.cc: Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots. Revision r2178: branches/5.1: Merge r2177 from trunk/: Fix Bug#29157 "UPDATE, changed rows incorrect": Return HA_ERR_RECORD_IS_THE_SAME from ha_innobase::update_row() if no columns were updated. Revision r2169: branches/5.1: Bug#32440: Put information about the free space in a tablespace in INFORMATION_SCHEMA.TABLES.DATA_FREE. This information was previously available in INFORMATION_SCHEMA.TABLES.TABLE_COMMENT, but MySQL has removed it from there recently. The stored value is in kilobytes. This can be considered as a permanent workaround to http://bugs.mysql.com/32440. "Workaround" becasue that bug is about the data missing from TABLE_COMMENT and this is actually not solved. storage/innobase/row/row0mysql.c: Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots. Revision r2161: branches/5.1: Merge r2160 from trunk/: Fix Bug#18942 by dropping all foreign key constraints at the end of DROP DATABASE. Usually, by then, there are no foreign constraints left because all of them are dropped when the relevant tables are dropped. This code is to ensure that any orphaned FKs are wiped too. storage/innobase/trx/trx0trx.c: Apply innodb-5.1-ss2146 and innodb-5.1-ss2178 snapshots. --- mysql-test/r/bdb_notembedded.result | 35 +++++++++++++ mysql-test/r/innodb.result | 13 +++++ mysql-test/r/partition_innodb.result | 12 ++--- mysql-test/t/bdb_notembedded.test | 38 ++++++++++++++ mysql-test/t/innodb.test | 21 ++++++++ mysql-test/t/partition_innodb.test | 18 +++++++ storage/innobase/handler/ha_innodb.cc | 29 +++++++++-- storage/innobase/row/row0mysql.c | 73 +++++++++++++++++++++++++++ storage/innobase/trx/trx0trx.c | 1 + 9 files changed, 229 insertions(+), 11 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index d0c586de8d4..0a2cb61b18d 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3218,3 +3218,16 @@ a 2 DROP TABLE t1; DROP TABLE t2; +create table t1 (i int, j int) engine=innodb; +insert into t1 (i, j) values (1, 1), (2, 2); +update t1 set j = 2; +affected rows: 1 +info: Rows matched: 2 Changed: 1 Warnings: 0 +drop table t1; +create table t1 (id int) comment='this is a comment' engine=innodb; +select table_comment, data_free > 0 as data_free_is_set +from information_schema.tables +where table_schema='test' and table_name = 't1'; +table_comment data_free_is_set +this is a comment 1 +drop table t1; diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 5cbe34c94ca..8cb8bc7c13f 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -13,33 +13,33 @@ DROP TABLE t1; create table t1 (a int) engine=innodb partition by hash(a) ; show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int) engine = innodb partition by key (a); 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 InnoDB 10 Compact 2 8192 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (0), (1), (2), (3); 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 InnoDB 10 Compact 4 4096 16384 0 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int auto_increment primary key) engine = innodb partition by key (a); 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 InnoDB 10 Compact 2 8192 16384 0 0 0 1 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 NULL NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (NULL), (NULL), (NULL), (NULL); 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 InnoDB 10 Compact 4 4096 16384 0 0 0 5 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 NULL NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (NULL), (NULL), (NULL), (NULL); 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 InnoDB 10 Compact 8 2048 16384 0 0 0 9 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 NULL NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int) partition by key (a) diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 8fdbbfcde79..bfe7d4ea9b4 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2382,6 +2382,27 @@ DROP TABLE t1; DROP TABLE t2; DISCONNECT c1; DISCONNECT c2; +CONNECTION default; + +# +# Bug #29157 UPDATE, changed rows incorrect +# +create table t1 (i int, j int) engine=innodb; +insert into t1 (i, j) values (1, 1), (2, 2); +--enable_info +update t1 set j = 2; +--disable_info +drop table t1; + +# +# Bug #32440 InnoDB free space info does not appear in SHOW TABLE STATUS or +# I_S +# +create table t1 (id int) comment='this is a comment' engine=innodb; +select table_comment, data_free > 0 as data_free_is_set + from information_schema.tables + where table_schema='test' and table_name = 't1'; +drop table t1; ####################################################################### # # diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index 58010f85ecf..76a54b36942 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -20,6 +20,9 @@ DROP TABLE t1; # Bug #14673: Wrong InnoDB default row format # create table t1 (a int) engine=innodb partition by hash(a) ; +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status like 't1'; drop table t1; @@ -29,18 +32,33 @@ drop table t1; create table t1 (a int) engine = innodb partition by key (a); +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status; insert into t1 values (0), (1), (2), (3); +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status; drop table t1; create table t1 (a int auto_increment primary key) engine = innodb partition by key (a); +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status; insert into t1 values (NULL), (NULL), (NULL), (NULL); +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status; insert into t1 values (NULL), (NULL), (NULL), (NULL); +# Data_free for InnoDB tablespace varies depending on which +# tests have been run before this one +--replace_column 10 # show table status; drop table t1; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 205cfc91e52..e66d5b84d19 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -600,7 +600,9 @@ convert_error_code_to_mysql( tell it also to MySQL so that MySQL knows to empty the cached binlog for this transaction */ - thd_mark_transaction_to_rollback(thd, TRUE); + if (thd) { + thd_mark_transaction_to_rollback(thd, TRUE); + } return(HA_ERR_LOCK_DEADLOCK); } else if (error == (int) DB_LOCK_WAIT_TIMEOUT) { @@ -609,8 +611,10 @@ convert_error_code_to_mysql( latest SQL statement in a lock wait timeout. Previously, we rolled back the whole transaction. */ - thd_mark_transaction_to_rollback(thd, - (bool)row_rollback_on_timeout); + if (thd) { + thd_mark_transaction_to_rollback( + thd, (bool)row_rollback_on_timeout); + } return(HA_ERR_LOCK_WAIT_TIMEOUT); @@ -662,7 +666,9 @@ convert_error_code_to_mysql( tell it also to MySQL so that MySQL knows to empty the cached binlog for this transaction */ - thd_mark_transaction_to_rollback(thd, TRUE); + if (thd) { + thd_mark_transaction_to_rollback(thd, TRUE); + } return(HA_ERR_LOCK_TABLE_FULL); } else if (error == DB_TOO_MANY_CONCURRENT_TRXS) { @@ -3769,6 +3775,16 @@ ha_innobase::update_row( error = convert_error_code_to_mysql(error, user_thd); + if (error == 0 /* success */ + && uvect->n_fields == 0 /* no columns were updated */) { + + /* This is the same as success, but instructs + MySQL that the row is not really updated and it + should not increase the count of updated rows. + This is fix for http://bugs.mysql.com/29157 */ + error = HA_ERR_RECORD_IS_THE_SAME; + } + /* Tell InnoDB server that there might be work for utility threads: */ @@ -5720,7 +5736,9 @@ ha_innobase::info( stats.index_file_length = ((ulonglong) ib_table->stat_sum_of_other_index_sizes) * UNIV_PAGE_SIZE; - stats.delete_length = 0; + stats.delete_length = + fsp_get_available_space_in_free_extents( + ib_table->space); stats.check_time = 0; if (stats.records == 0) { @@ -7246,6 +7264,7 @@ On return if there is no error then the tables AUTOINC lock is locked.*/ ulong ha_innobase::innobase_get_auto_increment( +/*=====================================*/ ulonglong* value) /* out: autoinc value */ { ulong error; diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index b3cf20b78b8..9348cfa7342 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -3312,6 +3312,66 @@ funct_exit: return((int) err); } +/*********************************************************************** +Drop all foreign keys in a database, see Bug#18942. +Called at the end of row_drop_database_for_mysql(). */ +static +ulint +drop_all_foreign_keys_in_db( +/*========================*/ + /* out: error code or DB_SUCCESS */ + const char* name, /* in: database name which ends to '/' */ + trx_t* trx) /* in: transaction handle */ +{ + pars_info_t* pinfo; + ulint err; + + ut_a(name[strlen(name) - 1] == '/'); + + pinfo = pars_info_create(); + + pars_info_add_str_literal(pinfo, "dbname", name); + +/* true if for_name is not prefixed with dbname */ +#define TABLE_NOT_IN_THIS_DB \ +"SUBSTR(for_name, 0, LENGTH(:dbname)) <> :dbname" + + err = que_eval_sql(pinfo, + "PROCEDURE DROP_ALL_FOREIGN_KEYS_PROC () IS\n" + "foreign_id CHAR;\n" + "for_name CHAR;\n" + "found INT;\n" + "DECLARE CURSOR cur IS\n" + "SELECT ID, FOR_NAME FROM SYS_FOREIGN\n" + "WHERE FOR_NAME >= :dbname\n" + "LOCK IN SHARE MODE\n" + "ORDER BY FOR_NAME;\n" + "BEGIN\n" + "found := 1;\n" + "OPEN cur;\n" + "WHILE found = 1 LOOP\n" + " FETCH cur INTO foreign_id, for_name;\n" + " IF (SQL % NOTFOUND) THEN\n" + " found := 0;\n" + " ELSIF (" TABLE_NOT_IN_THIS_DB ") THEN\n" + " found := 0;\n" + " ELSIF (1=1) THEN\n" + " DELETE FROM SYS_FOREIGN_COLS\n" + " WHERE ID = foreign_id;\n" + " DELETE FROM SYS_FOREIGN\n" + " WHERE ID = foreign_id;\n" + " END IF;\n" + "END LOOP;\n" + "CLOSE cur;\n" + "COMMIT WORK;\n" + "END;\n", + FALSE, /* do not reserve dict mutex, + we are already holding it */ + trx); + + return(err); +} + /************************************************************************* Drops a database for MySQL. */ @@ -3382,6 +3442,19 @@ loop: } } + if (err == DB_SUCCESS) { + /* after dropping all tables try to drop all leftover + foreign keys in case orphaned ones exist */ + err = (int) drop_all_foreign_keys_in_db(name, trx); + + if (err != DB_SUCCESS) { + fputs("InnoDB: DROP DATABASE ", stderr); + ut_print_name(stderr, trx, TRUE, name); + fprintf(stderr, " failed with error %d while " + "dropping all foreign keys", err); + } + } + trx_commit_for_mysql(trx); row_mysql_unlock_data_dictionary(trx); diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index a278ad51984..55b244abb0a 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -933,6 +933,7 @@ trx_commit_off_kernel( trx->rseg = NULL; trx->undo_no = ut_dulint_zero; trx->last_sql_stat_start.least_undo_no = ut_dulint_zero; + trx->mysql_query_str = NULL; ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0); ut_ad(UT_LIST_GET_LEN(trx->trx_locks) == 0); From 082cfb87919999efe83216d572ba6c776ecf748d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 15 Jan 2008 16:23:14 +0400 Subject: [PATCH 062/527] BUG#28884 - maybe a problem with malloc into base64.c Fixed that return value of malloc was not checked. Fixed wrong argument count (compilation failure) to base64_decode() function. Note: - there is no test case for this fix as this code is never compiled into mysql clients/server; - as this code is used for internal testing purposes only, no changelog entry needed. mysys/base64.c: Fixed that return value of malloc was not checked. Fixed wrong argument count to base64_decode function. --- mysys/base64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysys/base64.c b/mysys/base64.c index dbe8927290d..6157dcaa5af 100644 --- a/mysys/base64.c +++ b/mysys/base64.c @@ -256,6 +256,7 @@ main(void) char * str; char * dst; + require(src); for (j= 0; j Date: Wed, 16 Jan 2008 11:48:04 +0100 Subject: [PATCH 063/527] Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Post-pushbuild fix. Moved test from myisam.test to ctype_ucs2_def.test. UCS2 is not always available. mysql-test/r/ctype_ucs2_def.result: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Moved test result from myisam.result to here. mysql-test/r/myisam.result: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Moved test result from here to ctype_ucs2_def.result. mysql-test/t/ctype_ucs2_def.test: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Moved test from myisam.test to here. UCS2 is not always available. mysql-test/t/myisam.test: Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Moved test from here to ctype_ucs2_def.test. UCS2 is not always available. --- mysql-test/r/ctype_ucs2_def.result | 10 ++++++++++ mysql-test/r/myisam.result | 10 ---------- mysql-test/t/ctype_ucs2_def.test | 13 +++++++++++++ mysql-test/t/myisam.test | 13 ------------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/mysql-test/r/ctype_ucs2_def.result b/mysql-test/r/ctype_ucs2_def.result index d838c5d66b0..1bbb354798b 100644 --- a/mysql-test/r/ctype_ucs2_def.result +++ b/mysql-test/r/ctype_ucs2_def.result @@ -21,4 +21,14 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C'); INSERT INTO t1 VALUES('A ', 'A '); ERROR 23000: Duplicate entry '' for key 1 DROP TABLE t1; +CREATE TABLE t1 ( +c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, +KEY(c1) +) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('marshall\'s'); +INSERT INTO t1 VALUES ('marsh'); +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 4ff7441c02e..56933f45fbf 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1839,14 +1839,4 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; -CREATE TABLE t1 ( -c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, -KEY(c1) -) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('marshall\'s'); -INSERT INTO t1 VALUES ('marsh'); -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/ctype_ucs2_def.test b/mysql-test/t/ctype_ucs2_def.test index c80444daddd..b146dc63626 100644 --- a/mysql-test/t/ctype_ucs2_def.test +++ b/mysql-test/t/ctype_ucs2_def.test @@ -39,4 +39,17 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C'); INSERT INTO t1 VALUES('A ', 'A '); DROP TABLE t1; +# +# Bug#32705 - myisam corruption: Key in wrong position +# at page 1024 with ucs2_bin +# +CREATE TABLE t1 ( + c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, + KEY(c1) + ) ENGINE=MyISAM; +INSERT INTO t1 VALUES ('marshall\'s'); +INSERT INTO t1 VALUES ('marsh'); +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; + --echo End of 5.0 tests diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index b182c35514c..80c7a92c12f 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1193,17 +1193,4 @@ SET @@myisam_repair_threads=1; CHECK TABLE t1 EXTENDED; DROP TABLE t1; -# -# Bug#32705 - myisam corruption: Key in wrong position -# at page 1024 with ucs2_bin -# -CREATE TABLE t1 ( - c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, - KEY(c1) - ) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('marshall\'s'); -INSERT INTO t1 VALUES ('marsh'); -CHECK TABLE t1 EXTENDED; -DROP TABLE t1; - --echo End of 5.0 tests From dd40d4ea407e640d47b0f34fdb177b4d6ee4a175 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 16 Jan 2008 15:38:40 +0100 Subject: [PATCH 064/527] Bug#32705 - myisam corruption: Key in wrong position at page 1024 with ucs2_bin Post merge fix --- mysql-test/r/myisam.result | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 6863259aa9a..a18018657e0 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1809,16 +1809,6 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; -CREATE TABLE t1 ( -c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL, -KEY(c1) -) ENGINE=MyISAM; -INSERT INTO t1 VALUES ('marshall\'s'); -INSERT INTO t1 VALUES ('marsh'); -CHECK TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 check status OK -DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL, ref int NOT NULL, INDEX (id)) ENGINE=MyISAM; CREATE TABLE t2 LIKE t1; INSERT INTO t2 (id, ref) VALUES (1,3), (2,1), (3,2), (4,5), (4,4); From 29baec8ae30b315b82be25f10ad84647c973b044 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Jan 2008 15:42:50 +0100 Subject: [PATCH 065/527] Remove "#pragma once" it's already done by "#ifndef DBUTIL_HPP" --- storage/ndb/test/include/DbUtil.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index 5ca5fca290c..c143f0edd70 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -19,9 +19,6 @@ #ifndef DBUTIL_HPP #define DBUTIL_HPP -#if _MSC_VER > 1000 -#pragma once -#endif // _MSC_VER > 1000 #include #include #include From 24e10360d42b54dd29ed1238a0cc1aa4cb0ffd87 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Jan 2008 15:47:55 +0100 Subject: [PATCH 066/527] DBU_TRUE and DBU_FALSE => TRUE/FALSE --- storage/ndb/test/include/DbUtil.hpp | 2 -- storage/ndb/test/src/DbUtil.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index c143f0edd70..a1172205ff9 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -49,8 +49,6 @@ if (r) \ DIE_UNLESS(r == 0);\ } -#define DBU_TRUE 1 -#define DBU_FALSE 0 #define DBU_FAILED 1 #define DBU_OK 0 diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp index 1df4f8f745e..5fe3e6e9fbe 100755 --- a/storage/ndb/test/src/DbUtil.cpp +++ b/storage/ndb/test/src/DbUtil.cpp @@ -86,13 +86,13 @@ DbUtil::databaseLogin(const char* system, const char* usr, exit(DBU_FAILED); } - mysql->reconnect = DBU_TRUE; + mysql->reconnect = TRUE; /* set AUTOCOMMIT */ if(!transactional) - mysql_autocommit(mysql, DBU_TRUE); + mysql_autocommit(mysql, TRUE); else - mysql_autocommit(mysql, DBU_FALSE); + mysql_autocommit(mysql, FALSE); #ifdef DEBUG printf("\n\tConnected to MySQL server version: %s (%lu)\n\n", From 8f3a0ea2c8e791f0ee84c3e1dd7f09ef7daf0d48 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 17 Jan 2008 15:37:18 -0800 Subject: [PATCH 067/527] Bug#33067 "Update of CSV row incorrect for some BLOBs" when reading in rows, move blob columns into temporary storage not allocated by Field_blob class or else row update operation will alter original row and make mysql think that nothing has been changed. fix incrementing wrong statistic values. mysql-test/r/csv.result: test for bug33067 mysql-test/t/csv.test: test for bug33067 storage/csv/ha_tina.cc: bug33067 when reading in rows, move blob columns into temporary storage not allocated by Field_blob class or else row update operation will alter original row and make mysql think that nothing has been changed. fix incrementing wrong statistic values. storage/csv/ha_tina.h: bug33067 new memroot attribute for blobs --- mysql-test/r/csv.result | 9 ++++++++ mysql-test/t/csv.test | 11 ++++++++++ storage/csv/ha_tina.cc | 47 +++++++++++++++++++++++++++++++++++------ storage/csv/ha_tina.h | 1 + 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index b0033383f00..b91272f7e59 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5379,4 +5379,13 @@ SHOW WARNINGS; Level Code Message Error 1178 The storage engine for the table doesn't support nullable columns Error 1005 Can't create table 'test.t1' (errno: 138) +create table t1 (c1 tinyblob not null) engine=csv; +insert into t1 values("This"); +update t1 set c1="That" where c1="This"; +affected rows: 1 +info: Rows matched: 1 Changed: 1 Warnings: 0 +select * from t1; +c1 +That +drop table t1; End of 5.1 tests diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test index 7b4f95bbf8a..dd8c940ac44 100644 --- a/mysql-test/t/csv.test +++ b/mysql-test/t/csv.test @@ -1773,4 +1773,15 @@ drop table t1; CREATE TABLE t1(a INT) ENGINE=CSV; SHOW WARNINGS; +# +# BUG#33067 - . +# +create table t1 (c1 tinyblob not null) engine=csv; +insert into t1 values("This"); +--enable_info +update t1 set c1="That" where c1="This"; +--disable_info +select * from t1; +drop table t1; + --echo End of 5.1 tests diff --git a/storage/csv/ha_tina.cc b/storage/csv/ha_tina.cc index c9fab79a4c5..f8dd778045f 100644 --- a/storage/csv/ha_tina.cc +++ b/storage/csv/ha_tina.cc @@ -56,6 +56,7 @@ TODO: #define META_BUFFER_SIZE sizeof(uchar) + sizeof(uchar) + sizeof(ulonglong) \ + sizeof(ulonglong) + sizeof(ulonglong) + sizeof(ulonglong) + sizeof(uchar) #define TINA_CHECK_HEADER 254 // The number we use to determine corruption +#define BLOB_MEMROOT_ALLOC_SIZE 8192 /* The file extension */ #define CSV_EXT ".CSV" // The data file @@ -597,6 +598,8 @@ int ha_tina::find_current_row(uchar *buf) bool read_all; DBUG_ENTER("ha_tina::find_current_row"); + free_root(&blobroot, MYF(MY_MARK_BLOCKS_FREE)); + /* We do not read further then local_saved_data_file_length in order not to conflict with undergoing concurrent insert. @@ -684,6 +687,22 @@ int ha_tina::find_current_row(uchar *buf) if ((*field)->store(buffer.ptr(), buffer.length(), buffer.charset(), CHECK_FIELD_WARN)) goto err; + if ((*field)->flags & BLOB_FLAG) + { + Field_blob *blob= *(Field_blob**) field; + uchar *src, *tgt; + uint length, packlength; + + packlength= blob->pack_length_no_ptr(); + length= blob->get_length(blob->ptr); + memcpy_fixed(&src, blob->ptr + packlength, sizeof(char*)); + if (src) + { + tgt= (uchar*) alloc_root(&blobroot, length); + bmove(tgt, src, length); + memcpy_fixed(blob->ptr + packlength, &tgt, sizeof(char*)); + } + } } } next_position= end_offset + eoln_len; @@ -914,9 +933,10 @@ int ha_tina::open_update_temp_file_if_needed() int ha_tina::update_row(const uchar * old_data, uchar * new_data) { int size; + int rc= -1; DBUG_ENTER("ha_tina::update_row"); - ha_statistic_increment(&SSV::ha_read_rnd_next_count); + ha_statistic_increment(&SSV::ha_update_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); @@ -931,20 +951,23 @@ int ha_tina::update_row(const uchar * old_data, uchar * new_data) The temp_file_length is used to calculate new data file length. */ if (chain_append()) - DBUG_RETURN(-1); + goto err; if (open_update_temp_file_if_needed()) - DBUG_RETURN(-1); + goto err; if (my_write(update_temp_file, (uchar*)buffer.ptr(), size, MYF(MY_WME | MY_NABP))) - DBUG_RETURN(-1); + goto err; temp_file_length+= size; + rc= 0; /* UPDATE should never happen on the log tables */ DBUG_ASSERT(!share->is_log_table); - DBUG_RETURN(0); +err: + DBUG_PRINT("info",("rc = %d", rc)); + DBUG_RETURN(rc); } @@ -1050,6 +1073,8 @@ int ha_tina::rnd_init(bool scan) records_is_known= 0; chain_ptr= chain; + init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0); + DBUG_RETURN(0); } @@ -1115,7 +1140,7 @@ void ha_tina::position(const uchar *record) int ha_tina::rnd_pos(uchar * buf, uchar *pos) { DBUG_ENTER("ha_tina::rnd_pos"); - ha_statistic_increment(&SSV::ha_read_rnd_next_count); + ha_statistic_increment(&SSV::ha_read_rnd_count); current_position= (off_t)my_get_ptr(pos,ref_length); DBUG_RETURN(find_current_row(buf)); } @@ -1179,6 +1204,7 @@ int ha_tina::rnd_end() off_t file_buffer_start= 0; DBUG_ENTER("ha_tina::rnd_end"); + free_root(&blobroot, MYF(0)); records_is_known= 1; if ((chain_ptr - chain) > 0) @@ -1350,6 +1376,8 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt) /* set current position to the beginning of the file */ current_position= next_position= 0; + init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0); + /* Read the file row-by-row. If everything is ok, repair is not needed. */ while (!(rc= find_current_row(buf))) { @@ -1358,6 +1386,8 @@ int ha_tina::repair(THD* thd, HA_CHECK_OPT* check_opt) current_position= next_position; } + free_root(&blobroot, MYF(0)); + my_free((char*)buf, MYF(0)); if (rc == HA_ERR_END_OF_FILE) @@ -1535,6 +1565,9 @@ int ha_tina::check(THD* thd, HA_CHECK_OPT* check_opt) local_saved_data_file_length= share->saved_data_file_length; /* set current position to the beginning of the file */ current_position= next_position= 0; + + init_alloc_root(&blobroot, BLOB_MEMROOT_ALLOC_SIZE, 0); + /* Read the file row-by-row. If everything is ok, repair is not needed. */ while (!(rc= find_current_row(buf))) { @@ -1542,6 +1575,8 @@ int ha_tina::check(THD* thd, HA_CHECK_OPT* check_opt) count--; current_position= next_position; } + + free_root(&blobroot, MYF(0)); my_free((char*)buf, MYF(0)); thd_proc_info(thd, old_proc_info); diff --git a/storage/csv/ha_tina.h b/storage/csv/ha_tina.h index 5ce09783b9b..5b4381396fc 100644 --- a/storage/csv/ha_tina.h +++ b/storage/csv/ha_tina.h @@ -82,6 +82,7 @@ class ha_tina: public handler uint32 chain_size; uint local_data_file_version; /* Saved version of the data file used */ bool records_is_known; + MEM_ROOT blobroot; private: bool get_write_pos(off_t *end_pos, tina_set *closest_hole); From 4789e3f60669904a3032b59c6fb25f7ba6966bfe Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Jan 2008 22:55:02 +0100 Subject: [PATCH 068/527] Add SqlResultSet storage/ndb/test/include/DbUtil.hpp: Add support for SqlResultSet storage/ndb/test/ndbapi/Makefile.am: Add testNDBT storage/ndb/test/src/DbUtil.cpp: Add support for SqlResultSet storage/ndb/test/src/Makefile.am: Build AtrtClient storage/ndb/test/include/AtrtClient.hpp: New BitKeeper file ``storage/ndb/test/include/AtrtClient.hpp'' storage/ndb/test/ndbapi/testNDBT.cpp: New BitKeeper file ``storage/ndb/test/ndbapi/testNDBT.cpp'' storage/ndb/test/src/AtrtClient.cpp: New BitKeeper file ``storage/ndb/test/src/AtrtClient.cpp'' --- storage/ndb/test/include/AtrtClient.hpp | 56 +++ storage/ndb/test/include/DbUtil.hpp | 92 +++- storage/ndb/test/ndbapi/Makefile.am | 3 + storage/ndb/test/ndbapi/testNDBT.cpp | 173 ++++++++ storage/ndb/test/src/AtrtClient.cpp | 215 ++++++++++ storage/ndb/test/src/DbUtil.cpp | 546 +++++++++++++++++++----- storage/ndb/test/src/Makefile.am | 2 +- 7 files changed, 962 insertions(+), 125 deletions(-) create mode 100644 storage/ndb/test/include/AtrtClient.hpp create mode 100644 storage/ndb/test/ndbapi/testNDBT.cpp create mode 100644 storage/ndb/test/src/AtrtClient.cpp diff --git a/storage/ndb/test/include/AtrtClient.hpp b/storage/ndb/test/include/AtrtClient.hpp new file mode 100644 index 00000000000..5728aca2500 --- /dev/null +++ b/storage/ndb/test/include/AtrtClient.hpp @@ -0,0 +1,56 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; 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 ATRT_CLIENT_HPP +#define ATRT_CLIENT_HPP + +#include + +class AtrtClient: public DbUtil { +public: + + enum AtrtCommandType { + ATCT_CHANGE_VERSION= 1, + ATCT_RESET_PROC= 2 + }; + + AtrtClient(const char* _user= "root", + const char* _password= "", + const char* _suffix= ".1.atrt"); + AtrtClient(MYSQL*); + ~AtrtClient(); + + + // Command functions + bool changeVersion(int process_id, const char* process_args); + bool resetProc(int process_id); + + // Query functions + bool getConnectString(int cluster_id, SqlResultSet& result); + bool getClusters(SqlResultSet& result); + bool getMgmds(int cluster_id, SqlResultSet& result); + bool getNdbds(int cluster_id, SqlResultSet& result); + +private: + int writeCommand(AtrtCommandType _type, + const Properties& args); + bool readCommand(uint command_id, + SqlResultSet& result); + + bool doCommand(AtrtCommandType _type, + const Properties& args); +}; + +#endif diff --git a/storage/ndb/test/include/DbUtil.hpp b/storage/ndb/test/include/DbUtil.hpp index a1172205ff9..d865c92f9a3 100755 --- a/storage/ndb/test/include/DbUtil.hpp +++ b/storage/ndb/test/include/DbUtil.hpp @@ -19,14 +19,11 @@ #ifndef DBUTIL_HPP #define DBUTIL_HPP -#include -#include -#include +#include +#include +#include +#include #include -//include "rand.h" -#include -#include "BaseString.hpp" -#include "NDBT.hpp" //#define DEBUG #define DIE_UNLESS(expr) \ @@ -49,6 +46,41 @@ if (r) \ DIE_UNLESS(r == 0);\ } + +class SqlResultSet : public Properties { +public: + + // Get row with number + bool get_row(int row_num); + // Load next row + bool next(void); + // Reset iterator + void reset(void); + // Remove current row from resultset + void remove(); + + SqlResultSet(); + ~SqlResultSet(); + + const char* column(const char* col_name); + uint columnAsInt(const char* col_name); + + uint insertId(); + uint affectedRows(); + uint numRows(void); + uint mysqlErrno(); + const char* mysqlError(); + const char* mysqlSqlstate(); + +private: + uint get_int(const char* name); + const char* get_string(const char* name); + + const Properties* m_curr_row; + uint m_curr_row_num; +}; + + #define DBU_FAILED 1 #define DBU_OK 0 @@ -56,11 +88,23 @@ class DbUtil { public: - /* Deprecated, see DbUtil(dbname, suffix) */ - DbUtil(const char * databaseName); - DbUtil(const char* dbname, const char* suffix = NULL); + DbUtil(MYSQL* mysql); + DbUtil(const char* dbname = "mysql", + const char* user = "root", + const char* pass = "", + const char* suffix = NULL); ~DbUtil(); + bool doQuery(const char* query); + bool doQuery(const char* query, SqlResultSet& result); + bool doQuery(const char* query, const Properties& args, SqlResultSet& result); + + bool doQuery(BaseString& str); + bool doQuery(BaseString& str, SqlResultSet& result); + bool doQuery(BaseString& str, const Properties& args, SqlResultSet& result); + + bool waitConnected(int timeout); + /* Deprecated, see connect() */ void databaseLogin(const char * system, const char * usr, @@ -74,25 +118,35 @@ public: const char * getPassword(){return m_pass.c_str();}; const char * getHost() {return m_host.c_str();}; const char * getSocket() {return m_socket.c_str();}; - const char * getServerType(){return mysql_get_server_info(mysql);}; + const char * getServerType(){return mysql_get_server_info(m_mysql);}; const char * getError(); - MYSQL * getMysql(){return mysql;}; + MYSQL * getMysql(){return m_mysql;}; MYSQL_STMT * STDCALL mysqlSimplePrepare(const char *query); void databaseLogout(); void mysqlCloseStmHandle(MYSQL_STMT *my_stmt); int connect(); + void disconnect(); int selectDb(); int selectDb(const char *); int createDb(BaseString&); - int doQuery(BaseString&); - int doQuery(const char *); int getErrorNumber(); unsigned long selectCountTable(const char * table); +protected: + + bool runQuery(const char* query, + const Properties& args, + SqlResultSet& rows); + + bool isConnected(); + + MYSQL * m_mysql; + bool m_free_mysql; /* Don't free mysql* if allocated elsewhere */ + private: bool m_connected; @@ -102,15 +156,11 @@ private: BaseString m_pass; // MySQL User Password BaseString m_dbname; // Database to use BaseString m_socket; // MySQL Server Unix Socket - BaseString default_file; - BaseString default_group; + BaseString m_default_file; + BaseString m_default_group; unsigned int m_port; // MySQL Server port - MYSQL * mysql; - MYSQL_RES * m_result; - MYSQL_ROW m_row; - void setDbName(const char * name){m_dbname.assign(name);}; void setUser(const char * user_name){m_user.assign(user_name);}; void setPassword(const char * password){m_pass.assign(password);}; @@ -120,7 +170,7 @@ private: void printError(const char *msg); void printStError(MYSQL_STMT *stmt, const char *msg); void die(const char *file, int line, const char *expr); // stop program - + }; #endif diff --git a/storage/ndb/test/ndbapi/Makefile.am b/storage/ndb/test/ndbapi/Makefile.am index 9f83b061403..81bb346417f 100644 --- a/storage/ndb/test/ndbapi/Makefile.am +++ b/storage/ndb/test/ndbapi/Makefile.am @@ -53,6 +53,7 @@ DbCreate DbAsyncGenerator \ testSRBank \ test_event_merge \ testIndexStat \ +testNDBT \ NdbRepStress EXTRA_PROGRAMS = \ @@ -99,6 +100,8 @@ ndbapi_slow_select_SOURCES = slow_select.cpp testReadPerf_SOURCES = testReadPerf.cpp testLcp_SOURCES = testLcp.cpp testPartitioning_SOURCES = testPartitioning.cpp +testNDBT_SOURCES = testNDBT.cpp +testNDBT_LDADD = $(LDADD) $(top_srcdir)/libmysql_r/libmysqlclient_r.la testBitfield_SOURCES = testBitfield.cpp NdbRepStress_SOURCES = acrt/NdbRepStress.cpp DbCreate_SOURCES = bench/mainPopulate.cpp bench/dbPopulate.cpp bench/userInterface.cpp bench/dbPopulate.h bench/userInterface.h bench/testData.h bench/testDefinitions.h bench/ndb_schema.hpp bench/ndb_error.hpp diff --git a/storage/ndb/test/ndbapi/testNDBT.cpp b/storage/ndb/test/ndbapi/testNDBT.cpp new file mode 100644 index 00000000000..9c911b9a9d9 --- /dev/null +++ b/storage/ndb/test/ndbapi/testNDBT.cpp @@ -0,0 +1,173 @@ +/* Copyright (C) 2003 MySQL AB + + This program is free software; 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 + + +int runTestAtrtClient(NDBT_Context* ctx, NDBT_Step* step){ + AtrtClient atrt; + + SqlResultSet clusters; + if (!atrt.getClusters(clusters)) + return NDBT_FAILED; + + int i= 0; + while(clusters.next()) + { + ndbout << clusters.column("name") << endl; + if (i++ == 1){ + ndbout << "removing: " << clusters.column("name") << endl; + clusters.remove(); + } + } + + clusters.reset(); + while(clusters.next()) + { + ndbout << clusters.column("name") << endl; + } + + return NDBT_OK; +} + + +int runTestDbUtil(NDBT_Context* ctx, NDBT_Step* step){ + DbUtil sql; + + { + // Select all rows from mysql.user + SqlResultSet result; + if (!sql.doQuery("SELECT * FROM mysql.user", result)) + return NDBT_FAILED; + // result.print(); + + while(result.next()) + { + ndbout << result.column("host") << ", " + << result.column("uSer") << ", " + << result.columnAsInt("max_updates") << ", " + << endl; + } + + result.reset(); + while(result.next()) + { + ndbout << result.column("host") << endl; + } + } + + { + // No column name, query should fail + Properties args; + SqlResultSet result; + if (sql.doQuery("SELECT * FROM mysql.user WHERE name=?", args, result)) + return NDBT_FAILED; + result.print(); + } + + { + // Select nonexisiting rows from mysql.user + Properties args; + SqlResultSet result; + args.put("0", "no_such_host"); + if (!sql.doQuery("SELECT * FROM mysql.user WHERE host=?", args, result)) + return NDBT_FAILED; + ndbout << "no rows" << endl; + result.print(); + + // Change args to an find one row + args.clear(); + args.put("0", "localhost"); + if (!sql.doQuery("SELECT host, user FROM mysql.user WHERE host=?", + args, result)) + return NDBT_FAILED; + result.print(); + } + + { + if (!sql.doQuery("CREATE TABLE sql_client_test (a int, b varchar(255))")) + return NDBT_FAILED; + + if (!sql.doQuery("INSERT INTO sql_client_test VALUES(1, 'hello'), (2, 'bye')")) + return NDBT_FAILED; + + // Select all rows from sql_client_test + SqlResultSet result; + if (!sql.doQuery("SELECT * FROM sql_client_test", result)) + return NDBT_FAILED; + // result.print(); + + while(result.next()) + { + } + + // Select second row from sql_client_test + Properties args; + args.put("0", 2); + if (!sql.doQuery("SELECT * FROM sql_client_test WHERE a=?", args,result)) + return NDBT_FAILED; + result.print(); + + result.reset(); + while(result.next()) + { + ndbout << "a: " << result.columnAsInt("a") << endl; + ndbout << "b: " << result.column("b") << endl; + if (result.columnAsInt("a") != 2){ + ndbout << "hepp1" << endl; + return NDBT_FAILED; + } + + if (strcmp(result.column("b"), "bye")){ + ndbout << "hepp2" << endl; + return NDBT_FAILED; + } + + } + + if (sql.selectCountTable("sql_client_test") != 2) + { + ndbout << "Got wrong count" << endl; + return NDBT_FAILED; + } + + + if (!sql.doQuery("DROP TABLE sql_client_test")) + return NDBT_FAILED; + + } + + return NDBT_OK; +} + +NDBT_TESTSUITE(testNDBT); +TESTCASE("AtrtClient", + "Test AtrtClient class"){ + INITIALIZER(runTestAtrtClient); +} +TESTCASE("DbUtil", + "Test DbUtil class"){ + INITIALIZER(runTestDbUtil); +} +NDBT_TESTSUITE_END(testNDBT); + +int main(int argc, const char** argv){ + ndb_init(); + return testNDBT.execute(argc, argv); +} + diff --git a/storage/ndb/test/src/AtrtClient.cpp b/storage/ndb/test/src/AtrtClient.cpp new file mode 100644 index 00000000000..5183242f841 --- /dev/null +++ b/storage/ndb/test/src/AtrtClient.cpp @@ -0,0 +1,215 @@ +/* Copyright (C) 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 +#include + +AtrtClient::AtrtClient(const char* _user, + const char* _password, + const char* _group_suffix) + : DbUtil(_user, _password, _group_suffix) +{ +} + + +AtrtClient::AtrtClient(MYSQL* mysql) + : DbUtil(mysql) +{ +} + + +AtrtClient::~AtrtClient(){ +} + + +int +AtrtClient::writeCommand(AtrtCommandType _type, + const Properties& args){ + if (!isConnected()) + return false; + + BaseString sql; + sql.assfmt("INSERT command ( "); + + const char* name; + { + Properties::Iterator iter(&args); + while((name= iter.next())){ + sql.appfmt("%s, ", name); + } + } + + sql.appfmt(" state, cmd) VALUES ("); + + { + Properties::Iterator iter(&args); + while((name= iter.next())){ + PropertiesType t; + Uint32 val_i; + BaseString val_s; + args.getTypeOf(name, &t); + switch(t) { + case PropertiesType_Uint32: + args.get(name, &val_i); + sql.appfmt("%d, ", val_i); + break; + case PropertiesType_char: + args.get(name, val_s); + sql.appfmt("'%s', ", val_s.c_str()); + break; + default: + assert(false); + break; + } + } + } + + sql.appfmt("'new', %d)", _type); + if (!doQuery(sql)){ + return -1; + } + + return mysql_insert_id(m_mysql); +} + + +bool +AtrtClient::readCommand(uint command_id, + SqlResultSet& result){ + Properties args; + args.put("0", command_id); + return runQuery("SELECT * FROM command WHERE id = ?", + args, + result); +} + + +bool +AtrtClient::doCommand(AtrtCommandType type, + const Properties& args){ + + int running_timeout= 10; + int total_timeout= 120; + int commandId= writeCommand(type, + args); + if (commandId == -1){ + g_err << "Failed to write command" << endl; + return false; + } + + while (true){ + + SqlResultSet result; + if (!readCommand(commandId, result)) + { + result.print(); + g_err << "Failed to read command "<< commandId << endl; + return false; + } + + // Get first row + result.next(); + + // Check if command has completed + BaseString state(result.column("state")); + if (state == "done") { + return true; + } + + if (state == "new"){ + if (!running_timeout--){ + g_err << "Timeout while waiting for command " + << commandId << " to start run" << endl; + return false; + } + } + else if (!total_timeout--){ + g_err << "Timeout while waiting for result of command " + << commandId << endl; + return false; + } + + + NdbSleep_SecSleep(1); + } + + return false; +} + + +bool +AtrtClient::changeVersion(int process_id, + const char* process_args){ + Properties args; + args.put("process_id", process_id); + args.put("process_args", process_args); + return doCommand(ATCT_CHANGE_VERSION, args); +} + + +bool +AtrtClient::resetProc(int process_id){ + Properties args; + args.put("process_id", process_id); + return doCommand(ATCT_RESET_PROC, args); +} + + +bool +AtrtClient::getConnectString(int cluster_id, SqlResultSet& result){ + Properties args; + args.put("0", cluster_id); + return doQuery("SELECT value as connectstring " \ + "FROM cluster c, process p, host h, options o " \ + "WHERE c.id=p.cluster_id AND p.host_id=h.id AND " \ + "p.id=o.process_id AND c.id=? AND " \ + "o.name='--ndb-connectstring=' AND type='ndb_mgmd'", + args, + result); +} + + +bool +AtrtClient::getClusters(SqlResultSet& result){ + Properties args; + return runQuery("SELECT id, name FROM cluster WHERE name != '.atrt'", + args, + result); +} + + +bool +AtrtClient::getMgmds(int cluster_id, SqlResultSet& result){ + Properties args; + args.put("0", cluster_id); + return runQuery("SELECT * FROM process WHERE cluster_id=? and type='ndb_mgmd'", + args, + result); +} + +bool +AtrtClient::getNdbds(int cluster_id, SqlResultSet& result){ + Properties args; + args.put("0", cluster_id); + return runQuery("SELECT * FROM process WHERE cluster_id=? and type='ndbd'", + args, + result); +} + + + + + diff --git a/storage/ndb/test/src/DbUtil.cpp b/storage/ndb/test/src/DbUtil.cpp index 5fe3e6e9fbe..a52f45b46a7 100755 --- a/storage/ndb/test/src/DbUtil.cpp +++ b/storage/ndb/test/src/DbUtil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2007 MySQL AB +/* Copyright (C) 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 @@ -16,43 +16,89 @@ /* DbUtil.cpp: implementation of the database utilities class.*/ #include "DbUtil.hpp" +#include + /* Constructors */ -DbUtil::DbUtil(const char * dbname) +DbUtil::DbUtil(const char* _dbname, + const char* _user, + const char* _password, + const char* _suffix): + m_connected(false), + m_dbname(_dbname), + m_mysql(NULL), + m_free_mysql(true) { - m_port = 0; - m_connected = false; - this->setDbName(dbname); -} - -DbUtil::DbUtil(const char * dbname, const char* suffix) -{ - this->setDbName(dbname); - m_connected = false; - const char* env= getenv("MYSQL_HOME"); if (env && strlen(env)) { - default_file.assfmt("%s/my.cnf", env); + m_default_file.assfmt("%s/my.cnf", env); } - if (suffix != NULL){ - default_group.assfmt("client%s", suffix); + if (_suffix != NULL){ + m_default_group.assfmt("client%s", _suffix); } else { - default_group.assign("client.1.master"); + m_default_group.assign("client.1.master"); } - ndbout << "default_file: " << default_file.c_str() << endl; - ndbout << "default_group: " << default_group.c_str() << endl; + ndbout << "default_file: " << m_default_file.c_str() << endl; + ndbout << "default_group: " << m_default_group.c_str() << endl; + + m_user.assign(_user); + m_pass.assign(_password); } -/* Destructor*/ + + +DbUtil::DbUtil(MYSQL* mysql): + m_connected(true), + m_mysql(mysql), + m_free_mysql(false) +{ +} + + +bool +DbUtil::isConnected(){ + if (m_connected == true) + { + assert(m_mysql); + return true; + } + return connect() == 0; +} + + +bool +DbUtil::waitConnected(int timeout) { + timeout*= 10; + while(!isConnected()){ + if (timeout-- == 0) + return false; + NdbSleep_MilliSleep(100); + } + return true; +} + + +void +DbUtil::disconnect(){ + if (m_mysql != NULL){ + if (m_free_mysql) + mysql_close(m_mysql); + m_mysql= NULL; + } + m_connected = false; +} + + +/* Destructor */ DbUtil::~DbUtil() { - this->databaseLogout(); + disconnect(); } /* Database Login */ @@ -62,18 +108,18 @@ DbUtil::databaseLogin(const char* system, const char* usr, const char* password, unsigned int portIn, const char* sockIn, bool transactional) { - if (!(mysql = mysql_init(NULL))) + if (!(m_mysql = mysql_init(NULL))) { myerror("DB Login-> mysql_init() failed"); exit(DBU_FAILED); } - this->setUser(usr); - this->setHost(system); - this->setPassword(password); - this->setPort(portIn); - this->setSocket(sockIn); + setUser(usr); + setHost(system); + setPassword(password); + setPort(portIn); + setSocket(sockIn); - if (!(mysql_real_connect(mysql, + if (!(mysql_real_connect(m_mysql, m_host.c_str(), m_user.c_str(), m_pass.c_str(), @@ -82,40 +128,40 @@ DbUtil::databaseLogin(const char* system, const char* usr, m_socket.c_str(), 0))) { myerror("connection failed"); - mysql_close(mysql); + mysql_close(m_mysql); exit(DBU_FAILED); } - mysql->reconnect = TRUE; + m_mysql->reconnect = TRUE; /* set AUTOCOMMIT */ if(!transactional) - mysql_autocommit(mysql, TRUE); + mysql_autocommit(m_mysql, TRUE); else - mysql_autocommit(mysql, FALSE); + mysql_autocommit(m_mysql, FALSE); #ifdef DEBUG printf("\n\tConnected to MySQL server version: %s (%lu)\n\n", - mysql_get_server_info(mysql), - (unsigned long) mysql_get_server_version(mysql)); + mysql_get_server_info(m_mysql), + (unsigned long) mysql_get_server_version(m_mysql)); #endif - this->selectDb(); + selectDb(); } /* Database Connect */ -int +int DbUtil::connect() { - if (!(mysql = mysql_init(NULL))) + if (!(m_mysql = mysql_init(NULL))) { myerror("DB connect-> mysql_init() failed"); return DBU_FAILED; } /* Load connection parameters file and group */ - if (mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, default_file.c_str()) || - mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, default_group.c_str())) + if (mysql_options(m_mysql, MYSQL_READ_DEFAULT_FILE, m_default_file.c_str()) || + mysql_options(m_mysql, MYSQL_READ_DEFAULT_GROUP, m_default_group.c_str())) { myerror("DB Connect -> mysql_options failed"); return DBU_FAILED; @@ -126,14 +172,14 @@ DbUtil::connect() NOTE! user and password can be stored there as well */ - if (mysql_real_connect(mysql, NULL, "root","", m_dbname.c_str(), + if (mysql_real_connect(m_mysql, NULL, "root","", m_dbname.c_str(), 0, NULL, 0) == NULL) { myerror("connection failed"); - mysql_close(mysql); + mysql_close(m_mysql); return DBU_FAILED; } - this->selectDb(); + selectDb(); m_connected = true; return DBU_OK; } @@ -141,14 +187,14 @@ DbUtil::connect() /* Database Logout */ -void +void DbUtil::databaseLogout() { - if (mysql){ + if (m_mysql){ #ifdef DEBUG printf("\n\tClosing the MySQL database connection ...\n\n"); #endif - mysql_close(mysql); + mysql_close(m_mysql); } } @@ -181,28 +227,28 @@ DbUtil::mysqlCloseStmHandle(MYSQL_STMT *my_stmt) /* Error Printing */ -void +void DbUtil::printError(const char *msg) { - if (this->getMysql() && mysql_errno(this->getMysql())) + if (m_mysql && mysql_errno(m_mysql)) { - if (this->getMysql()->server_version) - printf("\n [MySQL-%s]", this->getMysql()->server_version); + if (m_mysql->server_version) + printf("\n [MySQL-%s]", m_mysql->server_version); else printf("\n [MySQL]"); - printf("[%d] %s\n", this->getErrorNumber(), this->getError()); + printf("[%d] %s\n", getErrorNumber(), getError()); } else if (msg) printf(" [MySQL] %s\n", msg); } -void +void DbUtil::printStError(MYSQL_STMT *stmt, const char *msg) { if (stmt && mysql_stmt_errno(stmt)) { - if (this->getMysql() && this->getMysql()->server_version) - printf("\n [MySQL-%s]", this->getMysql()->server_version); + if (m_mysql && m_mysql->server_version) + printf("\n [MySQL-%s]", m_mysql->server_version); else printf("\n [MySQL]"); @@ -215,19 +261,19 @@ DbUtil::printStError(MYSQL_STMT *stmt, const char *msg) /* Select which database to use */ -int +int DbUtil::selectDb() { - if ((this->getDbName()) != NULL) + if ((getDbName()) != NULL) { - if(mysql_select_db(this->getMysql(), this->getDbName())) + if(mysql_select_db(m_mysql, this->getDbName())) { - this->printError("mysql_select_db failed"); + printError("mysql_select_db failed"); return DBU_FAILED; } return DBU_OK; } - this->printError("getDbName() == NULL"); + printError("getDbName() == NULL"); return DBU_FAILED; } @@ -235,9 +281,9 @@ int DbUtil::selectDb(const char * m_db) { { - if(mysql_select_db(this->getMysql(), m_db)) + if(mysql_select_db(m_mysql, m_db)) { - this->printError("mysql_select_db failed"); + printError("mysql_select_db failed"); return DBU_FAILED; } return DBU_OK; @@ -249,89 +295,383 @@ DbUtil::createDb(BaseString& m_db) { BaseString stm; { - if(mysql_select_db(this->getMysql(), m_db.c_str()) == DBU_OK) + if(mysql_select_db(m_mysql, m_db.c_str()) == DBU_OK) { stm.assfmt("DROP DATABASE %s", m_db.c_str()); - if(this->doQuery(m_db.c_str()) == DBU_FAILED) + if(doQuery(m_db.c_str()) == DBU_FAILED) return DBU_FAILED; } stm.assfmt("CREATE DATABASE %s", m_db.c_str()); - if(this->doQuery(m_db.c_str()) == DBU_FAILED) + if(doQuery(m_db.c_str()) == DBU_FAILED) return DBU_FAILED; return DBU_OK; } } + +/* Count Table Rows */ + +unsigned long +DbUtil::selectCountTable(const char * table) +{ + BaseString query; + SqlResultSet result; + + query.assfmt("select count(*) as count from %s", table); + if (!doQuery(query, result)) { + printError("select count(*) failed"); + return -1; + } + return result.columnAsInt("count"); +} + + /* Run Simple Queries */ -int -DbUtil::doQuery(BaseString& str) -{ - if(mysql_query(this->getMysql(), str.c_str())) - { - this->printError(str.c_str()); - return DBU_FAILED; + +static bool is_int_type(enum_field_types type){ + switch(type){ + case MYSQL_TYPE_TINY: + case MYSQL_TYPE_SHORT: + case MYSQL_TYPE_LONGLONG: + case MYSQL_TYPE_INT24: + case MYSQL_TYPE_LONG: + case MYSQL_TYPE_ENUM: + return true; + default: + return false; } - return DBU_OK; + return false; } -int -DbUtil::doQuery(const char * stm) -{ - if(mysql_query(this->getMysql(), stm)) + +bool +DbUtil::runQuery(const char* sql, + const Properties& args, + SqlResultSet& rows){ + + rows.clear(); + if (!isConnected()) + return false; + + g_debug << "runQuery: " << endl + << " sql: '" << sql << "'" << endl; + + + MYSQL_STMT *stmt= mysql_stmt_init(m_mysql); + if (mysql_stmt_prepare(stmt, sql, strlen(sql))) { - this->printError(stm); - return DBU_FAILED; + g_err << "Failed to prepare: " << mysql_error(m_mysql) << endl; + return false; } - return DBU_OK; + + uint params= mysql_stmt_param_count(stmt); + MYSQL_BIND bind_param[params]; + bzero(bind_param, sizeof(bind_param)); + + for(uint i= 0; i < mysql_stmt_param_count(stmt); i++) + { + BaseString name; + name.assfmt("%d", i); + // Parameters are named 0, 1, 2... + if (!args.contains(name.c_str())) + { + g_err << "param " << i << " missing" << endl; + assert(false); + } + PropertiesType t; + Uint32 val_i; + const char* val_s; + args.getTypeOf(name.c_str(), &t); + switch(t) { + case PropertiesType_Uint32: + args.get(name.c_str(), &val_i); + bind_param[i].buffer_type= MYSQL_TYPE_LONG; + bind_param[i].buffer= (char*)&val_i; + g_debug << " param" << name.c_str() << ": " << val_i << endl; + break; + case PropertiesType_char: + args.get(name.c_str(), &val_s); + bind_param[i].buffer_type= MYSQL_TYPE_STRING; + bind_param[i].buffer= (char*)val_s; + bind_param[i].buffer_length= strlen(val_s); + g_debug << " param" << name.c_str() << ": " << val_s << endl; + break; + default: + assert(false); + break; + } + } + if (mysql_stmt_bind_param(stmt, bind_param)) + { + g_err << "Failed to bind param: " << mysql_error(m_mysql) << endl; + mysql_stmt_close(stmt); + return false; + } + + if (mysql_stmt_execute(stmt)) + { + g_err << "Failed to execute: " << mysql_error(m_mysql) << endl; + mysql_stmt_close(stmt); + return false; + } + + /* + Update max_length, making it possible to know how big + buffers to allocate + */ + my_bool one= 1; + mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, (void*) &one); + + if (mysql_stmt_store_result(stmt)) + { + g_err << "Failed to store result: " << mysql_error(m_mysql) << endl; + mysql_stmt_close(stmt); + return false; + } + + uint row= 0; + MYSQL_RES* res= mysql_stmt_result_metadata(stmt); + if (res != NULL) + { + MYSQL_FIELD *fields= mysql_fetch_fields(res); + uint num_fields= mysql_num_fields(res); + MYSQL_BIND bind_result[num_fields]; + bzero(bind_result, sizeof(bind_result)); + + for (uint i= 0; i < num_fields; i++) + { + if (is_int_type(fields[i].type)){ + bind_result[i].buffer_type= MYSQL_TYPE_LONG; + bind_result[i].buffer= malloc(sizeof(int)); + } + else + { + uint max_length= fields[i].max_length + 1; + bind_result[i].buffer_type= MYSQL_TYPE_STRING; + bind_result[i].buffer= malloc(max_length); + bind_result[i].buffer_length= max_length; + } + } + + if (mysql_stmt_bind_result(stmt, bind_result)){ + g_err << "Failed to bind result: " << mysql_error(m_mysql) << endl; + mysql_stmt_close(stmt); + return false; + } + + while (mysql_stmt_fetch(stmt) != MYSQL_NO_DATA) + { + Properties curr(true); + for (uint i= 0; i < num_fields; i++){ + if (is_int_type(fields[i].type)) + curr.put(fields[i].name, *(int*)bind_result[i].buffer); + else + curr.put(fields[i].name, (char*)bind_result[i].buffer); + } + rows.put("row", row++, &curr); + } + + mysql_free_result(res); + + for (uint i= 0; i < num_fields; i++) + free(bind_result[i].buffer); + + } + + // Save stats in result set + rows.put("rows", row); + rows.put("affected_rows", mysql_affected_rows(m_mysql)); + rows.put("mysql_errno", mysql_errno(m_mysql)); + rows.put("mysql_error", mysql_error(m_mysql)); + rows.put("mysql_sqlstate", mysql_sqlstate(m_mysql)); + rows.put("insert_id", mysql_insert_id(m_mysql)); + + mysql_stmt_close(stmt); + return true; } + +bool +DbUtil::doQuery(const char* query){ + const Properties args; + SqlResultSet result; + return doQuery(query, args, result); +} + + +bool +DbUtil::doQuery(const char* query, SqlResultSet& result){ + Properties args; + return doQuery(query, args, result); +} + + +bool +DbUtil::doQuery(const char* query, const Properties& args, + SqlResultSet& result){ + if (!runQuery(query, args, result)) + return false; + result.get_row(0); // Load first row + return true; +} + + +bool +DbUtil::doQuery(BaseString& str){ + return doQuery(str.c_str()); +} + + +bool +DbUtil::doQuery(BaseString& str, SqlResultSet& result){ + return doQuery(str.c_str(), result); +} + + +bool +DbUtil::doQuery(BaseString& str, const Properties& args, + SqlResultSet& result){ + return doQuery(str.c_str(), args, result); +} + + /* Return MySQL Error String */ -const char * +const char * DbUtil::getError() { return mysql_error(this->getMysql()); } -/* Retrun MySQL Error Number */ +/* Return MySQL Error Number */ -int +int DbUtil::getErrorNumber() { return mysql_errno(this->getMysql()); } -/* Count Table Rows */ - -unsigned long -DbUtil::selectCountTable(const char * table) -{ - unsigned long m_count = 0; - BaseString m_query; - - m_query.assfmt("select count(*) from %s", table); - if (mysql_query(this->getMysql(),m_query.c_str()) || - !(m_result=mysql_store_result(this->getMysql()))) - { - this->printError("selectCountTable\n"); - return DBU_FAILED; - } - m_row = mysql_fetch_row(m_result); - m_count = (ulong) strtoull(m_row[0], (char**) 0, 10); - mysql_free_result(m_result); - - return m_count; -} - /* DIE */ -void +void DbUtil::die(const char *file, int line, const char *expr) { printf("%s:%d: check failed: '%s'\n", file, line, expr); abort(); } + +/* SqlResultSet */ + +bool +SqlResultSet::get_row(int row_num){ + if(!get("row", row_num, &m_curr_row)){ + return false; + } + return true; +} + + +bool +SqlResultSet::next(void){ + return get_row(++m_curr_row_num); +} + + +// Reset iterator +void SqlResultSet::reset(void){ + m_curr_row_num= -1; + m_curr_row= 0; +} + + +// Remove row from resultset +void SqlResultSet::remove(){ + BaseString row_name; + row_name.assfmt("row_%d", m_curr_row_num); + Properties::remove(row_name.c_str()); +} + + +SqlResultSet::SqlResultSet(): m_curr_row(0), m_curr_row_num(-1){ +} + + +SqlResultSet::~SqlResultSet(){ +} + + +const char* SqlResultSet::column(const char* col_name){ + const char* value; + if (!m_curr_row){ + g_err << "ERROR: SqlResultSet::column("<< col_name << ")" << endl + << "There is no row loaded, call next() before " + << "acessing the column values" << endl; + assert(m_curr_row); + } + if (!m_curr_row->get(col_name, &value)) + return NULL; + return value; +} + + +uint SqlResultSet::columnAsInt(const char* col_name){ + uint value; + if (!m_curr_row){ + g_err << "ERROR: SqlResultSet::columnAsInt("<< col_name << ")" << endl + << "There is no row loaded, call next() before " + << "acessing the column values" << endl; + assert(m_curr_row); + } + if (!m_curr_row->get(col_name, &value)) + return (uint)-1; + return value; +} + + +uint SqlResultSet::insertId(){ + return get_int("insert_id"); +} + + +uint SqlResultSet::affectedRows(){ + return get_int("affected_rows"); +} + + +uint SqlResultSet::numRows(void){ + return get_int("rows"); +} + + +uint SqlResultSet::mysqlErrno(void){ + return get_int("mysql_errno"); +} + + +const char* SqlResultSet::mysqlError(void){ + return get_string("mysql_error"); +} + + +const char* SqlResultSet::mysqlSqlstate(void){ + return get_string("mysql_sqlstate"); +} + + +uint SqlResultSet::get_int(const char* name){ + uint value; + get(name, &value); + return value; +} + + +const char* SqlResultSet::get_string(const char* name){ + const char* value; + get(name, &value); + return value; +} + /* EOF */ diff --git a/storage/ndb/test/src/Makefile.am b/storage/ndb/test/src/Makefile.am index 8cbe83dfbcf..1e4f30c3f39 100644 --- a/storage/ndb/test/src/Makefile.am +++ b/storage/ndb/test/src/Makefile.am @@ -23,7 +23,7 @@ libNDBT_a_SOURCES = \ HugoAsynchTransactions.cpp UtilTransactions.cpp \ NdbRestarter.cpp NdbRestarts.cpp NDBT_Output.cpp \ NdbBackup.cpp NdbConfig.cpp NdbGrep.cpp NDBT_Table.cpp \ - NdbSchemaCon.cpp NdbSchemaOp.cpp getarg.c \ + NdbSchemaCon.cpp NdbSchemaOp.cpp getarg.c AtrtClient.cpp \ CpcClient.cpp NdbMixRestarter.cpp NDBT_Thread.cpp DbUtil.cpp INCLUDES_LOC = -I$(top_srcdir)/storage/ndb/src/common/mgmcommon -I$(top_srcdir)/storage/ndb/include/mgmcommon -I$(top_srcdir)/storage/ndb/include/kernel -I$(top_srcdir)/storage/ndb/src/mgmapi -I$(top_srcdir)/include From 63c73b52f3c67ffe8510c7dc8af12411136cee65 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Jan 2008 13:49:03 -0500 Subject: [PATCH 069/527] New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Added new tests and corrected existing tests mysql-test/suite/stress/include/ddl3.inc: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Had to change CREATE TABLE statements to include NOT NULL due to CSV engine constraints mysql-test/suite/stress/r/ddl_archive.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc mysql-test/suite/stress/r/ddl_csv.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc mysql-test/suite/stress/r/ddl_innodb.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc mysql-test/suite/stress/r/ddl_memory.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc mysql-test/suite/stress/r/ddl_myisam.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc mysql-test/suite/stress/r/ddl_ndb.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Reproduced .result files due to changes in ddl3.inc BitKeeper/etc/ignore: Added mysql-test/.DS_Store .DS_Store to the ignore list mysql-test/t/disabled.def: Disabled new test - csv_alter_table.test file due to Bug#33696. Cannot generate a .result file due to the Bug. These tests can be enabled to test the bug fix without needing new tests unless the developer feels the need to add more. mysql-test/r/csv_not_null.result: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support mysql-test/t/csv_alter_table.test: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support Designed to test fixes for Bug#33696 - CSV Engine allows nullable columns via ALTER TABLE statements mysql-test/t/csv_not_null.test: New tests added for Bug#33558 - Test "stress.ddl_csv needs nullable columns which CSV does not support --- .bzrignore | 2 + mysql-test/r/csv_not_null.result | 59 +++++++++++ mysql-test/suite/stress/include/ddl3.inc | 2 +- mysql-test/suite/stress/r/ddl_archive.result | 16 +-- mysql-test/suite/stress/r/ddl_csv.result | 16 +-- mysql-test/suite/stress/r/ddl_innodb.result | 16 +-- mysql-test/suite/stress/r/ddl_memory.result | 16 +-- mysql-test/suite/stress/r/ddl_myisam.result | 16 +-- mysql-test/suite/stress/r/ddl_ndb.result | 16 +-- mysql-test/t/csv_alter_table.test | 56 ++++++++++ mysql-test/t/csv_not_null.test | 106 +++++++++++++++++++ mysql-test/t/disabled.def | 1 + 12 files changed, 273 insertions(+), 49 deletions(-) create mode 100644 mysql-test/r/csv_not_null.result create mode 100644 mysql-test/t/csv_alter_table.test create mode 100644 mysql-test/t/csv_not_null.test diff --git a/.bzrignore b/.bzrignore index 4477d4f1243..c54795778c8 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3015,3 +3015,5 @@ zlib/*.vcproj mysql-test/funcs_1.log mysql-test/funcs_1.tar mysql-test/suite/funcs_1.tar.gz +mysql-test/.DS_Store +.DS_Store diff --git a/mysql-test/r/csv_not_null.result b/mysql-test/r/csv_not_null.result new file mode 100644 index 00000000000..9757d258618 --- /dev/null +++ b/mysql-test/r/csv_not_null.result @@ -0,0 +1,59 @@ +# ===== csv_not_null.1 ===== +DROP TABLE IF EXISTS t1, t2; +# === Will fail -- no NOT NULL === +CREATE TABLE t1 (a int) ENGINE = CSV; +ERROR 42000: The storage engine for the table doesn't support nullable columns +# === Good CREATE === +CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; +# === Will fail -- ALL columns need NOT NULL == +CREATE TABLE t2 (a int NOT NULL, b char(20)) ENGINE = CSV; +ERROR 42000: The storage engine for the table doesn't support nullable columns +DROP TABLE t1; +# ===== csv_not_null.2 ===== +DROP TABLE IF EXISTS t1; +CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL, +d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) +ENGINE = CSV; +# === should result in default for each datatype === +INSERT INTO t1 VALUES(); +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31'); +SELECT * FROM t1; +a b c d e f +0 foo 0000-00-00 +0 abc def ghi bar 1999-12-31 +# === insert failures === +INSERT INTO t1 VALUES(NULL,'ab','a','b','foo','2007-01-01'); +ERROR 23000: Column 'a' cannot be null +INSERT INTO t1 VALUES(default(a),default(b), default(c), default(d), +default(e), default(f)); +ERROR HY000: Field 'a' doesn't have a default value +DROP TABLE t1; +# ===== csv_not_null.3 ===== +DROP TABLE IF EXISTS t1; +CREATE DATABASE csv_not_null_test; +USE csv_not_null_test; +CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; +INSERT INTO t1 VALUES(); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +Warning 1364 Field 'b' doesn't have a default value +SELECT * FROM t1; +a b +0 +UPDATE t1 set b = 'new_value' where a = 0; +SELECT * FROM t1; +a b +0 new_value +UPDATE t1 set b = NULL where b = 'new_value'; +Warnings: +Warning 1048 Column 'b' cannot be null +SELECT * FROM t1; +a b +0 +DROP TABLE t1; diff --git a/mysql-test/suite/stress/include/ddl3.inc b/mysql-test/suite/stress/include/ddl3.inc index aacf09f9428..d41c8506be4 100644 --- a/mysql-test/suite/stress/include/ddl3.inc +++ b/mysql-test/suite/stress/include/ddl3.inc @@ -24,7 +24,7 @@ #---------------------------------------------------------------------- # Settings for Subtest 3 variants # Scenario: CREATE TABLE/CREATE TABLE(F)/DROP TABLE/DROP TABLE(F) -let $create_table= CREATE TABLE t1 (f1 BIGINT) ENGINE=$engine_type; +let $create_table= CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=$engine_type; let $drop_table= DROP TABLE t1; #---------------------------------------------------------------------- diff --git a/mysql-test/suite/stress/r/ddl_archive.result b/mysql-test/suite/stress/r/ddl_archive.result index 47c64a6af94..457fc30b9f9 100644 --- a/mysql-test/suite/stress/r/ddl_archive.result +++ b/mysql-test/suite/stress/r/ddl_archive.result @@ -29,26 +29,26 @@ DROP TABLE IF EXISTS 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) ENGINE=ARCHIVE -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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) ENGINE=ARCHIVE -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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) ENGINE=ARCHIVE -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (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) ENGINE=ARCHIVE -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=ARCHIVE (expect to get ER_TABLE_EXISTS_ERROR) # default: DROP TABLE t1 # con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) # Subtest 5A (one connection, no PREPARE/EXECUTE) diff --git a/mysql-test/suite/stress/r/ddl_csv.result b/mysql-test/suite/stress/r/ddl_csv.result index 3dfa0c8fd15..2346638360b 100644 --- a/mysql-test/suite/stress/r/ddl_csv.result +++ b/mysql-test/suite/stress/r/ddl_csv.result @@ -29,26 +29,26 @@ DROP TABLE IF EXISTS 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) ENGINE=CSV -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (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) ENGINE=CSV -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (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) ENGINE=CSV -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (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) ENGINE=CSV -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=CSV (expect to get ER_TABLE_EXISTS_ERROR) # default: DROP TABLE t1 # con2: DROP TABLE t1 (expect to get ER_BAD_TABLE_ERROR) DEALLOCATE PREPARE stmt_start; diff --git a/mysql-test/suite/stress/r/ddl_innodb.result b/mysql-test/suite/stress/r/ddl_innodb.result index 6417d3e1c5c..911aed2622a 100644 --- a/mysql-test/suite/stress/r/ddl_innodb.result +++ b/mysql-test/suite/stress/r/ddl_innodb.result @@ -53,26 +53,26 @@ ENGINE = InnoDB # 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) ENGINE=InnoDB -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (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) ENGINE=InnoDB -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (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) ENGINE=InnoDB -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (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) ENGINE=InnoDB -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=InnoDB (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=InnoDB (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=InnoDB; diff --git a/mysql-test/suite/stress/r/ddl_memory.result b/mysql-test/suite/stress/r/ddl_memory.result index 1700fbc2745..7ad9f9a61c5 100644 --- a/mysql-test/suite/stress/r/ddl_memory.result +++ b/mysql-test/suite/stress/r/ddl_memory.result @@ -53,26 +53,26 @@ ENGINE = MEMORY # 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) ENGINE=MEMORY -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (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) ENGINE=MEMORY -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (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) ENGINE=MEMORY -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (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) ENGINE=MEMORY -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MEMORY (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MEMORY (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=MEMORY; diff --git a/mysql-test/suite/stress/r/ddl_myisam.result b/mysql-test/suite/stress/r/ddl_myisam.result index 82be55b8371..808b22dc859 100644 --- a/mysql-test/suite/stress/r/ddl_myisam.result +++ b/mysql-test/suite/stress/r/ddl_myisam.result @@ -53,26 +53,26 @@ ENGINE = MyISAM # 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) ENGINE=MyISAM -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (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) ENGINE=MyISAM -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (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) ENGINE=MyISAM -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (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) ENGINE=MyISAM -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=MyISAM (expect to get ER_TABLE_EXISTS_ERROR) +# default: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM +# con2: CREATE TABLE t1 (f1 BIGINT NOT NULL) ENGINE=MyISAM (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=MyISAM; diff --git a/mysql-test/suite/stress/r/ddl_ndb.result b/mysql-test/suite/stress/r/ddl_ndb.result index 39146e65fb0..05c29456f7c 100644 --- a/mysql-test/suite/stress/r/ddl_ndb.result +++ b/mysql-test/suite/stress/r/ddl_ndb.result @@ -53,26 +53,26 @@ ENGINE = NDB # 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) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# 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) ENGINE=NDB -# default: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# 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) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# 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) ENGINE=NDB -# con2: CREATE TABLE t1 (f1 BIGINT) ENGINE=NDB (expect to get ER_TABLE_EXISTS_ERROR) +# 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; diff --git a/mysql-test/t/csv_alter_table.test b/mysql-test/t/csv_alter_table.test new file mode 100644 index 00000000000..0093a1d10a7 --- /dev/null +++ b/mysql-test/t/csv_alter_table.test @@ -0,0 +1,56 @@ +#----------------------------------------------------------------------------- +# csv_alter_table.test - .test file for MySQL regression suite +# Purpose: To test the behavior of the CSV engine +# Bug#31473 resulted in strict enforcement of non-nullable +# columns in CSV engine. +# Tests code for Bug#33696 - CSV engine allows NULLable +# Columns via ALTER TABLE statements +# +# Author pcrews +# Last modified: 2008-01-06 +#----------------------------------------------------------------------------- + +--source include/have_csv.inc + +############################################################################# +# Testcase csv_alter_table.1: Positive test for ALTER table +# +############################################################################# +-- echo # ===== csv_alter_table.1 ===== +-- disable_warnings +DROP TABLE IF EXISTS t1; +-- enable_warnings + +CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; +ALTER TABLE t1 ADD COLUMN b CHAR(5) NOT NULL; +DESC t1; +ALTER TABLE t1 DROP COLUMN b; +DESC t1; +ALTER TABLE t1 MODIFY a BIGINT NOT NULL; +DESC t1; +ALTER TABLE t1 CHANGE a a INT NOT NULL; +DESC t1; + +DROP TABLE t1; + +############################################################################# +# Testcase csv_alter_table.2: Negative test for ALTER table +# These queries should not succeed / should throw errors +############################################################################# +-- echo # ===== csv_alter_table.2 ===== +-- disable_warnings +DROP TABLE IF EXISTS t1; +-- enable_warnings + +CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 ADD COLUMN b CHAR(5); +DESC t1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 MODIFY a BIGINT; +DESC t1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 CHANGE a a INT; +DESC t1; + +DROP TABLE t1; diff --git a/mysql-test/t/csv_not_null.test b/mysql-test/t/csv_not_null.test new file mode 100644 index 00000000000..e79688fd95f --- /dev/null +++ b/mysql-test/t/csv_not_null.test @@ -0,0 +1,106 @@ +#----------------------------------------------------------------------------- +# csv_not_null.test - .test file for MySQL regression suite +# Purpose: To test the behavior of the CSV engine +# Bug#31473 resulted in strict enforcement of non-nullable +# columns in CSV engine. +# NOTE: Main functionality tested - NOT NULL restrictions on CSV tables +# CREATE, INSERT, and UPDATE statements +# ALTER statements in separate file due to BUG#33696 +# Author pcrews +# Last modified: 2008-01-04 +#----------------------------------------------------------------------------- + +--source include/have_csv.inc + +############################################################################# +# Testcase csv_not_null.1: CREATE TABLE for CSV Engine requires explicit +# NOT NULL for each column +############################################################################# +-- echo # ===== csv_not_null.1 ===== +-- disable_warnings +DROP TABLE IF EXISTS t1, t2; +-- enable_warnings + + +--echo # === Will fail -- no NOT NULL === +--error ER_CHECK_NOT_IMPLEMENTED +CREATE TABLE t1 (a int) ENGINE = CSV; + +--echo # === Good CREATE === +CREATE TABLE t1 (a int NOT NULL) ENGINE = CSV; + +--echo # === Will fail -- ALL columns need NOT NULL == +--error ER_CHECK_NOT_IMPLEMENTED +CREATE TABLE t2 (a int NOT NULL, b char(20)) ENGINE = CSV; + + +DROP TABLE t1; +############################################################################## +# Testcase csv_not_null.2: INSERT tests -- validating behavior of INSERT +# statements for CSV +############################################################################## +-- echo # ===== csv_not_null.2 ===== +-- disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + + +CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL, +d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL) +ENGINE = CSV; +-- echo # === should result in default for each datatype === +-- disable_warnings +INSERT INTO t1 VALUES(); +-- enable_warnings +SELECT * FROM t1; + +-- disable_warnings +# NOTE - Test disabled due to enum crash for this INSERT +# See Bug#33717 - INSERT...(default) fails for enum. +# Crashes CSV tables, loads spaces for MyISAM +#INSERT INTO t1 VALUES(default,default,default,default,default,default); +-- enable_warnings + +SELECT * FROM t1; +INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31'); +SELECT * FROM t1; +-- echo # === insert failures === +--error ER_BAD_NULL_ERROR +INSERT INTO t1 VALUES(NULL,'ab','a','b','foo','2007-01-01'); +--error ER_NO_DEFAULT_FOR_FIELD +INSERT INTO t1 VALUES(default(a),default(b), default(c), default(d), + default(e), default(f)); + + +DROP TABLE t1; + +############################################################################## +# Testcase csv_not_null.3: UPDATE tests -- examining behavior of UPDATE +# statements for CSV +# NOTE: Should not allow UPDATE
set = NULL +# WHERE ; +# However, this is currently allowed -- is +# set to the default value for the given datatype +# Might have to change this test depending on the action taken for +# Bug#33699 (addressing this behavior) +############################################################################## +-- echo # ===== csv_not_null.3 ===== +-- disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +CREATE DATABASE csv_not_null_test; +USE csv_not_null_test; + +CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; +INSERT INTO t1 VALUES(); +SELECT * FROM t1; +UPDATE t1 set b = 'new_value' where a = 0; +SELECT * FROM t1; +# Might need to change this depending on Bug#33699 -UPDATE allows NULL +# as new value on NOT NULL columns (= default datatype value) +# Currently sets to datatype default -- might throw error +UPDATE t1 set b = NULL where b = 'new_value'; +SELECT * FROM t1; + +DROP TABLE t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 3f9ec52ca36..15d02ac674a 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -23,3 +23,4 @@ wait_timeout : Bug#32801 wait_timeout.test fails randomly ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 +csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables From 7f2ed381d3c41bab2545c907aa92aaf8181c489e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 21 Jan 2008 22:28:43 -0500 Subject: [PATCH 070/527] Fix of .test and .result file for Bug#33558 - stress.ddl_csv requires nullable columns which CSV does not support --- mysql-test/r/csv_not_null.result | 2 -- mysql-test/t/csv_not_null.test | 2 -- 2 files changed, 4 deletions(-) diff --git a/mysql-test/r/csv_not_null.result b/mysql-test/r/csv_not_null.result index 9757d258618..ccd88631ce6 100644 --- a/mysql-test/r/csv_not_null.result +++ b/mysql-test/r/csv_not_null.result @@ -36,8 +36,6 @@ ERROR HY000: Field 'a' doesn't have a default value DROP TABLE t1; # ===== csv_not_null.3 ===== DROP TABLE IF EXISTS t1; -CREATE DATABASE csv_not_null_test; -USE csv_not_null_test; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; INSERT INTO t1 VALUES(); Warnings: diff --git a/mysql-test/t/csv_not_null.test b/mysql-test/t/csv_not_null.test index e79688fd95f..ae9742ea72d 100644 --- a/mysql-test/t/csv_not_null.test +++ b/mysql-test/t/csv_not_null.test @@ -89,8 +89,6 @@ DROP TABLE t1; DROP TABLE IF EXISTS t1; --enable_warnings -CREATE DATABASE csv_not_null_test; -USE csv_not_null_test; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; INSERT INTO t1 VALUES(); From 1486a5a7442dd18d9f1b5b3291e885eff53b01b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Jan 2008 14:18:47 +0100 Subject: [PATCH 071/527] DictCache.hpp, Ndb.hpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node ndb_restore.result, ndb_restore.test: Changed test to use information_schema to check auto_increment DictCache.cpp, Ndb.cpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node. When setting the auto_increment value we'll also read up the new value, this is useful if we use the table the first time in this MySQL Server and haven't yet seen the NEXTID value. The kernel will avoid updating since it already has the value but will also read up the NEXTID value to ensure we don't need to do this any more time. ndb_auto_increment.result: Updated result file since it was incorrect ndb/include/ndbapi/Ndb.hpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node ndb/src/ndbapi/DictCache.hpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node ndb/src/ndbapi/DictCache.cpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node. When setting the auto_increment value we'll also read up the new value, this is useful if we use the table the first time in this MySQL Server and haven't yet seen the NEXTID value. The kernel will avoid updating since it already has the value but will also read up the NEXTID value to ensure we don't need to do this any more time. ndb/src/ndbapi/Ndb.cpp: Add new variable m_highest_seen when only peeking at auto_increment NEXTID and not retrieving to cache. Add new method to check tupleId before calling data node. When setting the auto_increment value we'll also read up the new value, this is useful if we use the table the first time in this MySQL Server and haven't yet seen the NEXTID value. The kernel will avoid updating since it already has the value but will also read up the NEXTID value to ensure we don't need to do this any more time. mysql-test/r/ndb_restore.result: Changed test to use information_schema to check auto_increment mysql-test/t/ndb_restore.test: Changed test to use information_schema to check auto_increment mysql-test/r/ndb_auto_increment.result: Updated result file since it was incorrect --- mysql-test/r/ndb_auto_increment.result | 6 +- mysql-test/r/ndb_restore.result | 50 +++++++--- mysql-test/t/ndb_restore.test | 25 +++-- ndb/include/ndbapi/Ndb.hpp | 8 +- ndb/src/ndbapi/DictCache.cpp | 1 + ndb/src/ndbapi/DictCache.hpp | 1 + ndb/src/ndbapi/Ndb.cpp | 125 ++++++++++++++++++------- 7 files changed, 149 insertions(+), 67 deletions(-) diff --git a/mysql-test/r/ndb_auto_increment.result b/mysql-test/r/ndb_auto_increment.result index b7c9fa8e2b5..f8ef5af2770 100644 --- a/mysql-test/r/ndb_auto_increment.result +++ b/mysql-test/r/ndb_auto_increment.result @@ -421,10 +421,10 @@ select * from t1 order by a; a 1 20 -21 33 34 35 +65 insert into t1 values (100); insert into t1 values (NULL); insert into t1 values (NULL); @@ -432,11 +432,11 @@ select * from t1 order by a; a 1 20 -21 -22 33 34 35 +65 +66 100 101 set auto_increment_offset = @old_auto_increment_offset; diff --git a/mysql-test/r/ndb_restore.result b/mysql-test/r/ndb_restore.result index 9faac2df0a4..c48333f6ea8 100644 --- a/mysql-test/r/ndb_restore.result +++ b/mysql-test/r/ndb_restore.result @@ -266,21 +266,41 @@ a 2000 3000 10000 -show table status like 't1_c'; -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 -X X X X X X X X X X 3001 X X X X X X X -show table status like 't2_c'; -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 -X X X X X X X X X X 501 X X X X X X X -show table status like 't4_c'; -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 -X X X X X X X X X X 290000001 X X X X X X X -show table status like 't7_c'; -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 -X X X X X X X X X X 29 X X X X X X X -show table status like 't10_c'; -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 -X X X X X X X X X X 10001 X X X X X X X +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 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; 520093696, diff --git a/mysql-test/t/ndb_restore.test b/mysql-test/t/ndb_restore.test index 266a0c7fbc1..940b53adbe1 100644 --- a/mysql-test/t/ndb_restore.test +++ b/mysql-test/t/ndb_restore.test @@ -231,16 +231,21 @@ select count(*) select * from t10_c order by a; # Bug #27775 cont'd # - auto inc info should be correct ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't1_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't2_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't4_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't7_c'; ---replace_column 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 X 10 X 12 X 13 X 14 X 15 X 16 X 17 X 18 X -show table status like 't10_c'; +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'; --disable_warnings drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9, t10; diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 01bc899b4e1..2674c5db868 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -1399,9 +1399,9 @@ public: int readAutoIncrementValue(const NdbDictionary::Table * aTable, Uint64 & tupleId); int setAutoIncrementValue(const char* aTableName, - Uint64 tupleId, bool increase); + Uint64 tupleId, bool modify); int setAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 tupleId, bool increase); + Uint64 tupleId, bool modify); private: int getTupleIdFromNdb(Ndb_local_table_info* info, Uint64 & tupleId, Uint32 cacheSize, @@ -1409,7 +1409,9 @@ private: int readTupleIdFromNdb(Ndb_local_table_info* info, Uint64 & tupleId); int setTupleIdInNdb(Ndb_local_table_info* info, - Uint64 tupleId, bool increase); + Uint64 tupleId, bool modify); + int checkTupleIdInNdb(Ndb_local_table_info* info, + Uint64 tupleId); int opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op); public: diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 6a815067233..9234b6b5219 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -46,6 +46,7 @@ Ndb_local_table_info::Ndb_local_table_info(NdbTableImpl *table_impl) m_table_impl= table_impl; m_first_tuple_id = ~(Uint64)0; m_last_tuple_id = ~(Uint64)0; + m_highest_seen = 0; } Ndb_local_table_info::~Ndb_local_table_info() diff --git a/ndb/src/ndbapi/DictCache.hpp b/ndb/src/ndbapi/DictCache.hpp index db90a07d487..6ada55cc05e 100644 --- a/ndb/src/ndbapi/DictCache.hpp +++ b/ndb/src/ndbapi/DictCache.hpp @@ -36,6 +36,7 @@ public: // range of cached tuple ids per thread Uint64 m_first_tuple_id; Uint64 m_last_tuple_id; + Uint64 m_highest_seen; Uint64 m_local_data[1]; // Must be last member. Used to access extra space. private: diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index dcdee3d4ea1..350b66f2aee 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -767,7 +767,7 @@ Ndb::getNodeId() } /**************************************************************************** -Uint64 getAutoIncrementValue( const char* aTableName, +int getAutoIncrementValue( const char* aTableName, Uint64 & tupleId, Uint32 cacheSize, Uint64 step, @@ -779,6 +779,7 @@ Parameters: aTableName (IN) : The table name. step (IN) : Specifies the step between the autoincrement values. start (IN) : Start value for first value +Returns: 0 if succesful, -1 if error encountered Remark: Returns a new autoincrement value to the application. The autoincrement values can be increased by steps (default 1) and a number of values can be prefetched @@ -892,9 +893,20 @@ Ndb::getTupleIdFromNdb(Ndb_local_table_info* info, DBUG_RETURN(0); } +/**************************************************************************** +int readAutoIncrementValue( const char* aTableName, + Uint64 & autoValue, + bool modify); + +Parameters: aTableName (IN) : The table name. + autoValue (OUT) : The current autoincrement value + modify (IN) : Modify existing value (not initialization) +Returns: 0 if succesful, -1 if error encountered +Remark: Returns the current autoincrement value to the application. +****************************************************************************/ int Ndb::readAutoIncrementValue(const char* aTableName, - Uint64 & tupleId) + Uint64 & autoValue) { DBUG_ENTER("Ndb::readAutoIncrementValue"); BaseString internal_tabname(internalize_table_name(aTableName)); @@ -905,15 +917,15 @@ Ndb::readAutoIncrementValue(const char* aTableName, theError.code = theDictionary->getNdbError().code; DBUG_RETURN(-1); } - if (readTupleIdFromNdb(info, tupleId) == -1) + if (readTupleIdFromNdb(info, autoValue) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)autoValue)); DBUG_RETURN(0); } int Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId) + Uint64 & autoValue) { DBUG_ENTER("Ndb::readAutoIncrementValue"); assert(aTable != 0); @@ -926,9 +938,9 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, theError.code = theDictionary->getNdbError().code; DBUG_RETURN(-1); } - if (readTupleIdFromNdb(info, tupleId) == -1) + if (readTupleIdFromNdb(info, autoValue) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)autoValue)); DBUG_RETURN(0); } @@ -956,9 +968,20 @@ Ndb::readTupleIdFromNdb(Ndb_local_table_info* info, DBUG_RETURN(0); } +/**************************************************************************** +int setAutoIncrementValue( const char* aTableName, + Uint64 autoValue, + bool modify); + +Parameters: aTableName (IN) : The table name. + autoValue (IN) : The new autoincrement value + modify (IN) : Modify existing value (not initialization) +Returns: 0 if succesful, -1 if error encountered +Remark: Sets a new autoincrement value for the application. +****************************************************************************/ int Ndb::setAutoIncrementValue(const char* aTableName, - Uint64 tupleId, bool increase) + Uint64 autoValue, bool modify) { DBUG_ENTER("Ndb::setAutoIncrementValue"); BaseString internal_tabname(internalize_table_name(aTableName)); @@ -969,14 +992,14 @@ Ndb::setAutoIncrementValue(const char* aTableName, theError.code = theDictionary->getNdbError().code; DBUG_RETURN(-1); } - if (setTupleIdInNdb(info, tupleId, increase) == -1) + if (setTupleIdInNdb(info, autoValue, modify) == -1) DBUG_RETURN(-1); DBUG_RETURN(0); } int Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 tupleId, bool increase) + Uint64 autoValue, bool modify) { DBUG_ENTER("Ndb::setAutoIncrementValue"); assert(aTable != 0); @@ -989,38 +1012,42 @@ Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, theError.code = theDictionary->getNdbError().code; DBUG_RETURN(-1); } - if (setTupleIdInNdb(info, tupleId, increase) == -1) + if (setTupleIdInNdb(info, autoValue, modify) == -1) DBUG_RETURN(-1); DBUG_RETURN(0); } int Ndb::setTupleIdInNdb(Ndb_local_table_info* info, - Uint64 tupleId, bool increase) + Uint64 tupleId, bool modify) { DBUG_ENTER("Ndb::setTupleIdInNdb"); - if (increase) + if (modify) { - if (info->m_first_tuple_id != info->m_last_tuple_id) + if (checkTupleIdInNdb(info, tupleId)) { - assert(info->m_first_tuple_id < info->m_last_tuple_id); - if (tupleId <= info->m_first_tuple_id + 1) - DBUG_RETURN(0); - if (tupleId <= info->m_last_tuple_id) + if (info->m_first_tuple_id != info->m_last_tuple_id) { - info->m_first_tuple_id = tupleId - 1; - DBUG_PRINT("info", - ("Setting next auto increment cached value to %lu", - (ulong)tupleId)); - DBUG_RETURN(0); + assert(info->m_first_tuple_id < info->m_last_tuple_id); + if (tupleId <= info->m_first_tuple_id + 1) + DBUG_RETURN(0); + if (tupleId <= info->m_last_tuple_id) + { + info->m_first_tuple_id = tupleId - 1; + DBUG_PRINT("info", + ("Setting next auto increment cached value to %lu", + (ulong)tupleId)); + DBUG_RETURN(0); + } } + /* + * if tupleId <= NEXTID, do nothing. otherwise update NEXTID to + * tupleId and set cached range to first = last = tupleId - 1. + */ + Uint64 opValue = tupleId; + if (opTupleIdOnNdb(info, opValue, 2) == -1) + DBUG_RETURN(-1); } - /* - * if tupleId <= NEXTID, do nothing. otherwise update NEXTID to - * tupleId and set cached range to first = last = tupleId - 1. - */ - if (opTupleIdOnNdb(info, tupleId, 2) == -1) - DBUG_RETURN(-1); } else { @@ -1033,6 +1060,32 @@ Ndb::setTupleIdInNdb(Ndb_local_table_info* info, DBUG_RETURN(0); } +int +Ndb::checkTupleIdInNdb(Ndb_local_table_info* info, Uint64 tupleId) +{ + DBUG_ENTER("Ndb::checkTupleIdIndNdb"); + if ((info->m_first_tuple_id != ~(Uint64)0) && + (info->m_first_tuple_id > tupleId)) + { + /* + * If we have ever cached a value in this object and this cached + * value is larger than the value we're trying to set then we + * need not check with the real value in the SYSTAB_0 table. + */ + DBUG_RETURN(0); + } + if (info->m_highest_seen > tupleId) + { + /* + * Although we've never cached any higher value we have read + * a higher value and again it isn't necessary to change the + * auto increment value. + */ + DBUG_RETURN(0); + } + DBUG_RETURN(1); +} + int Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) { @@ -1094,6 +1147,7 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) info->m_first_tuple_id = ~(Uint64)0; info->m_last_tuple_id = ~(Uint64)0; + info->m_highest_seen = 0; break; case 2: tOperation->interpretedUpdateTuple(); @@ -1103,19 +1157,18 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) // compare NEXTID >= opValue tOperation->branch_le(2, 1, 0); tOperation->write_attr("NEXTID", 1); - tOperation->interpret_exit_ok(); tOperation->def_label(0); - tOperation->interpret_exit_nok(9999); - + tOperation->interpret_exit_ok(); + tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( Commit ) == -1) { - if (tConnection->theError.code != 9999) - goto error_handler; + goto error_handler; } else { + info->m_highest_seen = tRecAttrResult->u_64_value(); DBUG_PRINT("info", - ("Setting next auto increment value (db) to %lu", + ("Setting auto increment value (db) to %lu", (ulong)opValue)); info->m_first_tuple_id = info->m_last_tuple_id = opValue - 1; } @@ -1126,7 +1179,7 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( Commit ) == -1 ) goto error_handler; - opValue = tRecAttrResult->u_64_value(); // out + info->m_highest_seen = opValue = tRecAttrResult->u_64_value(); // out break; default: goto error_handler; From 0d9ed67997457ec0066f9854a876d2c5aa2fbd9a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 22 Jan 2008 15:04:56 +0100 Subject: [PATCH 072/527] Fixed incorrect signature comment --- ndb/src/ndbapi/Ndb.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 350b66f2aee..f55986d2e6b 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -768,7 +768,7 @@ Ndb::getNodeId() /**************************************************************************** int getAutoIncrementValue( const char* aTableName, - Uint64 & tupleId, + Uint64 & autoValue, Uint32 cacheSize, Uint64 step, Uint64 start); @@ -895,12 +895,10 @@ Ndb::getTupleIdFromNdb(Ndb_local_table_info* info, /**************************************************************************** int readAutoIncrementValue( const char* aTableName, - Uint64 & autoValue, - bool modify); + Uint64 & autoValue); Parameters: aTableName (IN) : The table name. autoValue (OUT) : The current autoincrement value - modify (IN) : Modify existing value (not initialization) Returns: 0 if succesful, -1 if error encountered Remark: Returns the current autoincrement value to the application. ****************************************************************************/ From a79ebb850311886e8d50bb39a14efccc36e88974 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 09:59:06 +0100 Subject: [PATCH 073/527] ndb - bug#33750 make sure that getField does not write after supplied buffer (recommit to correct clone, for easy merging) ndb/include/util/Bitmask.hpp: ndb- bug#33750 make sure that getField does not write after supplied buffer ndb/src/common/util/Bitmask.cpp: ndb- bug#33750 make sure that getField does not write after supplied buffer ndb/test/ndbapi/testBitfield.cpp: move test from Bitmask.cpp into testBitfield for automatic testing --- ndb/include/util/Bitmask.hpp | 10 +- ndb/src/common/util/Bitmask.cpp | 353 ++++----------------------- ndb/test/ndbapi/testBitfield.cpp | 407 ++++++++++++++++++++++++++++++- 3 files changed, 464 insertions(+), 306 deletions(-) diff --git a/ndb/include/util/Bitmask.hpp b/ndb/include/util/Bitmask.hpp index 3b3fe721cca..0383841a666 100644 --- a/ndb/include/util/Bitmask.hpp +++ b/ndb/include/util/Bitmask.hpp @@ -126,6 +126,7 @@ public: /** * setField - Set bitfield at given position and length (max 32 bits) + * Note : length == 0 not supported. */ static void setField(unsigned size, Uint32 data[], unsigned pos, unsigned len, Uint32 val); @@ -133,6 +134,7 @@ public: /** * getField - Get bitfield at given position and length + * Note : length == 0 not supported. */ static void getField(unsigned size, const Uint32 data[], unsigned pos, unsigned len, Uint32 dst[]); @@ -814,7 +816,10 @@ BitmaskImpl::getField(unsigned size, const Uint32 src[], unsigned pos, unsigned len, Uint32 dst[]) { assert(pos + len <= (size << 5)); - + assert (len != 0); + if (len == 0) + return; + src += (pos >> 5); Uint32 offset = pos & 31; * dst = (* src >> offset) & (len >= 32 ? ~0 : (1 << len) - 1); @@ -833,6 +838,9 @@ BitmaskImpl::setField(unsigned size, Uint32 dst[], unsigned pos, unsigned len, const Uint32 src[]) { assert(pos + len <= (size << 5)); + assert(len != 0); + if (len == 0) + return; dst += (pos >> 5); Uint32 offset = pos & 31; diff --git a/ndb/src/common/util/Bitmask.cpp b/ndb/src/common/util/Bitmask.cpp index f5b822ff08e..22919fe585a 100644 --- a/ndb/src/common/util/Bitmask.cpp +++ b/ndb/src/common/util/Bitmask.cpp @@ -16,49 +16,63 @@ #include #include -static -void print(const Uint32 src[], Uint32 len, Uint32 pos = 0) -{ - printf("b'"); - for(unsigned i = 0; i> 5, src, i+pos)) - printf("1"); - else - printf("0"); - if((i & 31) == 31) - printf(" "); - } -} - -#ifndef __TEST_BITMASK__ - void BitmaskImpl::getFieldImpl(const Uint32 src[], unsigned shiftL, unsigned len, Uint32 dst[]) { + /* Copy whole words of src to dst, shifting src left + * by shiftL. Undefined bits of the last written dst word + * should be zeroed. + */ assert(shiftL < 32); unsigned shiftR = 32 - shiftL; unsigned undefined = shiftL ? ~0 : 0; + /* Merge first word with previously set bits if there's a shift */ * dst = shiftL ? * dst : 0; - - while(len >= 32) + + /* Treat the zero-shift case separately to avoid + * trampling or reading past the end of src + */ + if (shiftL == 0) { - * dst++ |= (* src) << shiftL; - * dst = ((* src++) >> shiftR) & undefined; - len -= 32; + while(len >= 32) + { + * dst++ = * src++; + len -=32; + } + + if (len != 0) + { + /* Last word has some bits set */ + Uint32 mask= ((1 << len) -1); // 0000111 + * dst = (* src) & mask; + } } - - if(len < shiftR) + else // shiftL !=0, need to build each word from two words shifted { - * dst |= ((* src) & ((1 << len) - 1)) << shiftL; - } - else - { - * dst++ |= ((* src) << shiftL); - * dst = ((* src) >> shiftR) & ((1 << (len - shiftR)) - 1) & undefined; + while(len >= 32) + { + * dst++ |= (* src) << shiftL; + * dst = ((* src++) >> shiftR) & undefined; + len -= 32; + } + + /* Have space for shiftR more bits in the current dst word + * is that enough? + */ + if(len <= shiftR) + { + /* Fit the remaining bits in the current dst word */ + * dst |= ((* src) & ((1 << len) - 1)) << shiftL; + } + else + { + /* Need to write to two dst words */ + * dst++ |= ((* src) << shiftL); + * dst = ((* src) >> shiftR) & ((1 << (len - shiftR)) - 1) & undefined; + } } } @@ -81,286 +95,23 @@ BitmaskImpl::setFieldImpl(Uint32 dst[], len -= 32; } + /* Copy last bits */ Uint32 mask = ((1 << len) -1); * dst = (* dst & ~mask); - if(len < shiftR) + if(len <= shiftR) { + /* Remaining bits fit in current word */ * dst |= ((* src++) >> shiftL) & mask; } else { + /* Remaining bits update 2 words */ * dst |= ((* src++) >> shiftL); * dst |= ((* src) & ((1 << (len - shiftR)) - 1)) << shiftR ; } } -#else -#define DEBUG 0 -#include -static void do_test(int bitmask_size); - -int -main(int argc, char** argv) -{ - int loops = argc > 1 ? atoi(argv[1]) : 1000; - int max_size = argc > 2 ? atoi(argv[2]) : 1000; - - - for(int i = 0; i data; -}; - -static void require(bool b) -{ - if(!b) abort(); -} - -static -bool cmp(const Uint32 b1[], const Uint32 b2[], Uint32 len) -{ - Uint32 sz32 = (len + 31) >> 5; - for(int i = 0; i> 5, dst, i, (lrand() % 1000) > 500); -} - -static -void simple(int pos, int size) -{ - ndbout_c("simple pos: %d size: %d", pos, size); - Vector _mask; - Vector _src; - Vector _dst; - Uint32 sz32 = (size + pos + 32) >> 5; - const Uint32 sz = 4 * sz32; - - Uint32 zero = 0; - _mask.fill(sz32+1, zero); - _src.fill(sz32+1, zero); - _dst.fill(sz32+1, zero); - - Uint32 * src = _src.getBase(); - Uint32 * dst = _dst.getBase(); - Uint32 * mask = _mask.getBase(); - - memset(src, 0x0, sz); - memset(dst, 0x0, sz); - memset(mask, 0xFF, sz); - rand(src, size); - BitmaskImpl::setField(sz32, mask, pos, size, src); - BitmaskImpl::getField(sz32, mask, pos, size, dst); - printf("src: "); print(src, size+31); printf("\n"); - printf("msk: "); print(mask, (sz32 << 5) + 31); printf("\n"); - printf("dst: "); print(dst, size+31); printf("\n"); - require(cmp(src, dst, size+31)); -}; - -static -void simple2(int size, int loops) -{ - ndbout_c("simple2 %d - ", size); - Vector _mask; - Vector _src; - Vector _dst; - - Uint32 sz32 = (size + 32) >> 5; - Uint32 sz = sz32 << 2; - - Uint32 zero = 0; - _mask.fill(sz32+1, zero); - _src.fill(sz32+1, zero); - _dst.fill(sz32+1, zero); - - Uint32 * src = _src.getBase(); - Uint32 * dst = _dst.getBase(); - Uint32 * mask = _mask.getBase(); - - Vector save; - for(int i = 0; i alloc_list; - bitmask_size = (bitmask_size + 31) & ~31; - Uint32 sz32 = (bitmask_size >> 5); - Vector alloc_mask; - Vector test_mask; - - ndbout_c("Testing bitmask of size %d", bitmask_size); - Uint32 zero = 0; - alloc_mask.fill(sz32, zero); - test_mask.fill(sz32, zero); - - for(int i = 0; i<5000; i++) - { - Vector tmp; - tmp.fill(sz32, zero); - - int pos = lrand() % (bitmask_size - 1); - int free = 0; - if(BitmaskImpl::get(sz32, alloc_mask.getBase(), pos)) - { - // Bit was allocated - // 1) Look up allocation - // 2) Check data - // 3) free it - size_t j; - int min, max; - for(j = 0; j= min && pos < max) - { - break; - } - } - require(pos >= min && pos < max); - BitmaskImpl::getField(sz32, test_mask.getBase(), min, max-min, - tmp.getBase()); - if(DEBUG) - { - printf("freeing [ %d %d ]", min, max); - printf("- mask: "); - print(tmp.getBase(), max - min); - - printf(" save: "); - size_t k; - Alloc& a = alloc_list[j]; - for(k = 0; k> 3; - if(!cmp(tmp.getBase(), alloc_list[j].data.getBase(), max - min)) - { - abort(); - } - while(min < max) - BitmaskImpl::clear(sz32, alloc_mask.getBase(), min++); - alloc_list.erase(j); - } - else - { - Vector tmp; - tmp.fill(sz32, zero); - - // Bit was free - // 1) Check how much space is avaiable - // 2) Create new allocation of lrandom size - // 3) Fill data with lrandom data - // 4) Update alloc mask - while(pos+free < bitmask_size && - !BitmaskImpl::get(sz32, alloc_mask.getBase(), pos+free)) - free++; - - Uint32 sz = - (free <= 64 && ((lrand() % 100) > 80)) ? free : (lrand() % free); - sz = sz ? sz : 1; - sz = pos + sz == bitmask_size ? sz - 1 : sz; - Alloc a; - a.pos = pos; - a.size = sz; - a.data.fill(((sz+31)>> 5)-1, zero); - if(DEBUG) - printf("pos %d -> alloc [ %d %d ]", pos, pos, pos+sz); - for(size_t j = 0; j 500) - BitmaskImpl::set((sz + 31) >> 5, a.data.getBase(), j); - } - if(DEBUG) - { - printf("- mask: "); - print(a.data.getBase(), sz); - printf("\n"); - } - BitmaskImpl::setField(sz32, test_mask.getBase(), pos, sz, - a.data.getBase()); - alloc_list.push_back(a); - } - } -#endif -} - -template class Vector; -template class Vector; - -#endif +/* Bitmask testcase code moved from here to + * storage/ndb/test/ndbapi/testBitfield.cpp + * to get coverage from automated testing + */ diff --git a/ndb/test/ndbapi/testBitfield.cpp b/ndb/test/ndbapi/testBitfield.cpp index e26f495f5a4..6c958da693d 100644 --- a/ndb/test/ndbapi/testBitfield.cpp +++ b/ndb/test/ndbapi/testBitfield.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include static const char* _dbname = "TEST_DB"; static int g_loops = 7; @@ -28,6 +30,7 @@ static int unique_indexes(Ndb*, const NdbDictionary::Table* tab); static int ordered_indexes(Ndb*, const NdbDictionary::Table* tab); static int node_restart(Ndb*, const NdbDictionary::Table* tab); static int system_restart(Ndb*, const NdbDictionary::Table* tab); +static int testBitmask(); int main(int argc, char** argv){ @@ -38,6 +41,15 @@ main(int argc, char** argv){ argc--; argv++; + + int res = NDBT_FAILED; + + /* Run cluster-independent tests */ + for (int i=0; i<(10*g_loops); i++) + { + if (NDBT_OK != (res= testBitmask())) + return NDBT_ProgramExit(res); + } Ndb_cluster_connection con(opt_connect_str); if(con.connect(12, 5, 1)) @@ -50,7 +62,6 @@ main(int argc, char** argv){ pNdb = new Ndb(&con, _dbname); pNdb->init(); while (pNdb->waitUntilReady() != 0); - int res = NDBT_FAILED; NdbDictionary::Dictionary * dict = pNdb->getDictionary(); @@ -111,14 +122,12 @@ create_random_table(Ndb* pNdb) do { NdbDictionary::Table tab; Uint32 cols = 1 + (rand() % (NDB_MAX_ATTRIBUTES_IN_TABLE - 1)); - Uint32 keys = NDB_MAX_NO_OF_ATTRIBUTES_IN_KEY; Uint32 length = 4090; - Uint32 key_size = NDB_MAX_KEYSIZE_IN_WORDS; BaseString name; name.assfmt("TAB_%d", rand() & 65535); tab.setName(name.c_str()); - for(int i = 0; i 2; i++) + for(Uint32 i = 0; i 2; i++) { NdbDictionary::Column col; name.assfmt("COL_%d", i); @@ -196,3 +205,393 @@ system_restart(Ndb* pNdb, const NdbDictionary::Table* tab) { return 0; } + +/* Note : folowing classes test functionality of storage/ndb/src/common/util/Bitmask.cpp + * and were originally defined there. + * Set BITMASK_DEBUG to 1 to get more test debugging info. + */ +#define BITMASK_DEBUG 0 + +static +bool cmp(const Uint32 b1[], const Uint32 b2[], Uint32 len) +{ + Uint32 sz32 = (len + 31) >> 5; + for(Uint32 i = 0; i> 5, src, i+pos)) + printf("1"); + else + printf("0"); + if((i & 31) == 31) + printf(" "); + } +} + +static int lrand() +{ + return rand(); +} + +static +void rand(Uint32 dst[], Uint32 len) +{ + for(Uint32 i = 0; i> 5, dst, i, (lrand() % 1000) > 500); +} + +static +int checkNoTramplingGetSetField(const Uint32 totalTests) +{ + const Uint32 numWords= 67; + const Uint32 maxBitsToCopy= (numWords * 32); + Uint32 sourceBuf[numWords]; + Uint32 targetBuf[numWords]; + + ndbout << "Testing : Bitmask NoTrampling\n"; + + memset(sourceBuf, 0x00, (numWords*4)); + + for (Uint32 test=0; test= srcStart) && + (bitNum < (srcStart + length))); + bool actualValue= (((targetWord >> bit) & 1) == 1); + if (BITMASK_DEBUG) + ndbout << "bitNum=%u expectedValue=%u, actual value=%u" + << bitNum << expectedValue << actualValue; + + if (actualValue != expectedValue) + { + ndbout << "Notrampling setField failed for srcStart " + << srcStart + << " length " << length + << " at word " << word << " bit " << bit << "\n"; + ndbout << "bitNum=%u expectedValue=%u, actual value=%u" + << bitNum << expectedValue << actualValue; + return -1; + } + } + } + + } + + return 0; +} + +static +int simple(int pos, int size) +{ + ndbout << "Testing : Bitmask simple pos: " << pos << " size: " << size << "\n"; + Vector _mask; + Vector _src; + Vector _dst; + Uint32 sz32 = (size + pos + 32) >> 5; + const Uint32 sz = 4 * sz32; + + Uint32 zero = 0; + _mask.fill(sz32+1, zero); + _src.fill(sz32+1, zero); + _dst.fill(sz32+1, zero); + + Uint32 * src = _src.getBase(); + Uint32 * dst = _dst.getBase(); + Uint32 * mask = _mask.getBase(); + + memset(src, 0x0, sz); + memset(dst, 0x0, sz); + memset(mask, 0xFF, sz); + rand(src, size); + BitmaskImpl::setField(sz32, mask, pos, size, src); + BitmaskImpl::getField(sz32, mask, pos, size, dst); + if (BITMASK_DEBUG) + { + printf("src: "); print(src, size+31); printf("\n"); + printf("msk: "); print(mask, (sz32 << 5) + 31); printf("\n"); + printf("dst: "); print(dst, size+31); printf("\n"); + } + return (cmp(src, dst, size+31)?0 : -1); +}; + +struct Alloc +{ + Uint32 pos; + Uint32 size; + Vector data; +}; + +static +int +testRanges(Uint32 bitmask_size) +{ + Vector alloc_list; + bitmask_size = (bitmask_size + 31) & ~31; + Uint32 sz32 = (bitmask_size >> 5); + Vector alloc_mask; + Vector test_mask; + + ndbout_c("Testing : Bitmask ranges for bitmask of size %d", bitmask_size); + Uint32 zero = 0; + alloc_mask.fill(sz32, zero); + test_mask.fill(sz32, zero); + + /* Loop a number of times, setting and clearing bits in the mask + * and tracking the modifications in a separate structure. + * Check that both structures remain in sync + */ + for(int i = 0; i<5000; i++) + { + Vector tmp; + tmp.fill(sz32, zero); + + Uint32 pos = lrand() % (bitmask_size - 1); + Uint32 free = 0; + if(BitmaskImpl::get(sz32, alloc_mask.getBase(), pos)) + { + // Bit was allocated + // 1) Look up allocation + // 2) Check data + // 3) free it + size_t j; + Uint32 min, max; + for(j = 0; j= min && pos < max) + { + break; + } + } + if (! ((pos >= min) && (pos < max))) + { + printf("Failed with pos %u, min %u, max %u\n", + pos, min, max); + return -1; + } + BitmaskImpl::getField(sz32, test_mask.getBase(), min, max-min, + tmp.getBase()); + if(BITMASK_DEBUG) + { + printf("freeing [ %d %d ]", min, max); + printf("- mask: "); + print(tmp.getBase(), max - min); + + printf(" save: "); + size_t k; + Alloc& a = alloc_list[j]; + for(k = 0; k tmp; + tmp.fill(sz32, zero); + + // Bit was free + // 1) Check how much space is avaiable + // 2) Create new allocation of lrandom size + // 3) Fill data with lrandom data + // 4) Update alloc mask + while(pos+free < bitmask_size && + !BitmaskImpl::get(sz32, alloc_mask.getBase(), pos+free)) + free++; + + Uint32 sz = + (free <= 64 && ((lrand() % 100) > 80)) ? free : (lrand() % free); + sz = sz ? sz : 1; + sz = pos + sz == bitmask_size ? sz - 1 : sz; + Alloc a; + a.pos = pos; + a.size = sz; + a.data.fill(((sz+31)>> 5)-1, zero); + if(BITMASK_DEBUG) + printf("pos %d -> alloc [ %d %d ]", pos, pos, pos+sz); + for(size_t j = 0; j 500) + BitmaskImpl::set((sz + 31) >> 5, a.data.getBase(), j); + } + if(BITMASK_DEBUG) + { + printf("- mask: "); + print(a.data.getBase(), sz); + printf("\n"); + } + BitmaskImpl::setField(sz32, test_mask.getBase(), pos, sz, + a.data.getBase()); + alloc_list.push_back(a); + } + } + +#ifdef NDB_BM_SUPPORT_RANGE + for(Uint32 i = 0; i<1000; i++) + { + Uint32 sz32 = 10+rand() % 100; + Uint32 zero = 0; + Vector map; + map.fill(sz32, zero); + + Uint32 sz = 32 * sz32; + Uint32 start = (rand() % sz); + Uint32 stop = start + ((rand() % (sz - start)) & 0xFFFFFFFF); + + Vector check; + check.fill(sz32, zero); + + /* Verify range setting method works correctly */ + for(Uint32 j = 0; j= start && j= start && j; +template class Vector; From 7e6ab3a006faa58c8ca3b77391536c4a1a242e8c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 11:40:06 +0100 Subject: [PATCH 074/527] Ndb.hpp, Ndb.cpp, ha_ndbcluster.cc: Add a check if setting an auto_increment field will change it's next value before retrieving tuple_id_range lock. This avoids hitting locks when updating auto_increment values to a lower value than the current maximum. This is useful in loading a table with auto_increment where one loads the highest numbered pk's first and then proceeds backwards to the first. This can then be achieved with the same performance as a normal insert without auto_increment. ndb_restore.result: Updated result file mysql-test/suite/ndb/r/ndb_restore.result: Updated result file sql/ha_ndbcluster.cc: Add a check if setting an auto_increment field will change it's next value before retrieving tuple_id_range lock. This avoids hitting locks when updating auto_increment values to a lower value than the current maximum. This is useful in loading a table with auto_increment where one loads the highest numbered pk's first and then proceeds backwards to the first. This can then be achieved with the same performance as a normal insert without auto_increment. storage/ndb/include/ndbapi/Ndb.hpp: Add a check if setting an auto_increment field will change it's next value before retrieving tuple_id_range lock. This avoids hitting locks when updating auto_increment values to a lower value than the current maximum. This is useful in loading a table with auto_increment where one loads the highest numbered pk's first and then proceeds backwards to the first. This can then be achieved with the same performance as a normal insert without auto_increment. storage/ndb/src/ndbapi/Ndb.cpp: Add a check if setting an auto_increment field will change it's next value before retrieving tuple_id_range lock. This avoids hitting locks when updating auto_increment values to a lower value than the current maximum. This is useful in loading a table with auto_increment where one loads the highest numbered pk's first and then proceeds backwards to the first. This can then be achieved with the same performance as a normal insert without auto_increment. --- mysql-test/suite/ndb/r/ndb_restore.result | 318 +++++----------------- sql/ha_ndbcluster.cc | 11 +- storage/ndb/include/ndbapi/Ndb.hpp | 23 +- storage/ndb/src/ndbapi/Ndb.cpp | 125 ++++++--- 4 files changed, 179 insertions(+), 298 deletions(-) diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result index aba6997d218..0ebec9c96ae 100644 --- a/mysql-test/suite/ndb/r/ndb_restore.result +++ b/mysql-test/suite/ndb/r/ndb_restore.result @@ -18,12 +18,12 @@ CREATE TABLE `t2_c` ( 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,''); +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'); 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; +) 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, @@ -116,8 +116,8 @@ CREATE TABLE `t9_c` ( 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); +create table t10_c (a int auto_increment key) ENGINE=ndbcluster; +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; @@ -129,8 +129,6 @@ 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 = HEAP; DELETE FROM test.backup_info; LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; @@ -138,14 +136,29 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info; @the_backup_id:=backup_id 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 -NULL test t1_c capgoaledatta 1 NULL NO mediumint NULL NULL 7 0 NULL NULL mediumint(5) unsigned PRI auto_increment select,insert,update,references -NULL test t1_c goaledatta 2 NO char 2 2 NULL NULL latin1 latin1_swedish_ci char(2) PRI select,insert,update,references -NULL test t1_c maturegarbagefa 3 NO varchar 32 32 NULL NULL latin1 latin1_swedish_ci varchar(32) PRI select,insert,update,references +drop table t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c, t10_c; +show tables; +Tables_in_test +t1 +t10 +t2 +t3 +t4 +t5 +t6 +t7 +t8 +t9 +t4_c +t3_c +t2_c +t5_c +t6_c +t7_c +t8_c +t9_c +t10_c +t1_c select count(*) from t1; count(*) 5 @@ -159,15 +172,15 @@ count(*) 5 select count(*) from t2; count(*) -7 +6 select count(*) from t2_c; count(*) -7 +6 select count(*) from (select * from t2 union select * from t2_c) a; count(*) -7 +6 select count(*) from t3; count(*) 4 @@ -253,238 +266,41 @@ a 2000 3000 10000 -show table status like 't1_c'; -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 -X X X X X X X X X X 3001 X X X X X X X -show table status like 't2_c'; -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 -X X X X X X X X X X 501 X X X X X X X -show table status like 't4_c'; -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 -X X X X X X X X X X 290000001 X X X X X X X -show table status like 't7_c'; -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 -X X X X X X X X X X 29 X X X X X X X -show table status like 't10_c'; -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 -X X X X X X X X X X 10001 X X X X X X X -ALTER TABLE t7_c -PARTITION BY LINEAR KEY (`dardtestard`); -CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -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 = HEAP; -DELETE FROM test.backup_info; -LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; -SELECT @the_backup_id:=backup_id FROM test.backup_info; -@the_backup_id:=backup_id - -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; +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 +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; 520093696, diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index b9d7e846d84..6d745140c96 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2738,10 +2738,13 @@ ha_ndbcluster::set_auto_inc(Field *field) ("Trying to set next auto increment value to %s", llstr(next_val, buff))); #endif - Ndb_tuple_id_range_guard g(m_share); - if (ndb->setAutoIncrementValue(m_table, g.range, next_val, TRUE) - == -1) - ERR_RETURN(ndb->getNdbError()); + if (ndb->checkUpdateAutoIncrementValue(m_share->tuple_id_range, next_val)) + { + Ndb_tuple_id_range_guard g(m_share); + if (ndb->setAutoIncrementValue(m_table, g.range, next_val, TRUE) + == -1) + ERR_RETURN(ndb->getNdbError()); + } DBUG_RETURN(0); } diff --git a/storage/ndb/include/ndbapi/Ndb.hpp b/storage/ndb/include/ndbapi/Ndb.hpp index d71b9df9879..f31638db283 100644 --- a/storage/ndb/include/ndbapi/Ndb.hpp +++ b/storage/ndb/include/ndbapi/Ndb.hpp @@ -1515,37 +1515,40 @@ public: TupleIdRange() {} Uint64 m_first_tuple_id; Uint64 m_last_tuple_id; + Uint64 m_highest_seen; void reset() { m_first_tuple_id = ~(Uint64)0; m_last_tuple_id = ~(Uint64)0; + m_highest_seen = 0; }; }; int initAutoIncrement(); int getAutoIncrementValue(const char* aTableName, - Uint64 & tupleId, Uint32 cacheSize, + Uint64 & autoValue, Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1); int getAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId, Uint32 cacheSize, + Uint64 & autoValue, Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1); int getAutoIncrementValue(const NdbDictionary::Table * aTable, - TupleIdRange & range, Uint64 & tupleId, + TupleIdRange & range, Uint64 & autoValue, Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1); int readAutoIncrementValue(const char* aTableName, - Uint64 & tupleId); + Uint64 & autoValue); int readAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId); + Uint64 & autoValue); int readAutoIncrementValue(const NdbDictionary::Table * aTable, - TupleIdRange & range, Uint64 & tupleId); + TupleIdRange & range, Uint64 & autoValue); int setAutoIncrementValue(const char* aTableName, - Uint64 tupleId, bool modify); + Uint64 autoValue, bool modify); int setAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 tupleId, bool modify); + Uint64 autoValue, bool modify); int setAutoIncrementValue(const NdbDictionary::Table * aTable, - TupleIdRange & range, Uint64 tupleId, + TupleIdRange & range, Uint64 autoValue, bool modify); + bool checkUpdateAutoIncrementValue(TupleIdRange & range, Uint64 autoValue); private: int getTupleIdFromNdb(const NdbTableImpl* table, TupleIdRange & range, Uint64 & tupleId, @@ -1554,6 +1557,8 @@ private: TupleIdRange & range, Uint64 & tupleId); int setTupleIdInNdb(const NdbTableImpl* table, TupleIdRange & range, Uint64 tupleId, bool modify); + int checkTupleIdInNdb(TupleIdRange & range, + Uint64 tupleId); int opTupleIdOnNdb(const NdbTableImpl* table, TupleIdRange & range, Uint64 & opValue, Uint32 op); public: diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp index 15647861eef..23b0e0915ae 100644 --- a/storage/ndb/src/ndbapi/Ndb.cpp +++ b/storage/ndb/src/ndbapi/Ndb.cpp @@ -942,6 +942,7 @@ Parameters: aTableName (IN) : The table name. step (IN) : Specifies the step between the autoincrement values. start (IN) : Start value for first value +Returns: 0 if succesful, -1 if error encountered Remark: Returns a new autoincrement value to the application. The autoincrement values can be increased by steps (default 1) and a number of values can be prefetched @@ -1072,9 +1073,18 @@ Ndb::getTupleIdFromNdb(const NdbTableImpl* table, DBUG_RETURN(0); } +/**************************************************************************** +int readAutoIncrementValue( const char* aTableName, + Uint64 & autoValue); + +Parameters: aTableName (IN) : The table name. + autoValue (OUT) : The current autoincrement value +Returns: 0 if succesful, -1 if error encountered +Remark: Returns the current autoincrement value to the application. +****************************************************************************/ int Ndb::readAutoIncrementValue(const char* aTableName, - Uint64 & tupleId) + Uint64 & autoValue) { DBUG_ENTER("Ndb::readAutoIncrementValue"); ASSERT_NOT_MYSQLD; @@ -1088,15 +1098,15 @@ Ndb::readAutoIncrementValue(const char* aTableName, } const NdbTableImpl* table = info->m_table_impl; TupleIdRange & range = info->m_tuple_id_range; - if (readTupleIdFromNdb(table, range, tupleId) == -1) + if (readTupleIdFromNdb(table, range, autoValue) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)autoValue)); DBUG_RETURN(0); } int Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId) + Uint64 & autoValue) { DBUG_ENTER("Ndb::readAutoIncrementValue"); ASSERT_NOT_MYSQLD; @@ -1111,23 +1121,23 @@ Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, DBUG_RETURN(-1); } TupleIdRange & range = info->m_tuple_id_range; - if (readTupleIdFromNdb(table, range, tupleId) == -1) + if (readTupleIdFromNdb(table, range, autoValue) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)autoValue)); DBUG_RETURN(0); } int Ndb::readAutoIncrementValue(const NdbDictionary::Table * aTable, - TupleIdRange & range, Uint64 & tupleId) + TupleIdRange & range, Uint64 & autoValue) { DBUG_ENTER("Ndb::readAutoIncrementValue"); assert(aTable != 0); const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable); - if (readTupleIdFromNdb(table, range, tupleId) == -1) + if (readTupleIdFromNdb(table, range, autoValue) == -1) DBUG_RETURN(-1); - DBUG_PRINT("info", ("value %lu", (ulong)tupleId)); + DBUG_PRINT("info", ("value %lu", (ulong)autoValue)); DBUG_RETURN(0); } @@ -1155,9 +1165,20 @@ Ndb::readTupleIdFromNdb(const NdbTableImpl* table, DBUG_RETURN(0); } +/**************************************************************************** +int setAutoIncrementValue( const char* aTableName, + Uint64 autoValue, + bool modify); + +Parameters: aTableName (IN) : The table name. + autoValue (IN) : The new autoincrement value + modify (IN) : Modify existing value (not initialization) +Returns: 0 if succesful, -1 if error encountered +Remark: Sets a new autoincrement value for the application. +****************************************************************************/ int Ndb::setAutoIncrementValue(const char* aTableName, - Uint64 tupleId, bool increase) + Uint64 autoValue, bool modify) { DBUG_ENTER("Ndb::setAutoIncrementValue"); ASSERT_NOT_MYSQLD; @@ -1171,14 +1192,14 @@ Ndb::setAutoIncrementValue(const char* aTableName, } const NdbTableImpl* table = info->m_table_impl; TupleIdRange & range = info->m_tuple_id_range; - if (setTupleIdInNdb(table, range, tupleId, increase) == -1) + if (setTupleIdInNdb(table, range, autoValue, modify) == -1) DBUG_RETURN(-1); DBUG_RETURN(0); } int Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 tupleId, bool increase) + Uint64 autoValue, bool modify) { DBUG_ENTER("Ndb::setAutoIncrementValue"); ASSERT_NOT_MYSQLD; @@ -1193,52 +1214,55 @@ Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, DBUG_RETURN(-1); } TupleIdRange & range = info->m_tuple_id_range; - if (setTupleIdInNdb(table, range, tupleId, increase) == -1) + if (setTupleIdInNdb(table, range, autoValue, modify) == -1) DBUG_RETURN(-1); DBUG_RETURN(0); } int Ndb::setAutoIncrementValue(const NdbDictionary::Table * aTable, - TupleIdRange & range, Uint64 tupleId, - bool increase) + TupleIdRange & range, Uint64 autoValue, + bool modify) { DBUG_ENTER("Ndb::setAutoIncrementValue"); assert(aTable != 0); const NdbTableImpl* table = & NdbTableImpl::getImpl(*aTable); - if (setTupleIdInNdb(table, range, tupleId, increase) == -1) + if (setTupleIdInNdb(table, range, autoValue, modify) == -1) DBUG_RETURN(-1); DBUG_RETURN(0); } int Ndb::setTupleIdInNdb(const NdbTableImpl* table, - TupleIdRange & range, Uint64 tupleId, bool increase) + TupleIdRange & range, Uint64 tupleId, bool modify) { DBUG_ENTER("Ndb::setTupleIdInNdb"); - if (increase) + if (modify) { - if (range.m_first_tuple_id != range.m_last_tuple_id) + if (checkTupleIdInNdb(range, tupleId)) { - assert(range.m_first_tuple_id < range.m_last_tuple_id); - if (tupleId <= range.m_first_tuple_id + 1) - DBUG_RETURN(0); - if (tupleId <= range.m_last_tuple_id) + if (range.m_first_tuple_id != range.m_last_tuple_id) { - range.m_first_tuple_id = tupleId - 1; - DBUG_PRINT("info", - ("Setting next auto increment cached value to %lu", - (ulong)tupleId)); - DBUG_RETURN(0); + assert(range.m_first_tuple_id < range.m_last_tuple_id); + if (tupleId <= range.m_first_tuple_id + 1) + DBUG_RETURN(0); + if (tupleId <= range.m_last_tuple_id) + { + range.m_first_tuple_id = tupleId - 1; + DBUG_PRINT("info", + ("Setting next auto increment cached value to %lu", + (ulong)tupleId)); + DBUG_RETURN(0); + } } + /* + * if tupleId <= NEXTID, do nothing. otherwise update NEXTID to + * tupleId and set cached range to first = last = tupleId - 1. + */ + if (opTupleIdOnNdb(table, range, tupleId, 2) == -1) + DBUG_RETURN(-1); } - /* - * if tupleId <= NEXTID, do nothing. otherwise update NEXTID to - * tupleId and set cached range to first = last = tupleId - 1. - */ - if (opTupleIdOnNdb(table, range, tupleId, 2) == -1) - DBUG_RETURN(-1); } else { @@ -1277,6 +1301,39 @@ int Ndb::initAutoIncrement() return 0; } +bool +Ndb::checkUpdateAutoIncrementValue(TupleIdRange & range, Uint64 autoValue) +{ + return(checkTupleIdInNdb(range, autoValue) != 0); +} + +int +Ndb::checkTupleIdInNdb(TupleIdRange & range, Uint64 tupleId) +{ + DBUG_ENTER("Ndb::checkTupleIdIndNdb"); + if ((range.m_first_tuple_id != ~(Uint64)0) && + (range.m_first_tuple_id > tupleId)) + { + /* + * If we have ever cached a value in this object and this cached + * value is larger than the value we're trying to set then we + * need not check with the real value in the SYSTAB_0 table. + */ + DBUG_RETURN(0); + } + if (range.m_highest_seen > tupleId) + { + /* + * Although we've never cached any higher value we have read + * a higher value and again it isn't necessary to change the + * auto increment value. + */ + DBUG_RETURN(0); + } + DBUG_RETURN(1); +} + + int Ndb::opTupleIdOnNdb(const NdbTableImpl* table, TupleIdRange & range, Uint64 & opValue, Uint32 op) From 0f151f6b7a1700105a9eb4ce3edf7f5e8533601e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 11:41:45 +0100 Subject: [PATCH 075/527] Ndb.hpp: Changed function attribute names to match implementation ndb/include/ndbapi/Ndb.hpp: Changed function attribute names to match implementation --- ndb/include/ndbapi/Ndb.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp index 2674c5db868..c979db2b418 100644 --- a/ndb/include/ndbapi/Ndb.hpp +++ b/ndb/include/ndbapi/Ndb.hpp @@ -1386,22 +1386,22 @@ public: * * @param cacheSize number of values to cache in this Ndb object * - * @return 0 or -1 on error, and tupleId in out parameter + * @return 0 or -1 on error, and autoValue in out parameter */ int getAutoIncrementValue(const char* aTableName, - Uint64 & tupleId, Uint32 cacheSize, + Uint64 & autoValue, Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1); int getAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId, Uint32 cacheSize, + Uint64 & autoValue, Uint32 cacheSize, Uint64 step = 1, Uint64 start = 1); int readAutoIncrementValue(const char* aTableName, - Uint64 & tupleId); + Uint64 & autoValue); int readAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 & tupleId); + Uint64 & autoValue); int setAutoIncrementValue(const char* aTableName, - Uint64 tupleId, bool modify); + Uint64 autoValue, bool modify); int setAutoIncrementValue(const NdbDictionary::Table * aTable, - Uint64 tupleId, bool modify); + Uint64 autoValue, bool modify); private: int getTupleIdFromNdb(Ndb_local_table_info* info, Uint64 & tupleId, Uint32 cacheSize, From ac632f5cbbb5b9acbbd8c6ec9d0147893e1878a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 12:56:27 +0100 Subject: [PATCH 076/527] ndb - bug#34005 make sure whole send buffer is flushed, even when wrapping around end ndb/src/common/transporter/TCP_Transporter.cpp: ndb - bug#34005 make sure whole send buffer is flush, even when wrapping around end --- .../common/transporter/TCP_Transporter.cpp | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp index 91a5fb50c57..8e09c9d90c8 100644 --- a/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/ndb/src/common/transporter/TCP_Transporter.cpp @@ -330,22 +330,32 @@ TCP_Transporter::doSend() { // Empty the SendBuffers - const char * const sendPtr = m_sendBuffer.sendPtr; - const Uint32 sizeToSend = m_sendBuffer.sendDataSize; - if (sizeToSend > 0){ + bool sent_any = true; + while (m_sendBuffer.dataSize > 0) + { + const char * const sendPtr = m_sendBuffer.sendPtr; + const Uint32 sizeToSend = m_sendBuffer.sendDataSize; const int nBytesSent = inet_send(theSocket, sendPtr, sizeToSend, 0); - if (nBytesSent > 0) { + if (nBytesSent > 0) + { + sent_any = true; m_sendBuffer.bytesSent(nBytesSent); sendCount ++; sendSize += nBytesSent; - if(sendCount == reportFreq){ + if(sendCount == reportFreq) + { reportSendLen(get_callback_obj(), remoteNodeId, sendCount, sendSize); sendCount = 0; sendSize = 0; } - } else { + } + else + { + if (nBytesSent < 0 && InetErrno == EAGAIN && sent_any) + break; + // Send failed #if defined DEBUG_TRANSPORTER ndbout_c("Send Failure(disconnect==%d) to node = %d nBytesSent = %d " From f8ad0918291c390ac23c2b20d0cdfb1f0ecce50b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 20:45:46 +0100 Subject: [PATCH 077/527] config.medium.ini.sh, config.small.ini.sh, config.huge.ini.sh: Sample cluster configuration files for 5.1 Makefile.am: Updated for new files support-files/config.huge.ini.sh: Sample cluster configuration files for 5.1 support-files/config.medium.ini.sh: Sample cluster configuration files for 5.1 support-files/config.small.ini.sh: Sample cluster configuration files for 5.1 support-files/Makefile.am: Updated for new files --- support-files/Makefile.am | 6 + support-files/config.huge.ini.sh | 212 +++++++++++++++++++++++++++++ support-files/config.medium.ini.sh | 124 +++++++++++++++++ support-files/config.small.ini.sh | 65 +++++++++ 4 files changed, 407 insertions(+) create mode 100755 support-files/config.huge.ini.sh create mode 100755 support-files/config.medium.ini.sh create mode 100755 support-files/config.small.ini.sh diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 056a61f2e2a..71939728046 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -26,6 +26,9 @@ EXTRA_DIST = mysql.spec.sh \ mysql-log-rotate.sh \ mysql.server.sh \ mysqld_multi.server.sh \ + config.huge.ini.sh \ + config.medium.ini.sh \ + config.small.ini.sh \ binary-configure.sh \ magic mysql.m4 \ MySQL-shared-compat.spec.sh \ @@ -41,6 +44,9 @@ pkgsupp_DATA = my-small.cnf \ my-medium.cnf \ my-large.cnf \ my-huge.cnf \ + config.huge.ini \ + config.medium.ini \ + config.small.ini \ my-innodb-heavy-4G.cnf \ mysql-log-rotate \ binary-configure \ diff --git a/support-files/config.huge.ini.sh b/support-files/config.huge.ini.sh new file mode 100755 index 00000000000..938dd3209b8 --- /dev/null +++ b/support-files/config.huge.ini.sh @@ -0,0 +1,212 @@ +###################################################### +# MySQL NDB Cluster Huge Sample Configuration File # +###################################################### +# This files assumes that you are using at least 9 # +# hosts for running the cluster. Hostnames and paths # +# listed below should be changed to match your setup # +###################################################### + +[NDBD DEFAULT] +NoOfReplicas: 2 +DataDir: /add/path/here +FileSystemPath: /add/path/here + +# Data Memory, Index Memory, and String Memory # +DataMemory: 6000M +IndexMemory: 1500M +StringMemory: 5 + +# Transaction Parameters # +MaxNoOfConcurrentTransactions: 4096 +MaxNoOfConcurrentOperations: 100000 +MaxNoOfLocalOperations: 100000 + +# Transaction Temporary Storage # +MaxNoOfConcurrentIndexOperations: 8192 +MaxNoOfFiredTriggers: 4000 +TransactionBufferMemory: 1M + +# Scans and buffering # +MaxNoOfConcurrentScans: 300 +MaxNoOfLocalScans: 32 +BatchSizePerLocalScan: 64 +LongMessageBuffer: 1M + +# Logging and Checkpointing # +NoOfFragmentLogFiles: 300 +FragmentLogFileSize: 16M +MaxNoOfOpenFiles: 40 +InitialNoOfOpenFiles: 27 +MaxNoOfSavedMessages: 25 + +# Metadata Objects # +MaxNoOfAttributes: 1500 +MaxNoOfTables: 400 +MaxNoOfOrderedIndexes: 200 +MaxNoOfUniqueHashIndexes: 200 +MaxNoOfTriggers: 770 + +# Boolean Parameters # +LockPagesInMainMemory: 0 +StopOnError: 1 +Diskless: 0 +ODirect: 0 + +# Controlling Timeouts, Intervals, and Disk Paging # +TimeBetweenWatchDogCheck: 6000 +TimeBetweenWatchDogCheckInitial: 6000 +StartPartialTimeout: 30000 +StartPartitionedTimeout: 60000 +StartFailureTimeout: 1000000 +HeartbeatIntervalDbDb: 2000 +HeartbeatIntervalDbApi: 3000 +TimeBetweenLocalCheckpoints: 20 +TimeBetweenGlobalCheckpoints: 2000 +TransactionInactiveTimeout: 0 +TransactionDeadlockDetectionTimeout: 1200 +DiskSyncSize: 4M +DiskCheckpointSpeed: 10M +DiskCheckpointSpeedInRestart: 100M +ArbitrationTimeout: 10 + +# Buffering and Logging # +UndoIndexBuffer: 2M +UndoDataBuffer: 1M +RedoBuffer: 32M +LogLevelStartup: 15 +LogLevelShutdown: 3 +LogLevelStatistic: 0 +LogLevelCheckpoint: 0 +LogLevelNodeRestart: 0 +LogLevelConnection: 0 +LogLevelError: 15 +LogLevelCongestion: 0 +LogLevelInfo: 3 +MemReportFrequency: 0 + +# Backup Parameters # +BackupDataBufferSize: 2M +BackupLogBufferSize: 2M +BackupMemory: 64M +BackupWriteSize: 32K +BackupMaxWriteSize: 256K + +[MGM DEFAULT] +PortNumber: 1186 +DataDir: /add/path/here + +[TCP DEFAULT] +SendBufferMemory: 2M + +####################################### +# Change HOST1 to the name of the NDB_MGMD host +# Change HOST2 to the name of the NDB_MGMD host +# Change HOST3 to the name of the NDB_MGMD host +# Change HOST4 to the name of the NDBD host +# Change HOST5 to the name of the NDBD host +# Change HOST6 to the name of the NDBD host +# Change HOST7 to the name of the NDBD host +# Change HOST8 to the name of the NDBD host +# Change HOST9 to the name of the NDBD host +####################################### + +[NDB_MGMD] +Id: 1 +HostName: HOST1 +ArbitrationRank: 1 + +[NDB_MGMD] +Id: 2 +HostName: HOST2 +ArbitrationRank: 1 + +[NDB_MGMD] +Id: 3 +HostName: HOST3 +ArbitrationRank: 1 + +[NDBD] +Id: 4 +HostName: HOST4 + +[NDBD] +Id: 5 +HostName: HOST5 + +[NDBD] +Id: 6 +HostName: HOST6 + +[NDBD] +Id: 7 +HostName: HOST7 + +[NDBD] +Id: 8 +HostName: HOST8 + +[NDBD] +Id: 9 +HostName: HOST9 + +###################################################### +# Note: The following can be MySQLD connections or # +# NDB API application connecting to the cluster # +###################################################### + +[API] +Id: 10 +HostName: HOST1 +ArbitrationRank: 2 + +[API] +Id: 11 +HostName: HOST2 +ArbitrationRank: 2 + +[API] +Id: 12 +HostName: HOST3 + +[API] +Id: 13 +HostName: HOST4 + +[API] +Id: 14 +HostName: HOST5 + +[API] +Id: 15 +HostName: HOST6 + +[API] +Id: 16 +HostName: HOST7 + +[API] +Id: 17 +HostName: HOST8 + +[API] +Id: 19 +HostName: HOST9 + +[API] +Id: 20 + +[API] +Id: 21 + +[API] +Id: 22 + +[API] +Id: 23 + +[API] +Id: 24 + +[API] +Id: 25 + diff --git a/support-files/config.medium.ini.sh b/support-files/config.medium.ini.sh new file mode 100755 index 00000000000..e35dd35e455 --- /dev/null +++ b/support-files/config.medium.ini.sh @@ -0,0 +1,124 @@ +# +# MySQL NDB Cluster Medium Sample Configuration File +# +# This files assumes that you are using at least 6 +# hosts for running the cluster. Hostnames and paths +# listed below should be changed to match your setup +# + +[NDBD DEFAULT] +NoOfReplicas: 2 +DataDir: /add/path/here +FileSystemPath: /add/path/here + + +# Data Memory, Index Memory, and String Memory + +DataMemory: 3000M +IndexMemory: 800M +BackupMemory: 64M + +# Transaction Parameters + +MaxNoOfConcurrentOperations: 100000 +MaxNoOfLocalOperations: 100000 + +# Buffering and Logging + +RedoBuffer: 16M + +# Logging and Checkpointing + +NoOfFragmentLogFiles: 200 + +# Metadata Objects + +MaxNoOfAttributes: 500 +MaxNoOfTables: 100 + +# Scans and Buffering + +MaxNoOfConcurrentScans: 100 + + +[MGM DEFAULT] +PortNumber: 1186 +DataDir: /add/path/here + +# +# Change HOST1 to the name of the NDB_MGMD host +# Change HOST2 to the name of the NDB_MGMD host +# Change HOST3 to the name of the NDBD host +# Change HOST4 to the name of the NDBD host +# Change HOST5 to the name of the NDBD host +# Change HOST6 to the name of the NDBD host +# + +[NDB_MGMD] +Id: 1 +HostName: HOST1 +ArbitrationRank: 1 + +[NDB_MGMD] +Id: 2 +HostName: HOST2 +ArbitrationRank: 1 + +[NDBD] +Id: 3 +HostName: HOST3 + +[NDBD] +Id: 4 +HostName: HOST4 + +[NDBD] +Id: 5 +HostName: HOST5 + +[NDBD] +Id: 6 +HostName: HOST6 + +# +# Note: The following can be MySQLD connections or +# NDB API application connecting to the cluster +# + +[API] +Id: 7 +HostName: HOST1 +ArbitrationRank: 2 + +[API] +Id: 8 +HostName: HOST2 +ArbitrationRank: 2 + +[API] +Id: 9 +HostName: HOST3 +ArbitrationRank: 2 + +[API] +Id: 10 +HostName: HOST4 + +[API] +Id: 11 +HostName: HOST5 + +[API] +Id: 12 +HostName: HOST6 + +[API] +Id: 13 + +[API] +Id: 14 + +[API] +Id: 15 + + diff --git a/support-files/config.small.ini.sh b/support-files/config.small.ini.sh new file mode 100755 index 00000000000..129e2521e17 --- /dev/null +++ b/support-files/config.small.ini.sh @@ -0,0 +1,65 @@ +# +# MySQL NDB Cluster Small Sample Configuration File +# +# This files assumes that you are using 1 to 3 hosts +# for running the cluster. Hostnames and paths listed +# below should be changed to match your setup. +# +# Note: You can change localhost for a different host +# + +[NDBD DEFAULT] +NoOfReplicas: 2 +DataDir: /add/path/here +FileSystemPath: /add/path/here + +# Data Memory, Index Memory, and String Memory + +DataMemory: 600M +IndexMemory: 100M +BackupMemory: 64M + +[MGM DEFAULT] +PortNumber: 1186 +DataDir: /add/path/here + +[NDB_MGMD] +Id: 1 +HostName: localhost +ArbitrationRank: 1 + +[NDBD] +Id: 2 +HostName: localhost + +[NDBD] +Id: 3 +HostName: localhost + +# +# Note: The following can be MySQLD connections or +# NDB API application connecting to the cluster +# + +[API] +Id: 4 +HostName: localhost +ArbitrationRank: 2 + +[API] +Id: 5 +HostName: localhost + +[API] +Id: 6 +HostName: localhost + +[API] +Id: 7 + +[API] +Id: 8 + +[API] +Id: 9 + From 6fc612e87b2c189fc5fd7911345dfc9c02716470 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 21:51:01 +0100 Subject: [PATCH 078/527] correct result to be the same as in 5.0 --- mysql-test/r/view.result | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 7c1da1b3bab..0e3d650c571 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -2720,12 +2720,12 @@ View Create View v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(`t1`.`test_date`) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75) SELECT (year(test_date)-year(DOB)) AS Age FROM t1 HAVING Age < 75; Age -44 -40 +43 +39 SELECT * FROM v1; Age -44 -40 +43 +39 DROP VIEW v1; DROP TABLE t1; CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx'); From 14b1de4293c856eff1f05e2ec1bc857b95861e6d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 23 Jan 2008 16:18:23 -0700 Subject: [PATCH 079/527] Add triggers to notify InnoDB developers when MySQL developers change files that they control. BitKeeper/triggers/post-commit.innodb.pl: Trigger to notify InnoDB developers about changes in InnoDB files. BitKeeper/triggers/post-incoming.innodb.pl: Trigger to notify InnoDB developers about changes in InnoDB files. BitKeeper/triggers/pre-commit.innodb.pl: Trigger to warn MySQL developers that they have changed InnoDB files, and that their changes will be sent to the InnoDB developers if they choose to commit. BitKeeper/triggers/triggers-lib.pl: Utility functions for BK triggers written in Perl. --- BitKeeper/triggers/post-commit.innodb.pl | 22 ++ BitKeeper/triggers/post-incoming.innodb.pl | 30 ++ BitKeeper/triggers/pre-commit.innodb.pl | 21 ++ BitKeeper/triggers/triggers-lib.pl | 360 +++++++++++++++++++++ 4 files changed, 433 insertions(+) create mode 100755 BitKeeper/triggers/post-commit.innodb.pl create mode 100755 BitKeeper/triggers/post-incoming.innodb.pl create mode 100755 BitKeeper/triggers/pre-commit.innodb.pl create mode 100644 BitKeeper/triggers/triggers-lib.pl diff --git a/BitKeeper/triggers/post-commit.innodb.pl b/BitKeeper/triggers/post-commit.innodb.pl new file mode 100755 index 00000000000..44d98b04838 --- /dev/null +++ b/BitKeeper/triggers/post-commit.innodb.pl @@ -0,0 +1,22 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +use FindBin; +require "$FindBin::Bin/triggers-lib.pl"; + +# Don't run unless commit was successful +check_status() || exit 0; + +my $cset = latest_cset(); + +# Read most recent ChangeSet's changed files. Send merge changes along, since +# they'll need to be incorporated in InnoDB's source tree eventually. +my $changes = innodb_get_changes('cset', $cset, 'yes') + or exit 0; + +innodb_send_changes_email($cset, $changes) + or exit 1; + +exit 0; diff --git a/BitKeeper/triggers/post-incoming.innodb.pl b/BitKeeper/triggers/post-incoming.innodb.pl new file mode 100755 index 00000000000..4b100d88037 --- /dev/null +++ b/BitKeeper/triggers/post-incoming.innodb.pl @@ -0,0 +1,30 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +use FindBin; +require "$FindBin::Bin/triggers-lib.pl"; + +# Don't run unless push/pull was successful +check_status() or exit 0; + +# Don't run if push/pull is in local clones +exit 0 if repository_type() eq 'local'; + +# For each pushed ChangeSet, check it for InnoDB files and send +# diff of entire ChangeSet to InnoDB developers if such changes +# exist. + +my $error = 0; + +foreach my $cset (read_bk_csetlist()) +{ + my $changes = innodb_get_changes('cset', $cset, 'yes') + or next; + + innodb_send_changes_email($cset, $changes) + or $error = 1; +} + +exit ($error == 0 ? 0 : 1); diff --git a/BitKeeper/triggers/pre-commit.innodb.pl b/BitKeeper/triggers/pre-commit.innodb.pl new file mode 100755 index 00000000000..6e2b65113b0 --- /dev/null +++ b/BitKeeper/triggers/pre-commit.innodb.pl @@ -0,0 +1,21 @@ +#! /usr/bin/perl + +use strict; +use warnings; + +use FindBin; +require "$FindBin::Bin/triggers-lib.pl"; + +die "$0: Script error: \$BK_PENDING is not set in pre-commit trigger\n" + unless defined $ENV{BK_PENDING}; + +# Read changed files from $BK_PENDING directly. Do not bother user about +# merge changes; they don't have any choice, the merge must be done. +my $changes = innodb_get_changes('file', $ENV{BK_PENDING}, undef) + or exit 0; + +innodb_inform_and_query_user($changes) + or exit 1; # Abort commit + +# OK, continue with commit +exit 0; diff --git a/BitKeeper/triggers/triggers-lib.pl b/BitKeeper/triggers/triggers-lib.pl new file mode 100644 index 00000000000..834cd9093d0 --- /dev/null +++ b/BitKeeper/triggers/triggers-lib.pl @@ -0,0 +1,360 @@ +# To use this convenience library in a trigger, simply require it at +# at the top of the script. For example: +# +# #! /usr/bin/perl +# +# use FindBin; +# require "$FindBin::Bin/triggers-lib.pl"; +# +# FindBin is needed, because sometimes a trigger is called from the +# RESYNC directory, and the trigger dir is ../BitKeeper/triggers + +use strict; +use warnings; + +use Carp; +use FindBin; + + +my $mysql_version = "5.0"; + +# These addresses must be kept current in all MySQL versions. +# See the wiki page InnoDBandOracle. +#my @innodb_to_email = ('dev_innodb_ww@oracle.com'); +#my @innodb_cc_email = ('dev-innodb@mysql.com'); +# FIXME: Keep this for testing; remove it once it's been used for a +# week or two. +my @innodb_to_email = ('tim@mysql.com'); +my @innodb_cc_email = (); + +# This is for MySQL <= 5.0. Regex which defines the InnoDB files +# which should generally not be touched by MySQL developers. +my $innodb_files_description = <> 8)), "\n"; + } + + return $status; +} + + +# check_status +# $warn If true, warn about bad status +# RETURN TRUE, if $BK_STATUS is "OK"; FALSE otherwise +# +# Also checks the undocumented $BK_COMMIT env variable + +sub check_status +{ + my ($warn) = @_; + + my $status = (grep { defined $_ } + $ENV{BK_STATUS}, $ENV{BK_COMMIT}, '')[0]; + + unless ($status eq 'OK') + { + warn "Bad BK_STATUS '$status'\n" if $warn; + return undef; + } + + return 1; +} + + +# repository_location +# +# RETURN ('HOST', 'ROOT') for the repository being modified + +sub repository_location +{ + if ($ENV{BK_SIDE} eq 'client') { + return ($ENV{BK_HOST}, $ENV{BK_ROOT}); + } else { + return ($ENV{BKD_HOST}, $ENV{BKD_ROOT}); + } +} + + +# repository_type +# RETURN: +# 'main' for repo on bk-internal with post-incoming.bugdb trigger +# 'team' for repo on bk-internal with post-incoming.queuepush.pl trigger +# 'local' otherwise +# +# This definition may need to be modified if the host name or triggers change. + +sub repository_type +{ + my ($host, $root) = repository_location(); + + return 'local' + unless uc($host) eq 'BK-INTERNAL.MYSQL.COM' + and -e "$root/BitKeeper/triggers/post-incoming.queuepush.pl"; + + return 'main' if -e "$root/BitKeeper/triggers/post-incoming.bugdb"; + + return 'team'; +} + + +# latest_cset +# RETURN Key for most recent ChangeSet + +sub latest_cset { + chomp(my $retval = `bk changes -r+ -k`); + return $retval; +} + + +# read_bk_csetlist +# RETURN list of cset keys from $BK_CSETLIST file +sub read_bk_csetlist +{ + die "$0: script error: \$BK_CSETLIST not set\n" + unless defined $ENV{BK_CSETLIST}; + + open CSETS, '<', $ENV{BK_CSETLIST} + or die "$0: can't read \$BK_CSETLIST='$ENV{BK_CSETLIST}': $!\n"; + chomp(my @csets = ); + close_or_warn(CSETS, "\$BK_CSETLIST='$ENV{BK_CSETLIST}'"); + + return @csets; +} + + +# innodb_get_changes +# $type 'file' or 'cset' +# $value file name (e.g., $BK_PENDING) or ChangeSet key +# $want_merge_changes flag; if false, merge changes will be ignored +# RETURN A string describing the InnoDB changes, or undef if no changes +# +# The return value does *not* include ChangeSet comments, only per-file +# comments. + +sub innodb_get_changes +{ + my ($type, $value, $want_merge_changes) = @_; + + if ($type eq 'file') + { + open CHANGES, '<', $value + or die "$0: can't read '$value': $!\n"; + } + elsif ($type eq 'cset') + { + open CHANGES, '-|', "bk changes -r'$value' -v -d'$file_rev_dspec'" + or die "$0: can't exec 'bk changes': $!\n"; + } + else + { + croak "$0: script error: invalid type '$type'"; + } + + my @changes = grep { /$innodb_files_regex/ } ; + + close_or_warn(CHANGES, "($type, '$value')"); + + return undef unless @changes; + + + # Set up a pipeline of 'bk log' commands to weed out unwanted deltas. We + # never want deltas which contain no actual changes. We may not want deltas + # which are merges. + + my @filters; + + # This tests if :LI: (lines inserted) or :LD: (lines deleted) is + # non-zero. That is, did this delta change the file contents? + push @filters, + "bk log -d'" + . "\$if(:LI: -gt 0){$file_rev_dspec}" + . "\$if(:LI: -eq 0){\$if(:LD: -gt 0){$file_rev_dspec}}" + . "' -"; + + push @filters, "bk log -d'\$unless(:MERGE:){$file_rev_dspec}' -" + unless $want_merge_changes; + + my $tmpname = "$bktmp/ibchanges.txt"; + my $pipeline = join(' | ', @filters) . " > $tmpname"; + open TMP, '|-', $pipeline + or die "$0: can't exec [[$pipeline]]: $!\n"; + + print TMP @changes; + close_or_warn(TMP, "| $pipeline"); + + # Use bk log to describe the changes + open LOG, "bk log - < $tmpname |" + or die "$0: can't exec 'bk log - < $tmpname': $!\n"; + my @log = ; + close_or_warn(LOG, "bk log - < $tmpname |"); + + unlink $tmpname; + + return undef unless @log; + + return join('', @log); +} + + +# Ask user if they really want to commit. +# RETURN TRUE = YES, commit; FALSE = NO, do not commit + +sub innodb_inform_and_query_user +{ + my ($description) = @_; + + my $tmpname = "$bktmp/ibquery.txt"; + + open MESSAGE, "> $tmpname" + or die "$0: can't write message to '$tmpname': $!"; + + print MESSAGE <"; + push @headers, "From: $from"; + push @headers, "To: " . (join ', ', @innodb_to_email); + push @headers, "Cc: " . (join ', ', @innodb_cc_email) if @innodb_cc_email; + push @headers, + "Subject: InnoDB changes in $type $mysql_version tree ($cset_short)"; + push @headers, "X-CSetKey: <$cset_key>"; + + print SENDMAIL map { "$_\n" } @headers, ''; + + if ($type eq 'main') + { + print SENDMAIL < Date: Wed, 23 Jan 2008 16:32:19 -0700 Subject: [PATCH 080/527] Update triggers lib for version MySQL 5.1 --- BitKeeper/triggers/triggers-lib.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/BitKeeper/triggers/triggers-lib.pl b/BitKeeper/triggers/triggers-lib.pl index 834cd9093d0..2eae70c034a 100644 --- a/BitKeeper/triggers/triggers-lib.pl +++ b/BitKeeper/triggers/triggers-lib.pl @@ -16,7 +16,7 @@ use Carp; use FindBin; -my $mysql_version = "5.0"; +my $mysql_version = "5.1"; # These addresses must be kept current in all MySQL versions. # See the wiki page InnoDBandOracle. @@ -27,27 +27,23 @@ my $mysql_version = "5.0"; my @innodb_to_email = ('tim@mysql.com'); my @innodb_cc_email = (); -# This is for MySQL <= 5.0. Regex which defines the InnoDB files +# This is for MySQL >= 5.1. Regex which defines the InnoDB files # which should generally not be touched by MySQL developers. my $innodb_files_description = < Date: Wed, 23 Jan 2008 18:20:04 -0700 Subject: [PATCH 081/527] Applied innodb-5.0-ss2223 snapshot Fixes: Bug #32083: server crashes on show status when InnoDB is not initialized innodb_export_status(): Check that InnoDB has been initialized before invoking srv_export_innodb_status(). (Bug #32083) This bug does not exist in MySQL/InnoDB 5.1. sql/ha_innodb.cc: Applied innodb-5.0-ss2223 snapshot Revision r2223: branches/5.0: innodb_export_status(): Check that InnoDB has been initialized before invoking srv_export_innodb_status(). (Bug #32083) This bug does not exist in MySQL/InnoDB 5.1. --- sql/ha_innodb.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index fa68da87661..2d2007c8fdd 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -6339,7 +6339,9 @@ void innodb_export_status(void) /*======================*/ { - srv_export_innodb_status(); + if (innodb_inited) { + srv_export_innodb_status(); + } } /**************************************************************************** From e09b41cf579d6bff2ac1652871fbbbdf47ebfd98 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 00:31:47 -0700 Subject: [PATCH 082/527] Fix bug in BK trigger for sending changes to InnoDB devs. BitKeeper/triggers/triggers-lib.pl: Fix bug in innodb_send_changes_mail() that always displayed details for the most recent changeset (-r+) instead of the $cset function argument. --- BitKeeper/triggers/triggers-lib.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BitKeeper/triggers/triggers-lib.pl b/BitKeeper/triggers/triggers-lib.pl index 834cd9093d0..1c5f7a85726 100644 --- a/BitKeeper/triggers/triggers-lib.pl +++ b/BitKeeper/triggers/triggers-lib.pl @@ -345,10 +345,10 @@ changes are in a clone of a $mysql_version tree. EOF } print SENDMAIL "\n"; - print SENDMAIL qx(bk changes -r+); + print SENDMAIL qx(bk changes -r'$cset'); print SENDMAIL "$description"; print SENDMAIL "The complete ChangeSet diffs follow.\n\n"; - print SENDMAIL qx(bk rset -r+ -ah | bk gnupatch -h -dup -T); + print SENDMAIL qx(bk rset -r'$cset' -ah | bk gnupatch -h -dup -T); close_or_warn(SENDMAIL, "$sendmail -t") or return undef; From d36be3437bb67a27b833569f3f114c84c5402be9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 12:06:40 +0100 Subject: [PATCH 083/527] Bug#30366 (recommit) NDB fails to start on OS X, PPC, 64 bit - The errno variable should only be used when the previous socket write failed, it should be regarded as undefined at other times --- storage/ndb/src/common/util/OutputStream.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/ndb/src/common/util/OutputStream.cpp b/storage/ndb/src/common/util/OutputStream.cpp index 0943e47e33f..cd619380e5a 100644 --- a/storage/ndb/src/common/util/OutputStream.cpp +++ b/storage/ndb/src/common/util/OutputStream.cpp @@ -62,7 +62,7 @@ SocketOutputStream::print(const char * fmt, ...){ if(ret >= 0) m_timeout_remain-=time; - if(errno==ETIMEDOUT || m_timeout_remain<=0) + if((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0) { m_timedout= true; ret= -1; @@ -84,7 +84,7 @@ SocketOutputStream::println(const char * fmt, ...){ if(ret >= 0) m_timeout_remain-=time; - if (errno==ETIMEDOUT || m_timeout_remain<=0) + if ((ret < 0 && errno==ETIMEDOUT) || m_timeout_remain<=0) { m_timedout= true; ret= -1; From 22be2b43f0a41082a4b8c11bf479593aad3f35b6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 12:08:04 +0100 Subject: [PATCH 084/527] Bug#33814 - yassl problems (recommit) extra/yassl/src/template_instnt.cpp: new template instantiation (recommit) --- extra/yassl/src/handshake.cpp | 5 +++++ extra/yassl/src/template_instnt.cpp | 1 + extra/yassl/src/yassl_imp.cpp | 11 ++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/extra/yassl/src/handshake.cpp b/extra/yassl/src/handshake.cpp index 1d5a95820bb..262b5cb3b8b 100644 --- a/extra/yassl/src/handshake.cpp +++ b/extra/yassl/src/handshake.cpp @@ -527,6 +527,11 @@ void ProcessOldClientHello(input_buffer& input, SSL& ssl) input.read(len, sizeof(len)); uint16 randomLen; ato16(len, randomLen); + if (ch.suite_len_ > MAX_SUITE_SZ || sessionLen > ID_LEN || + randomLen > RAN_LEN) { + ssl.SetError(bad_input); + return; + } int j = 0; for (uint16 i = 0; i < ch.suite_len_; i += 3) { diff --git a/extra/yassl/src/template_instnt.cpp b/extra/yassl/src/template_instnt.cpp index f82f7924359..fe3a251b865 100644 --- a/extra/yassl/src/template_instnt.cpp +++ b/extra/yassl/src/template_instnt.cpp @@ -101,6 +101,7 @@ template void ysArrayDelete(unsigned char*); template void ysArrayDelete(char*); template int min(int, int); +template uint16 min(uint16, uint16); template unsigned int min(unsigned int, unsigned int); template unsigned long min(unsigned long, unsigned long); } diff --git a/extra/yassl/src/yassl_imp.cpp b/extra/yassl/src/yassl_imp.cpp index 0bc95f64abc..b43d9c27355 100644 --- a/extra/yassl/src/yassl_imp.cpp +++ b/extra/yassl/src/yassl_imp.cpp @@ -621,6 +621,10 @@ void HandShakeHeader::Process(input_buffer& input, SSL& ssl) } uint len = c24to32(length_); + if (len > input.get_remaining()) { + ssl.SetError(bad_input); + return; + } hashHandShake(ssl, input, len); hs->set_length(len); @@ -1391,10 +1395,15 @@ input_buffer& operator>>(input_buffer& input, ClientHello& hello) // Suites byte tmp[2]; + uint16 len; tmp[0] = input[AUTO]; tmp[1] = input[AUTO]; - ato16(tmp, hello.suite_len_); + ato16(tmp, len); + + hello.suite_len_ = min(len, static_cast(MAX_SUITE_SZ)); input.read(hello.cipher_suites_, hello.suite_len_); + if (len > hello.suite_len_) // ignore extra suites + input.set_current(input.get_current() + len - hello.suite_len_); // Compression hello.comp_len_ = input[AUTO]; From eff091100d8813259b7c2408d2f0ebd7f0b4814e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 14:21:52 +0100 Subject: [PATCH 085/527] ndb - bug#34033 remove LCP-snapshot from MM-tables, removing possibility of spurious 899 on MM-tables storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp: dont run LCP-snapshot on pure MM-tables, this is implemented by not setting frag.m_lcp_scan_op which will make TUP_COMMIT do nothing --- .../ndb/src/kernel/blocks/dbtup/DbtupScan.cpp | 115 ++++++++++-------- 1 file changed, 61 insertions(+), 54 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp index 36a274ef36a..5359344a48f 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp @@ -53,7 +53,14 @@ Dbtup::execACC_SCANREQ(Signal* signal) // flags Uint32 bits = 0; - if (!AccScanReq::getLcpScanFlag(req->requestInfo)) + + if (AccScanReq::getLcpScanFlag(req->requestInfo)) + { + jam(); + bits |= ScanOp::SCAN_LCP; + c_scanOpPool.getPtr(scanPtr, c_lcp_scan_op); + } + else { // seize from pool and link to per-fragment list LocalDLList list(c_scanOpPool, frag.m_scanList); @@ -61,39 +68,35 @@ Dbtup::execACC_SCANREQ(Signal* signal) jam(); break; } - - if (!AccScanReq::getNoDiskScanFlag(req->requestInfo) - && tablePtr.p->m_no_of_disk_attributes) - { - bits |= ScanOp::SCAN_DD; - } + } + + if (!AccScanReq::getNoDiskScanFlag(req->requestInfo) + && tablePtr.p->m_no_of_disk_attributes) + { + bits |= ScanOp::SCAN_DD; + } + + bool mm = (bits & ScanOp::SCAN_DD); + if (tablePtr.p->m_attributes[mm].m_no_of_varsize > 0) { + bits |= ScanOp::SCAN_VS; - bool mm = (bits & ScanOp::SCAN_DD); - if (tablePtr.p->m_attributes[mm].m_no_of_varsize > 0) { - bits |= ScanOp::SCAN_VS; - - // disk pages have fixed page format - ndbrequire(! (bits & ScanOp::SCAN_DD)); - } - if (! AccScanReq::getReadCommittedFlag(req->requestInfo)) { - if (AccScanReq::getLockMode(req->requestInfo) == 0) - bits |= ScanOp::SCAN_LOCK_SH; - else - bits |= ScanOp::SCAN_LOCK_EX; - } - } else { - jam(); - // LCP scan and disk - - ndbrequire(frag.m_lcp_scan_op == c_lcp_scan_op); - c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); - ndbrequire(scanPtr.p->m_fragPtrI == fragPtr.i); - bits |= ScanOp::SCAN_LCP; - if (tablePtr.p->m_attributes[MM].m_no_of_varsize > 0) { - bits |= ScanOp::SCAN_VS; - } + // disk pages have fixed page format + ndbrequire(! (bits & ScanOp::SCAN_DD)); + } + if (! AccScanReq::getReadCommittedFlag(req->requestInfo)) { + if (AccScanReq::getLockMode(req->requestInfo) == 0) + bits |= ScanOp::SCAN_LOCK_SH; + else + bits |= ScanOp::SCAN_LOCK_EX; } + if (AccScanReq::getLcpScanFlag(req->requestInfo)) + { + jam(); + ndbrequire((bits & ScanOp::SCAN_DD) == 0); + ndbrequire((bits & ScanOp::SCAN_LOCK) == 0); + } + bits |= AccScanReq::getNRScanFlag(req->requestInfo) ? ScanOp::SCAN_NR : 0; // set up scan op @@ -1107,16 +1110,17 @@ Dbtup::releaseScanOp(ScanOpPtr& scanPtr) fragPtr.i = scanPtr.p->m_fragPtrI; ptrCheckGuard(fragPtr, cnoOfFragrec, fragrecord); - if(! (scanPtr.p->m_bits & ScanOp::SCAN_LCP)) + if(scanPtr.p->m_bits & ScanOp::SCAN_LCP) { - LocalDLList list(c_scanOpPool, fragPtr.p->m_scanList); - list.release(scanPtr); + jam(); + fragPtr.p->m_lcp_scan_op = RNIL; + scanPtr.p->m_fragPtrI = RNIL; } else { - ndbrequire(fragPtr.p->m_lcp_scan_op == scanPtr.i); - fragPtr.p->m_lcp_scan_op = RNIL; - scanPtr.p->m_fragPtrI = RNIL; + jam(); + LocalDLList list(c_scanOpPool, fragPtr.p->m_scanList); + list.release(scanPtr); } } @@ -1129,21 +1133,24 @@ Dbtup::execLCP_FRAG_ORD(Signal* signal) tablePtr.i = req->tableId; ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); - jam(); - FragrecordPtr fragPtr; - Uint32 fragId = req->fragmentId; - fragPtr.i = RNIL; - getFragmentrec(fragPtr, fragId, tablePtr.p); - ndbrequire(fragPtr.i != RNIL); - Fragrecord& frag = *fragPtr.p; - - ndbrequire(frag.m_lcp_scan_op == RNIL && c_lcp_scan_op != RNIL); - frag.m_lcp_scan_op = c_lcp_scan_op; - ScanOpPtr scanPtr; - c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); - ndbrequire(scanPtr.p->m_fragPtrI == RNIL); - scanPtr.p->m_fragPtrI = fragPtr.i; - - scanFirst(signal, scanPtr); - scanPtr.p->m_state = ScanOp::First; + if (tablePtr.p->m_no_of_disk_attributes) + { + jam(); + FragrecordPtr fragPtr; + Uint32 fragId = req->fragmentId; + fragPtr.i = RNIL; + getFragmentrec(fragPtr, fragId, tablePtr.p); + ndbrequire(fragPtr.i != RNIL); + Fragrecord& frag = *fragPtr.p; + + ndbrequire(frag.m_lcp_scan_op == RNIL && c_lcp_scan_op != RNIL); + frag.m_lcp_scan_op = c_lcp_scan_op; + ScanOpPtr scanPtr; + c_scanOpPool.getPtr(scanPtr, frag.m_lcp_scan_op); + ndbrequire(scanPtr.p->m_fragPtrI == RNIL); + scanPtr.p->m_fragPtrI = fragPtr.i; + + scanFirst(signal, scanPtr); + scanPtr.p->m_state = ScanOp::First; + } } From d91fba31e173e2baa834be1cc3e6a4c08ff65774 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 15:10:46 +0100 Subject: [PATCH 086/527] ndb - jamify (better) DbtupDiskAlloc storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: jamify DbtupDiskAlloc storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp: jamify DbtupDiskAlloc storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp: jamify DbtupDiskAlloc --- storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 1 + .../src/kernel/blocks/dbtup/DbtupCommit.cpp | 59 ++++++- .../kernel/blocks/dbtup/DbtupDiskAlloc.cpp | 155 +++++++++++------- 3 files changed, 148 insertions(+), 67 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 08332a2e1a1..5a0cca5a31e 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -86,6 +86,7 @@ inline const Uint32* ALIGN_WORD(const void* ptr) // DbtupDebug.cpp 30000 // DbtupVarAlloc.cpp 32000 // DbtupScan.cpp 33000 +// DbtupDiskAlloc.cpp 35000 //------------------------------------------------------------------ /* diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp index dc0be538807..15587ade2ca 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp @@ -108,8 +108,11 @@ void Dbtup::removeActiveOpList(Operationrec* const regOperPtr, * Release copy tuple */ if(!regOperPtr->m_copy_tuple_location.isNull()) + { + ljam(); c_undo_buffer.free_copy_tuple(®OperPtr->m_copy_tuple_location); - + } + if (regOperPtr->op_struct.in_active_list) { regOperPtr->op_struct.in_active_list= false; if (regOperPtr->nextActiveOp != RNIL) { @@ -172,6 +175,7 @@ Dbtup::dealloc_tuple(Signal* signal, Uint32 extra_bits = Tuple_header::FREED; if (bits & Tuple_header::DISK_PART) { + ljam(); Local_key disk; memcpy(&disk, ptr->get_disk_ref_ptr(regTabPtr), sizeof(disk)); PagePtr tmpptr; @@ -184,6 +188,7 @@ Dbtup::dealloc_tuple(Signal* signal, if (! (bits & (Tuple_header::LCP_SKIP | Tuple_header::ALLOC)) && lcpScan_ptr_i != RNIL) { + ljam(); ScanOpPtr scanOp; c_scanOpPool.getPtr(scanOp, lcpScan_ptr_i); Local_key rowid = regOperPtr->m_tuple_location; @@ -191,6 +196,7 @@ Dbtup::dealloc_tuple(Signal* signal, rowid.m_page_no = page->frag_page_id; if (rowid > scanpos) { + ljam(); extra_bits = Tuple_header::LCP_KEEP; // Note REMOVE FREE ptr->m_operation_ptr_i = lcp_keep_list; regFragPtr->m_lcp_keep_list = rowid.ref(); @@ -231,11 +237,13 @@ Dbtup::commit_operation(Signal* signal, Uint32 mm_vars= regTabPtr->m_attributes[MM].m_no_of_varsize; if(mm_vars == 0) { + ljam(); memcpy(tuple_ptr, copy, 4*fixsize); disk_ptr= (Tuple_header*)(((Uint32*)copy)+fixsize); } else { + ljam(); /** * Var_part_ref is only stored in *allocated* tuple * so memcpy from copy, will over write it... @@ -260,6 +268,7 @@ Dbtup::commit_operation(Signal* signal, if(copy_bits & Tuple_header::MM_SHRINK) { + ljam(); vpagePtrP->shrink_entry(tmp.m_page_idx, (sz + 3) >> 2); update_free_page_list(regFragPtr, vpagePtr); } @@ -270,6 +279,7 @@ Dbtup::commit_operation(Signal* signal, if (regTabPtr->m_no_of_disk_attributes && (copy_bits & Tuple_header::DISK_INLINE)) { + ljam(); Local_key key; memcpy(&key, copy->get_disk_ref_ptr(regTabPtr), sizeof(Local_key)); Uint32 logfile_group_id= regFragPtr->m_logfile_group_id; @@ -280,22 +290,26 @@ Dbtup::commit_operation(Signal* signal, Uint32 sz, *dst; if(copy_bits & Tuple_header::DISK_ALLOC) { + ljam(); disk_page_alloc(signal, regTabPtr, regFragPtr, &key, diskPagePtr, gci); } if(regTabPtr->m_attributes[DD].m_no_of_varsize == 0) { + ljam(); sz= regTabPtr->m_offsets[DD].m_fix_header_size; dst= ((Fix_page*)diskPagePtr.p)->get_ptr(key.m_page_idx, sz); } else { + ljam(); dst= ((Var_page*)diskPagePtr.p)->get_ptr(key.m_page_idx); sz= ((Var_page*)diskPagePtr.p)->get_entry_len(key.m_page_idx); } if(! (copy_bits & Tuple_header::DISK_ALLOC)) { + ljam(); disk_page_undo_update(diskPagePtr.p, &key, dst, sz, gci, logfile_group_id); } @@ -309,6 +323,7 @@ Dbtup::commit_operation(Signal* signal, if(lcpScan_ptr_i != RNIL && (bits & Tuple_header::ALLOC)) { + ljam(); ScanOpPtr scanOp; c_scanOpPool.getPtr(scanOp, lcpScan_ptr_i); Local_key rowid = regOperPtr->m_tuple_location; @@ -316,6 +331,7 @@ Dbtup::commit_operation(Signal* signal, rowid.m_page_no = pagePtr.p->frag_page_id; if(rowid > scanpos) { + ljam(); copy_bits |= Tuple_header::LCP_SKIP; } } @@ -374,7 +390,10 @@ Dbtup::disk_page_commit_callback(Signal* signal, execTUP_COMMITREQ(signal); if(signal->theData[0] == 0) + { + ljam(); c_lqh->tupcommit_conf_callback(signal, regOperPtr.p->userpointer); + } } void @@ -412,6 +431,7 @@ Dbtup::disk_page_log_buffer_callback(Signal* signal, void Dbtup::fix_commit_order(OperationrecPtr opPtr) { + ljam(); ndbassert(!opPtr.p->is_first_operation()); OperationrecPtr firstPtr = opPtr; while(firstPtr.p->prevActiveOp != RNIL) @@ -437,7 +457,10 @@ Dbtup::fix_commit_order(OperationrecPtr opPtr) c_operation_pool.getPtr(seco)->prevActiveOp = opPtr.i; c_operation_pool.getPtr(prev)->nextActiveOp = firstPtr.i; if(next != RNIL) + { + ljam(); c_operation_pool.getPtr(next)->prevActiveOp = firstPtr.i; + } } /* ----------------------------------------------------------------- */ @@ -502,6 +525,7 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) bool get_page = false; if(regOperPtr.p->op_struct.m_load_diskpage_on_commit) { + ljam(); Page_cache_client::Request req; ndbassert(regOperPtr.p->is_first_operation() && regOperPtr.p->is_last_operation()); @@ -511,6 +535,7 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) */ if(!regOperPtr.p->m_copy_tuple_location.isNull()) { + ljam(); Tuple_header* tmp= (Tuple_header*) c_undo_buffer.get_ptr(®OperPtr.p->m_copy_tuple_location); @@ -520,23 +545,25 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) if (unlikely(regOperPtr.p->op_struct.op_type == ZDELETE && tmp->m_header_bits & Tuple_header::DISK_ALLOC)) { - jam(); + ljam(); /** * Insert+Delete */ - regOperPtr.p->op_struct.m_load_diskpage_on_commit = 0; - regOperPtr.p->op_struct.m_wait_log_buffer = 0; - disk_page_abort_prealloc(signal, regFragPtr.p, + regOperPtr.p->op_struct.m_load_diskpage_on_commit = 0; + regOperPtr.p->op_struct.m_wait_log_buffer = 0; + disk_page_abort_prealloc(signal, regFragPtr.p, &req.m_page, req.m_page.m_page_idx); - - c_lgman->free_log_space(regFragPtr.p->m_logfile_group_id, + + c_lgman->free_log_space(regFragPtr.p->m_logfile_group_id, regOperPtr.p->m_undo_buffer_space); - ndbout_c("insert+delete"); - goto skip_disk; + ndbout_c("insert+delete"); + ljamEntry(); + goto skip_disk; } } else { + ljam(); // initial delete ndbassert(regOperPtr.p->op_struct.op_type == ZDELETE); memcpy(&req.m_page, @@ -560,11 +587,14 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) /** * Timeslice */ + ljam(); signal->theData[0] = 1; return; case -1: ndbrequire("NOT YET IMPLEMENTED" == 0); break; + default: + ljam(); } get_page = true; @@ -581,6 +611,7 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) if(regOperPtr.p->op_struct.m_wait_log_buffer) { + ljam(); ndbassert(regOperPtr.p->is_first_operation() && regOperPtr.p->is_last_operation()); @@ -592,18 +623,23 @@ void Dbtup::execTUP_COMMITREQ(Signal* signal) Logfile_client lgman(this, c_lgman, regFragPtr.p->m_logfile_group_id); int res= lgman.get_log_buffer(signal, sz, &cb); + ljamEntry(); switch(res){ case 0: + ljam(); signal->theData[0] = 1; return; case -1: ndbrequire("NOT YET IMPLEMENTED" == 0); break; + default: + ljam(); } } if(!tuple_ptr) { + ljam(); tuple_ptr = (Tuple_header*) get_ptr(&page, ®OperPtr.p->m_tuple_location,regTabPtr.p); } @@ -612,6 +648,7 @@ skip_disk: if(get_tuple_state(regOperPtr.p) == TUPLE_PREPARED) { + ljam(); /** * Execute all tux triggers at first commit * since previous tuple is otherwise removed... @@ -637,6 +674,7 @@ skip_disk: if(regOperPtr.p->is_last_operation()) { + ljam(); /** * Perform "real" commit */ @@ -647,12 +685,14 @@ skip_disk: if(regOperPtr.p->op_struct.op_type != ZDELETE) { + ljam(); commit_operation(signal, gci, tuple_ptr, page, regOperPtr.p, regFragPtr.p, regTabPtr.p); removeActiveOpList(regOperPtr.p, tuple_ptr); } else { + ljam(); removeActiveOpList(regOperPtr.p, tuple_ptr); if (get_page) ndbassert(tuple_ptr->m_header_bits & Tuple_header::DISK_PART); @@ -662,6 +702,7 @@ skip_disk: } else { + ljam(); removeActiveOpList(regOperPtr.p, tuple_ptr); } diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp index a235e02a4b7..264115d0508 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp @@ -16,6 +16,10 @@ #define DBTUP_C #include "Dbtup.hpp" +#define ljam() { jamLine(35000 + __LINE__); } +#define ljamEntry() { jamEntryLine(35000 + __LINE__); } + + static bool f_undo_done = true; static @@ -266,7 +270,7 @@ Dbtup::update_extent_pos(Disk_alloc_info& alloc, Uint32 pos = alloc.calc_extent_pos(extentPtr.p); if (old != pos) { - jam(); + ljam(); Local_extent_info_list old_list(c_extent_pool, alloc.m_free_extents[old]); Local_extent_info_list new_list(c_extent_pool, alloc.m_free_extents[pos]); old_list.remove(extentPtr); @@ -283,6 +287,7 @@ Dbtup::update_extent_pos(Disk_alloc_info& alloc, void Dbtup::restart_setup_page(Disk_alloc_info& alloc, PagePtr pagePtr) { + ljam(); /** * Link to extent, clear uncommitted_used_space */ @@ -303,6 +308,7 @@ Dbtup::restart_setup_page(Disk_alloc_info& alloc, PagePtr pagePtr) ddassert(real_free >= estimated); if (real_free != estimated) { + ljam(); extentPtr.p->m_free_space += (real_free - estimated); update_extent_pos(alloc, extentPtr); } @@ -318,7 +324,7 @@ Dbtup::restart_setup_page(Disk_alloc_info& alloc, PagePtr pagePtr) unsigned uncommitted, committed; uncommitted = committed = ~(unsigned)0; int ret = tsman.get_page_free_bits(&page, &uncommitted, &committed); - jamEntry(); + ljamEntry(); idx = alloc.calc_page_free_bits(real_free); ddassert(idx == committed); @@ -375,6 +381,7 @@ Dbtup::disk_page_prealloc(Signal* signal, key->m_file_no= tmp.p->m_file_no; if (DBG_DISK) ndbout << " found dirty page " << *key << endl; + ljam(); return 0; // Page in memory } } @@ -396,6 +403,7 @@ Dbtup::disk_page_prealloc(Signal* signal, * key = req.p->m_key; if (DBG_DISK) ndbout << " found transit page " << *key << endl; + ljam(); return 0; } } @@ -405,6 +413,7 @@ Dbtup::disk_page_prealloc(Signal* signal, */ if (!c_page_request_pool.seize(req)) { + ljam(); err= 1; //XXX set error code ndbout_c("no free request"); @@ -425,16 +434,16 @@ Dbtup::disk_page_prealloc(Signal* signal, */ if ((ext.i= alloc.m_curr_extent_info_ptr_i) != RNIL) { - jam(); + ljam(); c_extent_pool.getPtr(ext); if ((pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits)) >= 0) { - jamEntry(); + ljamEntry(); found= true; } else { - jamEntry(); + ljamEntry(); /** * The current extent is not in a free list * and since it couldn't accomadate the request @@ -453,14 +462,14 @@ Dbtup::disk_page_prealloc(Signal* signal, Uint32 pos; if ((pos= alloc.find_extent(sz)) != RNIL) { - jam(); + ljam(); Local_extent_info_list list(c_extent_pool, alloc.m_free_extents[pos]); list.first(ext); list.remove(ext); } else { - jam(); + ljam(); /** * We need to alloc an extent */ @@ -469,6 +478,7 @@ Dbtup::disk_page_prealloc(Signal* signal, err = c_lgman->alloc_log_space(logfile_group_id, sizeof(Disk_undo::AllocExtent)>>2); + ljamEntry(); if(unlikely(err)) { return -err; @@ -477,7 +487,7 @@ Dbtup::disk_page_prealloc(Signal* signal, if (!c_extent_pool.seize(ext)) { - jam(); + ljam(); //XXX err= 2; #if NOT_YET_UNDO_ALLOC_EXTENT @@ -491,7 +501,7 @@ Dbtup::disk_page_prealloc(Signal* signal, if ((err= tsman.alloc_extent(&ext.p->m_key)) < 0) { - jamEntry(); + ljamEntry(); #if NOT_YET_UNDO_ALLOC_EXTENT c_lgman->free_log_space(logfile_group_id, sizeof(Disk_undo::AllocExtent)>>2); @@ -543,7 +553,7 @@ Dbtup::disk_page_prealloc(Signal* signal, alloc.m_curr_extent_info_ptr_i= ext.i; ext.p->m_free_matrix_pos= RNIL; pageBits= tsman.alloc_page_from_extent(&ext.p->m_key, bits); - jamEntry(); + ljamEntry(); ddassert(pageBits >= 0); } @@ -569,6 +579,7 @@ Dbtup::disk_page_prealloc(Signal* signal, Uint32 newPageBits= alloc.calc_page_free_bits(new_size); if (newPageBits != (Uint32)pageBits) { + ljam(); ddassert(ext.p->m_free_page_count[pageBits] > 0); ext.p->m_free_page_count[pageBits]--; ext.p->m_free_page_count[newPageBits]++; @@ -596,6 +607,7 @@ Dbtup::disk_page_prealloc(Signal* signal, int flags= Page_cache_client::ALLOC_REQ; if (pageBits == 0) { + ljam(); //XXX empty page -> fast to map flags |= Page_cache_client::EMPTY_PAGE; preq.m_callback.m_callbackFunction = @@ -603,15 +615,17 @@ Dbtup::disk_page_prealloc(Signal* signal, } int res= m_pgman.get_page(signal, preq, flags); - jamEntry(); + ljamEntry(); switch(res) { case 0: + ljam(); break; case -1: ndbassert(false); break; default: + ljam(); execute(signal, preq.m_callback, res); // run callback } @@ -623,6 +637,7 @@ Dbtup::disk_page_prealloc_dirty_page(Disk_alloc_info & alloc, PagePtr pagePtr, Uint32 old_idx, Uint32 sz) { + ljam(); ddassert(pagePtr.p->list_index == old_idx); Uint32 free= pagePtr.p->free_space; @@ -638,6 +653,7 @@ Dbtup::disk_page_prealloc_dirty_page(Disk_alloc_info & alloc, if (old_idx != new_idx) { + ljam(); LocalDLList old_list(*pool, alloc.m_dirty_pages[old_idx]); LocalDLList new_list(*pool, alloc.m_dirty_pages[new_idx]); old_list.remove(pagePtr); @@ -661,6 +677,7 @@ Dbtup::disk_page_prealloc_transit_page(Disk_alloc_info& alloc, Ptr req, Uint32 old_idx, Uint32 sz) { + ljam(); ddassert(req.p->m_list_index == old_idx); Uint32 free= req.p->m_estimated_free_space; @@ -675,6 +692,7 @@ Dbtup::disk_page_prealloc_transit_page(Disk_alloc_info& alloc, if (old_idx != new_idx) { + ljam(); Page_request_list::Head *lists = alloc.m_page_requests; Local_page_request_list old_list(c_page_request_pool, lists[old_idx]); Local_page_request_list new_list(c_page_request_pool, lists[new_idx]); @@ -699,6 +717,7 @@ void Dbtup::disk_page_prealloc_callback(Signal* signal, Uint32 page_request, Uint32 page_id) { + ljamEntry(); //ndbout_c("disk_alloc_page_callback id: %d", page_id); Ptr req; @@ -728,6 +747,7 @@ Dbtup::disk_page_prealloc_initial_callback(Signal*signal, Uint32 page_request, Uint32 page_id) { + ljamEntry(); //ndbout_c("disk_alloc_page_callback_initial id: %d", page_id); /** * 1) lookup page request @@ -819,6 +839,7 @@ Dbtup::disk_page_prealloc_callback_common(Signal* signal, if (old_idx != new_idx || free != real_free) { + ljam(); Ptr extentPtr; c_extent_pool.getPtr(extentPtr, ext); @@ -826,6 +847,7 @@ Dbtup::disk_page_prealloc_callback_common(Signal* signal, if (old_idx != new_idx) { + ljam(); ddassert(extentPtr.p->m_free_page_count[old_idx]); extentPtr.p->m_free_page_count[old_idx]--; extentPtr.p->m_free_page_count[new_idx]++; @@ -844,9 +866,11 @@ Dbtup::disk_page_prealloc_callback_common(Signal* signal, void Dbtup::disk_page_set_dirty(PagePtr pagePtr) { + ljam(); Uint32 idx = pagePtr.p->list_index; if ((idx & 0x8000) == 0) { + ljam(); /** * Already in dirty list */ @@ -878,7 +902,6 @@ Dbtup::disk_page_set_dirty(PagePtr pagePtr) Uint32 used = pagePtr.p->uncommitted_used_space; if (unlikely(pagePtr.p->m_restart_seq != globalData.m_restart_seq)) { - jam(); restart_setup_page(alloc, pagePtr); idx = alloc.calc_page_free_bits(free); used = 0; @@ -903,14 +926,14 @@ Dbtup::disk_page_set_dirty(PagePtr pagePtr) // Make sure no one will allocate it... tsman.unmap_page(&key, MAX_FREE_LIST - 1); - jamEntry(); + ljamEntry(); } void Dbtup::disk_page_unmap_callback(Uint32 when, Uint32 page_id, Uint32 dirty_count) { - jamEntry(); + ljamEntry(); Ptr gpage; m_global_page_pool.getPtr(gpage, page_id); PagePtr pagePtr; @@ -922,6 +945,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, type != File_formats::PT_Tup_varsize_page) || f_undo_done == false)) { + ljam(); return ; } @@ -941,7 +965,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, /** * Before pageout */ - jam(); + ljam(); if (DBG_DISK) { @@ -962,7 +986,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, if (dirty_count == 0) { - jam(); + ljam(); pagePtr.p->list_index = idx | 0x8000; Local_key key; @@ -980,7 +1004,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, fragPtr.p->m_tablespace_id); tsman.unmap_page(&key, idx); - jamEntry(); + ljamEntry(); } } else if (when == 1) @@ -988,7 +1012,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, /** * After page out */ - jam(); + ljam(); Local_key key; key.m_page_no = pagePtr.p->m_page_no; @@ -1018,6 +1042,7 @@ Dbtup::disk_page_unmap_callback(Uint32 when, << endl; } tsman.update_page_free_bits(&key, alloc.calc_page_free_bits(real_free)); + ljamEntry(); } } @@ -1026,6 +1051,7 @@ Dbtup::disk_page_alloc(Signal* signal, Tablerec* tabPtrP, Fragrecord* fragPtrP, Local_key* key, PagePtr pagePtr, Uint32 gci) { + ljam(); Uint32 logfile_group_id= fragPtrP->m_logfile_group_id; Disk_alloc_info& alloc= fragPtrP->m_disk_alloc_info; @@ -1056,6 +1082,7 @@ Dbtup::disk_page_free(Signal *signal, Tablerec *tabPtrP, Fragrecord * fragPtrP, Local_key* key, PagePtr pagePtr, Uint32 gci) { + ljam(); if (DBG_DISK) ndbout << " disk_page_free " << *key << endl; @@ -1108,6 +1135,7 @@ Dbtup::disk_page_free(Signal *signal, if (old_idx != new_idx) { + ljam(); ddassert(extentPtr.p->m_free_page_count[old_idx]); extentPtr.p->m_free_page_count[old_idx]--; extentPtr.p->m_free_page_count[new_idx]++; @@ -1134,6 +1162,7 @@ void Dbtup::disk_page_abort_prealloc(Signal *signal, Fragrecord* fragPtrP, Local_key* key, Uint32 sz) { + ljam(); Page_cache_client::Request req; req.m_callback.m_callbackData= sz; req.m_callback.m_callbackFunction = @@ -1143,13 +1172,17 @@ Dbtup::disk_page_abort_prealloc(Signal *signal, Fragrecord* fragPtrP, memcpy(&req.m_page, key, sizeof(Local_key)); int res= m_pgman.get_page(signal, req, flags); - jamEntry(); + ljamEntry(); switch(res) { case 0: + ljam(); + break; case -1: + ndbrequire(false); break; default: + ljam(); Ptr gpage; m_global_page_pool.getPtr(gpage, (Uint32)res); PagePtr pagePtr; @@ -1165,7 +1198,7 @@ Dbtup::disk_page_abort_prealloc_callback(Signal* signal, Uint32 sz, Uint32 page_id) { //ndbout_c("disk_alloc_page_callback id: %d", page_id); - + ljamEntry(); Ptr gpage; m_global_page_pool.getPtr(gpage, page_id); @@ -1189,7 +1222,7 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal, PagePtr pagePtr, Uint32 sz) { - jam(); + ljam(); disk_page_set_dirty(pagePtr); Disk_alloc_info& alloc= fragPtrP->m_disk_alloc_info; @@ -1208,12 +1241,14 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal, c_extent_pool.getPtr(extentPtr, ext); if (old_idx != new_idx) { + ljam(); ddassert(extentPtr.p->m_free_page_count[old_idx]); extentPtr.p->m_free_page_count[old_idx]--; extentPtr.p->m_free_page_count[new_idx]++; if (old_idx == page_idx) { + ljam(); ArrayPool *pool= (ArrayPool*)&m_global_page_pool; LocalDLList old_list(*pool, alloc.m_dirty_pages[old_idx]); LocalDLList new_list(*pool, alloc.m_dirty_pages[new_idx]); @@ -1223,6 +1258,7 @@ Dbtup::disk_page_abort_prealloc_callback_1(Signal* signal, } else { + ljam(); pagePtr.p->list_index = new_idx | 0x8000; } } @@ -1272,7 +1308,7 @@ Dbtup::disk_page_alloc_extent_log_buffer_callback(Signal* signal, Uint64 lsn= lgman.add_entry(c, 1); tsman.update_lsn(&key, lsn); - jamEntry(); + ljamEntry(); } #endif @@ -1280,6 +1316,7 @@ Uint64 Dbtup::disk_page_undo_alloc(Page* page, const Local_key* key, Uint32 sz, Uint32 gci, Uint32 logfile_group_id) { + ljam(); Logfile_client lgman(this, c_lgman, logfile_group_id); Disk_undo::Alloc alloc; @@ -1291,7 +1328,7 @@ Dbtup::disk_page_undo_alloc(Page* page, const Local_key* key, Uint64 lsn= lgman.add_entry(c, 1); m_pgman.update_lsn(* key, lsn); - jamEntry(); + ljamEntry(); return lsn; } @@ -1301,6 +1338,7 @@ Dbtup::disk_page_undo_update(Page* page, const Local_key* key, const Uint32* src, Uint32 sz, Uint32 gci, Uint32 logfile_group_id) { + ljam(); Logfile_client lgman(this, c_lgman, logfile_group_id); Disk_undo::Update update; @@ -1321,7 +1359,7 @@ Dbtup::disk_page_undo_update(Page* page, const Local_key* key, Uint64 lsn= lgman.add_entry(c, 3); m_pgman.update_lsn(* key, lsn); - jamEntry(); + ljamEntry(); return lsn; } @@ -1331,6 +1369,7 @@ Dbtup::disk_page_undo_free(Page* page, const Local_key* key, const Uint32* src, Uint32 sz, Uint32 gci, Uint32 logfile_group_id) { + ljam(); Logfile_client lgman(this, c_lgman, logfile_group_id); Disk_undo::Free free; @@ -1351,7 +1390,7 @@ Dbtup::disk_page_undo_free(Page* page, const Local_key* key, Uint64 lsn= lgman.add_entry(c, 3); m_pgman.update_lsn(* key, lsn); - jamEntry(); + ljamEntry(); return lsn; } @@ -1377,7 +1416,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, case File_formats::Undofile::UNDO_LCP_FIRST: case File_formats::Undofile::UNDO_LCP: { - jam(); + ljam(); ndbrequire(len == 3); Uint32 lcp = ptr[0]; Uint32 tableId = ptr[1] >> 16; @@ -1393,7 +1432,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, } case File_formats::Undofile::UNDO_TUP_ALLOC: { - jam(); + ljam(); Disk_undo::Alloc* rec= (Disk_undo::Alloc*)ptr; preq.m_page.m_page_no = rec->m_page_no; preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16; @@ -1402,7 +1441,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, } case File_formats::Undofile::UNDO_TUP_UPDATE: { - jam(); + ljam(); Disk_undo::Update* rec= (Disk_undo::Update*)ptr; preq.m_page.m_page_no = rec->m_page_no; preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16; @@ -1411,7 +1450,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, } case File_formats::Undofile::UNDO_TUP_FREE: { - jam(); + ljam(); Disk_undo::Free* rec= (Disk_undo::Free*)ptr; preq.m_page.m_page_no = rec->m_page_no; preq.m_page.m_file_no = rec->m_file_no_page_idx >> 16; @@ -1423,7 +1462,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, * */ { - jam(); + ljam(); Disk_undo::Create* rec= (Disk_undo::Create*)ptr; Ptr tabPtr; tabPtr.i= rec->m_table; @@ -1442,7 +1481,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, } case File_formats::Undofile::UNDO_TUP_DROP: { - jam(); + ljam(); Disk_undo::Drop* rec = (Disk_undo::Drop*)ptr; Ptr tabPtr; tabPtr.i= rec->m_table; @@ -1460,14 +1499,14 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, return; } case File_formats::Undofile::UNDO_TUP_ALLOC_EXTENT: - jam(); + ljam(); case File_formats::Undofile::UNDO_TUP_FREE_EXTENT: - jam(); + ljam(); disk_restart_undo_next(signal); return; case File_formats::Undofile::UNDO_END: - jam(); + ljam(); f_undo_done = true; return; default: @@ -1480,7 +1519,7 @@ Dbtup::disk_restart_undo(Signal* signal, Uint64 lsn, int flags = 0; int res= m_pgman.get_page(signal, preq, flags); - jamEntry(); + ljamEntry(); switch(res) { case 0: @@ -1503,7 +1542,7 @@ Dbtup::disk_restart_undo_next(Signal* signal) void Dbtup::disk_restart_lcp_id(Uint32 tableId, Uint32 fragId, Uint32 lcpId) { - jamEntry(); + ljamEntry(); if (lcpId == RNIL) { @@ -1534,23 +1573,23 @@ Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag, if (tabPtr.p->tableStatus == DEFINED) { - jam(); + ljam(); FragrecordPtr fragPtr; getFragmentrec(fragPtr, fragId, tabPtr.p); if (!fragPtr.isNull()) { - jam(); + ljam(); switch(flag){ case Fragrecord::UC_CREATE: - jam(); + ljam(); fragPtr.p->m_undo_complete |= flag; return; case Fragrecord::UC_LCP: - jam(); + ljam(); if (fragPtr.p->m_undo_complete == 0 && fragPtr.p->m_restore_lcp_id == lcpId) { - jam(); + ljam(); fragPtr.p->m_undo_complete |= flag; if (DBG_UNDO) ndbout_c("table: %u fragment: %u lcp: %u -> done", @@ -1559,7 +1598,7 @@ Dbtup::disk_restart_undo_lcp(Uint32 tableId, Uint32 fragId, Uint32 flag, return; case Fragrecord::UC_SET_LCP: { - jam(); + ljam(); if (DBG_UNDO) ndbout_c("table: %u fragment: %u restore to lcp: %u", tableId, fragId, lcpId); @@ -1580,7 +1619,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, Uint32 id, Uint32 page_id) { - jamEntry(); + ljamEntry(); Ptr gpage; m_global_page_pool.getPtr(gpage, page_id); PagePtr pagePtr; @@ -1594,7 +1633,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, pagePtr.p->nextList != RNIL || pagePtr.p->prevList != RNIL) { - jam(); + ljam(); update = true; pagePtr.p->list_index |= 0x8000; pagePtr.p->nextList = pagePtr.p->prevList = RNIL; @@ -1605,7 +1644,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, if (tableId >= cnoOfTablerec) { - jam(); + ljam(); if (DBG_UNDO) ndbout_c("UNDO table> %u", tableId); disk_restart_undo_next(signal); @@ -1616,7 +1655,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, if (undo->m_table_ptr.p->tableStatus != DEFINED) { - jam(); + ljam(); if (DBG_UNDO) ndbout_c("UNDO !defined (%u) ", tableId); disk_restart_undo_next(signal); @@ -1626,7 +1665,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, getFragmentrec(undo->m_fragment_ptr, fragId, undo->m_table_ptr.p); if(undo->m_fragment_ptr.isNull()) { - jam(); + ljam(); if (DBG_UNDO) ndbout_c("UNDO fragment null %u/%u", tableId, fragId); disk_restart_undo_next(signal); @@ -1635,7 +1674,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, if (undo->m_fragment_ptr.p->m_undo_complete) { - jam(); + ljam(); if (DBG_UNDO) ndbout_c("UNDO undo complete %u/%u", tableId, fragId); disk_restart_undo_next(signal); @@ -1654,7 +1693,7 @@ Dbtup::disk_restart_undo_callback(Signal* signal, if (undo->m_lsn <= lsn) { - jam(); + ljam(); if (DBG_UNDO) { ndbout << "apply: " << undo->m_lsn << "(" << lsn << " )" @@ -1669,15 +1708,15 @@ Dbtup::disk_restart_undo_callback(Signal* signal, */ switch(undo->m_type){ case File_formats::Undofile::UNDO_TUP_ALLOC: - jam(); + ljam(); disk_restart_undo_alloc(undo); break; case File_formats::Undofile::UNDO_TUP_UPDATE: - jam(); + ljam(); disk_restart_undo_update(undo); break; case File_formats::Undofile::UNDO_TUP_FREE: - jam(); + ljam(); disk_restart_undo_free(undo); break; default: @@ -1691,13 +1730,13 @@ Dbtup::disk_restart_undo_callback(Signal* signal, lsn = undo->m_lsn - 1; // make sure undo isn't run again... m_pgman.update_lsn(undo->m_key, lsn); - jamEntry(); + ljamEntry(); disk_restart_undo_page_bits(signal, undo); } else if (DBG_UNDO) { - jam(); + ljam(); ndbout << "ignore: " << undo->m_lsn << "(" << lsn << " )" << key << " type: " << undo->m_type << " tab: " << tableId << endl; @@ -1783,7 +1822,7 @@ Dbtup::disk_restart_undo_page_bits(Signal* signal, Apply_undo* undo) fragPtrP->m_tablespace_id); tsman.restart_undo_page_free_bits(&undo->m_key, new_bits); - jamEntry(); + ljamEntry(); } int @@ -1799,7 +1838,7 @@ Dbtup::disk_restart_alloc_extent(Uint32 tableId, Uint32 fragId, getFragmentrec(fragPtr, fragId, tabPtr.p); if (fragPtr.p->m_undo_complete & Fragrecord::UC_CREATE) { - jam(); + ljam(); return -1; } @@ -1819,7 +1858,7 @@ Dbtup::disk_restart_alloc_extent(Uint32 tableId, Uint32 fragId, if (alloc.m_curr_extent_info_ptr_i != RNIL) { - jam(); + ljam(); Ptr old; c_extent_pool.getPtr(old, alloc.m_curr_extent_info_ptr_i); ndbassert(old.p->m_free_matrix_pos == RNIL); @@ -1846,7 +1885,7 @@ void Dbtup::disk_restart_page_bits(Uint32 tableId, Uint32 fragId, const Local_key*, Uint32 bits) { - jam(); + ljam(); TablerecPtr tabPtr; FragrecordPtr fragPtr; tabPtr.i = tableId; From 1804046d78a4e4c8750aed1dfbffdd1f07fc7857 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 18:56:42 +0100 Subject: [PATCH 087/527] Bug#29182 - MyISAMCHK reports wrong character set myisamchk did always show Character set: latin1_swedish_ci (8), regardless what DEFAULT CHARSET the table had. When the server created a MyISAM table, it did not copy the characterset number into the MyISAM create info structure. Added assignment of charset number to MI_CREATE_INFO. mysql-test/r/myisam.result: Bug#29182 - MyISAMCHK reports wrong character set Added test result. mysql-test/t/myisam.test: Bug#29182 - MyISAMCHK reports wrong character set Added test. storage/myisam/ha_myisam.cc: Bug#29182 - MyISAMCHK reports wrong character set Added assignment of charset number to MI_CREATE_INFO. --- mysql-test/r/myisam.result | 19 +++++++++++++++++++ mysql-test/t/myisam.test | 14 ++++++++++++++ storage/myisam/ha_myisam.cc | 1 + 3 files changed, 34 insertions(+) diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index a18018657e0..bf57b6e1006 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -2185,4 +2185,23 @@ CHECK TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 check status OK DROP TABLE t1; +CREATE TABLE t1 ( +c1 VARCHAR(10) NOT NULL, +c2 CHAR(10) DEFAULT NULL, +c3 VARCHAR(10) NOT NULL, +KEY (c1), +KEY (c2) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0; + +MyISAM file: MYSQLTEST_VARDIR/master-data/test/t1 +Record format: Packed +Character set: utf8_general_ci (33) +Data records: 0 Deleted blocks: 0 +Recordlength: 94 + +table description: +Key Start Len Index Type +1 2 30 multip. varchar +2 33 30 multip. char NULL +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index bb2c295eac2..21ffa0683b6 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -1448,5 +1448,19 @@ CHECK TABLE t1; CHECK TABLE t1 EXTENDED; DROP TABLE t1; +# +# Bug#29182 - MyISAMCHK reports wrong character set +# +CREATE TABLE t1 ( + c1 VARCHAR(10) NOT NULL, + c2 CHAR(10) DEFAULT NULL, + c3 VARCHAR(10) NOT NULL, + KEY (c1), + KEY (c2) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 PACK_KEYS=0; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--exec $MYISAMCHK -d $MYSQLTEST_VARDIR/master-data/test/t1 +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc index 0b69f9d135f..09393d58d1a 100644 --- a/storage/myisam/ha_myisam.cc +++ b/storage/myisam/ha_myisam.cc @@ -1859,6 +1859,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg, share->avg_row_length); create_info.data_file_name= ha_create_info->data_file_name; create_info.index_file_name= ha_create_info->index_file_name; + create_info.language= share->table_charset->number; if (ha_create_info->options & HA_LEX_CREATE_TMP_TABLE) create_flags|= HA_CREATE_TMP_TABLE; From f112c3cf0083d5092a32217f2145d984341c4d63 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 24 Jan 2008 19:04:48 +0100 Subject: [PATCH 088/527] Makefile.am: Needed to add the new sample configuration files to the CLEANFILES section support-files/Makefile.am: Needed to add the new sample configuration files to the CLEANFILES section --- support-files/Makefile.am | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support-files/Makefile.am b/support-files/Makefile.am index 71939728046..a6001e635e6 100644 --- a/support-files/Makefile.am +++ b/support-files/Makefile.am @@ -65,6 +65,9 @@ CLEANFILES = my-small.cnf \ my-medium.cnf \ my-large.cnf \ my-huge.cnf \ + config.huge.ini \ + config.medium.ini \ + config.small.ini \ my-innodb-heavy-4G.cnf \ mysql.spec \ mysql-@VERSION@.spec \ From 77b2e8f314f1df93df6661b2bd89ab806c41d359 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Jan 2008 10:43:30 +0100 Subject: [PATCH 089/527] ndb_restore.result, ndb_restore.test: Changed to use information_schema to check auto_increment Ndb.cpp: Bug #33534 Bad performance of INSERT's in auto_incremented tables: Saving highest seen value when setting auto_increment fields ndb_auto_increment.result: Regenerated result mysql-test/suite/ndb/r/ndb_auto_increment.result: Regenerated result mysql-test/suite/ndb/r/ndb_restore.result: Changed to use information_schema to check auto_increment mysql-test/suite/ndb/t/ndb_restore.test: Changed to use information_schema to check auto_increment storage/ndb/src/ndbapi/Ndb.cpp: Bug #33534 Bad performance of INSERT's in auto_incremented tables: Saving highest seen value when setting auto_increment fields --- .../suite/ndb/r/ndb_auto_increment.result | 6 +- mysql-test/suite/ndb/r/ndb_restore.result | 268 +++++++++++++++--- mysql-test/suite/ndb/t/ndb_restore.test | 168 ++++++++++- storage/ndb/src/ndbapi/Ndb.cpp | 10 +- 4 files changed, 404 insertions(+), 48 deletions(-) diff --git a/mysql-test/suite/ndb/r/ndb_auto_increment.result b/mysql-test/suite/ndb/r/ndb_auto_increment.result index 5740ed38242..78612b35113 100644 --- a/mysql-test/suite/ndb/r/ndb_auto_increment.result +++ b/mysql-test/suite/ndb/r/ndb_auto_increment.result @@ -421,10 +421,10 @@ select * from t1 order by a; a 1 20 -21 33 34 35 +65 insert into t1 values (100); insert into t1 values (NULL); insert into t1 values (NULL); @@ -432,11 +432,11 @@ select * from t1 order by a; a 1 20 -21 -22 33 34 35 +65 +66 100 101 set auto_increment_offset = @old_auto_increment_offset; diff --git a/mysql-test/suite/ndb/r/ndb_restore.result b/mysql-test/suite/ndb/r/ndb_restore.result index 0ebec9c96ae..a33c5c5f31c 100644 --- a/mysql-test/suite/ndb/r/ndb_restore.result +++ b/mysql-test/suite/ndb/r/ndb_restore.result @@ -18,12 +18,12 @@ CREATE TABLE `t2_c` ( 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'); +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; +) 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, @@ -116,8 +116,8 @@ CREATE TABLE `t9_c` ( 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; -insert into t10_c values (1),(2),(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; @@ -129,6 +129,8 @@ 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 = HEAP; DELETE FROM test.backup_info; LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; @@ -136,29 +138,14 @@ SELECT @the_backup_id:=backup_id FROM test.backup_info; @the_backup_id:=backup_id 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; -show tables; -Tables_in_test -t1 -t10 -t2 -t3 -t4 -t5 -t6 -t7 -t8 -t9 -t4_c -t3_c -t2_c -t5_c -t6_c -t7_c -t8_c -t9_c -t10_c -t1_c +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 +NULL test t1_c capgoaledatta 1 NULL NO mediumint NULL NULL 7 0 NULL NULL mediumint(5) unsigned PRI auto_increment select,insert,update,references +NULL test t1_c goaledatta 2 NO char 2 2 NULL NULL latin1 latin1_swedish_ci char(2) PRI select,insert,update,references +NULL 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 @@ -172,15 +159,15 @@ count(*) 5 select count(*) from t2; count(*) -6 +7 select count(*) from t2_c; count(*) -6 +7 select count(*) from (select * from t2 union select * from t2_c) a; count(*) -6 +7 select count(*) from t3; count(*) 4 @@ -301,6 +288,223 @@ select auto_increment from information_schema.tables where table_name = 't10_c'; auto_increment 10001 -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; +ALTER TABLE t7_c +PARTITION BY LINEAR KEY (`dardtestard`); +CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info (id INT, backup_id INT) ENGINE = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +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 = HEAP; +DELETE FROM test.backup_info; +LOAD DATA INFILE '../tmp.dat' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; +SELECT @the_backup_id:=backup_id FROM test.backup_info; +@the_backup_id:=backup_id + +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/t/ndb_restore.test b/mysql-test/suite/ndb/t/ndb_restore.test index 940b53adbe1..c8b07fd351a 100644 --- a/mysql-test/suite/ndb/t/ndb_restore.test +++ b/mysql-test/suite/ndb/t/ndb_restore.test @@ -33,13 +33,15 @@ CREATE TABLE `t2_c` ( 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'); +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; +) 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 @@ -147,8 +149,8 @@ INSERT INTO `t9_c` VALUES ('3g4jh8gar2t','joe','q3.net','elredun.com','q3.net',' # 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; -insert into t10_c values (1),(2),(3); +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); @@ -164,14 +166,27 @@ 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; +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 -show tables; +# 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; @@ -247,9 +262,146 @@ 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 t1_c,t2_c,t3_c,t4_c,t5_c,t6_c,t7_c,t8_c,t9_c, t10_c; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; +drop table if exists t2_c; --enable_warnings # diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp index 23b0e0915ae..769773c166a 100644 --- a/storage/ndb/src/ndbapi/Ndb.cpp +++ b/storage/ndb/src/ndbapi/Ndb.cpp @@ -1399,15 +1399,15 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table, tOperation->write_attr("NEXTID", 1); tOperation->interpret_exit_ok(); tOperation->def_label(0); - tOperation->interpret_exit_nok(9999); - + tOperation->interpret_exit_ok(); + tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( NdbTransaction::Commit ) == -1) { - if (tConnection->theError.code != 9999) - goto error_handler; + goto error_handler; } else { + range.m_highest_seen = tRecAttrResult->u_64_value(); DBUG_PRINT("info", ("Setting next auto increment value (db) to %lu", (ulong) opValue)); @@ -1420,7 +1420,7 @@ Ndb::opTupleIdOnNdb(const NdbTableImpl* table, tRecAttrResult = tOperation->getValue("NEXTID"); if (tConnection->execute( NdbTransaction::Commit ) == -1 ) goto error_handler; - opValue = tRecAttrResult->u_64_value(); // out + range.m_highest_seen = opValue = tRecAttrResult->u_64_value(); // out break; default: goto error_handler; From 60ea77d462317044cf3c65614bab55f24fd2e3bf Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Jan 2008 10:53:21 -0500 Subject: [PATCH 090/527] Bug#33841: mysql client crashes when returning results for long-\ running queries Bug#33976: buffer overflow of variable time_buff in function com_go() An internal buffer was too short. Overextending could smash the stack on some architectures and cause SEGVs. This is not a problem that could be exploited to run arbitrary code. To fix, I expanded one buffer to cover all the size that could be written to (we know the abolute max). client/mysql.cc: Bump up the max size of the time-elapsed buffer displayed at the end of queries. --- client/mysql.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index d8810ba3c28..e4002822fcc 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1,4 +1,4 @@ -/* Copyright (C) 2000-2003 MySQL AB +/* Copyright (C) 2000-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 @@ -729,7 +729,7 @@ static void usage(int version) if (version) return; printf("\ -Copyright (C) 2002 MySQL AB\n\ +Copyright (C) 2000-2008 MySQL AB\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] [database]\n", my_progname); @@ -1910,7 +1910,8 @@ com_charset(String *buffer __attribute__((unused)), char *line) static int com_go(String *buffer,char *line __attribute__((unused))) { - char buff[200], time_buff[32], *pos; + char buff[200]; /* about 110 chars used so far */ + char time_buff[52+3+1]; /* time max + space&parens + NUL */ MYSQL_RES *result; ulong timer, warnings; uint error= 0; @@ -1973,6 +1974,8 @@ com_go(String *buffer,char *line __attribute__((unused))) do { + char *pos; + if (quick) { if (!(result=mysql_use_result(&mysql)) && mysql_field_count(&mysql)) @@ -1988,7 +1991,9 @@ com_go(String *buffer,char *line __attribute__((unused))) if (verbose >= 3 || !opt_silent) mysql_end_timer(timer,time_buff); else - time_buff[0]=0; + time_buff[0]= '\0'; + + /* Every branch must truncate buff . */ if (result) { if (!mysql_num_rows(result) && ! quick) @@ -2045,6 +2050,7 @@ com_go(String *buffer,char *line __attribute__((unused))) fflush(stdout); mysql_free_result(result); } while (!(err= mysql_next_result(&mysql))); + if (err >= 1) error= put_error(&mysql); @@ -3275,6 +3281,11 @@ static ulong start_timer(void) } +/** + Write as many as 52+1 bytes to buff, in the form of a legible duration of time. + + len("4294967296 days, 23 hours, 59 minutes, 60.00 seconds") -> 52 +*/ static void nice_time(double sec,char *buff,bool part_second) { ulong tmp; From 7b71c46f1207733126ac4fb0607968204f2be6c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Jan 2008 17:56:44 +0200 Subject: [PATCH 091/527] Bug #31524: One table one row select on NDB cause optimizer to require SQL_BIG_SELECTS=1 There was a previous test that leaves a non-default (small) max_join_size. Fixed by re-setting the max_join_size to default when the test is over. mysql-test/extra/rpl_tests/rpl_row_charset.test: Bug #31524: side effects of previous testsuites fixed mysql-test/suite/rpl/r/rpl_row_charset.result: Bug #31524: side effects of previous testsuites fixed mysql-test/suite/rpl/r/rpl_row_charset_innodb.result: Bug #31524: side effects of previous testsuites fixed mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result: Bug #31524: side effects of previous testsuites fixed --- mysql-test/extra/rpl_tests/rpl_row_charset.test | 2 +- mysql-test/suite/rpl/r/rpl_row_charset.result | 2 +- mysql-test/suite/rpl/r/rpl_row_charset_innodb.result | 2 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_row_charset.test b/mysql-test/extra/rpl_tests/rpl_row_charset.test index c1eccff9bd5..6aedff0f002 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_charset.test +++ b/mysql-test/extra/rpl_tests/rpl_row_charset.test @@ -141,6 +141,7 @@ error 1115; set character_set_client=9999999; error 1273; set collation_server=9999998; +set max_join_size=default; # This one was contributed by Sergey Petrunia (BUG#3943) @@ -151,7 +152,6 @@ SET CHARACTER_SET_CLIENT=koi8r, CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_RESULTS=koi8r; INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -SET SQL_BIG_SELECTS=1; select hex(c1), hex(c2) from t1; sync_slave_with_master; SET SQL_BIG_SELECTS=1; diff --git a/mysql-test/suite/rpl/r/rpl_row_charset.result b/mysql-test/suite/rpl/r/rpl_row_charset.result index caaa9d8332b..a2639b63618 100644 --- a/mysql-test/suite/rpl/r/rpl_row_charset.result +++ b/mysql-test/suite/rpl/r/rpl_row_charset.result @@ -173,6 +173,7 @@ set character_set_client=9999999; ERROR 42000: Unknown character set: '9999999' set collation_server=9999998; ERROR HY000: Unknown collation: '9999998' +set max_join_size=default; select "--- --3943--" as ""; --- --3943-- @@ -182,7 +183,6 @@ SET CHARACTER_SET_CLIENT=koi8r, CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_RESULTS=koi8r; INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -SET SQL_BIG_SELECTS=1; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 diff --git a/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result b/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result index eb1dc585457..54ce005a920 100644 --- a/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_charset_innodb.result @@ -185,6 +185,7 @@ set character_set_client=9999999; ERROR 42000: Unknown character set: '9999999' set collation_server=9999998; ERROR HY000: Unknown collation: '9999998' +set max_join_size=default; select "--- --3943--" as ""; --- --3943-- @@ -194,7 +195,6 @@ SET CHARACTER_SET_CLIENT=koi8r, CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_RESULTS=koi8r; INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -SET SQL_BIG_SELECTS=1; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result index 8b1f3093332..04d7d9181eb 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_charset.result @@ -171,6 +171,7 @@ set character_set_client=9999999; ERROR 42000: Unknown character set: '9999999' set collation_server=9999998; ERROR HY000: Unknown collation: '9999998' +set max_join_size=default; select "--- --3943--" as ""; --- --3943-- @@ -180,7 +181,6 @@ SET CHARACTER_SET_CLIENT=koi8r, CHARACTER_SET_CONNECTION=cp1251, CHARACTER_SET_RESULTS=koi8r; INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ'); -SET SQL_BIG_SELECTS=1; select hex(c1), hex(c2) from t1; hex(c1) hex(c2) CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3 From f1042103e619330f5b1fdd11faed7d07c79df49f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 Jan 2008 16:05:15 -0800 Subject: [PATCH 092/527] Bug#33358 "Plugin enum variables can't be set from command line" fix crash of LOCK_plugins mutex when loading plug-ins from command line. fix off-by-one bug when loading multiple plug-ins from the command line. initialize command line handling for ENUM and SET plugin variable types. sql/sql_plugin.cc: Bug33358 fix crash of LOCK_plugins mutex when loading plug-ins from command line. fix off-by-one bug when loading multiple plug-ins from the command line. initialize command line handling for ENUM and SET plugin variable types. mysql-test/r/plugin_load.result: New BitKeeper file ``mysql-test/r/plugin_load.result'' mysql-test/t/plugin_load-master.opt: New BitKeeper file ``mysql-test/t/plugin_load-master.opt'' mysql-test/t/plugin_load.test: New BitKeeper file ``mysql-test/t/plugin_load.test'' --- mysql-test/r/plugin_load.result | 3 ++ mysql-test/t/plugin_load-master.opt | 3 ++ mysql-test/t/plugin_load.test | 3 ++ sql/sql_plugin.cc | 66 +++++++++++++++++++++-------- 4 files changed, 57 insertions(+), 18 deletions(-) create mode 100644 mysql-test/r/plugin_load.result create mode 100644 mysql-test/t/plugin_load-master.opt create mode 100644 mysql-test/t/plugin_load.test diff --git a/mysql-test/r/plugin_load.result b/mysql-test/r/plugin_load.result new file mode 100644 index 00000000000..33116cc20ab --- /dev/null +++ b/mysql-test/r/plugin_load.result @@ -0,0 +1,3 @@ +SELECT @@global.example_enum_var = 'e2'; +@@global.example_enum_var = 'e2' +1 diff --git a/mysql-test/t/plugin_load-master.opt b/mysql-test/t/plugin_load-master.opt new file mode 100644 index 00000000000..34186aab890 --- /dev/null +++ b/mysql-test/t/plugin_load-master.opt @@ -0,0 +1,3 @@ +$EXAMPLE_PLUGIN_OPT +"--plugin-load=;EXAMPLE=ha_example.so;" +--plugin-example-enum-var=e2 diff --git a/mysql-test/t/plugin_load.test b/mysql-test/t/plugin_load.test new file mode 100644 index 00000000000..8555247dd71 --- /dev/null +++ b/mysql-test/t/plugin_load.test @@ -0,0 +1,3 @@ +--source include/have_example_plugin.inc + +SELECT @@global.example_enum_var = 'e2'; diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2a86844c8c6..8e204eb3d51 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1412,7 +1412,11 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, while (list) { if (p == buffer + sizeof(buffer) - 1) - break; + { + sql_print_error("plugin-load parameter too long"); + DBUG_RETURN(TRUE); + } + switch ((*(p++)= *(list++))) { case '\0': list= NULL; /* terminate the loop */ @@ -1421,10 +1425,17 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, case ':': /* can't use this as delimiter as it may be drive letter */ #endif case ';': - name.str[name.length]= '\0'; - if (str != &dl) // load all plugins in named module + str->str[str->length]= '\0'; + if (str == &name) // load all plugins in named module { + if (!name.length) + { + p--; /* reset pointer */ + continue; + } + dl= name; + pthread_mutex_lock(&LOCK_plugin); if ((plugin_dl= plugin_dl_add(&dl, REPORT_TO_LOG))) { for (plugin= plugin_dl->plugins; plugin->info; plugin++) @@ -1434,7 +1445,10 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + { + pthread_mutex_unlock(&LOCK_plugin); goto error; + } } plugin_dl_del(&dl); // reduce ref count } @@ -1442,9 +1456,14 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, else { free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); + pthread_mutex_lock(&LOCK_plugin); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) + { + pthread_mutex_unlock(&LOCK_plugin); goto error; + } } + pthread_mutex_unlock(&LOCK_plugin); name.length= dl.length= 0; dl.str= NULL; name.str= p= buffer; str= &name; @@ -1453,6 +1472,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, case '#': if (str == &name) { + name.str[name.length]= '\0'; str= &dl; str->str= p; continue; @@ -2999,7 +3019,8 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, DBUG_RETURN(-1); } - if (opt->flags & PLUGIN_VAR_NOCMDOPT) + if ((opt->flags & (PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_THDLOCAL)) + == PLUGIN_VAR_NOCMDOPT) continue; if (!opt->name) @@ -3009,7 +3030,7 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, DBUG_RETURN(-1); } - if (!(v= find_bookmark(name, opt->name, opt->flags))) + if (!(opt->flags & PLUGIN_VAR_THDLOCAL)) { optnamelen= strlen(opt->name); optname= (char*) alloc_root(mem_root, namelen + optnamelen + 2); @@ -3017,7 +3038,23 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, optnamelen= namelen + optnamelen + 1; } else - optname= (char*) memdup_root(mem_root, v->key + 1, (optnamelen= v->name_len) + 1); + { + /* this should not fail because register_var should create entry */ + if (!(v= find_bookmark(name, opt->name, opt->flags))) + { + sql_print_error("Thread local variable '%s' not allocated " + "in plugin '%s'.", opt->name, plugin_name); + DBUG_RETURN(-1); + } + + *(int*)(opt + 1)= offset= v->offset; + + if (opt->flags & PLUGIN_VAR_NOCMDOPT) + continue; + + optname= (char*) memdup_root(mem_root, v->key + 1, + (optnamelen= v->name_len) + 1); + } /* convert '_' to '-' */ for (p= optname; *p; p++) @@ -3029,20 +3066,13 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp, options->app_type= opt; options->id= (options-1)->id + 1; - if (opt->flags & PLUGIN_VAR_THDLOCAL) - *(int*)(opt + 1)= offset= v->offset; - plugin_opt_set_limits(options, opt); - if ((opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_ENUM && - (opt->flags & PLUGIN_VAR_TYPEMASK) != PLUGIN_VAR_SET) - { - if (opt->flags & PLUGIN_VAR_THDLOCAL) - options->value= options->u_max_value= (uchar**) - (global_system_variables.dynamic_variables_ptr + offset); - else - options->value= options->u_max_value= *(uchar***) (opt + 1); - } + if (opt->flags & PLUGIN_VAR_THDLOCAL) + options->value= options->u_max_value= (uchar**) + (global_system_variables.dynamic_variables_ptr + offset); + else + options->value= options->u_max_value= *(uchar***) (opt + 1); options[1]= options[0]; options[1].name= p= (char*) alloc_root(mem_root, optnamelen + 8); From 70884e09b8d10088da4598aaf0b8ebe04e6a97b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Jan 2008 02:13:35 -0800 Subject: [PATCH 093/527] fixes to make pushbuild tests green mysql-test/t/plugin_load-master.opt: add '--loose' modifier to allow test to be skipped if plugin is not available. sql/sql_plugin.cc: Failure to load a plugin from command line option made non-fatal as plugin load failures from plugin table is already non-fatal. --- mysql-test/t/plugin_load-master.opt | 2 +- sql/sql_plugin.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/mysql-test/t/plugin_load-master.opt b/mysql-test/t/plugin_load-master.opt index 34186aab890..66637841f16 100644 --- a/mysql-test/t/plugin_load-master.opt +++ b/mysql-test/t/plugin_load-master.opt @@ -1,3 +1,3 @@ $EXAMPLE_PLUGIN_OPT "--plugin-load=;EXAMPLE=ha_example.so;" ---plugin-example-enum-var=e2 +--loose-plugin-example-enum-var=e2 diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 8e204eb3d51..bae4a85fd8a 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1181,9 +1181,8 @@ int plugin_init(int *argc, char **argv, int flags) /* Register all dynamic plugins */ if (!(flags & PLUGIN_INIT_SKIP_DYNAMIC_LOADING)) { - if (opt_plugin_load && - plugin_load_list(&tmp_root, argc, argv, opt_plugin_load)) - goto err; + if (opt_plugin_load) + plugin_load_list(&tmp_root, argc, argv, opt_plugin_load); if (!(flags & PLUGIN_INIT_SKIP_PLUGIN_TABLE)) plugin_load(&tmp_root, argc, argv); } From e30a0dda8f322aa8714caf6d6de6d583e51809f1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 26 Jan 2008 21:45:35 -0800 Subject: [PATCH 094/527] Fixed bug #33833. Two disjuncts containing equalities of the form key=const1 and key=const2 can be merged into one if const1 is equal to const2. To check it the common collation of the constants were used rather than the collation of the field key. For example when the default collation of the constants was cases insensitive while the collation of the field was case sensitive, then two or-ed equality predicates key='b' and key='B' incorrectly were merged into one f='b'. As a result ref access was used instead of range access and wrong result sets were returned in many cases. Fixed the problem by comparing constant in the or-ed predicate with collation of the key field. mysql-test/r/range.result: Added a test case for bug #33833. mysql-test/t/range.test: Added a test case for bug #33833. sql/item.cc: Fixed bug #33833. Added the method eq_by_collation that compares two items almost as the method Item::eq, but it rather enforces a given collation for the comparison. sql/item.h: Fixed bug #33833. Added the method eq_by_collation that compares two items almost as the method Item::eq, but it rather enforces a given collation for the comparison. --- mysql-test/r/range.result | 13 ++++++++++++ mysql-test/t/range.test | 17 ++++++++++++++++ sql/item.cc | 43 +++++++++++++++++++++++++++++++++++++++ sql/item.h | 1 + sql/sql_select.cc | 4 +++- 5 files changed, 77 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index e0084b53320..9b1da4ffc48 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -1153,3 +1153,16 @@ explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= ' id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 range dateval dateval 4 NULL 2 Using where drop table t1; +CREATE TABLE t1 ( +a varchar(32), index (a) +) DEFAULT CHARSET=latin1 COLLATE=latin1_bin; +INSERT INTO t1 VALUES +('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A'); +SELECT a FROM t1 WHERE a='b' OR a='B'; +a +B +B +EXPLAIN SELECT a FROM t1 WHERE a='b' OR a='B'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range a a 35 NULL 3 Using where; Using index +DROP TABLE t1; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 87ba3510326..1352b366508 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -955,4 +955,21 @@ explain select * from t1 where dateval >= '2007-01-01 00:00:00' and dateval <= ' drop table t1; +# +# Bug #33833: different or-ed predicates were erroneously merged into one that +# resulted in ref access instead of range access and a wrong result set +# + +CREATE TABLE t1 ( + a varchar(32), index (a) +) DEFAULT CHARSET=latin1 COLLATE=latin1_bin; + +INSERT INTO t1 VALUES + ('B'), ('A'), ('A'), ('C'), ('B'), ('A'), ('A'); + +SELECT a FROM t1 WHERE a='b' OR a='B'; +EXPLAIN SELECT a FROM t1 WHERE a='b' OR a='B'; + +DROP TABLE t1; + # End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 713e7709bcb..182632bb40f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4302,6 +4302,49 @@ String *Item::check_well_formed_result(String *str, bool send_error) return str; } +/* + Compare two items using a given collation + + SYNOPSIS + eq_by_collation() + item item to compare with + binary_cmp TRUE <-> compare as binaries + cs collation to use when comparing strings + + DESCRIPTION + This method works exactly as Item::eq if the collation cs coincides with + the collation of the compared objects. Otherwise, first the collations that + differ from cs are replaced for cs and then the items are compared by + Item::eq. After the comparison the original collations of items are + restored. + + RETURN + 1 compared items has been detected as equal + 0 otherwise +*/ + +bool Item::eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs) +{ + CHARSET_INFO *save_cs= 0; + CHARSET_INFO *save_item_cs= 0; + if (collation.collation != cs) + { + save_cs= collation.collation; + collation.collation= cs; + } + if (item->collation.collation != cs) + { + save_item_cs= item->collation.collation; + item->collation.collation= cs; + } + bool res= eq(item, binary_cmp); + if (save_cs) + collation.collation= save_cs; + if (save_item_cs) + item->collation.collation= save_item_cs; + return res; +} + /* Create a field to hold a string value from an item diff --git a/sql/item.h b/sql/item.h index 5f511557f47..f87499f23e3 100644 --- a/sql/item.h +++ b/sql/item.h @@ -873,6 +873,7 @@ public: virtual Field::geometry_type get_geometry_type() const { return Field::GEOM_GEOMETRY; }; String *check_well_formed_result(String *str, bool send_error= 0); + bool eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs); }; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 87935b5548f..bdea25ab99d 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2887,7 +2887,9 @@ merge_key_fields(KEY_FIELD *start,KEY_FIELD *new_fields,KEY_FIELD *end, } } else if (old->eq_func && new_fields->eq_func && - old->val->eq(new_fields->val, old->field->binary())) + old->val->eq_by_collation(new_fields->val, + old->field->binary(), + old->field->charset())) { old->level= and_level; From 66b1905fbd73ab1db542ac02c3d3dab5db72c157 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 27 Jan 2008 16:41:29 +0100 Subject: [PATCH 095/527] ndb - bug#31477 - 5.0 mysql-test/r/ndb_bug31477.result: BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/r/ndb_bug31477.result mysql-test/t/ndb_bug31477.test: BitKeeper file /export/space/pekka/ndb/version/my50-bug31477/mysql-test/t/ndb_bug31477.test ndb/src/common/util/NdbOut.cpp: missing comma, causing weird Uint64 printout ndb/test/ndbapi/testOIBasic.cpp: adjust params ndb/src/kernel/blocks/dbtup/Dbtup.hpp: bug#31477 - explicit rewrite of tuxQueryTh if active op then non-dirty scan enters lock queue via TUX instead of skipping the tuple ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp: bug#31477 - explicit rewrite of tuxQueryTh if active op then non-dirty scan enters lock queue via TUX instead of skipping the tuple ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp: bug#31477 - explicit rewrite of tuxQueryTh if active op then non-dirty scan enters lock queue via TUX instead of skipping the tuple --- mysql-test/r/bdb_notembedded.result | 35 + mysql-test/r/ndb_bug31477.result | 98 + mysql-test/t/bdb_notembedded.test | 38 + mysql-test/t/ndb_bug31477.test | 109 + ndb/src/common/util/NdbOut.cpp | 2 +- ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 22 +- ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp | 96 +- ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp | 6 +- ndb/test/ndbapi/testOIBasic.cpp | 2985 ++++++++++++-------- 9 files changed, 2142 insertions(+), 1249 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/r/ndb_bug31477.result create mode 100644 mysql-test/t/bdb_notembedded.test create mode 100644 mysql-test/t/ndb_bug31477.test diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/r/ndb_bug31477.result b/mysql-test/r/ndb_bug31477.result new file mode 100644 index 00000000000..002a928b485 --- /dev/null +++ b/mysql-test/r/ndb_bug31477.result @@ -0,0 +1,98 @@ +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/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/mysql-test/t/ndb_bug31477.test b/mysql-test/t/ndb_bug31477.test new file mode 100644 index 00000000000..41c519e56fd --- /dev/null +++ b/mysql-test/t/ndb_bug31477.test @@ -0,0 +1,109 @@ +--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/ndb/src/common/util/NdbOut.cpp b/ndb/src/common/util/NdbOut.cpp index 7ca7c91e266..61de2be7572 100644 --- a/ndb/src/common/util/NdbOut.cpp +++ b/ndb/src/common/util/NdbOut.cpp @@ -29,7 +29,7 @@ static const char * fms[] = { "%d", "0x%08x", // Int32 "%u", "0x%08x", // Uint32 "%lld", "0x%016llx", // Int64 - "%llu", "0x%016llx" // Uint64 + "%llu", "0x%016llx", // Uint64 "%llu", "0x%016llx" // UintPtr }; diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 6fe0eefcdb5..a80f4542fee 100644 --- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -1085,7 +1085,7 @@ public: /* * TUX checks if tuple is visible to scan. */ - bool tuxQueryTh(Uint32 fragPtrI, Uint32 tupAddr, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, Uint32 savePointId); + bool tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, bool dirty, Uint32 savePointId); private: BLOCK_DEFINES(Dbtup); @@ -1942,6 +1942,8 @@ private: bool getPageThroughSavePoint(Operationrec* const regOperPtr, Operationrec* const leaderOpPtr); + bool find_savepoint(OperationrecPtr& loopOpPtr, Uint32 savepointId); + Uint32 calculateChecksum(Page* const pagePtr, Uint32 tupHeadOffset, Uint32 tupHeadSize); void setChecksum(Page* const pagePtr, Uint32 tupHeadOffset, Uint32 tupHeadSize); @@ -2467,4 +2469,22 @@ bool Dbtup::isPageUndoLogged(Fragrecord* const regFragPtr, return false; }//Dbtup::isUndoLoggingNeeded() +inline +bool Dbtup::find_savepoint(OperationrecPtr& loopOpPtr, Uint32 savepointId) +{ + while (true) { + if (savepointId > loopOpPtr.p->savePointId) { + jam(); + return true; + } + // note 5.0 has reversed next/prev pointers + loopOpPtr.i = loopOpPtr.p->nextActiveOp; + if (loopOpPtr.i == RNIL) { + break; + } + ptrCheckGuard(loopOpPtr, cnoOfOprec, operationrec); + } + return false; +} + #endif diff --git a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index 964d8578217..c03ca35bc6a 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -246,8 +246,18 @@ Dbtup::accReadPk(Uint32 tableId, Uint32 fragId, Uint32 fragPageId, Uint32 pageIn return ret; } +/* + * TUX index contains all tuple versions. A scan in TUX has scanned + * one of them and asks if it can be returned as scan result. This + * depends on trans id, dirty read flag, and savepoint within trans. + * + * Previously this faked a ZREAD operation and used getPage(). + * In TUP getPage() is run after ACC locking, but TUX comes here + * before ACC access. Instead of modifying getPage() it is more + * clear to do the full check here. + */ bool -Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 tupAddr, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, Uint32 savePointId) +Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, bool dirty, Uint32 savePointId) { ljamEntry(); FragrecordPtr fragPtr; @@ -256,33 +266,73 @@ Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 tupAddr, Uint32 tupVersion, Uint32 tra TablerecPtr tablePtr; tablePtr.i = fragPtr.p->fragTableId; ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); - // get page PagePtr pagePtr; - Uint32 fragPageId = tupAddr >> MAX_TUPLES_BITS; - Uint32 pageIndex = tupAddr & ((1 << MAX_TUPLES_BITS ) - 1); - // use temp op rec - Operationrec tempOp; - tempOp.fragPageId = fragPageId; - tempOp.pageIndex = pageIndex; - tempOp.transid1 = transId1; - tempOp.transid2 = transId2; - tempOp.savePointId = savePointId; - tempOp.optype = ZREAD; - tempOp.dirtyOp = 1; - if (getPage(pagePtr, &tempOp, fragPtr.p, tablePtr.p)) { - /* - * We use the normal getPage which will return the tuple to be used - * for this transaction and savepoint id. If its tuple version - * equals the requested then we have a visible tuple otherwise not. - */ + pagePtr.i = pageId; + ptrCheckGuard(pagePtr, cnoOfPage, page); + + OperationrecPtr currOpPtr; + currOpPtr.i = pagePtr.p->pageWord[pageOffset]; + if (currOpPtr.i == RNIL) { ljam(); - Uint32 read_tupVersion = pagePtr.p->pageWord[tempOp.pageOffset + 1]; - if (read_tupVersion == tupVersion) { + // tuple has no operation, any scan can see it + return true; + } + ptrCheckGuard(currOpPtr, cnoOfOprec, operationrec); + + const bool sameTrans = + transId1 == currOpPtr.p->transid1 && + transId2 == currOpPtr.p->transid2; + + bool res = false; + OperationrecPtr loopOpPtr = currOpPtr; + + if (!sameTrans) { + ljam(); + if (!dirty) { ljam(); - return true; + if (currOpPtr.p->prevActiveOp == RNIL) { + ljam(); + // last op - TUX makes ACC lock request in same timeslice + res = true; + } + } + else { + // loop to first op (returns false) + find_savepoint(loopOpPtr, 0); + const Uint32 op_type = loopOpPtr.p->optype; + + if (op_type != ZINSERT) { + ljam(); + // read committed version from the page + const Uint32 origVersion = pagePtr.p->pageWord[pageOffset + 1]; + if (origVersion == tupVersion) { + ljam(); + res = true; + } + } } } - return false; + else { + ljam(); + // for own trans, ignore dirty flag + + if (find_savepoint(loopOpPtr, savePointId)) { + ljam(); + const Uint32 op_type = loopOpPtr.p->optype; + + if (op_type != ZDELETE) { + ljam(); + // check if this op has produced the scanned version + Uint32 loopVersion = loopOpPtr.p->tupVersion; + if (loopVersion == tupVersion) { + ljam(); + res = true; + } + } + } + } + + return res; } // ordered index build diff --git a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp index 7eae1486d43..58d37310c91 100644 --- a/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp +++ b/ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp @@ -984,7 +984,8 @@ Dbtux::scanVisible(ScanOpPtr scanPtr, TreeEnt ent) const Frag& frag = *c_fragPool.getPtr(scan.m_fragPtrI); Uint32 fragBit = ent.m_fragBit; Uint32 tableFragPtrI = frag.m_tupTableFragPtrI[fragBit]; - Uint32 tupAddr = getTupAddr(frag, ent); + Uint32 pageId = ent.m_tupLoc.getPageId(); + Uint32 pageOffset = ent.m_tupLoc.getPageOffset(); Uint32 tupVersion = ent.m_tupVersion; // check for same tuple twice in row if (scan.m_scanEnt.m_tupLoc == ent.m_tupLoc && @@ -994,8 +995,9 @@ Dbtux::scanVisible(ScanOpPtr scanPtr, TreeEnt ent) } Uint32 transId1 = scan.m_transId1; Uint32 transId2 = scan.m_transId2; + bool dirty = scan.m_readCommitted; Uint32 savePointId = scan.m_savePointId; - bool ret = c_tup->tuxQueryTh(tableFragPtrI, tupAddr, tupVersion, transId1, transId2, savePointId); + bool ret = c_tup->tuxQueryTh(tableFragPtrI, pageId, pageOffset, tupVersion, transId1, transId2, dirty, savePointId); jamEntry(); return ret; } diff --git a/ndb/test/ndbapi/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic.cpp index 8f77f0bb062..a7a7661d53a 100644 --- a/ndb/test/ndbapi/testOIBasic.cpp +++ b/ndb/test/ndbapi/testOIBasic.cpp @@ -36,10 +36,11 @@ struct Opt { // common options - unsigned m_batch; + uint m_batch; const char* m_bound; const char* m_case; bool m_collsp; + bool m_cont; bool m_core; const char* m_csname; CHARSET_INFO* m_cs; @@ -47,26 +48,29 @@ struct Opt { bool m_dups; NdbDictionary::Object::FragmentType m_fragtype; const char* m_index; - unsigned m_loop; + uint m_loop; bool m_msglock; bool m_nologging; bool m_noverify; - unsigned m_pctnull; - unsigned m_rows; - unsigned m_samples; - unsigned m_scanbatch; - unsigned m_scanpar; - unsigned m_scanstop; + uint m_pctnull; + uint m_rows; + uint m_samples; + uint m_scanbatch; + uint m_scanpar; + uint m_scanstop; int m_seed; - unsigned m_subloop; + const char* m_skip; + uint m_sloop; + uint m_ssloop; const char* m_table; - unsigned m_threads; + uint m_threads; int m_v; // int for lint Opt() : m_batch(32), m_bound("01234"), m_case(0), m_collsp(false), + m_cont(false), m_core(false), m_csname("random"), m_cs(0), @@ -85,7 +89,9 @@ struct Opt { m_scanpar(0), m_scanstop(0), m_seed(-1), - m_subloop(4), + m_skip(0), + m_sloop(4), + m_ssloop(4), m_table(0), m_threads(4), m_v(1) { @@ -107,6 +113,7 @@ printhelp() << " -bound xyz use only these bound types 0-4 [" << d.m_bound << "]" << endl << " -case abc only given test cases (letters a-z)" << endl << " -collsp use strnncollsp instead of strnxfrm" << endl + << " -cont on error continue to next test case [" << d.m_cont << "]" << endl << " -core core dump on error [" << d.m_core << "]" << endl << " -csname S charset or collation [" << d.m_csname << "]" << endl << " -die nnn exit immediately on NDB error code nnn" << endl @@ -122,7 +129,9 @@ printhelp() << " -scanbatch N scan batch 0=default [" << d.m_scanbatch << "]" << endl << " -scanpar N scan parallel 0=default [" << d.m_scanpar << "]" << endl << " -seed N srandom seed 0=loop number -1=random [" << d.m_seed << "]" << endl - << " -subloop N subtest (and subsubtest) loop count [" << d.m_subloop << "]" << endl + << " -skip abc skip given test cases (letters a-z)" << endl + << " -sloop N level 2 (sub)loop count [" << d.m_sloop << "]" << endl + << " -ssloop N level 3 (sub)loop count [" << d.m_ssloop << "]" << endl << " -table xyz only given table numbers (digits 0-9)" << endl << " -threads N number of threads [" << d.m_threads << "]" << endl << " -vN verbosity [" << d.m_v << "]" << endl @@ -142,17 +151,17 @@ static const char* hexstr = "0123456789abcdef"; // random ints -static unsigned -urandom(unsigned n) +static uint +urandom(uint n) { if (n == 0) return 0; - unsigned i = random() % n; + uint i = random() % n; return i; } static int -irandom(unsigned n) +irandom(uint n) { if (n == 0) return 0; @@ -163,7 +172,7 @@ irandom(unsigned n) } static bool -randompct(unsigned pct) +randompct(uint pct) { if (pct == 0) return false; @@ -172,15 +181,15 @@ randompct(unsigned pct) return urandom(100) < pct; } -static unsigned -random_coprime(unsigned n) +static uint +random_coprime(uint n) { - unsigned prime[] = { 101, 211, 307, 401, 503, 601, 701, 809, 907 }; - unsigned count = sizeof(prime) / sizeof(prime[0]); + uint prime[] = { 101, 211, 307, 401, 503, 601, 701, 809, 907 }; + uint count = sizeof(prime) / sizeof(prime[0]); if (n == 0) return 0; while (1) { - unsigned i = urandom(count); + uint i = urandom(count); if (n % prime[i] != 0) return prime[i]; } @@ -189,16 +198,16 @@ random_coprime(unsigned n) // random re-sequence of 0...(n-1) struct Rsq { - Rsq(unsigned n); - unsigned next(); + Rsq(uint n); + uint next(); private: - unsigned m_n; - unsigned m_i; - unsigned m_start; - unsigned m_prime; + uint m_n; + uint m_i; + uint m_start; + uint m_prime; }; -Rsq::Rsq(unsigned n) +Rsq::Rsq(uint n) { m_n = n; m_i = 0; @@ -206,7 +215,7 @@ Rsq::Rsq(unsigned n) m_prime = random_coprime(n); } -unsigned +uint Rsq::next() { assert(m_n != 0); @@ -216,30 +225,16 @@ Rsq::next() // log and error macros static NdbMutex *ndbout_mutex = NULL; - -static unsigned getthrno(); - -static const char* -getthrstr() -{ - static char buf[20]; - unsigned n = getthrno(); - if (n == (unsigned)-1) - strcpy(buf, ""); - else { - unsigned m = - g_opt.m_threads < 10 ? 1 : - g_opt.m_threads < 100 ? 2 : 3; - sprintf(buf, "[%0*u] ", m, n); - } - return buf; -} +static const char* getthrprefix(); #define LLN(n, s) \ do { \ if ((n) > g_opt.m_v) break; \ if (g_opt.m_msglock) NdbMutex_Lock(ndbout_mutex); \ - ndbout << getthrstr() << s << endl; \ + ndbout << getthrprefix(); \ + if ((n) > 2) \ + ndbout << "line " << __LINE__ << ": "; \ + ndbout << s << endl; \ if (g_opt.m_msglock) NdbMutex_Unlock(ndbout_mutex); \ } while(0) @@ -250,6 +245,8 @@ getthrstr() #define LL4(s) LLN(4, s) #define LL5(s) LLN(5, s) +#define HEX(x) hex << (x) << dec + // following check a condition and return -1 on failure #undef CHK // simple check @@ -281,53 +278,58 @@ getthrstr() class Thr; class Con; class Tab; +class ITab; class Set; class Tmr; struct Par : public Opt { - unsigned m_no; + uint m_no; Con* m_con; Con& con() const { assert(m_con != 0); return *m_con; } const Tab* m_tab; const Tab& tab() const { assert(m_tab != 0); return *m_tab; } + const ITab* m_itab; + const ITab& itab() const { assert(m_itab != 0); return *m_itab; } Set* m_set; Set& set() const { assert(m_set != 0); return *m_set; } Tmr* m_tmr; Tmr& tmr() const { assert(m_tmr != 0); return *m_tmr; } char m_currcase[2]; - unsigned m_lno; - unsigned m_slno; - unsigned m_totrows; + uint m_lno; + uint m_slno; + uint m_totrows; // value calculation - unsigned m_range; - unsigned m_pctrange; - unsigned m_pctbrange; + uint m_range; + uint m_pctrange; + uint m_pctbrange; int m_bdir; bool m_noindexkeyupdate; // choice of key bool m_randomkey; // do verify after read bool m_verify; - // deadlock possible - bool m_deadlock; - // abort percentabge - unsigned m_abortpct; + // errors to catch (see Con) + bool m_catcherr; + // abort percentage + uint m_abortpct; NdbOperation::LockMode m_lockmode; // scan options bool m_tupscan; bool m_ordered; bool m_descending; - // timer location + // threads used by current test case + uint m_usedthreads; Par(const Opt& opt) : Opt(opt), m_no(0), m_con(0), m_tab(0), + m_itab(0), m_set(0), m_tmr(0), m_lno(0), m_slno(0), - m_totrows(m_threads * m_rows), + m_totrows(0), m_range(m_rows), m_pctrange(40), m_pctbrange(80), @@ -335,39 +337,40 @@ struct Par : public Opt { m_noindexkeyupdate(false), m_randomkey(false), m_verify(false), - m_deadlock(false), + m_catcherr(0), m_abortpct(0), m_lockmode(NdbOperation::LM_Read), m_tupscan(false), m_ordered(false), - m_descending(false) + m_descending(false), + m_usedthreads(0) { m_currcase[0] = 0; } }; static bool -usetable(Par par, unsigned i) +usetable(Par par, uint i) { return par.m_table == 0 || strchr(par.m_table, '0' + i) != 0; } static bool -useindex(Par par, unsigned i) +useindex(Par par, uint i) { return par.m_index == 0 || strchr(par.m_index, '0' + i) != 0; } -static unsigned -thrrow(Par par, unsigned j) +static uint +thrrow(Par par, uint j) { - return par.m_threads * j + par.m_no; + return par.m_usedthreads * j + par.m_no; } static bool -isthrrow(Par par, unsigned i) +isthrrow(Par par, uint i) { - return i % par.m_threads == par.m_no; + return i % par.m_usedthreads == par.m_no; } // timer @@ -375,13 +378,13 @@ isthrrow(Par par, unsigned i) struct Tmr { void clr(); void on(); - void off(unsigned cnt = 0); + void off(uint cnt = 0); const char* time(); const char* pct(const Tmr& t1); const char* over(const Tmr& t1); NDB_TICKS m_on; - unsigned m_ms; - unsigned m_cnt; + uint m_ms; + uint m_cnt; char m_time[100]; char m_text[100]; Tmr() { clr(); } @@ -401,7 +404,7 @@ Tmr::on() } void -Tmr::off(unsigned cnt) +Tmr::off(uint cnt) { NDB_TICKS off = NdbTick_CurrentMillisecond(); assert(m_on != 0 && off >= m_on); @@ -446,53 +449,18 @@ Tmr::over(const Tmr& t1) return m_text; } -// list of ints - -struct Lst { - Lst(); - unsigned m_arr[1000]; - unsigned m_cnt; - void push(unsigned i); - unsigned cnt() const; - void reset(); -}; - -Lst::Lst() : - m_cnt(0) -{ -} - -void -Lst::push(unsigned i) -{ - assert(m_cnt < sizeof(m_arr)/sizeof(m_arr[0])); - m_arr[m_cnt++] = i; -} - -unsigned -Lst::cnt() const -{ - return m_cnt; -} - -void -Lst::reset() -{ - m_cnt = 0; -} - // character sets -static const unsigned maxcsnumber = 512; -static const unsigned maxcharcount = 32; -static const unsigned maxcharsize = 4; -static const unsigned maxxmulsize = 8; +static const uint maxcsnumber = 512; +static const uint maxcharcount = 32; +static const uint maxcharsize = 4; +static const uint maxxmulsize = 8; // single mb char struct Chr { - unsigned char m_bytes[maxcharsize]; - unsigned char m_xbytes[maxxmulsize * maxcharsize]; - unsigned m_size; + uchar m_bytes[maxcharsize]; + uchar m_xbytes[maxxmulsize * maxcharsize]; + uint m_size; Chr(); }; @@ -506,7 +474,7 @@ Chr::Chr() // charset and random valid chars to use struct Chs { CHARSET_INFO* m_cs; - unsigned m_xmul; + uint m_xmul; Chr* m_chr; Chs(CHARSET_INFO* cs); ~Chs(); @@ -523,22 +491,22 @@ Chs::Chs(CHARSET_INFO* cs) : m_xmul = 1; assert(m_xmul <= maxxmulsize); m_chr = new Chr [maxcharcount]; - unsigned i = 0; - unsigned miss1 = 0; - unsigned miss2 = 0; - unsigned miss3 = 0; - unsigned miss4 = 0; + uint i = 0; + uint miss1 = 0; + uint miss2 = 0; + uint miss3 = 0; + uint miss4 = 0; while (i < maxcharcount) { - unsigned char* bytes = m_chr[i].m_bytes; - unsigned char* xbytes = m_chr[i].m_xbytes; - unsigned& size = m_chr[i].m_size; + uchar* bytes = m_chr[i].m_bytes; + uchar* xbytes = m_chr[i].m_xbytes; + uint& size = m_chr[i].m_size; bool ok; size = m_cs->mbminlen + urandom(m_cs->mbmaxlen - m_cs->mbminlen + 1); assert(m_cs->mbminlen <= size && size <= m_cs->mbmaxlen); // prefer longer chars if (size == m_cs->mbminlen && m_cs->mbminlen < m_cs->mbmaxlen && urandom(5) != 0) continue; - for (unsigned j = 0; j < size; j++) { + for (uint j = 0; j < size; j++) { bytes[j] = urandom(256); } int not_used; @@ -550,13 +518,13 @@ Chs::Chs(CHARSET_INFO* cs) : } // check no proper prefix wellformed ok = true; - for (unsigned j = 1; j < size; j++) { + for (uint j = 1; j < size; j++) { if ((*cs->cset->well_formed_len)(cs, sbytes, sbytes + j, 1, ¬_used) == j) { ok = false; break; } } - if (! ok) { + if (!ok) { miss2++; continue; } @@ -566,37 +534,37 @@ Chs::Chs(CHARSET_INFO* cs) : int xlen = (*cs->coll->strnxfrm)(cs, xbytes, m_xmul * size, bytes, size); // check we got something ok = false; - for (unsigned j = 0; j < xlen; j++) { + for (uint j = 0; j < xlen; j++) { if (xbytes[j] != 0) { ok = true; break; } } - if (! ok) { + if (!ok) { miss3++; continue; } // check for duplicate (before normalize) ok = true; - for (unsigned j = 0; j < i; j++) { + for (uint j = 0; j < i; j++) { const Chr& chr = m_chr[j]; if (chr.m_size == size && memcmp(chr.m_bytes, bytes, size) == 0) { ok = false; break; } } - if (! ok) { + if (!ok) { miss4++; continue; } i++; } bool disorder = true; - unsigned bubbles = 0; + uint bubbles = 0; while (disorder) { disorder = false; - for (unsigned i = 1; i < maxcharcount; i++) { - unsigned len = sizeof(m_chr[i].m_xbytes); + for (uint i = 1; i < maxcharcount; i++) { + uint len = sizeof(m_chr[i].m_xbytes); if (memcmp(m_chr[i-1].m_xbytes, m_chr[i].m_xbytes, len) > 0) { Chr chr = m_chr[i]; m_chr[i] = m_chr[i-1]; @@ -627,7 +595,7 @@ static Chs* cslist[maxcsnumber]; static void resetcslist() { - for (unsigned i = 0; i < maxcsnumber; i++) { + for (uint i = 0; i < maxcsnumber; i++) { delete cslist[i]; cslist[i] = 0; } @@ -641,7 +609,7 @@ getcs(Par par) cs = par.m_cs; } else { while (1) { - unsigned n = urandom(maxcsnumber); + uint n = urandom(maxcsnumber); cs = get_charset(n, MYF(0)); if (cs != 0) { // prefer complex charsets @@ -667,24 +635,24 @@ struct Col { Longvarchar = NdbDictionary::Column::Longvarchar }; const class Tab& m_tab; - unsigned m_num; + uint m_num; const char* m_name; bool m_pk; Type m_type; - unsigned m_length; - unsigned m_bytelength; // multiplied by char width - unsigned m_attrsize; // base type size - unsigned m_headsize; // length bytes - unsigned m_bytesize; // full value size + uint m_length; + uint m_bytelength; // multiplied by char width + uint m_attrsize; // base type size + uint m_headsize; // length bytes + uint m_bytesize; // full value size bool m_nullable; const Chs* m_chs; - Col(const class Tab& tab, unsigned num, const char* name, bool pk, Type type, unsigned length, bool nullable, const Chs* chs); + Col(const class Tab& tab, uint num, const char* name, bool pk, Type type, uint length, bool nullable, const Chs* chs); ~Col(); bool equal(const Col& col2) const; void wellformed(const void* addr) const; }; -Col::Col(const class Tab& tab, unsigned num, const char* name, bool pk, Type type, unsigned length, bool nullable, const Chs* chs) : +Col::Col(const class Tab& tab, uint num, const char* name, bool pk, Type type, uint length, bool nullable, const Chs* chs) : m_tab(tab), m_num(num), m_name(strcpy(new char [strlen(name) + 1], name)), @@ -735,7 +703,7 @@ Col::wellformed(const void* addr) const { CHARSET_INFO* cs = m_chs->m_cs; const char* src = (const char*)addr; - unsigned len = m_bytelength; + uint len = m_bytelength; int not_used; assert((*cs->cset->well_formed_len)(cs, src, src + len, 0xffff, ¬_used) == len); } @@ -743,9 +711,9 @@ Col::wellformed(const void* addr) const case Col::Varchar: { CHARSET_INFO* cs = m_chs->m_cs; - const unsigned char* src = (const unsigned char*)addr; + const uchar* src = (const uchar*)addr; const char* ssrc = (const char*)src; - unsigned len = src[0]; + uint len = src[0]; int not_used; assert(len <= m_bytelength); assert((*cs->cset->well_formed_len)(cs, ssrc + 1, ssrc + 1 + len, 0xffff, ¬_used) == len); @@ -754,9 +722,9 @@ Col::wellformed(const void* addr) const case Col::Longvarchar: { CHARSET_INFO* cs = m_chs->m_cs; - const unsigned char* src = (const unsigned char*)addr; + const uchar* src = (const uchar*)addr; const char* ssrc = (const char*)src; - unsigned len = src[0] + (src[1] << 8); + uint len = src[0] + (src[1] << 8); int not_used; assert(len <= m_bytelength); assert((*cs->cset->well_formed_len)(cs, ssrc + 2, ssrc + 2 + len, 0xffff, ¬_used) == len); @@ -774,7 +742,7 @@ operator<<(NdbOut& out, const Col& col) out << "col[" << col.m_num << "] " << col.m_name; switch (col.m_type) { case Col::Unsigned: - out << " unsigned"; + out << " uint"; break; case Col::Char: { @@ -808,13 +776,13 @@ operator<<(NdbOut& out, const Col& col) struct ICol { const class ITab& m_itab; - unsigned m_num; + uint m_num; const Col& m_col; - ICol(const class ITab& itab, unsigned num, const Col& col); + ICol(const class ITab& itab, uint num, const Col& col); ~ICol(); }; -ICol::ICol(const class ITab& itab, unsigned num, const Col& col) : +ICol::ICol(const class ITab& itab, uint num, const Col& col) : m_itab(itab), m_num(num), m_col(col) @@ -842,47 +810,47 @@ struct ITab { const class Tab& m_tab; const char* m_name; Type m_type; - unsigned m_icols; + uint m_icols; const ICol** m_icol; - unsigned m_colmask; - ITab(const class Tab& tab, const char* name, Type type, unsigned icols); + uint m_keymask; + ITab(const class Tab& tab, const char* name, Type type, uint icols); ~ITab(); - void icoladd(unsigned k, const ICol* icolptr); + void icoladd(uint k, const ICol* icolptr); }; -ITab::ITab(const class Tab& tab, const char* name, Type type, unsigned icols) : +ITab::ITab(const class Tab& tab, const char* name, Type type, uint icols) : m_tab(tab), m_name(strcpy(new char [strlen(name) + 1], name)), m_type(type), m_icols(icols), m_icol(new const ICol* [icols + 1]), - m_colmask(0) + m_keymask(0) { - for (unsigned k = 0; k <= m_icols; k++) + for (uint k = 0; k <= m_icols; k++) m_icol[k] = 0; } ITab::~ITab() { delete [] m_name; - for (unsigned i = 0; i < m_icols; i++) + for (uint i = 0; i < m_icols; i++) delete m_icol[i]; delete [] m_icol; } void -ITab::icoladd(unsigned k, const ICol* icolptr) +ITab::icoladd(uint k, const ICol* icolptr) { assert(k == icolptr->m_num && k < m_icols && m_icol[k] == 0); m_icol[k] = icolptr; - m_colmask |= (1 << icolptr->m_col.m_num); + m_keymask |= (1 << icolptr->m_col.m_num); } static NdbOut& operator<<(NdbOut& out, const ITab& itab) { out << "itab " << itab.m_name << " icols=" << itab.m_icols; - for (unsigned k = 0; k < itab.m_icols; k++) { + for (uint k = 0; k < itab.m_icols; k++) { const ICol& icol = *itab.m_icol[k]; out << endl << icol; } @@ -893,56 +861,60 @@ operator<<(NdbOut& out, const ITab& itab) struct Tab { const char* m_name; - unsigned m_cols; + uint m_cols; const Col** m_col; - unsigned m_itabs; + uint m_pkmask; + uint m_itabs; const ITab** m_itab; - unsigned m_orderedindexes; - unsigned m_hashindexes; + uint m_orderedindexes; + uint m_hashindexes; // pk must contain an Unsigned column - unsigned m_keycol; - void coladd(unsigned k, Col* colptr); - void itabadd(unsigned j, ITab* itab); - Tab(const char* name, unsigned cols, unsigned itabs, unsigned keycol); + uint m_keycol; + void coladd(uint k, Col* colptr); + void itabadd(uint j, ITab* itab); + Tab(const char* name, uint cols, uint itabs, uint keycol); ~Tab(); }; -Tab::Tab(const char* name, unsigned cols, unsigned itabs, unsigned keycol) : +Tab::Tab(const char* name, uint cols, uint itabs, uint keycol) : m_name(strcpy(new char [strlen(name) + 1], name)), m_cols(cols), m_col(new const Col* [cols + 1]), + m_pkmask(0), m_itabs(itabs), m_itab(new const ITab* [itabs + 1]), m_orderedindexes(0), m_hashindexes(0), m_keycol(keycol) { - for (unsigned k = 0; k <= cols; k++) + for (uint k = 0; k <= cols; k++) m_col[k] = 0; - for (unsigned j = 0; j <= itabs; j++) + for (uint j = 0; j <= itabs; j++) m_itab[j] = 0; } Tab::~Tab() { delete [] m_name; - for (unsigned i = 0; i < m_cols; i++) + for (uint i = 0; i < m_cols; i++) delete m_col[i]; delete [] m_col; - for (unsigned i = 0; i < m_itabs; i++) + for (uint i = 0; i < m_itabs; i++) delete m_itab[i]; delete [] m_itab; } void -Tab::coladd(unsigned k, Col* colptr) +Tab::coladd(uint k, Col* colptr) { assert(k == colptr->m_num && k < m_cols && m_col[k] == 0); m_col[k] = colptr; + if (colptr->m_pk) + m_pkmask |= (1 << k); } void -Tab::itabadd(unsigned j, ITab* itabptr) +Tab::itabadd(uint j, ITab* itabptr) { assert(j < m_itabs && m_itab[j] == 0 && itabptr != 0); m_itab[j] = itabptr; @@ -956,11 +928,11 @@ static NdbOut& operator<<(NdbOut& out, const Tab& tab) { out << "tab " << tab.m_name << " cols=" << tab.m_cols; - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { const Col& col = *tab.m_col[k]; out << endl << col; } - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -972,20 +944,20 @@ operator<<(NdbOut& out, const Tab& tab) // make table structs static const Tab** tablist = 0; -static unsigned tabcount = 0; +static uint tabcount = 0; static void verifytables() { - for (unsigned j = 0; j < tabcount; j++) { + for (uint j = 0; j < tabcount; j++) { const Tab* t = tablist[j]; if (t == 0) continue; assert(t->m_cols != 0 && t->m_col != 0); - for (unsigned k = 0; k < t->m_cols; k++) { + for (uint k = 0; k < t->m_cols; k++) { const Col* c = t->m_col[k]; assert(c != 0 && c->m_num == k); - assert(! (c->m_pk && c->m_nullable)); + assert(!(c->m_pk && c->m_nullable)); } assert(t->m_col[t->m_cols] == 0); { @@ -994,16 +966,16 @@ verifytables() assert(c->m_pk && c->m_type == Col::Unsigned); } assert(t->m_itabs != 0 && t->m_itab != 0); - for (unsigned i = 0; i < t->m_itabs; i++) { + for (uint i = 0; i < t->m_itabs; i++) { const ITab* x = t->m_itab[i]; if (x == 0) continue; assert(x != 0 && x->m_icols != 0 && x->m_icol != 0); - for (unsigned k = 0; k < x->m_icols; k++) { + for (uint k = 0; k < x->m_icols; k++) { const ICol* c = x->m_icol[k]; assert(c != 0 && c->m_num == k && c->m_col.m_num < t->m_cols); if (x->m_type == ITab::UniqueHashIndex) { - assert(! c->m_col.m_nullable); + assert(!c->m_col.m_nullable); } } } @@ -1019,11 +991,11 @@ makebuiltintables(Par par) tabcount = 3; if (tablist == 0) { tablist = new const Tab* [tabcount]; - for (unsigned j = 0; j < tabcount; j++) { + for (uint j = 0; j < tabcount; j++) { tablist[j] = 0; } } else { - for (unsigned j = 0; j < tabcount; j++) { + for (uint j = 0; j < tabcount; j++) { delete tablist[j]; tablist[j] = 0; } @@ -1202,7 +1174,8 @@ static Ndb_cluster_connection* g_ncc = 0; struct Con { Ndb* m_ndb; NdbDictionary::Dictionary* m_dic; - NdbConnection* m_tx; + NdbTransaction* m_tx; + Uint64 m_txid; NdbOperation* m_op; NdbIndexOperation* m_indexop; NdbScanOperation* m_scanop; @@ -1210,10 +1183,16 @@ struct Con { NdbScanFilter* m_scanfilter; enum ScanMode { ScanNo = 0, Committed, Latest, Exclusive }; ScanMode m_scanmode; - enum ErrType { ErrNone = 0, ErrDeadlock, ErrNospace, ErrOther }; + enum ErrType { + ErrNone = 0, + ErrDeadlock = 1, + ErrNospace = 2, + ErrOther = 4 + }; ErrType m_errtype; + char m_errname[100]; Con() : - m_ndb(0), m_dic(0), m_tx(0), m_op(0), m_indexop(0), + m_ndb(0), m_dic(0), m_tx(0), m_txid(0), m_op(0), m_indexop(0), m_scanop(0), m_indexscanop(0), m_scanfilter(0), m_scanmode(ScanNo), m_errtype(ErrNone) {} ~Con() { @@ -1237,18 +1216,20 @@ struct Con { int setBound(int num, int type, const void* value); int beginFilter(int group); int endFilter(); - int setFilter(int num, int cond, const void* value, unsigned len); - int execute(ExecType t); - int execute(ExecType t, bool& deadlock, bool& nospace); + int setFilter(int num, int cond, const void* value, uint len); + int execute(ExecType et); + int execute(ExecType et, uint& err); + int readTuple(Par par); int readTuples(Par par); int readIndexTuples(Par par); int executeScan(); int nextScanResult(bool fetchAllowed); - int nextScanResult(bool fetchAllowed, bool& deadlock); + int nextScanResult(bool fetchAllowed, uint& err); int updateScanTuple(Con& con2); int deleteScanTuple(Con& con2); void closeScan(); void closeTransaction(); + const char* errname(uint err); void printerror(NdbOut& out); }; @@ -1259,7 +1240,7 @@ Con::connect() m_ndb = new Ndb(g_ncc, "TEST_DB"); CHKCON(m_ndb->init() == 0, *this); CHKCON(m_ndb->waitUntilReady(30) == 0, *this); - m_tx = 0, m_op = 0; + m_tx = 0, m_txid = 0, m_op = 0; return 0; } @@ -1274,7 +1255,7 @@ void Con::disconnect() { delete m_ndb; - m_ndb = 0, m_dic = 0, m_tx = 0, m_op = 0; + m_ndb = 0, m_dic = 0, m_tx = 0, m_txid = 0, m_op = 0; } int @@ -1284,6 +1265,7 @@ Con::startTransaction() if (m_tx != 0) closeTransaction(); CHKCON((m_tx = m_ndb->startTransaction()) != 0, *this); + m_txid = m_tx->getTransactionId(); return 0; } @@ -1307,7 +1289,7 @@ int Con::getNdbIndexOperation(const ITab& itab, const Tab& tab) { assert(m_tx != 0); - unsigned tries = 0; + uint tries = 0; while (1) { if (getNdbIndexOperation1(itab, tab) == 0) break; @@ -1337,7 +1319,7 @@ int Con::getNdbIndexScanOperation(const ITab& itab, const Tab& tab) { assert(m_tx != 0); - unsigned tries = 0; + uint tries = 0; while (1) { if (getNdbIndexScanOperation1(itab, tab) == 0) break; @@ -1405,7 +1387,7 @@ Con::endFilter() } int -Con::setFilter(int num, int cond, const void* value, unsigned len) +Con::setFilter(int num, int cond, const void* value, uint len) { assert(m_tx != 0 && m_scanfilter != 0); CHKCON(m_scanfilter->cmp((NdbScanFilter::BinaryCondition)cond, num, value, len) == 0, *this); @@ -1413,33 +1395,45 @@ Con::setFilter(int num, int cond, const void* value, unsigned len) } int -Con::execute(ExecType t) +Con::execute(ExecType et) { assert(m_tx != 0); - CHKCON(m_tx->execute(t) == 0, *this); + CHKCON(m_tx->execute(et) == 0, *this); return 0; } int -Con::execute(ExecType t, bool& deadlock, bool& nospace) +Con::execute(ExecType et, uint& err) { - int ret = execute(t); - if (ret != 0 && deadlock && m_errtype == ErrDeadlock) { - LL3("caught deadlock"); - ret = 0; - } else { - deadlock = false; - } - if (ret != 0 && nospace && m_errtype == ErrNospace) { - LL3("caught nospace"); - ret = 0; - } else { - nospace = false; + int ret = execute(et); + // err in: errors to catch, out: error caught + const uint errin = err; + err = 0; + if (ret == -1) { + if (m_errtype == ErrDeadlock && (errin & ErrDeadlock)) { + LL3("caught deadlock"); + err = ErrDeadlock; + ret = 0; + } + if (m_errtype == ErrNospace && (errin & ErrNospace)) { + LL3("caught nospace"); + err = ErrNospace; + ret = 0; + } } CHK(ret == 0); return 0; } +int +Con::readTuple(Par par) +{ + assert(m_tx != 0 && m_op != 0); + NdbOperation::LockMode lm = par.m_lockmode; + CHKCON(m_op->readTuple(lm) == 0, *this); + return 0; +} + int Con::readTuples(Par par) { @@ -1477,23 +1471,25 @@ Con::nextScanResult(bool fetchAllowed) int ret; assert(m_scanop != 0); CHKCON((ret = m_scanop->nextResult(fetchAllowed)) != -1, *this); - assert(ret == 0 || ret == 1 || (! fetchAllowed && ret == 2)); + assert(ret == 0 || ret == 1 || (!fetchAllowed && ret == 2)); return ret; } int -Con::nextScanResult(bool fetchAllowed, bool& deadlock) +Con::nextScanResult(bool fetchAllowed, uint& err) { int ret = nextScanResult(fetchAllowed); + // err in: errors to catch, out: error caught + const uint errin = err; + err = 0; if (ret == -1) { - if (deadlock && m_errtype == ErrDeadlock) { + if (m_errtype == ErrDeadlock && (errin & ErrDeadlock)) { LL3("caught deadlock"); + err = ErrDeadlock; ret = 0; } - } else { - deadlock = false; } - CHK(ret == 0 || ret == 1 || (! fetchAllowed && ret == 2)); + CHK(ret == 0 || ret == 1 || (!fetchAllowed && ret == 2)); return ret; } @@ -1502,6 +1498,7 @@ Con::updateScanTuple(Con& con2) { assert(con2.m_tx != 0); CHKCON((con2.m_op = m_scanop->updateCurrentTuple(con2.m_tx)) != 0, *this); + con2.m_txid = m_txid; // in the kernel return 0; } @@ -1510,6 +1507,7 @@ Con::deleteScanTuple(Con& con2) { assert(con2.m_tx != 0); CHKCON(m_scanop->deleteCurrentTuple(con2.m_tx) == 0, *this); + con2.m_txid = m_txid; // in the kernel return 0; } @@ -1527,15 +1525,26 @@ Con::closeTransaction() { assert(m_ndb != 0 && m_tx != 0); m_ndb->closeTransaction(m_tx); - m_tx = 0, m_op = 0; + m_tx = 0, m_txid = 0, m_op = 0; m_scanop = 0, m_indexscanop = 0; } +const char* +Con::errname(uint err) +{ + sprintf(m_errname, "0x%x", err); + if (err & ErrDeadlock) + strcat(m_errname, ",deadlock"); + if (err & ErrNospace) + strcat(m_errname, ",nospace"); + return m_errname; +} + void Con::printerror(NdbOut& out) { m_errtype = ErrOther; - unsigned any = 0; + uint any = 0; int code; int die = 0; if (m_ndb) { @@ -1563,7 +1572,7 @@ Con::printerror(NdbOut& out) } } } - if (! any) { + if (!any) { LL0("failed but no NDB error code"); } if (die) { @@ -1589,7 +1598,7 @@ invalidateindex(Par par) { Con& con = par.con(); const Tab& tab = par.tab(); - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -1639,7 +1648,7 @@ createtable(Par par) if (par.m_nologging) { t.setLogging(false); } - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { const Col& col = *tab.m_col[k]; NdbDictionary::Column c(col.m_name); c.setType((NdbDictionary::Column::Type)col.m_type); @@ -1677,7 +1686,7 @@ static int dropindex(Par par) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -1699,7 +1708,7 @@ createindex(Par par, const ITab& itab) if (par.m_nologging || itab.m_type == ITab::OrderedIndex) { x.setLogging(false); } - for (unsigned k = 0; k < itab.m_icols; k++) { + for (uint k = 0; k < itab.m_icols; k++) { const ICol& icol = *itab.m_icol[k]; const Col& col = icol.m_col; x.addColumnName(col.m_name); @@ -1714,7 +1723,7 @@ static int createindex(Par par) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -1731,27 +1740,29 @@ struct Val { const Col& m_col; union { Uint32 m_uint32; - unsigned char* m_char; - unsigned char* m_varchar; - unsigned char* m_longvarchar; + uchar* m_char; + uchar* m_varchar; + uchar* m_longvarchar; }; + bool m_null; + // construct Val(const Col& col); ~Val(); void copy(const Val& val2); void copy(const void* addr); const void* dataaddr() const; - bool m_null; - int equal(Par par) const; - int equal(Par par, const ICol& icol) const; - int setval(Par par) const; - void calc(Par par, unsigned i); - void calckey(Par par, unsigned i); - void calckeychars(Par par, unsigned i, unsigned& n, unsigned char* buf); + void calc(Par par, uint i); + void calckey(Par par, uint i); + void calckeychars(Par par, uint i, uint& n, uchar* buf); void calcnokey(Par par); - void calcnokeychars(Par par, unsigned& n, unsigned char* buf); - int verify(Par par, const Val& val2) const; + void calcnokeychars(Par par, uint& n, uchar* buf); + // operations + int setval(Par par) const; + int setval(Par par, const ICol& icol) const; + // compare int cmp(Par par, const Val& val2) const; - int cmpchars(Par par, const unsigned char* buf1, unsigned len1, const unsigned char* buf2, unsigned len2) const; + int cmpchars(Par par, const uchar* buf1, uint len1, const uchar* buf2, uint len2) const; + int verify(Par par, const Val& val2) const; private: Val& operator=(const Val& val2); }; @@ -1759,20 +1770,26 @@ private: static NdbOut& operator<<(NdbOut& out, const Val& val); +// construct + Val::Val(const Col& col) : m_col(col) { switch (col.m_type) { case Col::Unsigned: + m_uint32 = 0x7e7e7e7e; break; case Col::Char: - m_char = new unsigned char [col.m_bytelength]; + m_char = new uchar [col.m_bytelength]; + memset(m_char, 0x7e, col.m_bytelength); break; case Col::Varchar: - m_varchar = new unsigned char [1 + col.m_bytelength]; + m_varchar = new uchar [1 + col.m_bytelength]; + memset(m_char, 0x7e, 1 + col.m_bytelength); break; case Col::Longvarchar: - m_longvarchar = new unsigned char [2 + col.m_bytelength]; + m_longvarchar = new uchar [2 + col.m_bytelength]; + memset(m_char, 0x7e, 2 + col.m_bytelength); break; default: assert(false); @@ -1858,52 +1875,17 @@ Val::dataaddr() const return 0; } -int -Val::equal(Par par) const -{ - Con& con = par.con(); - const Col& col = m_col; - assert(col.m_pk && ! m_null); - const char* addr = (const char*)dataaddr(); - LL5("equal [" << col << "] " << *this); - CHK(con.equal(col.m_num, addr) == 0); - return 0; -} - -int -Val::equal(Par par, const ICol& icol) const -{ - Con& con = par.con(); - assert(! m_null); - const char* addr = (const char*)dataaddr(); - LL5("equal [" << icol << "] " << *this); - CHK(con.equal(icol.m_num, addr) == 0); - return 0; -} - -int -Val::setval(Par par) const -{ - Con& con = par.con(); - const Col& col = m_col; - assert(! col.m_pk); - const char* addr = ! m_null ? (const char*)dataaddr() : 0; - LL5("setval [" << col << "] " << *this); - CHK(con.setValue(col.m_num, addr) == 0); - return 0; -} - void -Val::calc(Par par, unsigned i) +Val::calc(Par par, uint i) { const Col& col = m_col; col.m_pk ? calckey(par, i) : calcnokey(par); - if (! m_null) + if (!m_null) col.wellformed(dataaddr()); } void -Val::calckey(Par par, unsigned i) +Val::calckey(Par par, uint i) { const Col& col = m_col; m_null = false; @@ -1915,7 +1897,7 @@ Val::calckey(Par par, unsigned i) { const Chs* chs = col.m_chs; CHARSET_INFO* cs = chs->m_cs; - unsigned n = 0; + uint n = 0; calckeychars(par, i, n, m_char); // extend by appropriate space (*cs->cset->fill)(cs, (char*)&m_char[n], col.m_bytelength - n, 0x20); @@ -1923,7 +1905,7 @@ Val::calckey(Par par, unsigned i) break; case Col::Varchar: { - unsigned n = 0; + uint n = 0; calckeychars(par, i, n, m_varchar + 1); // set length and pad with nulls m_varchar[0] = n; @@ -1932,7 +1914,7 @@ Val::calckey(Par par, unsigned i) break; case Col::Longvarchar: { - unsigned n = 0; + uint n = 0; calckeychars(par, i, n, m_longvarchar + 2); // set length and pad with nulls m_longvarchar[0] = (n & 0xff); @@ -1947,13 +1929,13 @@ Val::calckey(Par par, unsigned i) } void -Val::calckeychars(Par par, unsigned i, unsigned& n, unsigned char* buf) +Val::calckeychars(Par par, uint i, uint& n, uchar* buf) { const Col& col = m_col; const Chs* chs = col.m_chs; CHARSET_INFO* cs = chs->m_cs; n = 0; - unsigned len = 0; + uint len = 0; while (len < col.m_length) { if (i % (1 + n) == 0) { break; @@ -1980,7 +1962,7 @@ Val::calcnokey(Par par) if (r < 0 && par.m_bdir > 0 || r > 0 && par.m_bdir < 0) r = -r; } - unsigned v = par.m_range + r; + uint v = par.m_range + r; switch (col.m_type) { case Col::Unsigned: m_uint32 = v; @@ -1989,7 +1971,7 @@ Val::calcnokey(Par par) { const Chs* chs = col.m_chs; CHARSET_INFO* cs = chs->m_cs; - unsigned n = 0; + uint n = 0; calcnokeychars(par, n, m_char); // extend by appropriate space (*cs->cset->fill)(cs, (char*)&m_char[n], col.m_bytelength - n, 0x20); @@ -1997,7 +1979,7 @@ Val::calcnokey(Par par) break; case Col::Varchar: { - unsigned n = 0; + uint n = 0; calcnokeychars(par, n, m_varchar + 1); // set length and pad with nulls m_varchar[0] = n; @@ -2006,7 +1988,7 @@ Val::calcnokey(Par par) break; case Col::Longvarchar: { - unsigned n = 0; + uint n = 0; calcnokeychars(par, n, m_longvarchar + 2); // set length and pad with nulls m_longvarchar[0] = (n & 0xff); @@ -2021,24 +2003,24 @@ Val::calcnokey(Par par) } void -Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf) +Val::calcnokeychars(Par par, uint& n, uchar* buf) { const Col& col = m_col; const Chs* chs = col.m_chs; CHARSET_INFO* cs = chs->m_cs; n = 0; - unsigned len = 0; + uint len = 0; while (len < col.m_length) { if (urandom(1 + col.m_bytelength) == 0) { break; } - unsigned half = maxcharcount / 2; + uint half = maxcharcount / 2; int r = irandom((par.m_pctrange * half) / 100); if (par.m_bdir != 0 && urandom(10) != 0) { if (r < 0 && par.m_bdir > 0 || r > 0 && par.m_bdir < 0) r = -r; } - unsigned i = half + r; + uint i = half + r; assert(i < maxcharcount); const Chr& chr = chs->m_chr[i]; assert(n + chr.m_size <= col.m_bytelength); @@ -2048,13 +2030,39 @@ Val::calcnokeychars(Par par, unsigned& n, unsigned char* buf) } } +// operations + int -Val::verify(Par par, const Val& val2) const +Val::setval(Par par) const { - CHK(cmp(par, val2) == 0); + Con& con = par.con(); + const Col& col = m_col; + if (col.m_pk) { + assert(!m_null); + const char* addr = (const char*)dataaddr(); + LL5("setval pk [" << col << "] " << *this); + CHK(con.equal(col.m_num, addr) == 0); + } else { + const char* addr = !m_null ? (const char*)dataaddr() : 0; + LL5("setval non-pk [" << col << "] " << *this); + CHK(con.setValue(col.m_num, addr) == 0); + } return 0; } +int +Val::setval(Par par, const ICol& icol) const +{ + Con& con = par.con(); + assert(!m_null); + const char* addr = (const char*)dataaddr(); + LL5("setval key [" << icol << "] " << *this); + CHK(con.equal(icol.m_num, addr) == 0); + return 0; +} + +// compare + int Val::cmp(Par par, const Val& val2) const { @@ -2062,9 +2070,9 @@ Val::cmp(Par par, const Val& val2) const const Col& col2 = val2.m_col; assert(col.equal(col2)); if (m_null || val2.m_null) { - if (! m_null) + if (!m_null) return +1; - if (! val2.m_null) + if (!val2.m_null) return -1; return 0; } @@ -2084,21 +2092,21 @@ Val::cmp(Par par, const Val& val2) const break; case Col::Char: { - unsigned len = col.m_bytelength; + uint len = col.m_bytelength; return cmpchars(par, m_char, len, val2.m_char, len); } break; case Col::Varchar: { - unsigned len1 = m_varchar[0]; - unsigned len2 = val2.m_varchar[0]; + uint len1 = m_varchar[0]; + uint len2 = val2.m_varchar[0]; return cmpchars(par, m_varchar + 1, len1, val2.m_varchar + 1, len2); } break; case Col::Longvarchar: { - unsigned len1 = m_longvarchar[0] + (m_longvarchar[1] << 8); - unsigned len2 = val2.m_longvarchar[0] + (val2.m_longvarchar[1] << 8); + uint len1 = m_longvarchar[0] + (m_longvarchar[1] << 8); + uint len2 = val2.m_longvarchar[0] + (val2.m_longvarchar[1] << 8); return cmpchars(par, m_longvarchar + 2, len1, val2.m_longvarchar + 2, len2); } break; @@ -2110,17 +2118,17 @@ Val::cmp(Par par, const Val& val2) const } int -Val::cmpchars(Par par, const unsigned char* buf1, unsigned len1, const unsigned char* buf2, unsigned len2) const +Val::cmpchars(Par par, const uchar* buf1, uint len1, const uchar* buf2, uint len2) const { const Col& col = m_col; const Chs* chs = col.m_chs; CHARSET_INFO* cs = chs->m_cs; int k; - if (! par.m_collsp) { - unsigned char x1[maxxmulsize * 8000]; - unsigned char x2[maxxmulsize * 8000]; + if (!par.m_collsp) { + uchar x1[maxxmulsize * 8000]; + uchar x2[maxxmulsize * 8000]; // make strxfrm pad both to same length - unsigned len = maxxmulsize * col.m_bytelength; + uint len = maxxmulsize * col.m_bytelength; int n1 = NdbSqlUtil::strnxfrm_bug7284(cs, x1, chs->m_xmul * len, buf1, len1); int n2 = NdbSqlUtil::strnxfrm_bug7284(cs, x2, chs->m_xmul * len, buf2, len2); assert(n1 != -1 && n1 == n2); @@ -2131,8 +2139,17 @@ Val::cmpchars(Par par, const unsigned char* buf1, unsigned len1, const unsigned return k < 0 ? -1 : k > 0 ? +1 : 0; } +int +Val::verify(Par par, const Val& val2) const +{ + CHK(cmp(par, val2) == 0); + return 0; +} + +// print + static void -printstring(NdbOut& out, const unsigned char* str, unsigned len, bool showlen) +printstring(NdbOut& out, const uchar* str, uint len, bool showlen) { char buf[4 * 8000]; char *p = buf; @@ -2141,12 +2158,12 @@ printstring(NdbOut& out, const unsigned char* str, unsigned len, bool showlen) sprintf(p, "%u:", len); p += strlen(p); } - for (unsigned i = 0; i < len; i++) { - unsigned char c = str[i]; + for (uint i = 0; i < len; i++) { + uchar c = str[i]; if (c == '\\') { *p++ = '\\'; *p++ = c; - } else if (0x20 <= c && c < 0x7e) { + } else if (0x20 <= c && c <= 0x7e) { *p++ = c; } else { *p++ = '\\'; @@ -2173,19 +2190,19 @@ operator<<(NdbOut& out, const Val& val) break; case Col::Char: { - unsigned len = col.m_bytelength; + uint len = col.m_bytelength; printstring(out, val.m_char, len, false); } break; case Col::Varchar: { - unsigned len = val.m_varchar[0]; + uint len = val.m_varchar[0]; printstring(out, val.m_varchar + 1, len, true); } break; case Col::Longvarchar: { - unsigned len = val.m_longvarchar[0] + (val.m_longvarchar[1] << 8); + uint len = val.m_longvarchar[0] + (val.m_longvarchar[1] << 8); printstring(out, val.m_longvarchar + 2, len, true); } break; @@ -2202,16 +2219,36 @@ operator<<(NdbOut& out, const Val& val) struct Row { const Tab& m_tab; Val** m_val; - bool m_exist; - enum Op { NoOp = 0, ReadOp = 1, InsOp = 2, UpdOp = 4, DelOp = 8, AnyOp = 15 }; - Op m_pending; - Row* m_dbrow; // copy of db row before update + enum St { + StUndef = 0, + StDefine = 1, + StPrepare = 2, + StCommit = 3 + }; + enum Op { + OpNone = 0, + OpIns = 2, + OpUpd = 4, + OpDel = 8, + OpRead = 16, + OpReadEx = 32, + OpReadCom = 64, + OpDML = 2 | 4 | 8, + OpREAD = 16 | 32 | 64 + }; + St m_st; + Op m_op; + Uint64 m_txid; + Row* m_bi; + // construct Row(const Tab& tab); ~Row(); - void copy(const Row& row2); - void calc(Par par, unsigned i, unsigned mask = 0); - const Row& dbrow() const; - int verify(Par par, const Row& row2, bool pkonly) const; + void copy(const Row& row2, bool copy_bi); + void copyval(const Row& row2, uint colmask = ~0); + void calc(Par par, uint i, uint colmask = ~0); + // operations + int setval(Par par, uint colmask = ~0); + int setval(Par par, const ITab& itab); int insrow(Par par); int updrow(Par par); int updrow(Par par, const ITab& itab); @@ -2220,91 +2257,115 @@ struct Row { int selrow(Par par); int selrow(Par par, const ITab& itab); int setrow(Par par); + // compare int cmp(Par par, const Row& row2) const; int cmp(Par par, const Row& row2, const ITab& itab) const; + int verify(Par par, const Row& row2, bool pkonly) const; private: Row& operator=(const Row& row2); }; +static NdbOut& +operator<<(NdbOut& out, const Row* rowp); + +static NdbOut& +operator<<(NdbOut& out, const Row& row); + +// construct + Row::Row(const Tab& tab) : m_tab(tab) { m_val = new Val* [tab.m_cols]; - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { const Col& col = *tab.m_col[k]; m_val[k] = new Val(col); } - m_exist = false; - m_pending = NoOp; - m_dbrow = 0; + m_st = StUndef; + m_op = OpNone; + m_txid = 0; + m_bi = 0; } Row::~Row() { const Tab& tab = m_tab; - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { delete m_val[k]; } delete [] m_val; - delete m_dbrow; + delete m_bi; } void -Row::copy(const Row& row2) +Row::copy(const Row& row2, bool copy_bi) +{ + const Tab& tab = m_tab; + copyval(row2); + m_st = row2.m_st; + m_op = row2.m_op; + m_txid = row2.m_txid; + assert(m_bi == 0); + if (copy_bi && row2.m_bi != 0) { + m_bi = new Row(tab); + m_bi->copy(*row2.m_bi, copy_bi); + } +} + +void +Row::copyval(const Row& row2, uint colmask) { const Tab& tab = m_tab; assert(&tab == &row2.m_tab); - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { Val& val = *m_val[k]; const Val& val2 = *row2.m_val[k]; - val.copy(val2); - } - m_exist = row2.m_exist; - m_pending = row2.m_pending; - if (row2.m_dbrow == 0) { - m_dbrow = 0; - } else { - assert(row2.m_dbrow->m_dbrow == 0); - if (m_dbrow == 0) - m_dbrow = new Row(tab); - m_dbrow->copy(*row2.m_dbrow); + if ((1 << k) & colmask) + val.copy(val2); } } void -Row::calc(Par par, unsigned i, unsigned mask) +Row::calc(Par par, uint i, uint colmask) { const Tab& tab = m_tab; - for (unsigned k = 0; k < tab.m_cols; k++) { - if (! (mask & (1 << k))) { + for (uint k = 0; k < tab.m_cols; k++) { + if ((1 << k) & colmask) { Val& val = *m_val[k]; val.calc(par, i); } } } -const Row& -Row::dbrow() const +// operations + +int +Row::setval(Par par, uint colmask) { - if (m_dbrow == 0) - return *this; - assert(m_pending == Row::UpdOp || m_pending == Row::DelOp); - return *m_dbrow; + const Tab& tab = m_tab; + Rsq rsq(tab.m_cols); + for (uint k = 0; k < tab.m_cols; k++) { + uint k2 = rsq.next(); + if ((1 << k2) & colmask) { + const Val& val = *m_val[k2]; + CHK(val.setval(par) == 0); + } + } + return 0; } int -Row::verify(Par par, const Row& row2, bool pkonly) const +Row::setval(Par par, const ITab& itab) { - const Tab& tab = m_tab; - const Row& row1 = *this; - assert(&row1.m_tab == &row2.m_tab && row1.m_exist && row2.m_exist); - for (unsigned k = 0; k < tab.m_cols; k++) { - const Col& col = row1.m_val[k]->m_col; - if (! pkonly || col.m_pk) { - const Val& val1 = *row1.m_val[k]; - const Val& val2 = *row2.m_val[k]; - CHK(val1.verify(par, val2) == 0); - } + Con& con = par.con(); + Rsq rsq(itab.m_icols); + for (uint k = 0; k < itab.m_icols; k++) { + uint k2 = rsq.next(); + const ICol& icol = *itab.m_icol[k2]; + const Col& col = icol.m_col; + uint m = col.m_num; + const Val& val = *m_val[m]; + CHK(val.setval(par, icol) == 0); } return 0; } @@ -2314,26 +2375,14 @@ Row::insrow(Par par) { Con& con = par.con(); const Tab& tab = m_tab; - assert(! m_exist); CHK(con.getNdbOperation(tab) == 0); CHKCON(con.m_op->insertTuple() == 0, con); - Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (col.m_pk) - CHK(val.equal(par) == 0); - } - Rsq rsq2(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq2.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (! col.m_pk) - CHK(val.setval(par) == 0); - } - m_pending = InsOp; + CHK(setval(par, tab.m_pkmask) == 0); + CHK(setval(par, ~tab.m_pkmask) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpIns; + m_txid = con.m_txid; return 0; } @@ -2342,26 +2391,14 @@ Row::updrow(Par par) { Con& con = par.con(); const Tab& tab = m_tab; - assert(m_exist); CHK(con.getNdbOperation(tab) == 0); CHKCON(con.m_op->updateTuple() == 0, con); - Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (col.m_pk) - CHK(val.equal(par) == 0); - } - Rsq rsq2(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq2.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (! col.m_pk) - CHK(val.setval(par) == 0); - } - m_pending = UpdOp; + CHK(setval(par, tab.m_pkmask) == 0); + CHK(setval(par, ~tab.m_pkmask) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpUpd; + m_txid = con.m_txid; return 0; } @@ -2371,27 +2408,14 @@ Row::updrow(Par par, const ITab& itab) Con& con = par.con(); const Tab& tab = m_tab; assert(itab.m_type == ITab::UniqueHashIndex && &itab.m_tab == &tab); - assert(m_exist); CHK(con.getNdbIndexOperation(itab, tab) == 0); CHKCON(con.m_op->updateTuple() == 0, con); - Rsq rsq1(itab.m_icols); - for (unsigned k = 0; k < itab.m_icols; k++) { - unsigned k2 = rsq1.next(); - const ICol& icol = *itab.m_icol[k2]; - const Col& col = icol.m_col; - unsigned m = col.m_num; - const Val& val = *m_val[m]; - CHK(val.equal(par, icol) == 0); - } - Rsq rsq2(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq2.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (! col.m_pk) - CHK(val.setval(par) == 0); - } - m_pending = UpdOp; + CHK(setval(par, itab) == 0); + CHK(setval(par, ~tab.m_pkmask) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpUpd; + m_txid = con.m_txid; return 0; } @@ -2400,18 +2424,13 @@ Row::delrow(Par par) { Con& con = par.con(); const Tab& tab = m_tab; - assert(m_exist); CHK(con.getNdbOperation(m_tab) == 0); CHKCON(con.m_op->deleteTuple() == 0, con); - Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (col.m_pk) - CHK(val.equal(par) == 0); - } - m_pending = DelOp; + CHK(setval(par, tab.m_pkmask) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpDel; + m_txid = con.m_txid; return 0; } @@ -2421,19 +2440,13 @@ Row::delrow(Par par, const ITab& itab) Con& con = par.con(); const Tab& tab = m_tab; assert(itab.m_type == ITab::UniqueHashIndex && &itab.m_tab == &tab); - assert(m_exist); CHK(con.getNdbIndexOperation(itab, tab) == 0); CHKCON(con.m_op->deleteTuple() == 0, con); - Rsq rsq1(itab.m_icols); - for (unsigned k = 0; k < itab.m_icols; k++) { - unsigned k2 = rsq1.next(); - const ICol& icol = *itab.m_icol[k2]; - const Col& col = icol.m_col; - unsigned m = col.m_num; - const Val& val = *m_val[m]; - CHK(val.equal(par, icol) == 0); - } - m_pending = DelOp; + CHK(setval(par, itab) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpDel; + m_txid = con.m_txid; return 0; } @@ -2443,15 +2456,9 @@ Row::selrow(Par par) Con& con = par.con(); const Tab& tab = m_tab; CHK(con.getNdbOperation(m_tab) == 0); - CHKCON(con.m_op->readTuple() == 0, con); - Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (col.m_pk) - CHK(val.equal(par) == 0); - } + CHKCON(con.readTuple(par) == 0, con); + CHK(setval(par, tab.m_pkmask) == 0); + // TODO state return 0; } @@ -2462,16 +2469,9 @@ Row::selrow(Par par, const ITab& itab) const Tab& tab = m_tab; assert(itab.m_type == ITab::UniqueHashIndex && &itab.m_tab == &tab); CHK(con.getNdbIndexOperation(itab, tab) == 0); - CHKCON(con.m_op->readTuple() == 0, con); - Rsq rsq1(itab.m_icols); - for (unsigned k = 0; k < itab.m_icols; k++) { - unsigned k2 = rsq1.next(); - const ICol& icol = *itab.m_icol[k2]; - const Col& col = icol.m_col; - unsigned m = col.m_num; - const Val& val = *m_val[m]; - CHK(val.equal(par, icol) == 0); - } + CHKCON(con.readTuple(par) == 0, con); + CHK(setval(par, itab) == 0); + // TODO state return 0; } @@ -2480,25 +2480,23 @@ Row::setrow(Par par) { Con& con = par.con(); const Tab& tab = m_tab; - Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); - const Val& val = *m_val[k2]; - const Col& col = val.m_col; - if (! col.m_pk) - CHK(val.setval(par) == 0); - } - m_pending = UpdOp; + CHK(setval(par, ~tab.m_pkmask) == 0); + assert(m_st == StUndef); + m_st = StDefine; + m_op = OpUpd; + m_txid = con.m_txid; return 0; } +// compare + int Row::cmp(Par par, const Row& row2) const { const Tab& tab = m_tab; assert(&tab == &row2.m_tab); int c = 0; - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { const Val& val = *m_val[k]; const Val& val2 = *row2.m_val[k]; if ((c = val.cmp(par, val2)) != 0) @@ -2512,10 +2510,10 @@ Row::cmp(Par par, const Row& row2, const ITab& itab) const { const Tab& tab = m_tab; int c = 0; - for (unsigned i = 0; i < itab.m_icols; i++) { + for (uint i = 0; i < itab.m_icols; i++) { const ICol& icol = *itab.m_icol[i]; const Col& col = icol.m_col; - unsigned k = col.m_num; + uint k = col.m_num; assert(k < tab.m_cols); const Val& val = *m_val[k]; const Val& val2 = *row2.m_val[k]; @@ -2525,19 +2523,70 @@ Row::cmp(Par par, const Row& row2, const ITab& itab) const return c; } +int +Row::verify(Par par, const Row& row2, bool pkonly) const +{ + const Tab& tab = m_tab; + const Row& row1 = *this; + assert(&row1.m_tab == &row2.m_tab); + for (uint k = 0; k < tab.m_cols; k++) { + const Col& col = row1.m_val[k]->m_col; + if (!pkonly || col.m_pk) { + const Val& val1 = *row1.m_val[k]; + const Val& val2 = *row2.m_val[k]; + CHK(val1.verify(par, val2) == 0); + } + } + return 0; +} + +// print + +static NdbOut& +operator<<(NdbOut& out, const Row::St st) +{ + if (st == Row::StUndef) + out << "StUndef"; + else if (st == Row::StDefine) + out << "StDefine"; + else if (st == Row::StPrepare) + out << "StPrepare"; + else if (st == Row::StCommit) + out << "StCommit"; + else + out << "st=" << st; + return out; +} + static NdbOut& operator<<(NdbOut& out, const Row::Op op) { - if (op == Row::NoOp) - out << "NoOp"; - else if (op == Row::InsOp) - out << "InsOp"; - else if (op == Row::UpdOp) - out << "UpdOp"; - else if (op == Row::DelOp) - out << "DelOp"; + if (op == Row::OpNone) + out << "OpNone"; + else if (op == Row::OpIns) + out << "OpIns"; + else if (op == Row::OpUpd) + out << "OpUpd"; + else if (op == Row::OpDel) + out << "OpDel"; + else if (op == Row::OpRead) + out << "OpRead"; + else if (op == Row::OpReadEx) + out << "OpReadEx"; + else if (op == Row::OpReadCom) + out << "OpReadCom"; else - out << op; + out << "op=" << op; + return out; +} + +static NdbOut& +operator<<(NdbOut& out, const Row* rowp) +{ + if (rowp == 0) + out << "[null]"; + else + out << *rowp; return out; } @@ -2545,26 +2594,18 @@ static NdbOut& operator<<(NdbOut& out, const Row& row) { const Tab& tab = row.m_tab; - for (unsigned i = 0; i < tab.m_cols; i++) { + out << "["; + for (uint i = 0; i < tab.m_cols; i++) { if (i > 0) out << " "; out << *row.m_val[i]; } - out << " exist=" << row.m_exist; - if (row.m_pending) - out << " pending=" << row.m_pending; - if (row.m_dbrow != 0) - out << " [dbrow=" << *row.m_dbrow << "]"; - return out; -} - -static NdbOut& -operator<<(NdbOut& out, const Row* rowptr) -{ - if (rowptr == 0) - out << "null"; - else - out << *rowptr; + out << " " << row.m_st; + out << " " << row.m_op; + out << " " << HEX(row.m_txid); + if (row.m_bi != 0) + out << " " << row.m_bi; + out << "]"; return out; } @@ -2572,45 +2613,38 @@ operator<<(NdbOut& out, const Row* rowptr) struct Set { const Tab& m_tab; - unsigned m_rows; + uint m_rows; Row** m_row; - unsigned* m_rowkey; // maps row number (from 0) in scan to tuple key + uint* m_rowkey; // maps row number (from 0) in scan to tuple key Row* m_keyrow; NdbRecAttr** m_rec; - Set(const Tab& tab, unsigned rows); + // construct + Set(const Tab& tab, uint rows); ~Set(); void reset(); - unsigned count() const; - // old and new values - bool exist(unsigned i) const; - void dbsave(unsigned i); - void calc(Par par, unsigned i, unsigned mask = 0); - bool pending(unsigned i, unsigned mask) const; - void notpending(unsigned i, ExecType et = Commit); - void notpending(const Lst& lst, ExecType et = Commit); - void dbdiscard(unsigned i); - void dbdiscard(const Lst& lst); - const Row& dbrow(unsigned i) const; + bool compat(Par par, uint i, const Row::Op op) const; + void push(uint i); + void copyval(uint i, uint colmask = ~0); // from bi + void calc(Par par, uint i, uint colmask = ~0); + uint count() const; + const Row* getrow(uint i, bool dirty = false) const; + // transaction + void post(Par par, ExecType et); // operations - int insrow(Par par, unsigned i); - int updrow(Par par, unsigned i); - int updrow(Par par, const ITab& itab, unsigned i); - int delrow(Par par, unsigned i); - int delrow(Par par, const ITab& itab, unsigned i); + int insrow(Par par, uint i); + int updrow(Par par, uint i); + int updrow(Par par, const ITab& itab, uint i); + int delrow(Par par, uint i); + int delrow(Par par, const ITab& itab, uint i); int selrow(Par par, const Row& keyrow); int selrow(Par par, const ITab& itab, const Row& keyrow); - // set and get - void setkey(Par par, const Row& keyrow); - void setkey(Par par, const ITab& itab, const Row& keyrow); - int setrow(Par par, unsigned i); + int setrow(Par par, uint i); int getval(Par par); - int getkey(Par par, unsigned* i); - int putval(unsigned i, bool force, unsigned n = ~0); - // sort rows in-place according to ordered index + int getkey(Par par, uint* i); + int putval(uint i, bool force, uint n = ~0); + // compare void sort(Par par, const ITab& itab); - void sort(Par par, const ITab& itab, unsigned lo, unsigned hi); - // verify - int verify(Par par, const Set& set2, bool pkonly) const; + int verify(Par par, const Set& set2, bool pkonly, bool dirty = false) const; int verifyorder(Par par, const ITab& itab, bool descending) const; // protect structure NdbMutex* m_mutex; @@ -2621,26 +2655,27 @@ struct Set { NdbMutex_Unlock(m_mutex); } private: + void sort(Par par, const ITab& itab, uint lo, uint hi); Set& operator=(const Set& set2); }; -Set::Set(const Tab& tab, unsigned rows) : +// construct + +Set::Set(const Tab& tab, uint rows) : m_tab(tab) { m_rows = rows; m_row = new Row* [m_rows]; - for (unsigned i = 0; i < m_rows; i++) { - // allocate on need to save space + for (uint i = 0; i < m_rows; i++) { m_row[i] = 0; } - m_rowkey = new unsigned [m_rows]; - for (unsigned n = 0; n < m_rows; n++) { - // initialize to null + m_rowkey = new uint [m_rows]; + for (uint n = 0; n < m_rows; n++) { m_rowkey[n] = ~0; } m_keyrow = new Row(tab); m_rec = new NdbRecAttr* [tab.m_cols]; - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { m_rec[k] = 0; } m_mutex = NdbMutex_Create(); @@ -2649,7 +2684,7 @@ Set::Set(const Tab& tab, unsigned rows) : Set::~Set() { - for (unsigned i = 0; i < m_rows; i++) { + for (uint i = 0; i < m_rows; i++) { delete m_row[i]; } delete [] m_row; @@ -2662,132 +2697,203 @@ Set::~Set() void Set::reset() { - for (unsigned i = 0; i < m_rows; i++) { - if (m_row[i] != 0) { - Row& row = *m_row[i]; - row.m_exist = false; - } + for (uint i = 0; i < m_rows; i++) { + m_row[i] = 0; } } -unsigned +// this sucks +bool +Set::compat(Par par, uint i, const Row::Op op) const +{ + Con& con = par.con(); + int ret = -1; + int place = 0; + do { + const Row* rowp = getrow(i); + if (rowp == 0) { + ret = op == Row::OpIns; + place = 1; + break; + } + const Row& row = *rowp; + if (!(op & Row::OpREAD)) { + if (row.m_st == Row::StDefine || row.m_st == Row::StPrepare) { + assert(row.m_op & Row::OpDML); + assert(row.m_txid != 0); + if (con.m_txid != row.m_txid) { + ret = false; + place = 2; + break; + } + if (row.m_op != Row::OpDel) { + ret = op == Row::OpUpd || op == Row::OpDel; + place = 3; + break; + } + ret = op == Row::OpIns; + place = 4; + break; + } + if (row.m_st == Row::StCommit) { + assert(row.m_op == Row::OpNone); + assert(row.m_txid == 0); + ret = op == Row::OpUpd || op == Row::OpDel; + place = 5; + break; + } + } + if (op & Row::OpREAD) { + bool dirty = + con.m_txid != row.m_txid && + par.m_lockmode == NdbOperation::LM_CommittedRead; + const Row* rowp2 = getrow(i, dirty); + if (rowp2 == 0 || rowp2->m_op == Row::OpDel) { + ret = false; + place = 6; + break; + } + ret = true; + place = 7; + break; + } + } while (0); + LL4("compat ret=" << ret << " place=" << place); + assert(ret == false || ret == true); + return ret; +} + +void +Set::push(uint i) +{ + const Tab& tab = m_tab; + assert(i < m_rows); + Row* bi = m_row[i]; + m_row[i] = new Row(tab); + Row& row = *m_row[i]; + row.m_bi = bi; + if (bi != 0) + row.copyval(*bi); +} + +void +Set::copyval(uint i, uint colmask) +{ + assert(m_row[i] != 0); + Row& row = *m_row[i]; + assert(row.m_bi != 0); + row.copyval(*row.m_bi, colmask); +} + +void +Set::calc(Par par, uint i, uint colmask) +{ + assert(m_row[i] != 0); + Row& row = *m_row[i]; + row.calc(par, i, colmask); +} + +uint Set::count() const { - unsigned count = 0; - for (unsigned i = 0; i < m_rows; i++) { - if (m_row[i] != 0) { - Row& row = *m_row[i]; - if (row.m_exist) - count++; - } + uint count = 0; + for (uint i = 0; i < m_rows; i++) { + if (m_row[i] != 0) + count++; } return count; } -// old and new values - -bool -Set::exist(unsigned i) const +const Row* +Set::getrow(uint i, bool dirty) const { assert(i < m_rows); - if (m_row[i] == 0) // not allocated => not exist - return false; - return m_row[i]->m_exist; -} - -void -Set::dbsave(unsigned i) -{ - const Tab& tab = m_tab; - assert(i < m_rows && m_row[i] != 0); - Row& row = *m_row[i]; - LL5("dbsave " << i << ": " << row); - assert(row.m_exist && ! row.m_pending && row.m_dbrow == 0); - // could swap pointers but making copy is safer - Row* rowptr = new Row(tab); - rowptr->copy(row); - row.m_dbrow = rowptr; -} - -void -Set::calc(Par par, unsigned i, unsigned mask) -{ - const Tab& tab = m_tab; - if (m_row[i] == 0) - m_row[i] = new Row(tab); - Row& row = *m_row[i]; - row.calc(par, i, mask); -} - -bool -Set::pending(unsigned i, unsigned mask) const -{ - assert(i < m_rows); - if (m_row[i] == 0) // not allocated => not pending - return Row::NoOp; - return m_row[i]->m_pending & mask; -} - -void -Set::notpending(unsigned i, ExecType et) -{ - assert(m_row[i] != 0); - Row& row = *m_row[i]; - if (et == Commit) { - if (row.m_pending == Row::InsOp) - row.m_exist = true; - if (row.m_pending == Row::DelOp) - row.m_exist = false; - } else { - if (row.m_pending == Row::InsOp) - row.m_exist = false; - if (row.m_pending == Row::DelOp) - row.m_exist = true; + const Row* rowp = m_row[i]; + if (dirty) { + while (rowp != 0) { + bool b1 = rowp->m_op == Row::OpNone; + bool b2 = rowp->m_st == Row::StCommit; + assert(b1 == b2); + if (b1) { + assert(rowp->m_bi == 0); + break; + } + rowp = rowp->m_bi; + } } - row.m_pending = Row::NoOp; + return rowp; } +// transaction + void -Set::notpending(const Lst& lst, ExecType et) +Set::post(Par par, ExecType et) { - for (unsigned j = 0; j < lst.m_cnt; j++) { - unsigned i = lst.m_arr[j]; - notpending(i, et); - } -} - -void -Set::dbdiscard(unsigned i) -{ - assert(m_row[i] != 0); - Row& row = *m_row[i]; - LL5("dbdiscard " << i << ": " << row); - assert(row.m_dbrow != 0); - delete row.m_dbrow; - row.m_dbrow = 0; -} - -const Row& -Set::dbrow(unsigned i) const -{ - assert(m_row[i] != 0); - Row& row = *m_row[i]; - return row.dbrow(); -} - -void -Set::dbdiscard(const Lst& lst) -{ - for (unsigned j = 0; j < lst.m_cnt; j++) { - unsigned i = lst.m_arr[j]; - dbdiscard(i); + LL4("post"); + Con& con = par.con(); + assert(con.m_txid != 0); + uint i; + for (i = 0; i < m_rows; i++) { + Row* rowp = m_row[i]; + if (rowp == 0) { + LL5("skip " << i << " " << rowp); + continue; + } + if (rowp->m_st == Row::StCommit) { + assert(rowp->m_op == Row::OpNone); + assert(rowp->m_txid == 0); + assert(rowp->m_bi == 0); + LL5("skip committed " << i << " " << rowp); + continue; + } + assert(rowp->m_st == Row::StDefine || rowp->m_st == Row::StPrepare); + assert(rowp->m_txid != 0); + if (con.m_txid != rowp->m_txid) { + LL5("skip txid " << i << " " << HEX(con.m_txid) << " " << rowp); + continue; + } + // TODO read ops + assert(rowp->m_op & Row::OpDML); + LL4("post BEFORE " << rowp); + if (et == NoCommit) { + if (rowp->m_st == Row::StDefine) { + rowp->m_st = Row::StPrepare; + Row* bi = rowp->m_bi; + while (bi != 0 && bi->m_st == Row::StDefine) { + bi->m_st = Row::StPrepare; + bi = bi->m_bi; + } + } + } else if (et == Commit) { + if (rowp->m_op != Row::OpDel) { + rowp->m_st = Row::StCommit; + rowp->m_op = Row::OpNone; + rowp->m_txid = 0; + delete rowp->m_bi; + rowp->m_bi = 0; + } else { + delete rowp; + rowp = 0; + } + } else if (et == Rollback) { + while (rowp != 0 && rowp->m_st != Row::StCommit) { + Row* tmp = rowp; + rowp = rowp->m_bi; + tmp->m_bi = 0; + delete tmp; + } + } else { + assert(false); + } + m_row[i] = rowp; + LL4("post AFTER " << rowp); } } // operations int -Set::insrow(Par par, unsigned i) +Set::insrow(Par par, uint i) { assert(m_row[i] != 0); Row& row = *m_row[i]; @@ -2796,7 +2902,7 @@ Set::insrow(Par par, unsigned i) } int -Set::updrow(Par par, unsigned i) +Set::updrow(Par par, uint i) { assert(m_row[i] != 0); Row& row = *m_row[i]; @@ -2805,7 +2911,7 @@ Set::updrow(Par par, unsigned i) } int -Set::updrow(Par par, const ITab& itab, unsigned i) +Set::updrow(Par par, const ITab& itab, uint i) { assert(m_row[i] != 0); Row& row = *m_row[i]; @@ -2814,7 +2920,7 @@ Set::updrow(Par par, const ITab& itab, unsigned i) } int -Set::delrow(Par par, unsigned i) +Set::delrow(Par par, uint i) { assert(m_row[i] != 0); Row& row = *m_row[i]; @@ -2823,7 +2929,7 @@ Set::delrow(Par par, unsigned i) } int -Set::delrow(Par par, const ITab& itab, unsigned i) +Set::delrow(Par par, const ITab& itab, uint i) { assert(m_row[i] != 0); Row& row = *m_row[i]; @@ -2836,8 +2942,8 @@ Set::selrow(Par par, const Row& keyrow) { Con& con = par.con(); const Tab& tab = par.tab(); - setkey(par, keyrow); - LL5("selrow " << tab.m_name << ": keyrow: " << keyrow); + LL5("selrow " << tab.m_name << " keyrow " << keyrow); + m_keyrow->copyval(keyrow, tab.m_pkmask); CHK(m_keyrow->selrow(par) == 0); CHK(getval(par) == 0); return 0; @@ -2847,45 +2953,15 @@ int Set::selrow(Par par, const ITab& itab, const Row& keyrow) { Con& con = par.con(); - setkey(par, itab, keyrow); - LL5("selrow " << itab.m_name << ": keyrow: " << keyrow); + LL5("selrow " << itab.m_name << " keyrow " << keyrow); + m_keyrow->copyval(keyrow, itab.m_keymask); CHK(m_keyrow->selrow(par, itab) == 0); CHK(getval(par) == 0); return 0; } -// set and get - -void -Set::setkey(Par par, const Row& keyrow) -{ - const Tab& tab = m_tab; - for (unsigned k = 0; k < tab.m_cols; k++) { - const Col& col = *tab.m_col[k]; - if (col.m_pk) { - Val& val1 = *m_keyrow->m_val[k]; - const Val& val2 = *keyrow.dbrow().m_val[k]; - val1.copy(val2); - } - } -} - -void -Set::setkey(Par par, const ITab& itab, const Row& keyrow) -{ - const Tab& tab = m_tab; - for (unsigned k = 0; k < itab.m_icols; k++) { - const ICol& icol = *itab.m_icol[k]; - const Col& col = icol.m_col; - unsigned m = col.m_num; - Val& val1 = *m_keyrow->m_val[m]; - const Val& val2 = *keyrow.dbrow().m_val[m]; - val1.copy(val2); - } -} - int -Set::setrow(Par par, unsigned i) +Set::setrow(Par par, uint i) { Con& con = par.con(); assert(m_row[i] != 0); @@ -2899,18 +2975,18 @@ Set::getval(Par par) Con& con = par.con(); const Tab& tab = m_tab; Rsq rsq1(tab.m_cols); - for (unsigned k = 0; k < tab.m_cols; k++) { - unsigned k2 = rsq1.next(); + for (uint k = 0; k < tab.m_cols; k++) { + uint k2 = rsq1.next(); CHK(con.getValue(k2, m_rec[k2]) == 0); } return 0; } int -Set::getkey(Par par, unsigned* i) +Set::getkey(Par par, uint* i) { const Tab& tab = m_tab; - unsigned k = tab.m_keycol; + uint k = tab.m_keycol; assert(m_rec[k] != 0); const char* aRef = m_rec[k]->aRef(); Uint32 key = *(const Uint32*)aRef; @@ -2921,14 +2997,18 @@ Set::getkey(Par par, unsigned* i) } int -Set::putval(unsigned i, bool force, unsigned n) +Set::putval(uint i, bool force, uint n) { const Tab& tab = m_tab; - if (m_row[i] == 0) - m_row[i] = new Row(tab); + LL4("putval key=" << i << " row=" << n << " old=" << m_row[i]); + if (m_row[i] != 0) { + assert(force); + delete m_row[i]; + m_row[i] = 0; + } + m_row[i] = new Row(tab); Row& row = *m_row[i]; - CHK(! row.m_exist || force); - for (unsigned k = 0; k < tab.m_cols; k++) { + for (uint k = 0; k < tab.m_cols; k++) { Val& val = *row.m_val[k]; NdbRecAttr* rec = m_rec[k]; assert(rec != 0); @@ -2940,13 +3020,13 @@ Set::putval(unsigned i, bool force, unsigned n) val.copy(aRef); val.m_null = false; } - if (! row.m_exist) - row.m_exist = true; if (n != ~0) m_rowkey[n] = i; return 0; } +// compare + void Set::sort(Par par, const ITab& itab) { @@ -2955,12 +3035,12 @@ Set::sort(Par par, const ITab& itab) } void -Set::sort(Par par, const ITab& itab, unsigned lo, unsigned hi) +Set::sort(Par par, const ITab& itab, uint lo, uint hi) { assert(lo < m_rows && hi < m_rows && lo <= hi); Row* const p = m_row[lo]; - unsigned i = lo; - unsigned j = hi; + uint i = lo; + uint j = hi; while (i < j) { while (i < j && m_row[j]->cmp(par, *p, itab) >= 0) j--; @@ -2982,22 +3062,48 @@ Set::sort(Par par, const ITab& itab, unsigned lo, unsigned hi) sort(par, itab, i + 1, hi); } +/* + * set1 (self) is from dml and can contain un-committed operations. + * set2 is from read and contains no operations. "dirty" applies + * to set1: false = use latest row, true = use committed row. + */ int -Set::verify(Par par, const Set& set2, bool pkonly) const +Set::verify(Par par, const Set& set2, bool pkonly, bool dirty) const { - assert(&m_tab == &set2.m_tab && m_rows == set2.m_rows); - LL4("verify set1 count=" << count() << " vs set2 count=" << set2.count()); - for (unsigned i = 0; i < m_rows; i++) { + const Set& set1 = *this; + assert(&set1.m_tab == &set2.m_tab && set1.m_rows == set2.m_rows); + LL3("verify dirty:" << dirty); + for (uint i = 0; i < set1.m_rows; i++) { + // the row versions we actually compare + const Row* row1p = set1.getrow(i, dirty); + const Row* row2p = set2.getrow(i); bool ok = true; - if (exist(i) != set2.exist(i)) { - ok = false; - } else if (exist(i)) { - if (dbrow(i).verify(par, set2.dbrow(i), pkonly) != 0) + int place = 0; + if (row1p == 0) { + if (row2p != 0) { ok = false; + place = 1; + } + } else { + Row::Op op1 = row1p->m_op; + if (op1 != Row::OpDel) { + if (row2p == 0) { + ok = false; + place = 2; + } else if (row1p->verify(par, *row2p, pkonly) == -1) { + ok = false; + place = 3; + } + } else if (row2p != 0) { + ok = false; + place = 4; + } } - if (! ok) { - LL1("verify failed: key=" << i << " row1=" << m_row[i] << " row2=" << set2.m_row[i]); - CHK(0 == 1); + if (!ok) { + LL1("verify " << i << " failed at " << place); + LL1("row1 " << row1p); + LL1("row2 " << row2p); + CHK(false); } } return 0; @@ -3007,18 +3113,17 @@ int Set::verifyorder(Par par, const ITab& itab, bool descending) const { const Tab& tab = m_tab; - for (unsigned n = 0; n < m_rows; n++) { - unsigned i2 = m_rowkey[n]; + for (uint n = 0; n < m_rows; n++) { + uint i2 = m_rowkey[n]; if (i2 == ~0) break; if (n == 0) continue; - unsigned i1 = m_rowkey[n - 1]; - assert(i1 < m_rows && i2 < m_rows); + uint i1 = m_rowkey[n - 1]; + assert(m_row[i1] != 0 && m_row[i2] != 0); const Row& row1 = *m_row[i1]; const Row& row2 = *m_row[i2]; - assert(row1.m_exist && row2.m_exist); - if (! descending) + if (!descending) CHK(row1.cmp(par, row2, itab) <= 0); else CHK(row1.cmp(par, row2, itab) >= 0); @@ -3026,10 +3131,12 @@ Set::verifyorder(Par par, const ITab& itab, bool descending) const return 0; } +// print + static NdbOut& operator<<(NdbOut& out, const Set& set) { - for (unsigned i = 0; i < set.m_rows; i++) { + for (uint i = 0; i < set.m_rows; i++) { const Row& row = *set.m_row[i]; if (i > 0) out << endl; @@ -3058,8 +3165,8 @@ int BVal::setbnd(Par par) const { Con& con = par.con(); - assert(g_compare_null || ! m_null); - const char* addr = ! m_null ? (const char*)dataaddr() : 0; + assert(g_compare_null || !m_null); + const char* addr = !m_null ? (const char*)dataaddr() : 0; const ICol& icol = m_icol; CHK(con.setBound(icol.m_num, m_type, addr) == 0); return 0; @@ -3068,7 +3175,7 @@ BVal::setbnd(Par par) const int BVal::setflt(Par par) const { - static unsigned index_bound_to_filter_bound[5] = { + static uint index_bound_to_filter_bound[5] = { NdbScanFilter::COND_GE, NdbScanFilter::COND_GT, NdbScanFilter::COND_LE, @@ -3076,12 +3183,12 @@ BVal::setflt(Par par) const NdbScanFilter::COND_EQ }; Con& con = par.con(); - assert(g_compare_null || ! m_null); - const char* addr = ! m_null ? (const char*)dataaddr() : 0; + assert(g_compare_null || !m_null); + const char* addr = !m_null ? (const char*)dataaddr() : 0; const ICol& icol = m_icol; const Col& col = icol.m_col; - unsigned length = col.m_bytesize; - unsigned cond = index_bound_to_filter_bound[m_type]; + uint length = col.m_bytesize; + uint cond = index_bound_to_filter_bound[m_type]; CHK(con.setFilter(col.m_num, cond, addr, length) == 0); return 0; } @@ -3104,27 +3211,27 @@ operator<<(NdbOut& out, const BVal& bval) struct BSet { const Tab& m_tab; const ITab& m_itab; - unsigned m_alloc; - unsigned m_bvals; + uint m_alloc; + uint m_bvals; BVal** m_bval; - BSet(const Tab& tab, const ITab& itab, unsigned rows); + BSet(const Tab& tab, const ITab& itab); ~BSet(); void reset(); void calc(Par par); - void calcpk(Par par, unsigned i); + void calcpk(Par par, uint i); int setbnd(Par par) const; int setflt(Par par) const; void filter(Par par, const Set& set, Set& set2) const; }; -BSet::BSet(const Tab& tab, const ITab& itab, unsigned rows) : +BSet::BSet(const Tab& tab, const ITab& itab) : m_tab(tab), m_itab(itab), m_alloc(2 * itab.m_icols), m_bvals(0) { m_bval = new BVal* [m_alloc]; - for (unsigned i = 0; i < m_alloc; i++) { + for (uint i = 0; i < m_alloc; i++) { m_bval[i] = 0; } } @@ -3138,7 +3245,7 @@ void BSet::reset() { while (m_bvals > 0) { - unsigned i = --m_bvals; + uint i = --m_bvals; delete m_bval[i]; m_bval[i] = 0; } @@ -3150,10 +3257,10 @@ BSet::calc(Par par) const ITab& itab = m_itab; par.m_pctrange = par.m_pctbrange; reset(); - for (unsigned k = 0; k < itab.m_icols; k++) { + for (uint k = 0; k < itab.m_icols; k++) { const ICol& icol = *itab.m_icol[k]; const Col& col = icol.m_col; - for (unsigned i = 0; i <= 1; i++) { + for (uint i = 0; i <= 1; i++) { if (m_bvals == 0 && urandom(100) == 0) return; if (m_bvals != 0 && urandom(3) == 0) @@ -3162,7 +3269,7 @@ BSet::calc(Par par) BVal& bval = *new BVal(icol); m_bval[m_bvals++] = &bval; bval.m_null = false; - unsigned sel; + uint sel; do { // equality bound only on i==0 sel = urandom(5 - i); @@ -3175,7 +3282,7 @@ BSet::calc(Par par) bval.m_type = 4; if (k + 1 < itab.m_icols) bval.m_type = 4; - if (! g_compare_null) + if (!g_compare_null) par.m_pctnull = 0; if (bval.m_type == 0 || bval.m_type == 1) par.m_bdir = -1; @@ -3199,11 +3306,11 @@ BSet::calc(Par par) } void -BSet::calcpk(Par par, unsigned i) +BSet::calcpk(Par par, uint i) { const ITab& itab = m_itab; reset(); - for (unsigned k = 0; k < itab.m_icols; k++) { + for (uint k = 0; k < itab.m_icols; k++) { const ICol& icol = *itab.m_icol[k]; const Col& col = icol.m_col; assert(col.m_pk); @@ -3220,14 +3327,14 @@ BSet::setbnd(Par par) const { if (m_bvals != 0) { Rsq rsq1(m_bvals); - for (unsigned j = 0; j < m_bvals; j++) { - unsigned j2 = rsq1.next(); + for (uint j = 0; j < m_bvals; j++) { + uint j2 = rsq1.next(); const BVal& bval = *m_bval[j2]; CHK(bval.setbnd(par) == 0); } // duplicate if (urandom(5) == 0) { - unsigned j3 = urandom(m_bvals); + uint j3 = urandom(m_bvals); const BVal& bval = *m_bval[j3]; CHK(bval.setbnd(par) == 0); } @@ -3243,14 +3350,14 @@ BSet::setflt(Par par) const CHK(con.beginFilter(NdbScanFilter::AND) == 0); if (m_bvals != 0) { Rsq rsq1(m_bvals); - for (unsigned j = 0; j < m_bvals; j++) { - unsigned j2 = rsq1.next(); + for (uint j = 0; j < m_bvals; j++) { + uint j2 = rsq1.next(); const BVal& bval = *m_bval[j2]; CHK(bval.setflt(par) == 0); } // duplicate if (urandom(5) == 0) { - unsigned j3 = urandom(m_bvals); + uint j3 = urandom(m_bvals); const BVal& bval = *m_bval[j3]; CHK(bval.setflt(par) == 0); } @@ -3266,57 +3373,59 @@ BSet::filter(Par par, const Set& set, Set& set2) const const ITab& itab = m_itab; assert(&tab == &set2.m_tab && set.m_rows == set2.m_rows); assert(set2.count() == 0); - for (unsigned i = 0; i < set.m_rows; i++) { - if (! set.exist(i)) - continue; + for (uint i = 0; i < set.m_rows; i++) { set.lock(); - const Row& row = set.dbrow(i); - set.unlock(); - if (! g_store_null_key) { - bool ok1 = false; - for (unsigned k = 0; k < itab.m_icols; k++) { - const ICol& icol = *itab.m_icol[k]; + do { + if (set.m_row[i] == 0) { + break; + } + const Row& row = *set.m_row[i]; + if (!g_store_null_key) { + bool ok1 = false; + for (uint k = 0; k < itab.m_icols; k++) { + const ICol& icol = *itab.m_icol[k]; + const Col& col = icol.m_col; + const Val& val = *row.m_val[col.m_num]; + if (!val.m_null) { + ok1 = true; + break; + } + } + if (!ok1) + break; + } + bool ok2 = true; + for (uint j = 0; j < m_bvals; j++) { + const BVal& bval = *m_bval[j]; + const ICol& icol = bval.m_icol; const Col& col = icol.m_col; const Val& val = *row.m_val[col.m_num]; - if (! val.m_null) { - ok1 = true; - break; + int ret = bval.cmp(par, val); + LL5("cmp: ret=" << ret << " " << bval << " vs " << val); + if (bval.m_type == 0) + ok2 = (ret <= 0); + else if (bval.m_type == 1) + ok2 = (ret < 0); + else if (bval.m_type == 2) + ok2 = (ret >= 0); + else if (bval.m_type == 3) + ok2 = (ret > 0); + else if (bval.m_type == 4) + ok2 = (ret == 0); + else { + assert(false); } + if (!ok2) + break; } - if (! ok1) - continue; - } - bool ok2 = true; - for (unsigned j = 0; j < m_bvals; j++) { - const BVal& bval = *m_bval[j]; - const ICol& icol = bval.m_icol; - const Col& col = icol.m_col; - const Val& val = *row.m_val[col.m_num]; - int ret = bval.cmp(par, val); - LL5("cmp: ret=" << ret << " " << bval << " vs " << val); - if (bval.m_type == 0) - ok2 = (ret <= 0); - else if (bval.m_type == 1) - ok2 = (ret < 0); - else if (bval.m_type == 2) - ok2 = (ret >= 0); - else if (bval.m_type == 3) - ok2 = (ret > 0); - else if (bval.m_type == 4) - ok2 = (ret == 0); - else { - assert(false); - } - if (! ok2) + if (!ok2) break; - } - if (! ok2) - continue; - if (set2.m_row[i] == 0) + assert(set2.m_row[i] == 0); set2.m_row[i] = new Row(tab); - Row& row2 = *set2.m_row[i]; - assert(! row2.m_exist); - row2.copy(row); + Row& row2 = *set2.m_row[i]; + row2.copy(row, true); + } while (0); + set.unlock(); } } @@ -3324,7 +3433,7 @@ static NdbOut& operator<<(NdbOut& out, const BSet& bset) { out << "bounds=" << bset.m_bvals; - for (unsigned j = 0; j < bset.m_bvals; j++) { + for (uint j = 0; j < bset.m_bvals; j++) { const BVal& bval = *bset.m_bval[j]; out << " [bound " << j << ": " << bval << "]"; } @@ -3341,60 +3450,41 @@ pkinsert(Par par) Set& set = par.set(); LL3("pkinsert " << tab.m_name); CHK(con.startTransaction() == 0); - Lst lst; - for (unsigned j = 0; j < par.m_rows; j++) { - unsigned j2 = ! par.m_randomkey ? j : urandom(par.m_rows); - unsigned i = thrrow(par, j2); + uint batch = 0; + for (uint j = 0; j < par.m_rows; j++) { + uint j2 = !par.m_randomkey ? j : urandom(par.m_rows); + uint i = thrrow(par, j2); set.lock(); - if (set.exist(i) || set.pending(i, Row::AnyOp)) { + if (!set.compat(par, i, Row::OpIns)) { + LL3("pkinsert SKIP " << i << " " << set.getrow(i)); set.unlock(); - continue; + } else { + set.push(i); + set.calc(par, i); + CHK(set.insrow(par, i) == 0); + set.unlock(); + LL4("pkinsert key=" << i << " " << set.getrow(i)); + batch++; } - set.calc(par, i); - CHK(set.insrow(par, i) == 0); - set.unlock(); - LL4("pkinsert " << i << ": " << *set.m_row[i]); - lst.push(i); - if (lst.cnt() == par.m_batch) { - bool deadlock = par.m_deadlock; - bool nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - con.closeTransaction(); - if (deadlock) { - LL1("pkinsert: stop on deadlock [at 1]"); - return 0; - } - if (nospace) { - LL1("pkinsert: cnt=" << j << " stop on nospace"); - return 0; - } + bool lastbatch = (batch != 0 && j + 1 == par.m_rows); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = !randompct(par.m_abortpct) ? Commit : Rollback; + CHK(con.execute(et, err) == 0); set.lock(); - set.notpending(lst, et); + set.post(par, !err ? et : Rollback); set.unlock(); - lst.reset(); - CHK(con.startTransaction() == 0); + if (err) { + LL1("pkinsert key=" << i << " stop on " << con.errname(err)); + break; + } + batch = 0; + if (!lastbatch) { + con.closeTransaction(); + CHK(con.startTransaction() == 0); + } } } - if (lst.cnt() != 0) { - bool deadlock = par.m_deadlock; - bool nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - con.closeTransaction(); - if (deadlock) { - LL1("pkinsert: stop on deadlock [at 2]"); - return 0; - } - if (nospace) { - LL1("pkinsert: end: stop on nospace"); - return 0; - } - set.lock(); - set.notpending(lst, et); - set.unlock(); - return 0; - } con.closeTransaction(); return 0; } @@ -3407,59 +3497,40 @@ pkupdate(Par par) Set& set = par.set(); LL3("pkupdate " << tab.m_name); CHK(con.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; - for (unsigned j = 0; j < par.m_rows; j++) { - unsigned j2 = ! par.m_randomkey ? j : urandom(par.m_rows); - unsigned i = thrrow(par, j2); + uint batch = 0; + for (uint j = 0; j < par.m_rows; j++) { + uint j2 = !par.m_randomkey ? j : urandom(par.m_rows); + uint i = thrrow(par, j2); set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { + if (!set.compat(par, i, Row::OpUpd)) { + LL3("pkupdate SKIP " << i << " " << set.getrow(i)); set.unlock(); - continue; - } - set.dbsave(i); - set.calc(par, i); - CHK(set.updrow(par, i) == 0); - set.unlock(); - LL4("pkupdate " << i << ": " << *set.m_row[i]); - lst.push(i); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - if (deadlock) { - LL1("pkupdate: stop on deadlock [at 1]"); - break; - } - if (nospace) { - LL1("pkupdate: cnt=" << j << " stop on nospace [at 1]"); - break; - } - con.closeTransaction(); - set.lock(); - set.notpending(lst, et); - set.dbdiscard(lst); - set.unlock(); - lst.reset(); - CHK(con.startTransaction() == 0); - } - } - if (! deadlock && ! nospace && lst.cnt() != 0) { - deadlock = par.m_deadlock; - nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - if (deadlock) { - LL1("pkupdate: stop on deadlock [at 2]"); - } else if (nospace) { - LL1("pkupdate: end: stop on nospace [at 2]"); } else { - set.lock(); - set.notpending(lst, et); - set.dbdiscard(lst); + set.push(i); + set.copyval(i, tab.m_pkmask); + set.calc(par, i, ~tab.m_pkmask); + CHK(set.updrow(par, i) == 0); set.unlock(); + LL4("pkupdate key=" << i << " " << set.getrow(i)); + batch++; + } + bool lastbatch = (batch != 0 && j + 1 == par.m_rows); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = !randompct(par.m_abortpct) ? Commit : Rollback; + CHK(con.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("pkupdate key=" << i << ": stop on " << con.errname(err)); + break; + } + batch = 0; + if (!lastbatch) { + con.closeTransaction(); + CHK(con.startTransaction() == 0); + } } } con.closeTransaction(); @@ -3474,49 +3545,39 @@ pkdelete(Par par) Set& set = par.set(); LL3("pkdelete " << tab.m_name); CHK(con.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; - for (unsigned j = 0; j < par.m_rows; j++) { - unsigned j2 = ! par.m_randomkey ? j : urandom(par.m_rows); - unsigned i = thrrow(par, j2); + uint batch = 0; + for (uint j = 0; j < par.m_rows; j++) { + uint j2 = !par.m_randomkey ? j : urandom(par.m_rows); + uint i = thrrow(par, j2); set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { + if (!set.compat(par, i, Row::OpDel)) { + LL3("pkdelete SKIP " << i << " " << set.getrow(i)); set.unlock(); - continue; + } else { + set.push(i); + set.copyval(i, tab.m_pkmask); + CHK(set.delrow(par, i) == 0); + set.unlock(); + LL4("pkdelete key=" << i << " " << set.getrow(i)); + batch++; } - CHK(set.delrow(par, i) == 0); - set.unlock(); - LL4("pkdelete " << i << ": " << *set.m_row[i]); - lst.push(i); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - if (deadlock) { - LL1("pkdelete: stop on deadlock [at 1]"); + bool lastbatch = (batch != 0 && j + 1 == par.m_rows); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = !randompct(par.m_abortpct) ? Commit : Rollback; + CHK(con.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("pkdelete key=" << i << " stop on " << con.errname(err)); break; } - con.closeTransaction(); - set.lock(); - set.notpending(lst, et); - set.unlock(); - lst.reset(); - CHK(con.startTransaction() == 0); - } - } - if (! deadlock && ! nospace && lst.cnt() != 0) { - deadlock = par.m_deadlock; - nospace = true; - ExecType et = randompct(par.m_abortpct) ? Rollback : Commit; - CHK(con.execute(et, deadlock, nospace) == 0); - if (deadlock) { - LL1("pkdelete: stop on deadlock [at 2]"); - } else { - set.lock(); - set.notpending(lst, et); - set.unlock(); + batch = 0; + if (!lastbatch) { + con.closeTransaction(); + CHK(con.startTransaction() == 0); + } } } con.closeTransaction(); @@ -3533,9 +3594,11 @@ pkread(Par par) // expected const Set& set1 = set; Set set2(tab, set.m_rows); - for (unsigned i = 0; i < set.m_rows; i++) { + for (uint i = 0; i < set.m_rows; i++) { set.lock(); - if (! set.exist(i)) { + // TODO lock mode + if (!set.compat(par, i, Row::OpREAD)) { + LL3("pkread SKIP " << i << " " << set.getrow(i)); set.unlock(); continue; } @@ -3543,10 +3606,10 @@ pkread(Par par) CHK(con.startTransaction() == 0); CHK(set2.selrow(par, *set1.m_row[i]) == 0); CHK(con.execute(Commit) == 0); - unsigned i2 = (unsigned)-1; + uint i2 = (uint)-1; CHK(set2.getkey(par, &i2) == 0 && i == i2); CHK(set2.putval(i, false) == 0); - LL4("row " << set2.count() << ": " << *set2.m_row[i]); + LL4("row " << set2.count() << " " << set2.getrow(i)); con.closeTransaction(); } if (par.m_verify) @@ -3555,7 +3618,7 @@ pkread(Par par) } static int -pkreadfast(Par par, unsigned count) +pkreadfast(Par par, uint count) { Con& con = par.con(); const Tab& tab = par.tab(); @@ -3563,9 +3626,9 @@ pkreadfast(Par par, unsigned count) LL3("pkfast " << tab.m_name); Row keyrow(tab); // not batched on purpose - for (unsigned j = 0; j < count; j++) { - unsigned i = urandom(set.m_rows); - assert(set.exist(i)); + for (uint j = 0; j < count; j++) { + uint i = urandom(set.m_rows); + assert(set.compat(par, i, Row::OpREAD)); CHK(con.startTransaction() == 0); // define key keyrow.calc(par, i); @@ -3585,53 +3648,46 @@ static int hashindexupdate(Par par, const ITab& itab) { Con& con = par.con(); + const Tab& tab = par.tab(); Set& set = par.set(); LL3("hashindexupdate " << itab.m_name); CHK(con.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; - for (unsigned j = 0; j < par.m_rows; j++) { - unsigned j2 = ! par.m_randomkey ? j : urandom(par.m_rows); - unsigned i = thrrow(par, j2); + uint batch = 0; + for (uint j = 0; j < par.m_rows; j++) { + uint j2 = !par.m_randomkey ? j : urandom(par.m_rows); + uint i = thrrow(par, j2); set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { + if (!set.compat(par, i, Row::OpUpd)) { + LL3("hashindexupdate SKIP " << i << " " << set.getrow(i)); set.unlock(); - continue; + } else { + // table pk and index key are not updated + set.push(i); + uint keymask = tab.m_pkmask | itab.m_keymask; + set.copyval(i, keymask); + set.calc(par, i, ~keymask); + CHK(set.updrow(par, itab, i) == 0); + set.unlock(); + LL4("hashindexupdate " << i << " " << set.getrow(i)); + batch++; } - set.dbsave(i); - // index key columns are not re-calculated - set.calc(par, i, itab.m_colmask); - CHK(set.updrow(par, itab, i) == 0); - set.unlock(); - LL4("hashindexupdate " << i << ": " << *set.m_row[i]); - lst.push(i); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - CHK(con.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("hashindexupdate: stop on deadlock [at 1]"); + bool lastbatch = (batch != 0 && j + 1 == par.m_rows); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = !randompct(par.m_abortpct) ? Commit : Rollback; + CHK(con.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("hashindexupdate " << i << " stop on " << con.errname(err)); break; } - con.closeTransaction(); - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); - lst.reset(); - CHK(con.startTransaction() == 0); - } - } - if (! deadlock && lst.cnt() != 0) { - deadlock = par.m_deadlock; - CHK(con.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("hashindexupdate: stop on deadlock [at 2]"); - } else { - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); + batch = 0; + if (!lastbatch) { + con.closeTransaction(); + CHK(con.startTransaction() == 0); + } } } con.closeTransaction(); @@ -3645,45 +3701,39 @@ hashindexdelete(Par par, const ITab& itab) Set& set = par.set(); LL3("hashindexdelete " << itab.m_name); CHK(con.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; - for (unsigned j = 0; j < par.m_rows; j++) { - unsigned j2 = ! par.m_randomkey ? j : urandom(par.m_rows); - unsigned i = thrrow(par, j2); + uint batch = 0; + for (uint j = 0; j < par.m_rows; j++) { + uint j2 = !par.m_randomkey ? j : urandom(par.m_rows); + uint i = thrrow(par, j2); set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { + if (!set.compat(par, i, Row::OpDel)) { + LL3("hashindexdelete SKIP " << i << " " << set.getrow(i)); set.unlock(); - continue; + } else { + set.push(i); + set.copyval(i, itab.m_keymask); + CHK(set.delrow(par, itab, i) == 0); + set.unlock(); + LL4("hashindexdelete " << i << " " << set.getrow(i)); + batch++; } - CHK(set.delrow(par, itab, i) == 0); - set.unlock(); - LL4("hashindexdelete " << i << ": " << *set.m_row[i]); - lst.push(i); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - CHK(con.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("hashindexdelete: stop on deadlock [at 1]"); + bool lastbatch = (batch != 0 && j + 1 == par.m_rows); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = !randompct(par.m_abortpct) ? Commit : Rollback; + CHK(con.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("hashindexdelete " << i << " stop on " << con.errname(err)); break; } - con.closeTransaction(); - set.lock(); - set.notpending(lst); - set.unlock(); - lst.reset(); - CHK(con.startTransaction() == 0); - } - } - if (! deadlock && lst.cnt() != 0) { - deadlock = par.m_deadlock; - CHK(con.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("hashindexdelete: stop on deadlock [at 2]"); - } else { - set.lock(); - set.notpending(lst); - set.unlock(); + batch = 0; + if (!lastbatch) { + con.closeTransaction(); + CHK(con.startTransaction() == 0); + } } } con.closeTransaction(); @@ -3700,9 +3750,11 @@ hashindexread(Par par, const ITab& itab) // expected const Set& set1 = set; Set set2(tab, set.m_rows); - for (unsigned i = 0; i < set.m_rows; i++) { + for (uint i = 0; i < set.m_rows; i++) { set.lock(); - if (! set.exist(i)) { + // TODO lock mode + if (!set.compat(par, i, Row::OpREAD)) { + LL3("hashindexread SKIP " << i << " " << set.getrow(i)); set.unlock(); continue; } @@ -3710,10 +3762,10 @@ hashindexread(Par par, const ITab& itab) CHK(con.startTransaction() == 0); CHK(set2.selrow(par, itab, *set1.m_row[i]) == 0); CHK(con.execute(Commit) == 0); - unsigned i2 = (unsigned)-1; + uint i2 = (uint)-1; CHK(set2.getkey(par, &i2) == 0 && i == i2); CHK(set2.putval(i, false) == 0); - LL4("row " << set2.count() << ": " << *set2.m_row[i]); + LL4("row " << set2.count() << " " << *set2.m_row[i]); con.closeTransaction(); } if (par.m_verify) @@ -3731,40 +3783,39 @@ scanreadtable(Par par) const Set& set = par.set(); // expected const Set& set1 = set; - LL3("scanread " << tab.m_name << " lockmode=" << par.m_lockmode << " tupscan=" << par.m_tupscan << " expect=" << set1.count() << " verify=" << par.m_verify); + LL3("scanreadtable " << tab.m_name << " lockmode=" << par.m_lockmode << " tupscan=" << par.m_tupscan << " expect=" << set1.count() << " verify=" << par.m_verify); Set set2(tab, set.m_rows); CHK(con.startTransaction() == 0); CHK(con.getNdbScanOperation(tab) == 0); CHK(con.readTuples(par) == 0); set2.getval(par); CHK(con.executeScan() == 0); - unsigned n = 0; - bool deadlock = false; + uint n = 0; while (1) { int ret; - deadlock = par.m_deadlock; - CHK((ret = con.nextScanResult(true, deadlock)) == 0 || ret == 1); + uint err = par.m_catcherr; + CHK((ret = con.nextScanResult(true, err)) == 0 || ret == 1); if (ret == 1) break; - if (deadlock) { - LL1("scanreadtable: stop on deadlock"); + if (err) { + LL1("scanreadtable stop on " << con.errname(err)); break; } - unsigned i = (unsigned)-1; + uint i = (uint)-1; CHK(set2.getkey(par, &i) == 0); CHK(set2.putval(i, false, n) == 0); - LL4("row " << n << ": " << *set2.m_row[i]); + LL4("row " << n << " " << *set2.m_row[i]); n++; } con.closeTransaction(); if (par.m_verify) CHK(set1.verify(par, set2, false) == 0); - LL3("scanread " << tab.m_name << " done rows=" << n); + LL3("scanreadtable " << tab.m_name << " done rows=" << n); return 0; } static int -scanreadtablefast(Par par, unsigned countcheck) +scanreadtablefast(Par par, uint countcheck) { Con& con = par.con(); const Tab& tab = par.tab(); @@ -3777,7 +3828,7 @@ scanreadtablefast(Par par, unsigned countcheck) NdbRecAttr* rec; CHK(con.getValue((Uint32)0, rec) == 0); CHK(con.executeScan() == 0); - unsigned count = 0; + uint count = 0; while (1) { int ret; CHK((ret = con.nextScanResult(true)) == 0 || ret == 1); @@ -3797,7 +3848,7 @@ calcscanbounds(Par par, const ITab& itab, BSet& bset, const Set& set, Set& set1) while (true) { bset.calc(par); bset.filter(par, set, set1); - unsigned n = set1.count(); + uint n = set1.count(); // prefer proper subset if (0 < n && n < set.m_rows) break; @@ -3819,7 +3870,7 @@ scanreadindex(Par par, const ITab& itab, BSet& bset, bool calc) } else { bset.filter(par, set, set1); } - LL3("scanread " << itab.m_name << " " << bset << " lockmode=" << par.m_lockmode << " expect=" << set1.count() << " ordered=" << par.m_ordered << " descending=" << par.m_descending << " verify=" << par.m_verify); + LL3("scanreadindex " << itab.m_name << " " << bset << " lockmode=" << par.m_lockmode << " expect=" << set1.count() << " ordered=" << par.m_ordered << " descending=" << par.m_descending << " verify=" << par.m_verify); Set set2(tab, set.m_rows); CHK(con.startTransaction() == 0); CHK(con.getNdbIndexScanOperation(itab, tab) == 0); @@ -3827,22 +3878,21 @@ scanreadindex(Par par, const ITab& itab, BSet& bset, bool calc) CHK(bset.setbnd(par) == 0); set2.getval(par); CHK(con.executeScan() == 0); - unsigned n = 0; - bool deadlock = false; + uint n = 0; while (1) { int ret; - deadlock = par.m_deadlock; - CHK((ret = con.nextScanResult(true, deadlock)) == 0 || ret == 1); + uint err = par.m_catcherr; + CHK((ret = con.nextScanResult(true, err)) == 0 || ret == 1); if (ret == 1) break; - if (deadlock) { - LL1("scanreadindex: stop on deadlock"); + if (err) { + LL1("scanreadindex stop on " << con.errname(err)); break; } - unsigned i = (unsigned)-1; + uint i = (uint)-1; CHK(set2.getkey(par, &i) == 0); CHK(set2.putval(i, par.m_dups, n) == 0); - LL4("key " << i << " row " << n << ": " << *set2.m_row[i]); + LL4("key " << i << " row " << n << " " << *set2.m_row[i]); n++; } con.closeTransaction(); @@ -3851,12 +3901,12 @@ scanreadindex(Par par, const ITab& itab, BSet& bset, bool calc) if (par.m_ordered) CHK(set2.verifyorder(par, itab, par.m_descending) == 0); } - LL3("scanread " << itab.m_name << " done rows=" << n); + LL3("scanreadindex " << itab.m_name << " done rows=" << n); return 0; } static int -scanreadindexfast(Par par, const ITab& itab, const BSet& bset, unsigned countcheck) +scanreadindexfast(Par par, const ITab& itab, const BSet& bset, uint countcheck) { Con& con = par.con(); const Tab& tab = par.tab(); @@ -3871,7 +3921,7 @@ scanreadindexfast(Par par, const ITab& itab, const BSet& bset, unsigned countche NdbRecAttr* rec; CHK(con.getValue((Uint32)0, rec) == 0); CHK(con.executeScan() == 0); - unsigned count = 0; + uint count = 0; while (1) { int ret; CHK((ret = con.nextScanResult(true)) == 0 || ret == 1); @@ -3904,22 +3954,21 @@ scanreadfilter(Par par, const ITab& itab, BSet& bset, bool calc) CHK(bset.setflt(par) == 0); set2.getval(par); CHK(con.executeScan() == 0); - unsigned n = 0; - bool deadlock = false; + uint n = 0; while (1) { int ret; - deadlock = par.m_deadlock; - CHK((ret = con.nextScanResult(true, deadlock)) == 0 || ret == 1); + uint err = par.m_catcherr; + CHK((ret = con.nextScanResult(true, err)) == 0 || ret == 1); if (ret == 1) break; - if (deadlock) { - LL1("scanfilter: stop on deadlock"); + if (err) { + LL1("scanfilter stop on " << con.errname(err)); break; } - unsigned i = (unsigned)-1; + uint i = (uint)-1; CHK(set2.getkey(par, &i) == 0); CHK(set2.putval(i, par.m_dups, n) == 0); - LL4("key " << i << " row " << n << ": " << *set2.m_row[i]); + LL4("key " << i << " row " << n << " " << *set2.m_row[i]); n++; } con.closeTransaction(); @@ -3934,9 +3983,9 @@ static int scanreadindex(Par par, const ITab& itab) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < par.m_subloop; i++) { + for (uint i = 0; i < par.m_ssloop; i++) { if (itab.m_type == ITab::OrderedIndex) { - BSet bset(tab, itab, par.m_rows); + BSet bset(tab, itab); CHK(scanreadfilter(par, itab, bset, true) == 0); CHK(scanreadindex(par, itab, bset, true) == 0); } @@ -3948,7 +3997,7 @@ static int scanreadindex(Par par) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -3985,7 +4034,7 @@ timescanpkindex(Par par) { const Tab& tab = par.tab(); const ITab& itab = *tab.m_itab[0]; // 1st index is on PK - BSet bset(tab, itab, par.m_rows); + BSet bset(tab, itab); par.tmr().on(); CHK(scanreadindexfast(par, itab, bset, par.m_totrows) == 0); par.tmr().off(par.set().m_rows); @@ -3996,7 +4045,7 @@ static int timepkreadtable(Par par) { par.tmr().on(); - unsigned count = par.m_samples; + uint count = par.m_samples; if (count == 0) count = par.m_totrows; CHK(pkreadfast(par, count) == 0); @@ -4009,13 +4058,13 @@ timepkreadindex(Par par) { const Tab& tab = par.tab(); const ITab& itab = *tab.m_itab[0]; // 1st index is on PK - BSet bset(tab, itab, par.m_rows); - unsigned count = par.m_samples; + BSet bset(tab, itab); + uint count = par.m_samples; if (count == 0) count = par.m_totrows; par.tmr().on(); - for (unsigned j = 0; j < count; j++) { - unsigned i = urandom(par.m_totrows); + for (uint j = 0; j < count; j++) { + uint i = urandom(par.m_totrows); bset.calcpk(par, i); CHK(scanreadindexfast(par, itab, bset, 1) == 0); } @@ -4031,7 +4080,7 @@ scanupdatetable(Par par) Con& con = par.con(); const Tab& tab = par.tab(); Set& set = par.set(); - LL3("scan update " << tab.m_name); + LL3("scanupdatetable " << tab.m_name); Set set2(tab, set.m_rows); par.m_lockmode = NdbOperation::LM_Exclusive; CHK(con.startTransaction() == 0); @@ -4039,87 +4088,70 @@ scanupdatetable(Par par) CHK(con.readTuples(par) == 0); set2.getval(par); CHK(con.executeScan() == 0); - unsigned count = 0; + uint count = 0; // updating trans Con con2; con2.connect(con); CHK(con2.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; + uint batch = 0; while (1) { int ret; - deadlock = par.m_deadlock; - CHK((ret = con.nextScanResult(true, deadlock)) == 0 || ret == 1); - if (ret == 1) + uint32 err = par.m_catcherr; + CHK((ret = con.nextScanResult(true, err)) != -1); + if (ret != 0) break; - if (deadlock) { - LL1("scanupdatetable: stop on deadlock [at 1]"); + if (err) { + LL1("scanupdatetable [scan] stop on " << con.errname(err)); break; } if (par.m_scanstop != 0 && urandom(par.m_scanstop) == 0) { con.closeScan(); break; } - do { - unsigned i = (unsigned)-1; + while (1) { + uint i = (uint)-1; CHK(set2.getkey(par, &i) == 0); - const Row& row = *set.m_row[i]; set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { - LL4("scan update " << tab.m_name << ": skip: " << row); + if (!set.compat(par, i, Row::OpUpd)) { + LL3("scanupdatetable SKIP " << i << " " << set.getrow(i)); } else { CHKTRY(set2.putval(i, false) == 0, set.unlock()); CHKTRY(con.updateScanTuple(con2) == 0, set.unlock()); Par par2 = par; par2.m_con = &con2; - set.dbsave(i); - set.calc(par, i); + set.push(i); + set.calc(par, i, ~tab.m_pkmask); CHKTRY(set.setrow(par2, i) == 0, set.unlock()); - LL4("scan update " << tab.m_name << ": " << row); - lst.push(i); + LL4("scanupdatetable " << i << " " << set.getrow(i)); + batch++; } set.unlock(); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - CHK(con2.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("scanupdatetable: stop on deadlock [at 2]"); + CHK((ret = con.nextScanResult(false)) != -1); + bool lastbatch = (batch != 0 && ret != 0); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = Commit; + CHK(con2.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("scanupdatetable [update] stop on " << con2.errname(err)); goto out; } + LL4("scanupdatetable committed batch"); + count += batch; + batch = 0; con2.closeTransaction(); - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); - count += lst.cnt(); - lst.reset(); CHK(con2.startTransaction() == 0); } - CHK((ret = con.nextScanResult(false)) == 0 || ret == 1 || ret == 2); - if (ret == 2 && lst.cnt() != 0) { - deadlock = par.m_deadlock; - CHK(con2.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("scanupdatetable: stop on deadlock [at 3]"); - goto out; - } - con2.closeTransaction(); - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); - count += lst.cnt(); - lst.reset(); - CHK(con2.startTransaction() == 0); - } - } while (ret == 0); - if (ret == 1) - break; + if (ret != 0) + break; + } } out: con2.closeTransaction(); - LL3("scan update " << tab.m_name << " rows updated=" << count); + LL3("scanupdatetable " << tab.m_name << " rows updated=" << count); con.closeTransaction(); return 0; } @@ -4137,7 +4169,7 @@ scanupdateindex(Par par, const ITab& itab, BSet& bset, bool calc) } else { bset.filter(par, set, set1); } - LL3("scan update " << itab.m_name << " " << bset << " expect=" << set1.count() << " ordered=" << par.m_ordered << " descending=" << par.m_descending << " verify=" << par.m_verify); + LL3("scanupdateindex " << itab.m_name << " " << bset << " expect=" << set1.count() << " ordered=" << par.m_ordered << " descending=" << par.m_descending << " verify=" << par.m_verify); Set set2(tab, set.m_rows); par.m_lockmode = NdbOperation::LM_Exclusive; CHK(con.startTransaction() == 0); @@ -4146,83 +4178,67 @@ scanupdateindex(Par par, const ITab& itab, BSet& bset, bool calc) CHK(bset.setbnd(par) == 0); set2.getval(par); CHK(con.executeScan() == 0); - unsigned count = 0; + uint count = 0; // updating trans Con con2; con2.connect(con); CHK(con2.startTransaction() == 0); - Lst lst; - bool deadlock = false; - bool nospace = false; + uint batch = 0; while (1) { int ret; - deadlock = par.m_deadlock; - CHK((ret = con.nextScanResult(true, deadlock)) == 0 || ret == 1); - if (ret == 1) + uint err = par.m_catcherr; + CHK((ret = con.nextScanResult(true, err)) != -1); + if (ret != 0) break; - if (deadlock) { - LL1("scanupdateindex: stop on deadlock [at 1]"); + if (err) { + LL1("scanupdateindex [scan] stop on " << con.errname(err)); break; } if (par.m_scanstop != 0 && urandom(par.m_scanstop) == 0) { con.closeScan(); break; } - do { - unsigned i = (unsigned)-1; + while (1) { + uint i = (uint)-1; CHK(set2.getkey(par, &i) == 0); - const Row& row = *set.m_row[i]; set.lock(); - if (! set.exist(i) || set.pending(i, Row::AnyOp)) { - LL4("scan update " << itab.m_name << ": skip: " << row); + if (!set.compat(par, i, Row::OpUpd)) { + LL4("scanupdateindex SKIP " << set.getrow(i)); } else { CHKTRY(set2.putval(i, par.m_dups) == 0, set.unlock()); CHKTRY(con.updateScanTuple(con2) == 0, set.unlock()); Par par2 = par; par2.m_con = &con2; - set.dbsave(i); - set.calc(par, i, ! par.m_noindexkeyupdate ? 0 : itab.m_colmask); + set.push(i); + uint colmask = !par.m_noindexkeyupdate ? ~0 : ~itab.m_keymask; + set.calc(par, i, colmask); CHKTRY(set.setrow(par2, i) == 0, set.unlock()); - LL4("scan update " << itab.m_name << ": " << row); - lst.push(i); + LL4("scanupdateindex " << i << " " << set.getrow(i)); + batch++; } set.unlock(); - if (lst.cnt() == par.m_batch) { - deadlock = par.m_deadlock; - CHK(con2.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("scanupdateindex: stop on deadlock [at 2]"); + CHK((ret = con.nextScanResult(false)) != -1); + bool lastbatch = (batch != 0 && ret != 0); + if (batch == par.m_batch || lastbatch) { + uint err = par.m_catcherr; + ExecType et = Commit; + CHK(con2.execute(et, err) == 0); + set.lock(); + set.post(par, !err ? et : Rollback); + set.unlock(); + if (err) { + LL1("scanupdateindex [update] stop on " << con2.errname(err)); goto out; } + LL4("scanupdateindex committed batch"); + count += batch; + batch = 0; con2.closeTransaction(); - LL4("scanupdateindex: committed batch [at 1]"); - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); - count += lst.cnt(); - lst.reset(); CHK(con2.startTransaction() == 0); } - CHK((ret = con.nextScanResult(false)) == 0 || ret == 1 || ret == 2); - if (ret == 2 && lst.cnt() != 0) { - deadlock = par.m_deadlock; - CHK(con2.execute(Commit, deadlock, nospace) == 0); - if (deadlock) { - LL1("scanupdateindex: stop on deadlock [at 3]"); - goto out; - } - con2.closeTransaction(); - LL4("scanupdateindex: committed batch [at 2]"); - set.lock(); - set.notpending(lst); - set.dbdiscard(lst); - set.unlock(); - count += lst.cnt(); - lst.reset(); - CHK(con2.startTransaction() == 0); - } - } while (ret == 0); + if (ret != 0) + break; + } } out: con2.closeTransaction(); @@ -4231,7 +4247,7 @@ out: if (par.m_ordered) CHK(set2.verifyorder(par, itab, par.m_descending) == 0); } - LL3("scan update " << itab.m_name << " rows updated=" << count); + LL3("scanupdateindex " << itab.m_name << " rows updated=" << count); con.closeTransaction(); return 0; } @@ -4240,9 +4256,9 @@ static int scanupdateindex(Par par, const ITab& itab) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < par.m_subloop; i++) { + for (uint i = 0; i < par.m_ssloop; i++) { if (itab.m_type == ITab::OrderedIndex) { - BSet bset(tab, itab, par.m_rows); + BSet bset(tab, itab); CHK(scanupdateindex(par, itab, bset, true) == 0); } else { CHK(hashindexupdate(par, itab) == 0); @@ -4255,7 +4271,7 @@ static int scanupdateindex(Par par) { const Tab& tab = par.tab(); - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -4294,14 +4310,14 @@ readverifyfull(Par par) CHK(scanreadtable(par) == 0); } // each thread scans different indexes - for (unsigned i = 0; i < tab.m_itabs; i++) { - if (i % par.m_threads != par.m_no) + for (uint i = 0; i < tab.m_itabs; i++) { + if (i % par.m_usedthreads != par.m_no) continue; if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; if (itab.m_type == ITab::OrderedIndex) { - BSet bset(tab, itab, par.m_rows); + BSet bset(tab, itab); CHK(scanreadindex(par, itab, bset, false) == 0); } else { CHK(hashindexread(par, itab) == 0); @@ -4317,7 +4333,7 @@ readverifyindex(Par par) return 0; par.m_verify = true; par.m_lockmode = NdbOperation::LM_CommittedRead; - unsigned sel = urandom(10); + uint sel = urandom(10); if (sel < 9) { par.m_ordered = true; par.m_descending = (sel < 5); @@ -4331,8 +4347,8 @@ pkops(Par par) { const Tab& tab = par.tab(); par.m_randomkey = true; - for (unsigned i = 0; i < par.m_subloop; i++) { - unsigned j = 0; + for (uint i = 0; i < par.m_ssloop; i++) { + uint j = 0; while (j < tab.m_itabs) { if (tab.m_itab[j] != 0) { const ITab& itab = *tab.m_itab[j]; @@ -4341,7 +4357,7 @@ pkops(Par par) } j++; } - unsigned sel = urandom(10); + uint sel = urandom(10); if (par.m_slno % 2 == 0) { // favor insert if (sel < 8) { @@ -4389,8 +4405,8 @@ static int pkupdatescanread(Par par) { par.m_dups = true; - par.m_deadlock = true; - unsigned sel = urandom(10); + par.m_catcherr |= Con::ErrDeadlock; + uint sel = urandom(10); if (sel < 5) { CHK(pkupdate(par) == 0); } else if (sel < 6) { @@ -4411,9 +4427,9 @@ static int mixedoperations(Par par) { par.m_dups = true; - par.m_deadlock = true; + par.m_catcherr |= Con::ErrDeadlock; par.m_scanstop = par.m_totrows; // randomly close scans - unsigned sel = urandom(10); + uint sel = urandom(10); if (sel < 2) { CHK(pkdelete(par) == 0); } else if (sel < 4) { @@ -4434,8 +4450,8 @@ static int parallelorderedupdate(Par par) { const Tab& tab = par.tab(); - unsigned k = 0; - for (unsigned i = 0; i < tab.m_itabs; i++) { + uint k = 0; + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -4447,10 +4463,11 @@ parallelorderedupdate(Par par) par.m_noindexkeyupdate = true; par.m_ordered = true; par.m_descending = (par.m_slno != 0); + par.m_dups = false; par.m_verify = true; - BSet bset(tab, itab, par.m_rows); // empty bounds + BSet bset(tab, itab); // empty bounds // prefer empty bounds - unsigned sel = urandom(10); + uint sel = urandom(10); CHK(scanupdateindex(par, itab, bset, sel < 2) == 0); } } @@ -4469,6 +4486,418 @@ pkupdateindexbuild(Par par) return 0; } +// savepoint tests (single thread for now) + +struct Spt { + enum Res { Committed, Latest, Deadlock }; + bool m_same; // same transaction + NdbOperation::LockMode m_lm; + Res m_res; +}; + +static Spt sptlist[] = { + { 1, NdbOperation::LM_Read, Spt::Latest }, + { 1, NdbOperation::LM_Exclusive, Spt::Latest }, + { 1, NdbOperation::LM_CommittedRead, Spt::Latest }, + { 0, NdbOperation::LM_Read, Spt::Deadlock }, + { 0, NdbOperation::LM_Exclusive, Spt::Deadlock }, + { 0, NdbOperation::LM_CommittedRead, Spt::Committed } +}; +static uint sptcount = sizeof(sptlist)/sizeof(sptlist[0]); + +static int +savepointreadpk(Par par, Spt spt) +{ + LL3("savepointreadpk"); + Con& con = par.con(); + const Tab& tab = par.tab(); + Set& set = par.set(); + const Set& set1 = set; + Set set2(tab, set.m_rows); + uint n = 0; + for (uint i = 0; i < set.m_rows; i++) { + set.lock(); + if (!set.compat(par, i, Row::OpREAD)) { + LL4("savepointreadpk SKIP " << i << " " << set.getrow(i)); + set.unlock(); + continue; + } + set.unlock(); + CHK(set2.selrow(par, *set1.m_row[i]) == 0); + uint err = par.m_catcherr | Con::ErrDeadlock; + ExecType et = NoCommit; + CHK(con.execute(et, err) == 0); + if (err) { + if (err & Con::ErrDeadlock) { + CHK(spt.m_res == Spt::Deadlock); + // all rows have same behaviour + CHK(n == 0); + } + LL1("savepointreadpk stop on " << con.errname(err)); + break; + } + uint i2 = (uint)-1; + CHK(set2.getkey(par, &i2) == 0 && i == i2); + CHK(set2.putval(i, false) == 0); + LL4("row " << set2.count() << " " << set2.getrow(i)); + n++; + } + bool dirty = (!spt.m_same && spt.m_lm == NdbOperation::LM_CommittedRead); + if (spt.m_res != Spt::Deadlock) + CHK(set1.verify(par, set2, false, dirty) == 0); + return 0; +} + +static int +savepointreadhashindex(Par par, Spt spt) +{ + if (spt.m_lm == NdbOperation::LM_CommittedRead && !spt.m_same) { + LL1("skip hash index dirty read"); + return 0; + } + LL3("savepointreadhashindex"); + Con& con = par.con(); + const Tab& tab = par.tab(); + const ITab& itab = par.itab(); + Set& set = par.set(); + const Set& set1 = set; + Set set2(tab, set.m_rows); + uint n = 0; + for (uint i = 0; i < set.m_rows; i++) { + set.lock(); + if (!set.compat(par, i, Row::OpREAD)) { + LL3("savepointreadhashindex SKIP " << i << " " << set.getrow(i)); + set.unlock(); + continue; + } + set.unlock(); + CHK(set2.selrow(par, itab, *set1.m_row[i]) == 0); + uint err = par.m_catcherr | Con::ErrDeadlock; + ExecType et = NoCommit; + CHK(con.execute(et, err) == 0); + if (err) { + if (err & Con::ErrDeadlock) { + CHK(spt.m_res == Spt::Deadlock); + // all rows have same behaviour + CHK(n == 0); + } + LL1("savepointreadhashindex stop on " << con.errname(err)); + break; + } + uint i2 = (uint)-1; + CHK(set2.getkey(par, &i2) == 0 && i == i2); + CHK(set2.putval(i, false) == 0); + LL4("row " << set2.count() << " " << *set2.m_row[i]); + n++; + } + bool dirty = (!spt.m_same && spt.m_lm == NdbOperation::LM_CommittedRead); + if (spt.m_res != Spt::Deadlock) + CHK(set1.verify(par, set2, false, dirty) == 0); + return 0; +} + +static int +savepointscantable(Par par, Spt spt) +{ + LL3("savepointscantable"); + Con& con = par.con(); + const Tab& tab = par.tab(); + const Set& set = par.set(); + const Set& set1 = set; // not modifying current set + Set set2(tab, set.m_rows); // scan result + CHK(con.getNdbScanOperation(tab) == 0); + CHK(con.readTuples(par) == 0); + set2.getval(par); // getValue all columns + CHK(con.executeScan() == 0); + bool deadlock = false; + uint n = 0; + while (1) { + int ret; + uint err = par.m_catcherr | Con::ErrDeadlock; + CHK((ret = con.nextScanResult(true, err)) == 0 || ret == 1); + if (ret == 1) + break; + if (err) { + if (err & Con::ErrDeadlock) { + CHK(spt.m_res == Spt::Deadlock); + // all rows have same behaviour + CHK(n == 0); + deadlock = true; + } + LL1("savepointscantable stop on " << con.errname(err)); + break; + } + CHK(spt.m_res != Spt::Deadlock); + uint i = (uint)-1; + CHK(set2.getkey(par, &i) == 0); + CHK(set2.putval(i, false, n) == 0); + LL4("row " << n << " key " << i << " " << set2.getrow(i)); + n++; + } + if (set1.m_rows > 0) { + if (!deadlock) + CHK(spt.m_res != Spt::Deadlock); + else + CHK(spt.m_res == Spt::Deadlock); + } + LL2("savepointscantable " << n << " rows"); + bool dirty = (!spt.m_same && spt.m_lm == NdbOperation::LM_CommittedRead); + if (spt.m_res != Spt::Deadlock) + CHK(set1.verify(par, set2, false, dirty) == 0); + return 0; +} + +static int +savepointscanindex(Par par, Spt spt) +{ + LL3("savepointscanindex"); + Con& con = par.con(); + const Tab& tab = par.tab(); + const ITab& itab = par.itab(); + const Set& set = par.set(); + const Set& set1 = set; + Set set2(tab, set.m_rows); + CHK(con.getNdbIndexScanOperation(itab, tab) == 0); + CHK(con.readIndexTuples(par) == 0); + set2.getval(par); + CHK(con.executeScan() == 0); + bool deadlock = false; + uint n = 0; + while (1) { + int ret; + uint err = par.m_catcherr | Con::ErrDeadlock; + CHK((ret = con.nextScanResult(true, err)) == 0 || ret == 1); + if (ret == 1) + break; + if (err) { + if (err & Con::ErrDeadlock) { + CHK(spt.m_res == Spt::Deadlock); + // all rows have same behaviour + CHK(n == 0); + deadlock = true; + } + LL1("savepointscanindex stop on " << con.errname(err)); + break; + } + CHK(spt.m_res != Spt::Deadlock); + uint i = (uint)-1; + CHK(set2.getkey(par, &i) == 0); + CHK(set2.putval(i, par.m_dups, n) == 0); + LL4("row " << n << " key " << i << " " << set2.getrow(i)); + n++; + } + if (set1.m_rows > 0) { + if (!deadlock) + CHK(spt.m_res != Spt::Deadlock); + else + CHK(spt.m_res == Spt::Deadlock); + } + LL2("savepointscanindex " << n << " rows"); + bool dirty = (!spt.m_same && spt.m_lm == NdbOperation::LM_CommittedRead); + if (spt.m_res != Spt::Deadlock) + CHK(set1.verify(par, set2, false, dirty) == 0); + return 0; +} + +typedef int (*SptFun)(Par, Spt); + +static int +savepointtest(Par par, Spt spt, SptFun fun) +{ + Con& con = par.con(); + Par par2 = par; + Con con2; + if (!spt.m_same) { + con2.connect(con); // copy ndb reference + par2.m_con = &con2; + CHK(con2.startTransaction() == 0); + } + par2.m_lockmode = spt.m_lm; + CHK((*fun)(par2, spt) == 0); + if (!spt.m_same) { + con2.closeTransaction(); + } + return 0; +} + +static int +savepointtest(Par par, const char* op) +{ + Con& con = par.con(); + const Tab& tab = par.tab(); + Set& set = par.set(); + LL2("savepointtest op=\"" << op << "\""); + CHK(con.startTransaction() == 0); + const char* p = op; + char c; + while ((c = *p++) != 0) { + uint j; + for (j = 0; j < par.m_rows; j++) { + uint i = thrrow(par, j); + if (c == 'c') { + ExecType et = Commit; + CHK(con.execute(et) == 0); + set.lock(); + set.post(par, et); + set.unlock(); + CHK(con.startTransaction() == 0); + } else { + set.lock(); + set.push(i); + if (c == 'i') { + set.calc(par, i); + CHK(set.insrow(par, i) == 0); + } else if (c == 'u') { + set.copyval(i, tab.m_pkmask); + set.calc(par, i, ~tab.m_pkmask); + CHK(set.updrow(par, i) == 0); + } else if (c == 'd') { + set.copyval(i, tab.m_pkmask); + CHK(set.delrow(par, i) == 0); + } else { + assert(false); + } + set.unlock(); + } + } + } + { + ExecType et = NoCommit; + CHK(con.execute(et) == 0); + set.lock(); + set.post(par, et); + set.unlock(); + } + for (uint k = 0; k < sptcount; k++) { + Spt spt = sptlist[k]; + LL2("spt lm=" << spt.m_lm << " same=" << spt.m_same); + CHK(savepointtest(par, spt, &savepointreadpk) == 0); + CHK(savepointtest(par, spt, &savepointscantable) == 0); + for (uint i = 0; i < tab.m_itabs; i++) { + if (tab.m_itab[i] == 0) + continue; + const ITab& itab = *tab.m_itab[i]; + par.m_itab = &itab; + if (itab.m_type == ITab::OrderedIndex) + CHK(savepointtest(par, spt, &savepointscanindex) == 0); + else + CHK(savepointtest(par, spt, &savepointreadhashindex) == 0); + par.m_itab = 0; + } + } + { + ExecType et = Rollback; + CHK(con.execute(et) == 0); + set.lock(); + set.post(par, et); + set.unlock(); + } + con.closeTransaction(); + return 0; +} + +static int +savepointtest(Par par) +{ + assert(par.m_usedthreads == 1); + const char* oplist[] = { + // each based on previous and "c" not last + "i", + "icu", + "uuuuu", + "d", + "dciuuuuud", + 0 + }; + int i; + for (i = 0; oplist[i] != 0; i++) { + CHK(savepointtest(par, oplist[i]) == 0); + } + return 0; +} + +static int +halloweentest(Par par, const ITab& itab) +{ + LL2("halloweentest " << itab.m_name); + Con& con = par.con(); + const Tab& tab = par.tab(); + Set& set = par.set(); + CHK(con.startTransaction() == 0); + // insert 1 row + uint i = 0; + set.push(i); + set.calc(par, i); + CHK(set.insrow(par, i) == 0); + CHK(con.execute(NoCommit) == 0); + // scan via index until Set m_rows reached + uint scancount = 0; + bool stop = false; + while (!stop) { + par.m_lockmode = // makes no difference + scancount % 2 == 0 ? NdbOperation::LM_CommittedRead : + NdbOperation::LM_Read; + Set set1(tab, set.m_rows); // expected scan result + Set set2(tab, set.m_rows); // actual scan result + BSet bset(tab, itab); + calcscanbounds(par, itab, bset, set, set1); + CHK(con.getNdbIndexScanOperation(itab, tab) == 0); + CHK(con.readIndexTuples(par) == 0); + CHK(bset.setbnd(par) == 0); + set2.getval(par); + CHK(con.executeScan() == 0); + const uint savepoint = i; + LL3("scancount=" << scancount << " savepoint=" << savepoint); + uint n = 0; + while (1) { + int ret; + CHK((ret = con.nextScanResult(true)) == 0 || ret == 1); + if (ret == 1) + break; + uint k = (uint)-1; + CHK(set2.getkey(par, &k) == 0); + CHK(set2.putval(k, false, n) == 0); + LL3("row=" << n << " key=" << k); + CHK(k <= savepoint); + if (++i == set.m_rows) { + stop = true; + break; + } + set.push(i); + set.calc(par, i); + CHK(set.insrow(par, i) == 0); + CHK(con.execute(NoCommit) == 0); + n++; + } + con.closeScan(); + LL3("scanrows=" << n); + if (!stop) { + CHK(set1.verify(par, set2, false) == 0); + } + scancount++; + } + CHK(con.execute(Commit) == 0); + set.post(par, Commit); + assert(set.count() == set.m_rows); + CHK(pkdelete(par) == 0); + return 0; +} + +static int +halloweentest(Par par) +{ + assert(par.m_usedthreads == 1); + const Tab& tab = par.tab(); + for (uint i = 0; i < tab.m_itabs; i++) { + if (tab.m_itab[i] == 0) + continue; + const ITab& itab = *tab.m_itab[i]; + if (itab.m_type == ITab::OrderedIndex) + CHK(halloweentest(par, itab) == 0); + } + return 0; +} + // threads typedef int (*TFunc)(Par par); @@ -4477,7 +4906,7 @@ enum TMode { ST = 1, MT = 2 }; extern "C" { static void* runthread(void* arg); } struct Thr { - enum State { Wait, Start, Stop, Stopped, Exit }; + enum State { Wait, Start, Stop, Exit }; State m_state; Par m_par; Uint64 m_id; @@ -4487,12 +4916,12 @@ struct Thr { TFunc m_func; int m_ret; void* m_status; - Thr(Par par, unsigned n); + char m_tmp[20]; // used for debug msg prefix + Thr(Par par, uint n); ~Thr(); int run(); void start(); void stop(); - void stopped(); void exit(); // void lock() { @@ -4513,7 +4942,7 @@ struct Thr { } }; -Thr::Thr(Par par, unsigned n) : +Thr::Thr(Par par, uint n) : m_state(Wait), m_par(par), m_id(0), @@ -4533,7 +4962,7 @@ Thr::Thr(Par par, unsigned n) : m_cond = NdbCondition_Create(); assert(m_mutex != 0 && m_cond != 0); // run - const unsigned stacksize = 256 * 1024; + const uint stacksize = 256 * 1024; const NDB_THREAD_PRIO prio = NDB_THREAD_PRIO_LOW; m_thread = NdbThread_Create(runthread, (void**)this, stacksize, name, prio); } @@ -4589,11 +5018,16 @@ Thr::run() LL4("start"); assert(m_state == Start); m_ret = (*m_func)(m_par); - m_state = Stopped; + m_state = Stop; LL4("stop"); signal(); unlock(); - CHK(m_ret == 0); + if (m_ret == -1) { + if (m_par.m_cont) + LL1("continue running due to -cont"); + else + return -1; + } } con.disconnect(); return 0; @@ -4612,16 +5046,7 @@ void Thr::stop() { lock(); - m_state = Stop; - signal(); - unlock(); -} - -void -Thr::stopped() -{ - lock(); - while (m_state != Stopped) + while (m_state != Stop) wait(); m_state = Wait; unlock(); @@ -4640,27 +5065,44 @@ Thr::exit() static Thr** g_thrlist = 0; -static unsigned -getthrno() +static Thr* +getthr() { if (g_thrlist != 0) { Uint64 id = (Uint64)pthread_self(); - for (unsigned n = 0; n < g_opt.m_threads; n++) { + for (uint n = 0; n < g_opt.m_threads; n++) { if (g_thrlist[n] != 0) { - const Thr& thr = *g_thrlist[n]; + Thr& thr = *g_thrlist[n]; if (thr.m_id == id) - return thr.m_par.m_no; + return &thr; } } } - return (unsigned)-1; + return 0; +} + +// for debug messages (par.m_no not available) +static const char* +getthrprefix() +{ + Thr* thrp = getthr(); + if (thrp != 0) { + Thr& thr = *thrp; + uint n = thr.m_par.m_no; + uint m = + g_opt.m_threads < 10 ? 1 : + g_opt.m_threads < 100 ? 2 : 3; + sprintf(thr.m_tmp, "[%0*u] ", m, n); + return thr.m_tmp; + } + return ""; } static int -runstep(Par par, const char* fname, TFunc func, unsigned mode) +runstep(Par par, const char* fname, TFunc func, uint mode) { LL2("step: " << fname); - const int threads = (mode & ST ? 1 : par.m_threads); + const int threads = (mode & ST ? 1 : par.m_usedthreads); int n; for (n = 0; n < threads; n++) { LL4("start " << n); @@ -4673,11 +5115,11 @@ runstep(Par par, const char* fname, TFunc func, unsigned mode) thr.m_func = func; thr.start(); } - unsigned errs = 0; + uint errs = 0; for (n = threads - 1; n >= 0; n--) { LL4("stop " << n); Thr& thr = *g_thrlist[n]; - thr.stopped(); + thr.stop(); if (thr.m_ret != 0) errs++; } @@ -4689,7 +5131,7 @@ runstep(Par par, const char* fname, TFunc func, unsigned mode) CHK(runstep(par, #func, func, mode) == 0) #define SUBLOOP(par) \ - "subloop: " << par.m_lno << "/" << par.m_currcase << "/" << \ + "sloop: " << par.m_lno << "/" << par.m_currcase << "/" << \ par.m_tab->m_name << "/" << par.m_slno static int @@ -4698,7 +5140,7 @@ tbuild(Par par) RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); if (par.m_slno % 3 == 0) { RUNSTEP(par, createindex, ST); @@ -4718,7 +5160,7 @@ tbuild(Par par) } RUNSTEP(par, readverifyfull, MT); // leave last one - if (par.m_slno + 1 < par.m_subloop) { + if (par.m_slno + 1 < par.m_sloop) { RUNSTEP(par, pkdelete, MT); RUNSTEP(par, readverifyfull, MT); RUNSTEP(par, dropindex, ST); @@ -4737,7 +5179,7 @@ tindexscan(Par par) RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, pkinsert, MT); RUNSTEP(par, readverifyfull, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, readverifyindex, MT); } @@ -4753,7 +5195,7 @@ tpkops(Par par) RUNSTEP(par, invalidatetable, MT); RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkops, MT); LL2("rows=" << par.set().count()); @@ -4772,7 +5214,7 @@ tpkopsread(Par par) RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverifyfull, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkupdatescanread, MT); RUNSTEP(par, readverifyfull, MT); @@ -4792,7 +5234,7 @@ tmixedops(Par par) RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverifyfull, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, mixedoperations, MT); RUNSTEP(par, readverifyfull, MT); @@ -4807,7 +5249,7 @@ tbusybuild(Par par) RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); RUNSTEP(par, pkinsert, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkupdateindexbuild, MT); RUNSTEP(par, invalidateindex, MT); @@ -4828,7 +5270,7 @@ trollback(Par par) RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverifyfull, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, mixedoperations, MT); RUNSTEP(par, readverifyfull, MT); @@ -4846,7 +5288,7 @@ tparupdate(Par par) RUNSTEP(par, createindex, ST); RUNSTEP(par, invalidateindex, MT); RUNSTEP(par, readverifyfull, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, parallelorderedupdate, MT); RUNSTEP(par, readverifyfull, MT); @@ -4854,6 +5296,37 @@ tparupdate(Par par) return 0; } +static int +tsavepoint(Par par) +{ + RUNSTEP(par, droptable, ST); + RUNSTEP(par, createtable, ST); + RUNSTEP(par, invalidatetable, MT); + RUNSTEP(par, createindex, ST); + RUNSTEP(par, invalidateindex, MT); + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { + LL1(SUBLOOP(par)); + RUNSTEP(par, savepointtest, MT); + RUNSTEP(par, readverifyfull, MT); + } + return 0; +} + +static int +thalloween(Par par) +{ + RUNSTEP(par, droptable, ST); + RUNSTEP(par, createtable, ST); + RUNSTEP(par, invalidatetable, MT); + RUNSTEP(par, createindex, ST); + RUNSTEP(par, invalidateindex, MT); + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { + LL1(SUBLOOP(par)); + RUNSTEP(par, halloweentest, MT); + } + return 0; +} + static int ttimebuild(Par par) { @@ -4861,7 +5334,7 @@ ttimebuild(Par par) RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkinsert, MT); t1.on(); @@ -4881,7 +5354,7 @@ ttimemaint(Par par) RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkinsert, MT); t1.on(); @@ -4911,7 +5384,7 @@ ttimescan(Par par) RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkinsert, MT); RUNSTEP(par, createindex, ST); @@ -4938,7 +5411,7 @@ ttimepkread(Par par) RUNSTEP(par, droptable, ST); RUNSTEP(par, createtable, ST); RUNSTEP(par, invalidatetable, MT); - for (par.m_slno = 0; par.m_slno < par.m_subloop; par.m_slno++) { + for (par.m_slno = 0; par.m_slno < par.m_sloop; par.m_slno++) { LL1(SUBLOOP(par)); RUNSTEP(par, pkinsert, MT); RUNSTEP(par, createindex, ST); @@ -4981,7 +5454,9 @@ tcaselist[] = { TCase("e", tmixedops, "pk operations and scan operations"), TCase("f", tbusybuild, "pk operations and index build"), TCase("g", trollback, "operations with random rollbacks"), - TCase("h", tparupdate, "parallel ordered update (bug20446)"), + TCase("h", tparupdate, "parallel ordered update bug#20446"), + TCase("i", tsavepoint, "savepoint test locking bug#31477"), + TCase("j", thalloween, "savepoint test halloween problem"), TCase("t", ttimebuild, "time index build"), TCase("u", ttimemaint, "time index maintenance"), TCase("v", ttimescan, "time full scan table vs index on pk"), @@ -4989,14 +5464,14 @@ tcaselist[] = { TCase("z", tdrop, "drop test tables") }; -static const unsigned +static const uint tcasecount = sizeof(tcaselist) / sizeof(tcaselist[0]); static void printcases() { ndbout << "test cases:" << endl; - for (unsigned i = 0; i < tcasecount; i++) { + for (uint i = 0; i < tcasecount; i++) { const TCase& tcase = tcaselist[i]; ndbout << " " << tcase.m_name << " - " << tcase.m_desc << endl; } @@ -5008,13 +5483,13 @@ printtables() Par par(g_opt); makebuiltintables(par); ndbout << "tables and indexes (x=ordered z=hash x0=on pk):" << endl; - for (unsigned j = 0; j < tabcount; j++) { + for (uint j = 0; j < tabcount; j++) { if (tablist[j] == 0) continue; const Tab& tab = *tablist[j]; const char* tname = tab.m_name; ndbout << " " << tname; - for (unsigned i = 0; i < tab.m_itabs; i++) { + for (uint i = 0; i < tab.m_itabs; i++) { if (tab.m_itab[i] == 0) continue; const ITab& itab = *tab.m_itab[i]; @@ -5023,7 +5498,7 @@ printtables() iname += strlen(tname); ndbout << " " << iname; ndbout << "("; - for (unsigned k = 0; k < itab.m_icols; k++) { + for (uint k = 0; k < itab.m_icols; k++) { if (k != 0) ndbout << ","; const ICol& icol = *itab.m_icol[k]; @@ -5036,14 +5511,48 @@ printtables() } } +static bool +setcasepar(Par& par) +{ + Opt d; + const char* c = par.m_currcase; + switch (c[0]) { + case 'i': + { + if (par.m_usedthreads > 1) { + par.m_usedthreads = 1; + LL1("case " << c << " reduce threads to " << par.m_usedthreads); + } + const uint rows = 100; + if (par.m_rows > rows) { + par.m_rows = rows; + LL1("case " << c << " reduce rows to " << rows); + } + } + break; + case 'j': + { + if (par.m_usedthreads > 1) { + par.m_usedthreads = 1; + LL1("case " << c << " reduce threads to " << par.m_usedthreads); + } + } + break; + default: + break; + } + return true; +} + static int runtest(Par par) { + int totret = 0; if (par.m_seed == -1) { // good enough for daily run - unsigned short seed = (unsigned short)getpid(); + ushort seed = (ushort)getpid(); LL0("random seed: " << seed); - srandom((unsigned)seed); + srandom((uint)seed); } else if (par.m_seed != 0) { LL0("random seed: " << par.m_seed); srandom(par.m_seed); @@ -5061,9 +5570,10 @@ runtest(Par par) Con con; CHK(con.connect() == 0); par.m_con = &con; + par.m_catcherr |= Con::ErrNospace; // threads g_thrlist = new Thr* [par.m_threads]; - unsigned n; + uint n; for (n = 0; n < par.m_threads; n++) { g_thrlist[n] = 0; } @@ -5078,23 +5588,38 @@ runtest(Par par) LL1("random seed: " << par.m_lno); srandom(par.m_lno); } - for (unsigned i = 0; i < tcasecount; i++) { + for (uint i = 0; i < tcasecount; i++) { const TCase& tcase = tcaselist[i]; - if (par.m_case != 0 && strchr(par.m_case, tcase.m_name[0]) == 0) + if (par.m_case != 0 && strchr(par.m_case, tcase.m_name[0]) == 0 || + par.m_skip != 0 && strchr(par.m_skip, tcase.m_name[0]) != 0) { continue; + } sprintf(par.m_currcase, "%c", tcase.m_name[0]); + par.m_usedthreads = par.m_threads; + if (!setcasepar(par)) { + LL1("case " << tcase.m_name << " cannot run with given options"); + continue; + } + par.m_totrows = par.m_usedthreads * par.m_rows; makebuiltintables(par); LL1("case: " << par.m_lno << "/" << tcase.m_name << " - " << tcase.m_desc); - for (unsigned j = 0; j < tabcount; j++) { + for (uint j = 0; j < tabcount; j++) { if (tablist[j] == 0) continue; const Tab& tab = *tablist[j]; par.m_tab = &tab; par.m_set = new Set(tab, par.m_totrows); LL1("table: " << par.m_lno << "/" << tcase.m_name << "/" << tab.m_name); - CHK(tcase.m_func(par) == 0); + int ret = tcase.m_func(par); delete par.m_set; par.m_set = 0; + if (ret == -1) { + if (!par.m_cont) + return -1; + totret = -1; + LL1("continue to next case due to -cont"); + break; + } } } } @@ -5110,7 +5635,7 @@ runtest(Par par) delete [] g_thrlist; g_thrlist = 0; con.disconnect(); - return 0; + return totret; } static const char* g_progname = "testOIBasic"; @@ -5119,7 +5644,7 @@ int main(int argc, char** argv) { ndb_init(); - unsigned i; + uint i; ndbout << g_progname; for (i = 1; i < argc; i++) ndbout << " " << argv[i]; @@ -5156,6 +5681,10 @@ main(int argc, char** argv) g_opt.m_collsp = true; continue; } + if (strcmp(arg, "-cont") == 0) { + g_opt.m_cont = true; + continue; + } if (strcmp(arg, "-core") == 0) { g_opt.m_core = true; continue; @@ -5252,9 +5781,21 @@ main(int argc, char** argv) continue; } } - if (strcmp(arg, "-subloop") == 0) { + if (strcmp(arg, "-skip") == 0) { if (++argv, --argc > 0) { - g_opt.m_subloop = atoi(argv[0]); + g_opt.m_skip = strdup(argv[0]); + continue; + } + } + if (strcmp(arg, "-sloop") == 0) { + if (++argv, --argc > 0) { + g_opt.m_sloop = atoi(argv[0]); + continue; + } + } + if (strcmp(arg, "-ssloop") == 0) { + if (++argv, --argc > 0) { + g_opt.m_ssloop = atoi(argv[0]); continue; } } From eb493203aadf6ad4dec7997ce85b145b9301e2c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 13:03:27 +0100 Subject: [PATCH 096/527] ndb - bug#31477 post-merge fixes in 5.1 storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: bug#31477 post-merge fixes in 5.1 storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: bug#31477 post-merge fixes in 5.1 storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp: bug#31477 post-merge fixes in 5.1 --- storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 9 ++- .../kernel/blocks/dbtup/DbtupExecQuery.cpp | 16 +---- .../src/kernel/blocks/dbtup/DbtupIndex.cpp | 62 ++++++++++++------- 3 files changed, 45 insertions(+), 42 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 3065e0d4192..e70b4a17719 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -1558,7 +1558,7 @@ public: /* * TUX checks if tuple is visible to scan. */ - bool tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, bool dirty, Uint32 savePointId); + bool tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageIndex, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, bool dirty, Uint32 savepointId); int load_diskpage(Signal*, Uint32 opRec, Uint32 fragPtrI, Uint32 local_key, Uint32 flags); @@ -3041,16 +3041,15 @@ inline bool Dbtup::find_savepoint(OperationrecPtr& loopOpPtr, Uint32 savepointId) { while (true) { - if (savepointId > loopOpPtr.p->savePointId) { + if (savepointId > loopOpPtr.p->savepointId) { jam(); return true; } - // note 5.0 has reversed next/prev pointers - loopOpPtr.i = loopOpPtr.p->nextActiveOp; + loopOpPtr.i = loopOpPtr.p->prevActiveOp; if (loopOpPtr.i == RNIL) { break; } - ptrCheckGuard(loopOpPtr, cnoOfOprec, operationrec); + c_operation_pool.getPtr(loopOpPtr); } return false; } diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index a642d704eb9..4f639a4c7a4 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -358,21 +358,7 @@ Dbtup::setup_read(KeyReqStruct *req_struct, dirty= false; } - OperationrecPtr prevOpPtr = currOpPtr; - bool found= false; - while(true) - { - if (savepointId > currOpPtr.p->savepointId) { - found= true; - break; - } - if (currOpPtr.p->is_first_operation()){ - break; - } - prevOpPtr= currOpPtr; - currOpPtr.i = currOpPtr.p->prevActiveOp; - c_operation_pool.getPtr(currOpPtr); - } + bool found= find_savepoint(currOpPtr, savepointId); Uint32 currOp= currOpPtr.p->op_struct.op_type; diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp index e315afc93de..0a4477db0d0 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp @@ -15,6 +15,7 @@ #define DBTUP_C #define DBTUP_INDEX_CPP +#include #include "Dbtup.hpp" #include #include @@ -330,7 +331,14 @@ Dbtup::accReadPk(Uint32 tableId, Uint32 fragId, Uint32 fragPageId, Uint32 pageIn * clear to do the full check here. */ bool -Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupVersion, Uint32 transId1, Uint32 transId2, bool dirty, Uint32 savePointId) +Dbtup::tuxQueryTh(Uint32 fragPtrI, + Uint32 pageId, + Uint32 pageIndex, + Uint32 tupVersion, + Uint32 transId1, + Uint32 transId2, + bool dirty, + Uint32 savepointId) { jamEntry(); FragrecordPtr fragPtr; @@ -341,30 +349,40 @@ Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupV ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec); PagePtr pagePtr; pagePtr.i = pageId; - ptrCheckGuard(pagePtr, cnoOfPage, page); + c_page_pool.getPtr(pagePtr); + + KeyReqStruct req_struct; + + { + Operationrec tmpOp; + tmpOp.m_tuple_location.m_page_no = pageId; + tmpOp.m_tuple_location.m_page_idx = pageIndex; + setup_fixed_part(&req_struct, &tmpOp, tablePtr.p); + } + + Tuple_header* tuple_ptr = req_struct.m_tuple_ptr; OperationrecPtr currOpPtr; - currOpPtr.i = pagePtr.p->pageWord[pageOffset]; + currOpPtr.i = tuple_ptr->m_operation_ptr_i; if (currOpPtr.i == RNIL) { - ljam(); + jam(); // tuple has no operation, any scan can see it return true; } - ptrCheckGuard(currOpPtr, cnoOfOprec, operationrec); + c_operation_pool.getPtr(currOpPtr); const bool sameTrans = - transId1 == currOpPtr.p->transid1 && - transId2 == currOpPtr.p->transid2; + c_lqh->is_same_trans(currOpPtr.p->userpointer, transId1, transId2); bool res = false; OperationrecPtr loopOpPtr = currOpPtr; if (!sameTrans) { - ljam(); + jam(); if (!dirty) { - ljam(); - if (currOpPtr.p->prevActiveOp == RNIL) { - ljam(); + jam(); + if (currOpPtr.p->nextActiveOp == RNIL) { + jam(); // last op - TUX makes ACC lock request in same timeslice res = true; } @@ -372,33 +390,33 @@ Dbtup::tuxQueryTh(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32 tupV else { // loop to first op (returns false) find_savepoint(loopOpPtr, 0); - const Uint32 op_type = loopOpPtr.p->optype; + const Uint32 op_type = loopOpPtr.p->op_struct.op_type; if (op_type != ZINSERT) { - ljam(); - // read committed version from the page - const Uint32 origVersion = pagePtr.p->pageWord[pageOffset + 1]; + jam(); + // read committed version + const Uint32 origVersion = tuple_ptr->get_tuple_version(); if (origVersion == tupVersion) { - ljam(); + jam(); res = true; } } } } else { - ljam(); + jam(); // for own trans, ignore dirty flag - if (find_savepoint(loopOpPtr, savePointId)) { - ljam(); - const Uint32 op_type = loopOpPtr.p->optype; + if (find_savepoint(loopOpPtr, savepointId)) { + jam(); + const Uint32 op_type = loopOpPtr.p->op_struct.op_type; if (op_type != ZDELETE) { - ljam(); + jam(); // check if this op has produced the scanned version Uint32 loopVersion = loopOpPtr.p->tupVersion; if (loopVersion == tupVersion) { - ljam(); + jam(); res = true; } } From 3d5e32b27d35655ab509f5567be7eeda58418052 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 10:52:41 -0200 Subject: [PATCH 097/527] Bug#30331 Table_locks_waited shows inaccurate values The problem is that the Table_locks_waited was incremented only when the lock request succeed. If a thread waiting for the lock gets killed or the lock request is aborted, the variable would not be incremented, leading to inaccurate values in the variable. The solution is to increment the Table_locks_waited whenever the lock request is queued. This reflects better the intended behavior of the variable -- show how many times a lock was waited. mysql-test/r/lock_multi.result: Add test case result for Bug#30331 mysql-test/t/lock_multi.test: Add test case for Bug#30331 mysys/thr_lock.c: Increment locks_waited whenever the thread is supposed to wait for the lock. --- mysql-test/r/lock_multi.result | 12 ++++++++++++ mysql-test/t/lock_multi.test | 26 ++++++++++++++++++++++++++ mysys/thr_lock.c | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index 9c4f1b17dcc..e17b56e0695 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -143,4 +143,16 @@ connection: default flush tables; unlock tables; drop table t1; +drop table if exists t1,t2; +create table t1 (a int); +flush status; +lock tables t1 read; +show status like 'Table_locks_waited'; +Variable_name Value +Table_locks_waited 0 +insert into t1 values(1);; +drop table t1; +show status like 'Table_locks_waited'; +Variable_name Value +Table_locks_waited 1 End of 5.1 tests diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 0d36b79df78..c73ebab056e 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -439,4 +439,30 @@ connection default; disconnect flush; drop table t1; +# +# Bug#30331: Table_locks_waited shows inaccurate values +# + +--disable_warnings +drop table if exists t1,t2; +--enable_warnings + +create table t1 (a int); +flush status; +lock tables t1 read; +show status like 'Table_locks_waited'; +connect (waiter,localhost,root,,); +connection waiter; +--send insert into t1 values(1); +connection default; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Locked" and info = "insert into t1 values(1)"; +--source include/wait_condition.inc +drop table t1; +disconnect waiter; +connection default; +show status like 'Table_locks_waited'; +#show global status like "Table_locks_waited"; + --echo End of 5.1 tests diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c index 7f7be4835a5..afe8f289089 100644 --- a/mysys/thr_lock.c +++ b/mysys/thr_lock.c @@ -405,6 +405,8 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, wait->last= &data->next; } + statistic_increment(locks_waited, &THR_LOCK_lock); + /* Set up control struct to allow others to abort locks */ thread_var->current_mutex= &data->lock->mutex; thread_var->current_cond= cond; @@ -469,7 +471,6 @@ wait_for_lock(struct st_lock_list *wait, THR_LOCK_DATA *data, else { result= THR_LOCK_SUCCESS; - statistic_increment(locks_waited, &THR_LOCK_lock); if (data->lock->get_status) (*data->lock->get_status)(data->status_param, 0); check_locks(data->lock,"got wait_for_lock",0); From cdc66b12c5efc66b8148f98fc78134e7db938080 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 11:21:39 -0200 Subject: [PATCH 098/527] Remove spurious commented out test line. mysql-test/t/lock_multi.test: Remove spurious test line. --- mysql-test/t/lock_multi.test | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index c73ebab056e..c8feace5c4a 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -463,6 +463,5 @@ drop table t1; disconnect waiter; connection default; show status like 'Table_locks_waited'; -#show global status like "Table_locks_waited"; --echo End of 5.1 tests From a0f0e41f20d1fd5e9ddba9b3b209fe4f5c2e180e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 14:48:09 +0100 Subject: [PATCH 099/527] ndb - bug#34046 - rename Ndbd_mem_manager::log2 to ndb_log2 storage/ndb/src/kernel/vm/NdbdSuperPool.cpp: rename Ndbd_mem_manager::log2 to ndb_log2 storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp: rename Ndbd_mem_manager::log2 to ndb_log2 storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp: rename Ndbd_mem_manager::log2 to ndb_log2 --- storage/ndb/src/kernel/vm/NdbdSuperPool.cpp | 2 +- storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp | 8 ++++---- storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp b/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp index 14545e23820..717c354a180 100644 --- a/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp +++ b/storage/ndb/src/kernel/vm/NdbdSuperPool.cpp @@ -48,7 +48,7 @@ NdbdSuperPool::NdbdSuperPool(class Ndbd_mem_manager & mm, { m_memRoot = m_mm.get_memroot(); - m_shift = Ndbd_mem_manager::log2((1 << (BMW_2LOG + 2)) / pageSize) - 1; + m_shift = Ndbd_mem_manager::ndb_log2((1 << (BMW_2LOG + 2)) / pageSize) - 1; m_add = (1 << m_shift) - 1; } diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp index 70637a362d0..e771745a62d 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp @@ -125,7 +125,7 @@ do_malloc(Uint32 pages, InitChunk* chunk) } Uint32 -Ndbd_mem_manager::log2(Uint32 input) +Ndbd_mem_manager::ndb_log2(Uint32 input) { input = input | (input >> 8); input = input | (input >> 4); @@ -400,7 +400,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min) Int32 i; Uint32 start; Uint32 cnt = * pages; - Uint32 list = log2(cnt - 1); + Uint32 list = ndb_log2(cnt - 1); assert(cnt); assert(list <= 16); @@ -438,7 +438,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min) * search in other lists... */ - Int32 min_list = log2(min - 1); + Int32 min_list = ndb_log2(min - 1); assert((Int32)list >= min_list); for (i = list - 1; i >= min_list; i--) { @@ -470,7 +470,7 @@ Ndbd_mem_manager::alloc(Uint32* ret, Uint32 *pages, Uint32 min) void Ndbd_mem_manager::insert_free_list(Uint32 start, Uint32 size) { - Uint32 list = log2(size) - 1; + Uint32 list = ndb_log2(size) - 1; Uint32 last = start + size - 1; Uint32 head = m_buddy_lists[list]; diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp index d87927d9c45..b89371b8d71 100644 --- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp +++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.hpp @@ -75,7 +75,7 @@ public: * @note size = 0 -> 0 * @note size > 65536 -> 16 */ - static Uint32 log2(Uint32 size); + static Uint32 ndb_log2(Uint32 size); private: void grow(Uint32 start, Uint32 cnt); From 516f95acea961ed8e7c550ba49acdd884678058c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 15:20:55 +0100 Subject: [PATCH 100/527] BUG#32943: Fixed buggy lock handling of ALTER TABLE for partitioning mysql-test/r/partition_range.result: Added new test cases for lock tables and ALTER TABLE for partitions, also added a test case with a trigger. mysql-test/t/partition_range.test: Added new test cases for lock tables and ALTER TABLE for partitions, also added a test case with a trigger. sql/mysql_priv.h: Added WFRM_KEEP_SHARE for use of code not to be used otherwise sql/sql_partition.cc: Removed get_name_lock and release_name_lock, use close_data_files_and_morph_locks which leaves an exclusive name lock after completing. Reopen table after completing if under lock tables Updated comments sql/sql_table.cc: Ensure that code to set partition syntax isn't used other than when specifically asked to do it. --- mysql-test/r/partition_range.result | 22 ++++++ mysql-test/t/partition_range.test | 35 +++++++++ sql/mysql_priv.h | 1 + sql/sql_partition.cc | 114 +++++++++++----------------- sql/sql_table.cc | 10 ++- 5 files changed, 109 insertions(+), 73 deletions(-) diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index 4da79704ec3..4c6459a09e3 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,4 +1,26 @@ drop table if exists t1, t2; +create table t1 (a integer) +partition by range (a) +( partition p0 values less than (4), +partition p1 values less than (100)); +create trigger tr1 before insert on t1 +for each row begin +set @a = 1; +end| +alter table t1 drop partition p0; +drop table t1; +create table t1 (a integer) +partition by range (a) +( partition p0 values less than (4), +partition p1 values less than (100)); +LOCK TABLES t1 WRITE; +alter table t1 drop partition p0; +alter table t1 reorganize partition p1 into +( partition p0 values less than (4), +partition p1 values less than (100)); +alter table t1 add partition ( partition p2 values less than (200)); +UNLOCK TABLES; +drop table t1; create table t1 (a int unsigned) partition by range (a) (partition pnull values less than (0), diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index 6ed3abab46a..c73a56aff9d 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -9,6 +9,41 @@ drop table if exists t1, t2; --enable_warnings +# +# BUG 32943: +# Locking problems in relation to partitioning and triggers +# Also fixes and test cases of generic lock issues with +# partition change code. +# +create table t1 (a integer) +partition by range (a) +( partition p0 values less than (4), + partition p1 values less than (100)); + +delimiter |; +create trigger tr1 before insert on t1 +for each row begin + set @a = 1; +end| + +delimiter ;| +alter table t1 drop partition p0; + +drop table t1; + +create table t1 (a integer) +partition by range (a) +( partition p0 values less than (4), + partition p1 values less than (100)); +LOCK TABLES t1 WRITE; +alter table t1 drop partition p0; +alter table t1 reorganize partition p1 into +( partition p0 values less than (4), + partition p1 values less than (100)); +alter table t1 add partition ( partition p2 values less than (200)); +UNLOCK TABLES; +drop table t1; + # # BUG 18198: Various tests for partition functions # diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 0adf90dc258..b2e97116828 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1635,6 +1635,7 @@ extern pthread_mutex_t LOCK_gdl; #define WFRM_WRITE_SHADOW 1 #define WFRM_INSTALL_SHADOW 2 #define WFRM_PACK_FRM 4 +#define WFRM_KEEP_SHARE 8 bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags); int abort_and_upgrade_lock(ALTER_PARTITION_PARAM_TYPE *lpt); void close_open_tables_and_downgrade(ALTER_PARTITION_PARAM_TYPE *lpt); diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index eabf4526f7b..677d45dc33d 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -5838,32 +5838,32 @@ static void release_log_entries(partition_info *part_info) /* - Get a lock on table name to avoid that anyone can open the table in - a critical part of the ALTER TABLE. - SYNOPSIS - get_name_lock() + Final part of partition changes to handle things when under + LOCK TABLES. + SYNPOSIS + alter_partition_lock_handling() lpt Struct carrying parameters RETURN VALUES - FALSE Success - TRUE Failure + NONE */ - -static int get_name_lock(ALTER_PARTITION_PARAM_TYPE *lpt) +void alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt) { - int error= 0; - DBUG_ENTER("get_name_lock"); - - bzero(&lpt->table_list, sizeof(lpt->table_list)); - lpt->table_list.db= (char*)lpt->db; - lpt->table_list.table= lpt->table; - lpt->table_list.table_name= (char*)lpt->table_name; - pthread_mutex_lock(&LOCK_open); - error= lock_table_name(lpt->thd, &lpt->table_list, FALSE); - pthread_mutex_unlock(&LOCK_open); - DBUG_RETURN(error); + int err; + if (lpt->thd->locked_tables) + { + pthread_mutex_lock(&LOCK_open); + lpt->thd->in_lock_tables= 1; + err= reopen_tables(lpt->thd, 1, 1); + lpt->thd->in_lock_tables= 0; + pthread_mutex_unlock(&LOCK_open); + if (err) + { + /* Issue a warning since we weren't able to regain the lock again. */ + sql_print_warning("We failed to reacquire LOCKs in ALTER TABLE"); + } + } } - /* Unlock and close table before renaming and dropping partitions SYNOPSIS @@ -5876,35 +5876,16 @@ static int get_name_lock(ALTER_PARTITION_PARAM_TYPE *lpt) static int alter_close_tables(ALTER_PARTITION_PARAM_TYPE *lpt) { THD *thd= lpt->thd; - TABLE *table= lpt->table; + const char *db= lpt->db; + const char *table_name= lpt->table_name; DBUG_ENTER("alter_close_tables"); /* We need to also unlock tables and close all handlers. We set lock to zero to ensure we don't do this twice and we set db_stat to zero to ensure we don't close twice. */ - mysql_unlock_tables(thd, thd->lock); - thd->lock= 0; - table->file->close(); - table->db_stat= 0; - DBUG_RETURN(0); -} - - -/* - Release a lock name - SYNOPSIS - release_name_lock() - lpt - RETURN VALUES - 0 -*/ - -static int release_name_lock(ALTER_PARTITION_PARAM_TYPE *lpt) -{ - DBUG_ENTER("release_name_lock"); pthread_mutex_lock(&LOCK_open); - unlock_table_name(lpt->thd, &lpt->table_list); + close_data_files_and_morph_locks(thd, db, table_name); pthread_mutex_unlock(&LOCK_open); DBUG_RETURN(0); } @@ -6202,7 +6183,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, name lock. 5) Close all tables that have already been opened but didn't stumble on the abort locked previously. This is done as part of the - get_name_lock call. + close_data_files_and_morph_locks call. 6) We are now ready to release all locks we got in this thread. 7) Write the bin log Unfortunately the writing of the binlog is not synchronised with @@ -6219,8 +6200,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, 9) Prepare handlers for drop of partitions 10) Drop the partitions 11) Remove entries from ddl log - 12) Release name lock so that all other threads can access the table - again. + 12) Reopen table if under lock tables 13) Complete query We insert Error injections at all places where it could be interesting @@ -6235,23 +6215,21 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, (not_completed= FALSE) || abort_and_upgrade_lock(lpt) || /* Always returns 0 */ ERROR_INJECT_CRASH("crash_drop_partition_4") || - get_name_lock(lpt) || - ERROR_INJECT_CRASH("crash_drop_partition_5") || alter_close_tables(lpt) || - ERROR_INJECT_CRASH("crash_drop_partition_6") || + ERROR_INJECT_CRASH("crash_drop_partition_5") || ((!thd->lex->no_write_to_binlog) && (write_bin_log(thd, FALSE, thd->query, thd->query_length), FALSE)) || - ERROR_INJECT_CRASH("crash_drop_partition_7") || + ERROR_INJECT_CRASH("crash_drop_partition_6") || ((frm_install= TRUE), FALSE) || mysql_write_frm(lpt, WFRM_INSTALL_SHADOW) || ((frm_install= FALSE), FALSE) || - ERROR_INJECT_CRASH("crash_drop_partition_8") || + ERROR_INJECT_CRASH("crash_drop_partition_7") || mysql_drop_partitions(lpt) || - ERROR_INJECT_CRASH("crash_drop_partition_9") || + ERROR_INJECT_CRASH("crash_drop_partition_8") || (write_log_completed(lpt, FALSE), FALSE) || - ERROR_INJECT_CRASH("crash_drop_partition_10") || - (release_name_lock(lpt), FALSE)) + ERROR_INJECT_CRASH("crash_drop_partition_9") || + (alter_partition_lock_handling(lpt), FALSE)) { handle_alter_part_error(lpt, not_completed, TRUE, frm_install); goto err; @@ -6283,7 +6261,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, name lock. 5) Close all tables that have already been opened but didn't stumble on the abort locked previously. This is done as part of the - get_name_lock call. + close_data_files_and_morph_locks call. 6) Close all table handlers and unlock all handlers but retain name lock 7) Write binlog 8) Now the change is completed except for the installation of the @@ -6293,7 +6271,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, added to the table. 10)Wait until all accesses using the old frm file has completed 11)Remove entries from ddl log - 12)Release name lock + 12)Reopen tables if under lock tables 13)Complete query */ if (write_log_add_change_partition(lpt) || @@ -6303,8 +6281,6 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, mysql_change_partitions(lpt) || ERROR_INJECT_CRASH("crash_add_partition_3") || abort_and_upgrade_lock(lpt) || /* Always returns 0 */ - ERROR_INJECT_CRASH("crash_add_partition_3") || - get_name_lock(lpt) || ERROR_INJECT_CRASH("crash_add_partition_4") || alter_close_tables(lpt) || ERROR_INJECT_CRASH("crash_add_partition_5") || @@ -6320,7 +6296,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ERROR_INJECT_CRASH("crash_add_partition_8") || (write_log_completed(lpt, FALSE), FALSE) || ERROR_INJECT_CRASH("crash_add_partition_9") || - (release_name_lock(lpt), FALSE)) + (alter_partition_lock_handling(lpt), FALSE)) { handle_alter_part_error(lpt, not_completed, FALSE, frm_install); goto err; @@ -6374,15 +6350,15 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, 7) Close all tables opened but not yet locked, after this call we are certain that no other thread is in the lock wait queue or has opened the table. The name lock will ensure that they are blocked - on the open call. This is achieved also by get_name_lock call. + on the open call. + This is achieved also by close_data_files_and_morph_locks call. 8) Close all partitions opened by this thread, but retain name lock. 9) Write bin log 10) Prepare handlers for rename and delete of partitions 11) Rename and drop the reorged partitions such that they are no longer used and rename those added to their real new names. 12) Install the shadow frm file - 13) Release the name lock to enable other threads to start using the - table again. + 13) Reopen the table if under lock tables 14) Complete query */ if (write_log_add_change_partition(lpt) || @@ -6396,24 +6372,22 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, (not_completed= FALSE) || abort_and_upgrade_lock(lpt) || /* Always returns 0 */ ERROR_INJECT_CRASH("crash_change_partition_5") || - get_name_lock(lpt) || - ERROR_INJECT_CRASH("crash_change_partition_6") || alter_close_tables(lpt) || - ERROR_INJECT_CRASH("crash_change_partition_7") || + ERROR_INJECT_CRASH("crash_change_partition_6") || ((!thd->lex->no_write_to_binlog) && (write_bin_log(thd, FALSE, thd->query, thd->query_length), FALSE)) || - ERROR_INJECT_CRASH("crash_change_partition_8") || + ERROR_INJECT_CRASH("crash_change_partition_7") || mysql_write_frm(lpt, WFRM_INSTALL_SHADOW) || - ERROR_INJECT_CRASH("crash_change_partition_9") || + ERROR_INJECT_CRASH("crash_change_partition_8") || mysql_drop_partitions(lpt) || - ERROR_INJECT_CRASH("crash_change_partition_10") || + ERROR_INJECT_CRASH("crash_change_partition_9") || mysql_rename_partitions(lpt) || ((frm_install= TRUE), FALSE) || - ERROR_INJECT_CRASH("crash_change_partition_11") || + ERROR_INJECT_CRASH("crash_change_partition_10") || (write_log_completed(lpt, FALSE), FALSE) || - ERROR_INJECT_CRASH("crash_change_partition_12") || - (release_name_lock(lpt), FALSE)) + ERROR_INJECT_CRASH("crash_change_partition_11") || + (alter_partition_lock_handling(lpt), FALSE)) { handle_alter_part_error(lpt, not_completed, FALSE, frm_install); goto err; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 505bcd1b421..a0464d43372 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1226,8 +1226,12 @@ uint build_table_shadow_filename(char *buff, size_t bufflen, flags Flags as defined below WFRM_INITIAL_WRITE If set we need to prepare table before creating the frm file - WFRM_CREATE_HANDLER_FILES If set we need to create the handler file as - part of the creation of the frm file + WFRM_INSTALL_SHADOW If set we should install the new frm + WFRM_KEEP_SHARE If set we know that the share is to be + retained and thus we should ensure share + object is correct, if not set we don't + set the new partition syntax string since + we know the share object is destroyed. WFRM_PACK_FRM If set we should pack the frm file and delete the frm file @@ -1370,7 +1374,7 @@ bool mysql_write_frm(ALTER_PARTITION_PARAM_TYPE *lpt, uint flags) goto err; } #ifdef WITH_PARTITION_STORAGE_ENGINE - if (part_info) + if (part_info && (flags & WFRM_KEEP_SHARE)) { TABLE_SHARE *share= lpt->table->s; char *tmp_part_syntax_str; From 21e654a828fb553a05fa59ce1e24a9360e377835 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 16:11:43 +0100 Subject: [PATCH 101/527] BUG#33429: No check for maxvalue before adding partition mysql-test/r/partition_range.result: Added new test cases mysql-test/t/partition_range.test: Added new test cases sql/sql_partition.cc: Added check that last partition hasn't got maxvalue defined when executing ADD PARTITION --- mysql-test/r/partition_range.result | 11 +++++++++++ mysql-test/t/partition_range.test | 11 +++++++++++ sql/sql_partition.cc | 7 ++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/partition_range.result b/mysql-test/r/partition_range.result index 4da79704ec3..bfc67d4947f 100644 --- a/mysql-test/r/partition_range.result +++ b/mysql-test/r/partition_range.result @@ -1,4 +1,15 @@ drop table if exists t1, t2; +create table t1 (a int) +partition by range (a) +( partition p0 values less than (maxvalue)); +alter table t1 add partition (partition p1 values less than (100000)); +ERROR HY000: MAXVALUE can only be used in last partition definition +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (a) (PARTITION p0 VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */ +drop table t1; create table t1 (a int unsigned) partition by range (a) (partition pnull values less than (0), diff --git a/mysql-test/t/partition_range.test b/mysql-test/t/partition_range.test index 6ed3abab46a..035a895dbab 100644 --- a/mysql-test/t/partition_range.test +++ b/mysql-test/t/partition_range.test @@ -9,6 +9,17 @@ drop table if exists t1, t2; --enable_warnings +# +# BUG 33429: Succeeds in adding partition when maxvalue on last partition +# +create table t1 (a int) +partition by range (a) +( partition p0 values less than (maxvalue)); +--error ER_PARTITION_MAXVALUE_ERROR +alter table t1 add partition (partition p1 values less than (100000)); +show create table t1; +drop table t1; + # # BUG 18198: Various tests for partition functions # diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index eabf4526f7b..36f1cc771a6 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4313,7 +4313,12 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, { my_error(ER_NO_BINLOG_ERROR, MYF(0)); DBUG_RETURN(TRUE); - } + } + if (tab_part_info->defined_max_value) + { + my_error(ER_PARTITION_MAXVALUE_ERROR, MYF(0)); + DBUG_RETURN(TRUE); + } if (no_new_partitions == 0) { my_error(ER_ADD_PARTITION_NO_NEW_PARTITION, MYF(0)); From bb091abb145f89e2332a5b49cbc221793bce3452 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 28 Jan 2008 22:05:25 +0100 Subject: [PATCH 102/527] BUG#33182: Disallow division due to div_precision_increment problems mysql-test/r/partition.result: New test case to validate that '/' is no longer allowed, only integer division is allowed mysql-test/t/partition.test: New test case to validate that '/' is no longer allowed, only integer division is allowed sql/item_func.h: +,-,*, mod is allowed / is disallowed --- mysql-test/r/partition.result | 3 +++ mysql-test/t/partition.test | 4 ++++ sql/item_func.h | 4 +++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index a361a8f6bcc..d3275cec922 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1,4 +1,7 @@ drop table if exists t1; +create table t1 (a int) partition by list ((a/3)*10 div 1) +(partition p0 values in (0), partition p1 values in (1)); +ERROR HY000: This partition function is not allowed CREATE TABLE t1 ( d DATE NOT NULL ) diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..7ca6f0f55d6 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -14,6 +14,10 @@ drop table if exists t1; --enable_warnings +--error ER_PARTITION_FUNCTION_IS_NOT_ALLOWED +create table t1 (a int) partition by list ((a/3)*10 div 1) +(partition p0 values in (0), partition p1 values in (1)); + # # Bug #30695: An apostrophe ' in the comment of the ADD PARTITION causes the Server to crash. # diff --git a/sql/item_func.h b/sql/item_func.h index e09b584de95..c73b46f21e6 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -296,7 +296,6 @@ class Item_num_op :public Item_func_numhybrid void print(String *str) { print_op(str); } void find_num_type(); String *str_op(String *str) { DBUG_ASSERT(0); return 0; } - bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -382,6 +381,7 @@ class Item_func_additive_op :public Item_num_op public: Item_func_additive_op(Item *a,Item *b) :Item_num_op(a,b) {} void result_precision(); + bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -416,6 +416,7 @@ public: double real_op(); my_decimal *decimal_op(my_decimal *); void result_precision(); + bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -456,6 +457,7 @@ public: const char *func_name() const { return "%"; } void result_precision(); void fix_length_and_dec(); + bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; From e743c791cba5bca00b81f21d7b5e5ea1c19ce9b5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jan 2008 14:14:34 +0300 Subject: [PATCH 103/527] Fix Bug#27812 "an ampersand is missed in sql/sql_bitmap.h, line 68" --- sql/sql_bitmap.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_bitmap.h b/sql/sql_bitmap.h index 9a765120895..97accefe8aa 100644 --- a/sql/sql_bitmap.h +++ b/sql/sql_bitmap.h @@ -65,7 +65,7 @@ public: my_bool is_clear_all() const { return bitmap_is_clear_all(&map); } my_bool is_set_all() const { return bitmap_is_set_all(&map); } my_bool is_subset(const Bitmap& map2) const { return bitmap_is_subset(&map, &map2.map); } - my_bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, map2.map); } + my_bool is_overlapping(const Bitmap& map2) const { return bitmap_is_overlapping(&map, &map2.map); } my_bool operator==(const Bitmap& map2) const { return bitmap_cmp(&map, &map2.map); } char *print(char *buf) const { From b46d5d6b2fbf5cd67c9c853f489221d50bec973a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jan 2008 10:37:44 -0200 Subject: [PATCH 104/527] Fix test case of Bug 30331 mysql-test/r/lock_multi.result: Update test case result. mysql-test/t/lock_multi.test: Don't print the value of Table_lock_waited, check the precedence instead. Unlock the table before dropping. --- mysql-test/r/lock_multi.result | 10 ++++------ mysql-test/t/lock_multi.test | 10 ++++++++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/lock_multi.result b/mysql-test/r/lock_multi.result index e17b56e0695..cd05fc1473f 100644 --- a/mysql-test/r/lock_multi.result +++ b/mysql-test/r/lock_multi.result @@ -147,12 +147,10 @@ drop table if exists t1,t2; create table t1 (a int); flush status; lock tables t1 read; -show status like 'Table_locks_waited'; -Variable_name Value -Table_locks_waited 0 insert into t1 values(1);; +unlock tables; drop table t1; -show status like 'Table_locks_waited'; -Variable_name Value -Table_locks_waited 1 +select @tlwa < @tlwb; +@tlwa < @tlwb +1 End of 5.1 tests diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index c8feace5c4a..f1e9c0d253f 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -450,7 +450,7 @@ drop table if exists t1,t2; create table t1 (a int); flush status; lock tables t1 read; -show status like 'Table_locks_waited'; +let $tlwa= `show status like 'Table_locks_waited'`; connect (waiter,localhost,root,,); connection waiter; --send insert into t1 values(1); @@ -459,9 +459,15 @@ let $wait_condition= select count(*) = 1 from information_schema.processlist where state = "Locked" and info = "insert into t1 values(1)"; --source include/wait_condition.inc +let $tlwb= `show status like 'Table_locks_waited'`; +unlock tables; drop table t1; disconnect waiter; connection default; -show status like 'Table_locks_waited'; +--disable_query_log +eval SET @tlwa= SUBSTRING_INDEX('$tlwa', ' ', -1); +eval SET @tlwb= SUBSTRING_INDEX('$tlwb', ' ', -1); +--enable_query_log +select @tlwa < @tlwb; --echo End of 5.1 tests From 6b4274cc616dc70a912914e8a04163b18757f311 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jan 2008 15:02:03 +0100 Subject: [PATCH 105/527] ndb - bug#31477 - in 5.1 move ndb_bug31477.test to suite/ndb mysql-test/suite/ndb/t/ndb_bug31477.test: Rename: mysql-test/t/ndb_bug31477.test -> mysql-test/suite/ndb/t/ndb_bug31477.test mysql-test/suite/ndb/r/ndb_bug31477.result: Rename: mysql-test/r/ndb_bug31477.result -> mysql-test/suite/ndb/r/ndb_bug31477.result --- mysql-test/{ => suite/ndb}/r/ndb_bug31477.result | 0 mysql-test/{ => suite/ndb}/t/ndb_bug31477.test | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename mysql-test/{ => suite/ndb}/r/ndb_bug31477.result (100%) rename mysql-test/{ => suite/ndb}/t/ndb_bug31477.test (100%) diff --git a/mysql-test/r/ndb_bug31477.result b/mysql-test/suite/ndb/r/ndb_bug31477.result similarity index 100% rename from mysql-test/r/ndb_bug31477.result rename to mysql-test/suite/ndb/r/ndb_bug31477.result diff --git a/mysql-test/t/ndb_bug31477.test b/mysql-test/suite/ndb/t/ndb_bug31477.test similarity index 100% rename from mysql-test/t/ndb_bug31477.test rename to mysql-test/suite/ndb/t/ndb_bug31477.test From 4c414b10d5ae1971de8ea667dd155c1fd6116a6f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jan 2008 15:25:27 +0100 Subject: [PATCH 106/527] ndb - bug#34118 - hash index trigger vs. disk mysql-test/suite/ndb/r/ndb_dd_basic.result: bug#34118 hash index trigger disk flag mysql-test/suite/ndb/t/ndb_dd_basic.test: bug#34118 hash index trigger disk flag storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: bug#34118 hash index trigger disk flag storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: bug#34118 hash index trigger disk flag storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp: bug#34118 hash index trigger disk flag --- mysql-test/suite/ndb/r/ndb_dd_basic.result | 12 +++++++ mysql-test/suite/ndb/t/ndb_dd_basic.test | 15 +++++++++ storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 17 ++++++---- .../kernel/blocks/dbtup/DbtupExecQuery.cpp | 9 +++-- .../src/kernel/blocks/dbtup/DbtupTrigger.cpp | 33 ++++++++++++------- 5 files changed, 66 insertions(+), 20 deletions(-) diff --git a/mysql-test/suite/ndb/r/ndb_dd_basic.result b/mysql-test/suite/ndb/r/ndb_dd_basic.result index f04905b8d13..2a79fcfb3c8 100644 --- a/mysql-test/suite/ndb/r/ndb_dd_basic.result +++ b/mysql-test/suite/ndb/r/ndb_dd_basic.result @@ -501,6 +501,18 @@ 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; diff --git a/mysql-test/suite/ndb/t/ndb_dd_basic.test b/mysql-test/suite/ndb/t/ndb_dd_basic.test index 8c83c2febe5..fc35ef03b39 100644 --- a/mysql-test/suite/ndb/t/ndb_dd_basic.test +++ b/mysql-test/suite/ndb/t/ndb_dd_basic.test @@ -439,6 +439,21 @@ 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 ################### diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index e70b4a17719..1972306b4f4 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -2202,17 +2202,20 @@ private: void checkImmediateTriggersAfterInsert(KeyReqStruct *req_struct, Operationrec* regOperPtr, - Tablerec* tablePtr); + Tablerec* tablePtr, + bool disk); void checkImmediateTriggersAfterUpdate(KeyReqStruct *req_struct, Operationrec* regOperPtr, - Tablerec* tablePtr); + Tablerec* tablePtr, + bool disk); void checkImmediateTriggersAfterDelete(KeyReqStruct *req_struct, Operationrec* regOperPtr, - Tablerec* tablePtr); + Tablerec* tablePtr, + bool disk); #if 0 void checkDeferredTriggers(Signal* signal, @@ -2226,7 +2229,8 @@ private: void fireImmediateTriggers(KeyReqStruct *req_struct, DLList& triggerList, - Operationrec* regOperPtr); + Operationrec* regOperPtr, + bool disk); void fireDeferredTriggers(KeyReqStruct *req_struct, DLList& triggerList, @@ -2239,12 +2243,13 @@ private: void executeTriggers(KeyReqStruct *req_struct, DLList& triggerList, - Operationrec* regOperPtr); + Operationrec* regOperPtr, + bool disk); void executeTrigger(KeyReqStruct *req_struct, TupTriggerData* trigPtr, Operationrec* regOperPtr, - bool disk = true); + bool disk); bool readTriggerInfo(TupTriggerData* trigPtr, Operationrec* regOperPtr, diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 4f639a4c7a4..17a0d7ed5b7 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -749,7 +749,8 @@ void Dbtup::execTUPKEYREQ(Signal* signal) } checkImmediateTriggersAfterInsert(&req_struct, regOperPtr, - regTabPtr); + regTabPtr, + disk_page != RNIL); set_change_mask_state(regOperPtr, SET_ALL_MASK); sendTUPKEYCONF(signal, &req_struct, regOperPtr); return; @@ -782,7 +783,8 @@ void Dbtup::execTUPKEYREQ(Signal* signal) } checkImmediateTriggersAfterUpdate(&req_struct, regOperPtr, - regTabPtr); + regTabPtr, + disk_page != RNIL); // XXX use terrorCode for now since all methods are void if (terrorCode != 0) { @@ -813,7 +815,8 @@ void Dbtup::execTUPKEYREQ(Signal* signal) */ checkImmediateTriggersAfterDelete(&req_struct, regOperPtr, - regTabPtr); + regTabPtr, + disk_page != RNIL); set_change_mask_state(regOperPtr, DELETE_CHANGES); sendTUPKEYCONF(signal, &req_struct, regOperPtr); return; diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp index 09d71a19add..0ae6d0f4ac6 100644 --- a/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp +++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp @@ -369,7 +369,8 @@ Dbtup::dropTrigger(Tablerec* table, const DropTrigReq* req, BlockNumber sender) void Dbtup::checkImmediateTriggersAfterInsert(KeyReqStruct *req_struct, Operationrec *regOperPtr, - Tablerec *regTablePtr) + Tablerec *regTablePtr, + bool disk) { if(refToBlock(req_struct->TC_ref) != DBTC) { return; @@ -380,14 +381,16 @@ Dbtup::checkImmediateTriggersAfterInsert(KeyReqStruct *req_struct, jam(); fireImmediateTriggers(req_struct, regTablePtr->afterInsertTriggers, - regOperPtr); + regOperPtr, + disk); } } void Dbtup::checkImmediateTriggersAfterUpdate(KeyReqStruct *req_struct, Operationrec* regOperPtr, - Tablerec* regTablePtr) + Tablerec* regTablePtr, + bool disk) { if(refToBlock(req_struct->TC_ref) != DBTC) { return; @@ -398,21 +401,24 @@ Dbtup::checkImmediateTriggersAfterUpdate(KeyReqStruct *req_struct, jam(); fireImmediateTriggers(req_struct, regTablePtr->afterUpdateTriggers, - regOperPtr); + regOperPtr, + disk); } if ((regOperPtr->op_struct.primary_replica) && (!(regTablePtr->constraintUpdateTriggers.isEmpty()))) { jam(); fireImmediateTriggers(req_struct, regTablePtr->constraintUpdateTriggers, - regOperPtr); + regOperPtr, + disk); } } void Dbtup::checkImmediateTriggersAfterDelete(KeyReqStruct *req_struct, Operationrec* regOperPtr, - Tablerec* regTablePtr) + Tablerec* regTablePtr, + bool disk) { if(refToBlock(req_struct->TC_ref) != DBTC) { return; @@ -423,7 +429,8 @@ Dbtup::checkImmediateTriggersAfterDelete(KeyReqStruct *req_struct, jam(); executeTriggers(req_struct, regTablePtr->afterDeleteTriggers, - regOperPtr); + regOperPtr, + disk); } } @@ -547,7 +554,8 @@ end: void Dbtup::fireImmediateTriggers(KeyReqStruct *req_struct, DLList& triggerList, - Operationrec* const regOperPtr) + Operationrec* const regOperPtr, + bool disk) { TriggerPtr trigPtr; triggerList.first(trigPtr); @@ -558,7 +566,8 @@ Dbtup::fireImmediateTriggers(KeyReqStruct *req_struct, jam(); executeTrigger(req_struct, trigPtr.p, - regOperPtr); + regOperPtr, + disk); }//if triggerList.next(trigPtr); }//while @@ -621,7 +630,8 @@ Dbtup::fireDetachedTriggers(KeyReqStruct *req_struct, void Dbtup::executeTriggers(KeyReqStruct *req_struct, DLList& triggerList, - Operationrec* regOperPtr) + Operationrec* regOperPtr, + bool disk) { TriggerPtr trigPtr; triggerList.first(trigPtr); @@ -629,7 +639,8 @@ void Dbtup::executeTriggers(KeyReqStruct *req_struct, jam(); executeTrigger(req_struct, trigPtr.p, - regOperPtr); + regOperPtr, + disk); triggerList.next(trigPtr); } From e524e0f146e403f2a8c8c5fe62f39366aa7cb0b9 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jan 2008 21:58:57 -0500 Subject: [PATCH 107/527] Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency to storage engines that include mysqld_error.h extra/yassl/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. sql/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/archive/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/blackhole/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/csv/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/example/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/federated/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/heap/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/innobase/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/myisam/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. storage/myisammrg/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. vio/CMakeLists.txt: Bug#31929 Windows build fails with >=4 Parallel build threads. - Add GenError Dependency. --- extra/yassl/CMakeLists.txt | 1 + mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ sql/CMakeLists.txt | 2 +- storage/archive/CMakeLists.txt | 1 + storage/blackhole/CMakeLists.txt | 1 + storage/csv/CMakeLists.txt | 1 + storage/example/CMakeLists.txt | 1 + storage/federated/CMakeLists.txt | 1 + storage/heap/CMakeLists.txt | 1 + storage/innobase/CMakeLists.txt | 1 + storage/myisam/CMakeLists.txt | 1 + storage/myisammrg/CMakeLists.txt | 1 + vio/CMakeLists.txt | 1 + 14 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/extra/yassl/CMakeLists.txt b/extra/yassl/CMakeLists.txt index 26e682cbb0c..ffb72b831af 100755 --- a/extra/yassl/CMakeLists.txt +++ b/extra/yassl/CMakeLists.txt @@ -24,4 +24,5 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr src/yassl_imp.cpp src/yassl_int.cpp) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(yassl ${YASSL_SOURCES}) + ADD_DEPENDENCIES(yassl GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 77abc4e6fa5..8a943c269fb 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -167,5 +167,5 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "lex_hash.h;message.rc;message.h;sql_yacc.h;sql_yacc.cc") ADD_LIBRARY(udf_example MODULE udf_example.c udf_example.def) -ADD_DEPENDENCIES(udf_example strings) +ADD_DEPENDENCIES(udf_example strings GenError) TARGET_LINK_LIBRARIES(udf_example strings wsock32) diff --git a/storage/archive/CMakeLists.txt b/storage/archive/CMakeLists.txt index 9a1cfe081b6..1c53ad15c07 100644 --- a/storage/archive/CMakeLists.txt +++ b/storage/archive/CMakeLists.txt @@ -25,4 +25,5 @@ SET(ARCHIVE_SOURCES azio.c ha_archive.cc ha_archive.h) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(archive ${ARCHIVE_SOURCES}) + ADD_DEPENDENCIES(archive GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/blackhole/CMakeLists.txt b/storage/blackhole/CMakeLists.txt index 9b6dd7adac9..b11330db255 100644 --- a/storage/blackhole/CMakeLists.txt +++ b/storage/blackhole/CMakeLists.txt @@ -24,4 +24,5 @@ SET(BLACKHOLE_SOURCES ha_blackhole.cc ha_blackhole.h) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(blackhole ${BLACKHOLE_SOURCES}) + ADD_DEPENDENCIES(blackhole GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/csv/CMakeLists.txt b/storage/csv/CMakeLists.txt index bb0df45e5f4..528b9928c76 100644 --- a/storage/csv/CMakeLists.txt +++ b/storage/csv/CMakeLists.txt @@ -24,4 +24,5 @@ SET(CSV_SOURCES ha_tina.cc ha_tina.h transparent_file.cc transparent_file.h) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(csv ${CSV_SOURCES}) + ADD_DEPENDENCIES(csv GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/example/CMakeLists.txt b/storage/example/CMakeLists.txt index 99c223f3f85..0af60e1df83 100644 --- a/storage/example/CMakeLists.txt +++ b/storage/example/CMakeLists.txt @@ -24,4 +24,5 @@ SET(EXAMPLE_SOURCES ha_example.cc) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(example ${EXAMPLE_SOURCES}) + ADD_DEPENDENCIES(example GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/federated/CMakeLists.txt b/storage/federated/CMakeLists.txt index 62064a633b1..b96f68a3c37 100644 --- a/storage/federated/CMakeLists.txt +++ b/storage/federated/CMakeLists.txt @@ -24,4 +24,5 @@ SET(FEDERATED_SOURCES ha_federated.cc) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(federated ${FEDERATED_SOURCES}) + ADD_DEPENDENCIES(federated GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt index fd3ce149b2c..f8f0aa91464 100755 --- a/storage/heap/CMakeLists.txt +++ b/storage/heap/CMakeLists.txt @@ -29,4 +29,5 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(heap ${HEAP_SOURCES}) + ADD_DEPENDENCIES(heap GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/innobase/CMakeLists.txt b/storage/innobase/CMakeLists.txt index 47b1a566cd8..c4246abd30d 100755 --- a/storage/innobase/CMakeLists.txt +++ b/storage/innobase/CMakeLists.txt @@ -58,4 +58,5 @@ SET(INNOBASE_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(innobase ${INNOBASE_SOURCES}) + ADD_DEPENDENCIES(innobase GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/storage/myisam/CMakeLists.txt b/storage/myisam/CMakeLists.txt index 9d91bf0560a..4436c8fa7c4 100755 --- a/storage/myisam/CMakeLists.txt +++ b/storage/myisam/CMakeLists.txt @@ -37,6 +37,7 @@ SET(MYISAM_SOURCES ft_boolean_search.c ft_nlq_search.c ft_parser.c ft_static.c IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(myisam ${MYISAM_SOURCES}) + ADD_DEPENDENCIES(myisam GenError) ADD_EXECUTABLE(myisam_ftdump myisam_ftdump.c) TARGET_LINK_LIBRARIES(myisam_ftdump myisam mysys debug dbug strings zlib wsock32) diff --git a/storage/myisammrg/CMakeLists.txt b/storage/myisammrg/CMakeLists.txt index 848f2dfea43..403ca6c2776 100755 --- a/storage/myisammrg/CMakeLists.txt +++ b/storage/myisammrg/CMakeLists.txt @@ -30,4 +30,5 @@ SET(MYISAMMRG_SOURCES myrg_close.c myrg_create.c myrg_delete.c myrg_extra.c myr IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(myisammrg ${MYISAMMRG_SOURCES}) + ADD_DEPENDENCIES(myisammrg GenError) ENDIF(NOT SOURCE_SUBLIBS) diff --git a/vio/CMakeLists.txt b/vio/CMakeLists.txt index 83cd6f65e6d..164bcde7c4b 100755 --- a/vio/CMakeLists.txt +++ b/vio/CMakeLists.txt @@ -23,5 +23,6 @@ SET(VIO_SOURCES vio.c viosocket.c viossl.c viosslfactories.c) IF(NOT SOURCE_SUBLIBS) ADD_LIBRARY(vio ${VIO_SOURCES}) + ADD_DEPENDENCIES(vio GenError) ENDIF(NOT SOURCE_SUBLIBS) From 6c19c971b618e2e9d9728de2345e08e1ca231fa7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 08:09:56 +0100 Subject: [PATCH 108/527] ndb - bug#30172 Backup can assert with "big" table definitions Correct condition before fetching next meta-table Increase meta-buffer, to cope with atleast 2 tables ndb/src/kernel/blocks/backup/Backup.cpp: Correct condition, before fetching new meta-table ndb/src/kernel/blocks/backup/Backup.hpp: Make sure atleast 2 tables can fix --- ndb/src/kernel/blocks/backup/Backup.cpp | 14 ++++++++------ ndb/src/kernel/blocks/backup/Backup.hpp | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ndb/src/kernel/blocks/backup/Backup.cpp b/ndb/src/kernel/blocks/backup/Backup.cpp index 70721bfca56..52ab11b8388 100644 --- a/ndb/src/kernel/blocks/backup/Backup.cpp +++ b/ndb/src/kernel/blocks/backup/Backup.cpp @@ -374,16 +374,18 @@ Backup::execCONTINUEB(Signal* signal) ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr); FsBuffer & buf = filePtr.p->operation.dataBuffer; - if(buf.getFreeSize() + buf.getMinRead() < buf.getUsableSize()) { + if(buf.getFreeSize() < buf.getMaxWrite()) { jam(); TablePtr tabPtr LINT_SET_PTR; c_tablePool.getPtr(tabPtr, Tdata2); - DEBUG_OUT("Backup - Buffer full - " << buf.getFreeSize() - << " + " << buf.getMinRead() - << " < " << buf.getUsableSize() - << " - tableId = " << tabPtr.p->tableId); - + DEBUG_OUT("Backup - Buffer full - " + << buf.getFreeSize() + << " < " << buf.getMaxWrite() + << " (sz: " << buf.getUsableSize() + << " getMinRead: " << buf.getMinRead() + << ") - tableId = " << tabPtr.p->tableId); + signal->theData[0] = BackupContinueB::BUFFER_FULL_META; signal->theData[1] = Tdata1; signal->theData[2] = Tdata2; diff --git a/ndb/src/kernel/blocks/backup/Backup.hpp b/ndb/src/kernel/blocks/backup/Backup.hpp index 8b0c27727b0..e67d8f09f0e 100644 --- a/ndb/src/kernel/blocks/backup/Backup.hpp +++ b/ndb/src/kernel/blocks/backup/Backup.hpp @@ -518,7 +518,7 @@ public: Uint32 m_diskless; STATIC_CONST(NO_OF_PAGES_META_FILE = - (MAX_WORDS_META_FILE + BACKUP_WORDS_PER_PAGE - 1) / + (2*MAX_WORDS_META_FILE + BACKUP_WORDS_PER_PAGE - 1) / BACKUP_WORDS_PER_PAGE); /** From d132dd6299e03e9afe35638ba1bcca5ddb24ba44 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 11:58:10 +0100 Subject: [PATCH 109/527] ndb - bug#34160 make sure release of not added ptr does not corrupt hashtable --- ndb/src/kernel/vm/DLHashTable.hpp | 22 ++++++++++++++++++---- ndb/src/kernel/vm/DLHashTable2.hpp | 22 ++++++++++++++++++---- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/ndb/src/kernel/vm/DLHashTable.hpp b/ndb/src/kernel/vm/DLHashTable.hpp index acf53944b07..cc6802db2bc 100644 --- a/ndb/src/kernel/vm/DLHashTable.hpp +++ b/ndb/src/kernel/vm/DLHashTable.hpp @@ -45,8 +45,8 @@ public: /** * Seize element from pool - return i * - * Note must be either added using add or released - * using release + * Note *must* be added using add (even before hash.release) + * or be released using pool */ bool seize(Ptr &); @@ -374,7 +374,14 @@ DLHashTable::remove(Ptr & ptr){ prevP->nextHash = next; } else { const Uint32 hv = ptr.p->hashValue() & mask; - hashValues[hv] = next; + if (hashValues[hv] == ptr.i) + { + hashValues[hv] = next; + } + else + { + // Will add assert in 5.1 + } } if(next != RNIL){ @@ -395,7 +402,14 @@ DLHashTable::release(Ptr & ptr){ prevP->nextHash = next; } else { const Uint32 hv = ptr.p->hashValue() & mask; - hashValues[hv] = next; + if (hashValues[hv] == ptr.i) + { + hashValues[hv] = next; + } + else + { + // Will add assert in 5.1 + } } if(next != RNIL){ diff --git a/ndb/src/kernel/vm/DLHashTable2.hpp b/ndb/src/kernel/vm/DLHashTable2.hpp index ad03e8ed3ba..20515af8cf6 100644 --- a/ndb/src/kernel/vm/DLHashTable2.hpp +++ b/ndb/src/kernel/vm/DLHashTable2.hpp @@ -43,8 +43,8 @@ public: /** * Seize element from pool - return i * - * Note must be either added using add or released - * using release + * Note *must* be added using add (even before hash.release) + * or be released using pool */ bool seize(Ptr &); @@ -375,7 +375,14 @@ DLHashTable2::remove(Ptr & ptr){ prevP->nextHash = next; } else { const Uint32 hv = ptr.p->hashValue() & mask; - hashValues[hv] = next; + if (hashValues[hv] == ptr.i) + { + hashValues[hv] = next; + } + else + { + // Will add assert in 5.1 + } } if(next != RNIL){ @@ -396,7 +403,14 @@ DLHashTable2::release(Ptr & ptr){ prevP->nextHash = next; } else { const Uint32 hv = ptr.p->hashValue() & mask; - hashValues[hv] = next; + if (hashValues[hv] == ptr.i) + { + hashValues[hv] = next; + } + else + { + // Will add assert in 5.1 + } } if(next != RNIL){ From 39509d64c370b5a309f1c905d847ea0f92921327 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 18:27:41 +0300 Subject: [PATCH 110/527] A fix and a test case for Bug#34166 Server crash in SHOW OPEN TABLES and pre-locking. The crash was caused by an implicit assumption in check_table_access() that table_list parameter is always a part of lex->query_tables. When iterating over the passed list of tables, check_table_access() used to stop only when lex->query_tables_last_not_own was reached. In case of pre-locking, lex->query_tables_last_own is not NULL and points to some element of lex->query_tables. When the parameter of check_table_access() was not part of lex->query_tables, loop invariant could never be violated and a crash would happen when the current table pointer would point beyond the end of the provided list. The fix is to change the signature of check_table_access() to also accept a numeric limit of loop iterations, similarly to check_grant(), and supply this limit in all places when we want to check access of tables that are outside lex->query_tables, or just want to check access to one table. mysql-test/r/information_schema.result: Update test results (Bug#34166). mysql-test/t/information_schema.test: Add a test case for Bug#34166. sql/mysql_priv.h: Change signature of check_table_access() to accept a numeric limit of tables to check. sql/sp_head.cc: Update to the new signature of check_table_access(). sql/sql_acl.cc: Improve code clarity: if there is a numeric limit, we should not need to look at first_not_own_table. sql/sql_base.cc: Update to the new signature of check_table_access(). sql/sql_cache.cc: Update to the new signature of check_table_access(). sql/sql_parse.cc: Update to the new signature of check_table_access(). Change check_table_access() to accept an optional numeric limit of tables to check. A crash would happen when check_table_access() was passed a list of tables that is not part of lex->query_tables and lex->query_tables_last_own was not NULL. sql/sql_plugin.cc: Update to the new signature of check_table_access(). sql/sql_prepare.cc: Update to the new signature of check_table_access(). sql/sql_show.cc: Update to the new signature of check_table_access(). Ensure that check_table_access() only checks access to the first table in the table list when called from list_open_tables(). list_open_tables() supplies a table list that is created on stack, whereas check_table_access() used to assume that the supplied list is a part of thd->lex. sql/sql_trigger.cc: Update to the new signature of check_table_access(). sql/sql_view.cc: Update to the new signature of check_table_access(). --- mysql-test/r/information_schema.result | 15 ++++++ mysql-test/t/information_schema.test | 22 ++++++++ sql/mysql_priv.h | 4 +- sql/sp_head.cc | 4 +- sql/sql_acl.cc | 2 +- sql/sql_base.cc | 2 +- sql/sql_cache.cc | 2 +- sql/sql_parse.cc | 74 ++++++++++++++------------ sql/sql_plugin.cc | 2 +- sql/sql_prepare.cc | 6 +-- sql/sql_show.cc | 6 +-- sql/sql_trigger.cc | 2 +- sql/sql_view.cc | 6 +-- 13 files changed, 94 insertions(+), 53 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 0cb4b10a789..dc76a2693be 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1619,4 +1619,19 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E show events where Db= 'information_schema'; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation use test; +# +# Bug#34166: Server crash in SHOW OPEN TABLES and prelocking +# +drop table if exists t1; +drop function if exists f1; +create table t1 (a int); +create function f1() returns int +begin +insert into t1 (a) values (1); +return 0; +end| +show open tables where f1()=0; +show open tables where f1()=0; +drop table t1; +drop function f1; End of 5.1 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 2a9319fe010..6e76a043645 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1248,4 +1248,26 @@ show events from information_schema; show events where Db= 'information_schema'; use test; +--echo # +--echo # Bug#34166: Server crash in SHOW OPEN TABLES and prelocking +--echo # +--disable_warnings +drop table if exists t1; +drop function if exists f1; +--enable_warnings +create table t1 (a int); +delimiter |; +create function f1() returns int +begin + insert into t1 (a) values (1); + return 0; +end| +delimiter ;| +--disable_result_log +show open tables where f1()=0; +show open tables where f1()=0; +--enable_result_log +drop table t1; +drop function f1; + --echo End of 5.1 tests. diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index f61267711b0..696e0bce50c 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1015,7 +1015,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv, bool no_grant, bool no_errors, bool schema_db); bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables, - bool no_errors); + uint number, bool no_errors); bool check_global_access(THD *thd, ulong want_access); #else inline bool check_access(THD *thd, ulong access, const char *db, @@ -1027,7 +1027,7 @@ inline bool check_access(THD *thd, ulong access, const char *db, return false; } inline bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables, - bool no_errors) + uint number, bool no_errors) { return false; } inline bool check_global_access(THD *thd, ulong want_access) { return false; } diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 74f5bf55828..036101021f5 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2265,7 +2265,7 @@ bool check_show_routine_access(THD *thd, sp_head *sp, bool *full_access) bzero((char*) &tables,sizeof(tables)); tables.db= (char*) "mysql"; tables.table_name= tables.alias= (char*) "proc"; - *full_access= (!check_table_access(thd, SELECT_ACL, &tables, 1) || + *full_access= (!check_table_access(thd, SELECT_ACL, &tables, 1, TRUE) || (!strcmp(sp->m_definer_user.str, thd->security_ctx->priv_user) && !strcmp(sp->m_definer_host.str, @@ -2712,7 +2712,7 @@ int sp_instr::exec_open_and_lock_tables(THD *thd, TABLE_LIST *tables) Check whenever we have access to tables for this statement and open and lock them before executing instructions core function. */ - if (check_table_access(thd, SELECT_ACL, tables, 0) + if (check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE) || open_and_lock_tables(thd, tables)) result= -1; else diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index d2d26da229a..da0b7bb89fc 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3862,7 +3862,7 @@ bool check_grant(THD *thd, ulong want_access, TABLE_LIST *tables, of other queries). For simple queries first_not_own_table is 0. */ for (i= 0, table= tables; - table != first_not_own_table && i < number; + i < number && table != first_not_own_table; table= table->next_global, i++) { /* Remove SHOW_VIEW_ACL, because it will be checked during making view */ diff --git a/sql/sql_base.cc b/sql/sql_base.cc index c50c89d6937..b79ce3fe70e 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -799,7 +799,7 @@ OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild) table_list.table_name= share->table_name.str; table_list.grant.privilege=0; - if (check_table_access(thd,SELECT_ACL | EXTRA_ACL,&table_list,1)) + if (check_table_access(thd,SELECT_ACL | EXTRA_ACL,&table_list, 1, TRUE)) continue; /* need to check if we haven't already listed it */ for (table= open_list ; table ; table=table->next) diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 47301e1d205..be2322360fb 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1378,7 +1378,7 @@ def_week_frmt: %lu", table_list.db = table->db(); table_list.alias= table_list.table_name= table->table(); #ifndef NO_EMBEDDED_ACCESS_CHECKS - if (check_table_access(thd,SELECT_ACL,&table_list,1)) + if (check_table_access(thd,SELECT_ACL,&table_list, 1, TRUE)) { DBUG_PRINT("qcache", ("probably no SELECT access to %s.%s => return to normal processing", diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b60a72e4c53..3a89b745d4a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -495,7 +495,7 @@ static bool check_merge_table_access(THD *thd, char *db, tlist->db= db; /* purecov: inspected */ } error= check_table_access(thd, SELECT_ACL | UPDATE_ACL | DELETE_ACL, - table_list,0); + table_list, UINT_MAX, FALSE); } return error; } @@ -1994,7 +1994,7 @@ mysql_execute_command(THD *thd) res= check_table_access(thd, lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL, - all_tables, 0); + all_tables, UINT_MAX, FALSE); } else res= check_access(thd, @@ -2019,7 +2019,7 @@ mysql_execute_command(THD *thd) break; } case SQLCOM_DO: - if (check_table_access(thd, SELECT_ACL, all_tables, 0) || + if (check_table_access(thd, SELECT_ACL, all_tables, UINT_MAX, FALSE) || open_and_lock_tables(thd, all_tables)) goto error; @@ -2116,7 +2116,7 @@ mysql_execute_command(THD *thd) case SQLCOM_BACKUP_TABLE: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL, all_tables, 0) || + if (check_table_access(thd, SELECT_ACL, all_tables, UINT_MAX, FALSE) || check_global_access(thd, FILE_ACL)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; @@ -2128,7 +2128,7 @@ mysql_execute_command(THD *thd) case SQLCOM_RESTORE_TABLE: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, INSERT_ACL, all_tables, 0) || + if (check_table_access(thd, INSERT_ACL, all_tables, UINT_MAX, FALSE) || check_global_access(thd, FILE_ACL)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; @@ -2677,7 +2677,8 @@ end_with_restore_list: case SQLCOM_CHECKSUM: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL | EXTRA_ACL, all_tables, 0)) + if (check_table_access(thd, SELECT_ACL | EXTRA_ACL, all_tables, + UINT_MAX, FALSE)) goto error; /* purecov: inspected */ res = mysql_checksum_table(thd, first_table, &lex->check_opt); break; @@ -2685,7 +2686,8 @@ end_with_restore_list: case SQLCOM_REPAIR: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, 0)) + if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, + UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; res= mysql_repair_table(thd, first_table, &lex->check_opt); @@ -2704,7 +2706,8 @@ end_with_restore_list: case SQLCOM_CHECK: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL | EXTRA_ACL , all_tables, 0)) + if (check_table_access(thd, SELECT_ACL | EXTRA_ACL , all_tables, + UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; res = mysql_check_table(thd, first_table, &lex->check_opt); @@ -2715,7 +2718,8 @@ end_with_restore_list: case SQLCOM_ANALYZE: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, 0)) + if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, + UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; res= mysql_analyze_table(thd, first_table, &lex->check_opt); @@ -2735,7 +2739,8 @@ end_with_restore_list: case SQLCOM_OPTIMIZE: { DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, 0)) + if (check_table_access(thd, SELECT_ACL | INSERT_ACL, all_tables, + UINT_MAX, FALSE)) goto error; /* purecov: inspected */ thd->enable_slow_log= opt_log_slow_admin_statements; res= (specialflag & (SPECIAL_SAFE_MODE | SPECIAL_NO_NEW_FUNC)) ? @@ -3064,7 +3069,7 @@ end_with_restore_list: DBUG_ASSERT(first_table == all_tables && first_table != 0); if (!lex->drop_temporary) { - if (check_table_access(thd, DROP_ACL, all_tables, 0)) + if (check_table_access(thd, DROP_ACL, all_tables, UINT_MAX, FALSE)) goto error; /* purecov: inspected */ if (end_active_trans(thd)) goto error; @@ -3168,7 +3173,7 @@ end_with_restore_list: if (lex->autocommit && end_active_trans(thd)) goto error; - if ((check_table_access(thd, SELECT_ACL, all_tables, 0) || + if ((check_table_access(thd, SELECT_ACL, all_tables, UINT_MAX, FALSE) || open_and_lock_tables(thd, all_tables))) goto error; if (lex->one_shot_set && not_all_support_one_shot(lex_var_list)) @@ -3210,7 +3215,8 @@ end_with_restore_list: /* we must end the trasaction first, regardless of anything */ if (end_active_trans(thd)) goto error; - if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables, 0)) + if (check_table_access(thd, LOCK_TABLES_ACL | SELECT_ACL, all_tables, + UINT_MAX, FALSE)) goto error; thd->in_lock_tables=1; thd->options|= OPTION_TABLE_LOCK; @@ -3704,7 +3710,7 @@ end_with_restore_list: #endif case SQLCOM_HA_OPEN: DBUG_ASSERT(first_table == all_tables && first_table != 0); - if (check_table_access(thd, SELECT_ACL, all_tables, 0)) + if (check_table_access(thd, SELECT_ACL, all_tables, UINT_MAX, FALSE)) goto error; res= mysql_ha_open(thd, first_table, 0); break; @@ -3952,7 +3958,7 @@ create_sp_error: This will cache all SP and SF and open and lock all tables required for execution. */ - if (check_table_access(thd, SELECT_ACL, all_tables, 0) || + if (check_table_access(thd, SELECT_ACL, all_tables, UINT_MAX, FALSE) || open_and_lock_tables(thd, all_tables)) goto error; @@ -4299,7 +4305,7 @@ create_sp_error: } case SQLCOM_DROP_VIEW: { - if (check_table_access(thd, DROP_ACL, all_tables, 0) || + if (check_table_access(thd, DROP_ACL, all_tables, UINT_MAX, FALSE) || end_active_trans(thd)) goto error; /* Conditionally writes to binlog. */ @@ -4778,7 +4784,7 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables) subselects_tables= subselects_tables->next_global; } if (subselects_tables && - (check_table_access(thd, SELECT_ACL, subselects_tables, 0))) + (check_table_access(thd, SELECT_ACL, subselects_tables, UINT_MAX, FALSE))) return 1; } return 0; @@ -5011,39 +5017,39 @@ static bool check_show_access(THD *thd, TABLE_LIST *table) /* Check the privilege for all used tables. - SYNOPSYS - check_table_access() - thd Thread context - want_access Privileges requested - tables List of tables to be checked - no_errors FALSE/TRUE - report/don't report error to - the client (using my_error() call). + @param thd Thread context + @param want_access Privileges requested + @param tables List of tables to be checked + @param number Check at most this number of tables. + @param no_errors FALSE/TRUE - report/don't report error to + the client (using my_error() call). - NOTES + @note Table privileges are cached in the table list for GRANT checking. This functions assumes that table list used and thd->lex->query_tables_own_last value correspond to each other (the latter should be either 0 or point to next_global member of one of elements of this table list). - RETURN VALUE - FALSE - OK - TRUE - Access denied + @retval FALSE OK + @retval TRUE Access denied */ bool check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, - bool no_errors) + uint number, bool no_errors) { TABLE_LIST *org_tables= tables; TABLE_LIST *first_not_own_table= thd->lex->first_not_own_table(); + uint i= 0; Security_context *sctx= thd->security_ctx, *backup_ctx= thd->security_ctx; /* The check that first_not_own_table is not reached is for the case when the given table list refers to the list for prelocking (contains tables of other queries). For simple queries first_not_own_table is 0. */ - for (; tables != first_not_own_table; tables= tables->next_global) + for (; i < number && tables != first_not_own_table; + tables= tables->next_global, i++) { if (tables->security_ctx) sctx= tables->security_ctx; @@ -5093,7 +5099,7 @@ check_table_access(THD *thd, ulong want_access,TABLE_LIST *tables, } thd->security_ctx= backup_ctx; return check_grant(thd,want_access & ~EXTRA_ACL,org_tables, - test(want_access & EXTRA_ACL), UINT_MAX, no_errors); + test(want_access & EXTRA_ACL), number, no_errors); deny: thd->security_ctx= backup_ctx; return TRUE; @@ -6855,7 +6861,7 @@ bool multi_delete_precheck(THD *thd, TABLE_LIST *tables) /* sql_yacc guarantees that tables and aux_tables are not zero */ DBUG_ASSERT(aux_tables != 0); - if (check_table_access(thd, SELECT_ACL, tables, 0)) + if (check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE)) DBUG_RETURN(TRUE); /* @@ -6864,7 +6870,7 @@ bool multi_delete_precheck(THD *thd, TABLE_LIST *tables) call check_table_access() safely. */ thd->lex->query_tables_own_last= 0; - if (check_table_access(thd, DELETE_ACL, aux_tables, 0)) + if (check_table_access(thd, DELETE_ACL, aux_tables, UINT_MAX, FALSE)) { thd->lex->query_tables_own_last= save_query_tables_own_last; DBUG_RETURN(TRUE); @@ -7108,7 +7114,7 @@ bool create_table_precheck(THD *thd, TABLE_LIST *tables, } } #endif - if (tables && check_table_access(thd, SELECT_ACL, tables,0)) + if (tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE)) goto err; } else if (lex->create_info.options & HA_LEX_CREATE_TABLE_LIKE) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2a86844c8c6..5cd056807a6 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1619,7 +1619,7 @@ bool mysql_install_plugin(THD *thd, const LEX_STRING *name, const LEX_STRING *dl bzero(&tables, sizeof(tables)); tables.db= (char *)"mysql"; tables.table_name= tables.alias= (char *)"plugin"; - if (check_table_access(thd, INSERT_ACL, &tables, 0)) + if (check_table_access(thd, INSERT_ACL, &tables, 1, FALSE)) DBUG_RETURN(TRUE); /* need to open before acquiring LOCK_plugin or it will deadlock */ diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 52e6fcc5d58..b76ed0852f5 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1272,7 +1272,7 @@ static int mysql_test_select(Prepared_statement *stmt, ulong privilege= lex->exchange ? SELECT_ACL | FILE_ACL : SELECT_ACL; if (tables) { - if (check_table_access(thd, privilege, tables,0)) + if (check_table_access(thd, privilege, tables, UINT_MAX, FALSE)) goto error; } else if (check_access(thd, privilege, any_db,0,0,0,0)) @@ -1342,7 +1342,7 @@ static bool mysql_test_do_fields(Prepared_statement *stmt, THD *thd= stmt->thd; DBUG_ENTER("mysql_test_do_fields"); - if (tables && check_table_access(thd, SELECT_ACL, tables, 0)) + if (tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE)) DBUG_RETURN(TRUE); if (open_normal_and_derived_tables(thd, tables, 0)) @@ -1374,7 +1374,7 @@ static bool mysql_test_set_fields(Prepared_statement *stmt, THD *thd= stmt->thd; set_var_base *var; - if (tables && check_table_access(thd, SELECT_ACL, tables, 0) || + if (tables && check_table_access(thd, SELECT_ACL, tables, UINT_MAX, FALSE) || open_normal_and_derived_tables(thd, tables, 0)) goto error; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 20cf12b95c5..644aa3fd4cb 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4059,7 +4059,7 @@ int fill_schema_proc(THD *thd, TABLE_LIST *tables, COND *cond) proc_tables.table_name= proc_tables.alias= (char*) "proc"; proc_tables.table_name_length= 4; proc_tables.lock_type= TL_READ; - full_access= !check_table_access(thd, SELECT_ACL, &proc_tables, 1); + full_access= !check_table_access(thd, SELECT_ACL, &proc_tables, 1, TRUE); if (!(proc_table= open_proc_table_for_read(thd, &open_tables_state_backup))) { DBUG_RETURN(1); @@ -4447,10 +4447,8 @@ static int get_schema_triggers_record(THD *thd, TABLE_LIST *tables, Table_triggers_list *triggers= tables->table->triggers; int event, timing; -#ifndef NO_EMBEDDED_ACCESS_CHECKS - if (check_table_access(thd, TRIGGER_ACL, tables, 1)) + if (check_table_access(thd, TRIGGER_ACL, tables, 1, TRUE)) goto ret; -#endif for (event= 0; event < (int)TRG_EVENT_MAX; event++) { diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index b421f57b7ab..7925eb3e95a 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -418,7 +418,7 @@ bool mysql_create_or_drop_trigger(THD *thd, TABLE_LIST *tables, bool create) TABLE_LIST **save_query_tables_own_last= thd->lex->query_tables_own_last; thd->lex->query_tables_own_last= 0; - err_status= check_table_access(thd, TRIGGER_ACL, tables, 0); + err_status= check_table_access(thd, TRIGGER_ACL, tables, 1, FALSE); thd->lex->query_tables_own_last= save_query_tables_own_last; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index f7223cafb5e..ec3f8b5e84c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1123,8 +1123,8 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, if (!table->prelocking_placeholder && (old_lex->sql_command == SQLCOM_SELECT && old_lex->describe)) { - if (check_table_access(thd, SELECT_ACL, view_tables, 1) && - check_table_access(thd, SHOW_VIEW_ACL, table, 1)) + if (check_table_access(thd, SELECT_ACL, view_tables, UINT_MAX, TRUE) && + check_table_access(thd, SHOW_VIEW_ACL, table, UINT_MAX, TRUE)) { my_message(ER_VIEW_NO_EXPLAIN, ER(ER_VIEW_NO_EXPLAIN), MYF(0)); goto err; @@ -1134,7 +1134,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, (old_lex->sql_command == SQLCOM_SHOW_CREATE) && !table->belong_to_view) { - if (check_table_access(thd, SHOW_VIEW_ACL, table, 0)) + if (check_table_access(thd, SHOW_VIEW_ACL, table, UINT_MAX, FALSE)) goto err; } From 324d54170144dc8926258a13ef514a77ce170506 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 20:14:35 +0400 Subject: [PATCH 111/527] BUG#33871 - Duplicate "would" in Fulltext Stopwords Code cleanup: removed duplicate stopword. storage/myisam/ft_static.c: Code cleanup: removed duplicate stopword. --- storage/myisam/ft_static.c | 1 - 1 file changed, 1 deletion(-) diff --git a/storage/myisam/ft_static.c b/storage/myisam/ft_static.c index 610c20eede6..1b6c7458fd7 100644 --- a/storage/myisam/ft_static.c +++ b/storage/myisam/ft_static.c @@ -608,7 +608,6 @@ const char *ft_precompiled_stopwords[] = { "won't", "wonder", "would", - "would", "wouldn't", "yes", "yet", From 96f33937779296da12b9818dd4d4c21371558c0d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 23:04:55 +0300 Subject: [PATCH 112/527] Fix a build failure (embedded server). --- sql/sql_show.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 644aa3fd4cb..bc5628f12c0 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4486,9 +4486,7 @@ static int get_schema_triggers_record(THD *thd, TABLE_LIST *tables, } } } -#ifndef NO_EMBEDDED_ACCESS_CHECKS ret: -#endif DBUG_RETURN(0); } From 4621dbf5a8b428e379a9afa2e1d2c2438c4a2566 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 16:51:39 -0500 Subject: [PATCH 113/527] Bug#24624: MySQL client ignores its own completion table Nothing was in the command-line dictionary, because of the wrong order of instructions when populating it. This is a smaller, less optimistic patch that both fixes a bug and refreshes the list of keywords that the command-line library (e.g., readline) can use to expand typed commands. Now, read from the command list /after/ we free the list, not before. The best way is to read the keywords from the lexer code, but that doesn't work everywhere yet. Grr. client/mysql.cc: Order the instructions for clearing and populating the keyword list, to be in that order. Additionally, add more keywords. --- client/mysql.cc | 731 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 718 insertions(+), 13 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index e480e659939..0a1c1954ea2 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -283,13 +283,6 @@ static COMMANDS commands[] = { /* Get bash-like expansion for some commands */ { "create table", 0, 0, 0, ""}, { "create database", 0, 0, 0, ""}, - { "drop", 0, 0, 0, ""}, - { "select", 0, 0, 0, ""}, - { "insert", 0, 0, 0, ""}, - { "replace", 0, 0, 0, ""}, - { "update", 0, 0, 0, ""}, - { "delete", 0, 0, 0, ""}, - { "explain", 0, 0, 0, ""}, { "show databases", 0, 0, 0, ""}, { "show fields from", 0, 0, 0, ""}, { "show keys from", 0, 0, 0, ""}, @@ -299,6 +292,718 @@ static COMMANDS commands[] = { { "set option", 0, 0, 0, ""}, { "lock tables", 0, 0, 0, ""}, { "unlock tables", 0, 0, 0, ""}, + /* generated 2006-12-28. Refresh occasionally from lexer. */ + { "ACTION", 0, 0, 0, ""}, + { "ADD", 0, 0, 0, ""}, + { "AFTER", 0, 0, 0, ""}, + { "AGAINST", 0, 0, 0, ""}, + { "AGGREGATE", 0, 0, 0, ""}, + { "ALL", 0, 0, 0, ""}, + { "ALGORITHM", 0, 0, 0, ""}, + { "ALTER", 0, 0, 0, ""}, + { "ANALYZE", 0, 0, 0, ""}, + { "AND", 0, 0, 0, ""}, + { "ANY", 0, 0, 0, ""}, + { "AS", 0, 0, 0, ""}, + { "ASC", 0, 0, 0, ""}, + { "ASCII", 0, 0, 0, ""}, + { "ASENSITIVE", 0, 0, 0, ""}, + { "AUTO_INCREMENT", 0, 0, 0, ""}, + { "AVG", 0, 0, 0, ""}, + { "AVG_ROW_LENGTH", 0, 0, 0, ""}, + { "BACKUP", 0, 0, 0, ""}, + { "BDB", 0, 0, 0, ""}, + { "BEFORE", 0, 0, 0, ""}, + { "BEGIN", 0, 0, 0, ""}, + { "BERKELEYDB", 0, 0, 0, ""}, + { "BETWEEN", 0, 0, 0, ""}, + { "BIGINT", 0, 0, 0, ""}, + { "BINARY", 0, 0, 0, ""}, + { "BINLOG", 0, 0, 0, ""}, + { "BIT", 0, 0, 0, ""}, + { "BLOB", 0, 0, 0, ""}, + { "BOOL", 0, 0, 0, ""}, + { "BOOLEAN", 0, 0, 0, ""}, + { "BOTH", 0, 0, 0, ""}, + { "BTREE", 0, 0, 0, ""}, + { "BY", 0, 0, 0, ""}, + { "BYTE", 0, 0, 0, ""}, + { "CACHE", 0, 0, 0, ""}, + { "CALL", 0, 0, 0, ""}, + { "CASCADE", 0, 0, 0, ""}, + { "CASCADED", 0, 0, 0, ""}, + { "CASE", 0, 0, 0, ""}, + { "CHAIN", 0, 0, 0, ""}, + { "CHANGE", 0, 0, 0, ""}, + { "CHANGED", 0, 0, 0, ""}, + { "CHAR", 0, 0, 0, ""}, + { "CHARACTER", 0, 0, 0, ""}, + { "CHARSET", 0, 0, 0, ""}, + { "CHECK", 0, 0, 0, ""}, + { "CHECKSUM", 0, 0, 0, ""}, + { "CIPHER", 0, 0, 0, ""}, + { "CLIENT", 0, 0, 0, ""}, + { "CLOSE", 0, 0, 0, ""}, + { "CODE", 0, 0, 0, ""}, + { "COLLATE", 0, 0, 0, ""}, + { "COLLATION", 0, 0, 0, ""}, + { "COLUMN", 0, 0, 0, ""}, + { "COLUMNS", 0, 0, 0, ""}, + { "COMMENT", 0, 0, 0, ""}, + { "COMMIT", 0, 0, 0, ""}, + { "COMMITTED", 0, 0, 0, ""}, + { "COMPACT", 0, 0, 0, ""}, + { "COMPRESSED", 0, 0, 0, ""}, + { "CONCURRENT", 0, 0, 0, ""}, + { "CONDITION", 0, 0, 0, ""}, + { "CONNECTION", 0, 0, 0, ""}, + { "CONSISTENT", 0, 0, 0, ""}, + { "CONSTRAINT", 0, 0, 0, ""}, + { "CONTAINS", 0, 0, 0, ""}, + { "CONTINUE", 0, 0, 0, ""}, + { "CONVERT", 0, 0, 0, ""}, + { "CREATE", 0, 0, 0, ""}, + { "CROSS", 0, 0, 0, ""}, + { "CUBE", 0, 0, 0, ""}, + { "CURRENT_DATE", 0, 0, 0, ""}, + { "CURRENT_TIME", 0, 0, 0, ""}, + { "CURRENT_TIMESTAMP", 0, 0, 0, ""}, + { "CURRENT_USER", 0, 0, 0, ""}, + { "CURSOR", 0, 0, 0, ""}, + { "DATA", 0, 0, 0, ""}, + { "DATABASE", 0, 0, 0, ""}, + { "DATABASES", 0, 0, 0, ""}, + { "DATE", 0, 0, 0, ""}, + { "DATETIME", 0, 0, 0, ""}, + { "DAY", 0, 0, 0, ""}, + { "DAY_HOUR", 0, 0, 0, ""}, + { "DAY_MICROSECOND", 0, 0, 0, ""}, + { "DAY_MINUTE", 0, 0, 0, ""}, + { "DAY_SECOND", 0, 0, 0, ""}, + { "DEALLOCATE", 0, 0, 0, ""}, + { "DEC", 0, 0, 0, ""}, + { "DECIMAL", 0, 0, 0, ""}, + { "DECLARE", 0, 0, 0, ""}, + { "DEFAULT", 0, 0, 0, ""}, + { "DEFINER", 0, 0, 0, ""}, + { "DELAYED", 0, 0, 0, ""}, + { "DELAY_KEY_WRITE", 0, 0, 0, ""}, + { "DELETE", 0, 0, 0, ""}, + { "DESC", 0, 0, 0, ""}, + { "DESCRIBE", 0, 0, 0, ""}, + { "DES_KEY_FILE", 0, 0, 0, ""}, + { "DETERMINISTIC", 0, 0, 0, ""}, + { "DIRECTORY", 0, 0, 0, ""}, + { "DISABLE", 0, 0, 0, ""}, + { "DISCARD", 0, 0, 0, ""}, + { "DISTINCT", 0, 0, 0, ""}, + { "DISTINCTROW", 0, 0, 0, ""}, + { "DIV", 0, 0, 0, ""}, + { "DO", 0, 0, 0, ""}, + { "DOUBLE", 0, 0, 0, ""}, + { "DROP", 0, 0, 0, ""}, + { "DUAL", 0, 0, 0, ""}, + { "DUMPFILE", 0, 0, 0, ""}, + { "DUPLICATE", 0, 0, 0, ""}, + { "DYNAMIC", 0, 0, 0, ""}, + { "EACH", 0, 0, 0, ""}, + { "ELSE", 0, 0, 0, ""}, + { "ELSEIF", 0, 0, 0, ""}, + { "ENABLE", 0, 0, 0, ""}, + { "ENCLOSED", 0, 0, 0, ""}, + { "END", 0, 0, 0, ""}, + { "ENGINE", 0, 0, 0, ""}, + { "ENGINES", 0, 0, 0, ""}, + { "ENUM", 0, 0, 0, ""}, + { "ERRORS", 0, 0, 0, ""}, + { "ESCAPE", 0, 0, 0, ""}, + { "ESCAPED", 0, 0, 0, ""}, + { "EVENTS", 0, 0, 0, ""}, + { "EXECUTE", 0, 0, 0, ""}, + { "EXISTS", 0, 0, 0, ""}, + { "EXIT", 0, 0, 0, ""}, + { "EXPANSION", 0, 0, 0, ""}, + { "EXPLAIN", 0, 0, 0, ""}, + { "EXTENDED", 0, 0, 0, ""}, + { "FALSE", 0, 0, 0, ""}, + { "FAST", 0, 0, 0, ""}, + { "FETCH", 0, 0, 0, ""}, + { "FIELDS", 0, 0, 0, ""}, + { "FILE", 0, 0, 0, ""}, + { "FIRST", 0, 0, 0, ""}, + { "FIXED", 0, 0, 0, ""}, + { "FLOAT", 0, 0, 0, ""}, + { "FLOAT4", 0, 0, 0, ""}, + { "FLOAT8", 0, 0, 0, ""}, + { "FLUSH", 0, 0, 0, ""}, + { "FOR", 0, 0, 0, ""}, + { "FORCE", 0, 0, 0, ""}, + { "FOREIGN", 0, 0, 0, ""}, + { "FOUND", 0, 0, 0, ""}, + { "FRAC_SECOND", 0, 0, 0, ""}, + { "FROM", 0, 0, 0, ""}, + { "FULL", 0, 0, 0, ""}, + { "FULLTEXT", 0, 0, 0, ""}, + { "FUNCTION", 0, 0, 0, ""}, + { "GEOMETRY", 0, 0, 0, ""}, + { "GEOMETRYCOLLECTION", 0, 0, 0, ""}, + { "GET_FORMAT", 0, 0, 0, ""}, + { "GLOBAL", 0, 0, 0, ""}, + { "GRANT", 0, 0, 0, ""}, + { "GRANTS", 0, 0, 0, ""}, + { "GROUP", 0, 0, 0, ""}, + { "HANDLER", 0, 0, 0, ""}, + { "HASH", 0, 0, 0, ""}, + { "HAVING", 0, 0, 0, ""}, + { "HELP", 0, 0, 0, ""}, + { "HIGH_PRIORITY", 0, 0, 0, ""}, + { "HOSTS", 0, 0, 0, ""}, + { "HOUR", 0, 0, 0, ""}, + { "HOUR_MICROSECOND", 0, 0, 0, ""}, + { "HOUR_MINUTE", 0, 0, 0, ""}, + { "HOUR_SECOND", 0, 0, 0, ""}, + { "IDENTIFIED", 0, 0, 0, ""}, + { "IF", 0, 0, 0, ""}, + { "IGNORE", 0, 0, 0, ""}, + { "IMPORT", 0, 0, 0, ""}, + { "IN", 0, 0, 0, ""}, + { "INDEX", 0, 0, 0, ""}, + { "INDEXES", 0, 0, 0, ""}, + { "INFILE", 0, 0, 0, ""}, + { "INNER", 0, 0, 0, ""}, + { "INNOBASE", 0, 0, 0, ""}, + { "INNODB", 0, 0, 0, ""}, + { "INOUT", 0, 0, 0, ""}, + { "INSENSITIVE", 0, 0, 0, ""}, + { "INSERT", 0, 0, 0, ""}, + { "INSERT_METHOD", 0, 0, 0, ""}, + { "INT", 0, 0, 0, ""}, + { "INT1", 0, 0, 0, ""}, + { "INT2", 0, 0, 0, ""}, + { "INT3", 0, 0, 0, ""}, + { "INT4", 0, 0, 0, ""}, + { "INT8", 0, 0, 0, ""}, + { "INTEGER", 0, 0, 0, ""}, + { "INTERVAL", 0, 0, 0, ""}, + { "INTO", 0, 0, 0, ""}, + { "IO_THREAD", 0, 0, 0, ""}, + { "IS", 0, 0, 0, ""}, + { "ISOLATION", 0, 0, 0, ""}, + { "ISSUER", 0, 0, 0, ""}, + { "ITERATE", 0, 0, 0, ""}, + { "INVOKER", 0, 0, 0, ""}, + { "JOIN", 0, 0, 0, ""}, + { "KEY", 0, 0, 0, ""}, + { "KEYS", 0, 0, 0, ""}, + { "KILL", 0, 0, 0, ""}, + { "LANGUAGE", 0, 0, 0, ""}, + { "LAST", 0, 0, 0, ""}, + { "LEADING", 0, 0, 0, ""}, + { "LEAVE", 0, 0, 0, ""}, + { "LEAVES", 0, 0, 0, ""}, + { "LEFT", 0, 0, 0, ""}, + { "LEVEL", 0, 0, 0, ""}, + { "LIKE", 0, 0, 0, ""}, + { "LIMIT", 0, 0, 0, ""}, + { "LINES", 0, 0, 0, ""}, + { "LINESTRING", 0, 0, 0, ""}, + { "LOAD", 0, 0, 0, ""}, + { "LOCAL", 0, 0, 0, ""}, + { "LOCALTIME", 0, 0, 0, ""}, + { "LOCALTIMESTAMP", 0, 0, 0, ""}, + { "LOCK", 0, 0, 0, ""}, + { "LOCKS", 0, 0, 0, ""}, + { "LOGS", 0, 0, 0, ""}, + { "LONG", 0, 0, 0, ""}, + { "LONGBLOB", 0, 0, 0, ""}, + { "LONGTEXT", 0, 0, 0, ""}, + { "LOOP", 0, 0, 0, ""}, + { "LOW_PRIORITY", 0, 0, 0, ""}, + { "MASTER", 0, 0, 0, ""}, + { "MASTER_CONNECT_RETRY", 0, 0, 0, ""}, + { "MASTER_HOST", 0, 0, 0, ""}, + { "MASTER_LOG_FILE", 0, 0, 0, ""}, + { "MASTER_LOG_POS", 0, 0, 0, ""}, + { "MASTER_PASSWORD", 0, 0, 0, ""}, + { "MASTER_PORT", 0, 0, 0, ""}, + { "MASTER_SERVER_ID", 0, 0, 0, ""}, + { "MASTER_SSL", 0, 0, 0, ""}, + { "MASTER_SSL_CA", 0, 0, 0, ""}, + { "MASTER_SSL_CAPATH", 0, 0, 0, ""}, + { "MASTER_SSL_CERT", 0, 0, 0, ""}, + { "MASTER_SSL_CIPHER", 0, 0, 0, ""}, + { "MASTER_SSL_KEY", 0, 0, 0, ""}, + { "MASTER_USER", 0, 0, 0, ""}, + { "MATCH", 0, 0, 0, ""}, + { "MAX_CONNECTIONS_PER_HOUR", 0, 0, 0, ""}, + { "MAX_QUERIES_PER_HOUR", 0, 0, 0, ""}, + { "MAX_ROWS", 0, 0, 0, ""}, + { "MAX_UPDATES_PER_HOUR", 0, 0, 0, ""}, + { "MAX_USER_CONNECTIONS", 0, 0, 0, ""}, + { "MEDIUM", 0, 0, 0, ""}, + { "MEDIUMBLOB", 0, 0, 0, ""}, + { "MEDIUMINT", 0, 0, 0, ""}, + { "MEDIUMTEXT", 0, 0, 0, ""}, + { "MERGE", 0, 0, 0, ""}, + { "MICROSECOND", 0, 0, 0, ""}, + { "MIDDLEINT", 0, 0, 0, ""}, + { "MIGRATE", 0, 0, 0, ""}, + { "MINUTE", 0, 0, 0, ""}, + { "MINUTE_MICROSECOND", 0, 0, 0, ""}, + { "MINUTE_SECOND", 0, 0, 0, ""}, + { "MIN_ROWS", 0, 0, 0, ""}, + { "MOD", 0, 0, 0, ""}, + { "MODE", 0, 0, 0, ""}, + { "MODIFIES", 0, 0, 0, ""}, + { "MODIFY", 0, 0, 0, ""}, + { "MONTH", 0, 0, 0, ""}, + { "MULTILINESTRING", 0, 0, 0, ""}, + { "MULTIPOINT", 0, 0, 0, ""}, + { "MULTIPOLYGON", 0, 0, 0, ""}, + { "MUTEX", 0, 0, 0, ""}, + { "NAME", 0, 0, 0, ""}, + { "NAMES", 0, 0, 0, ""}, + { "NATIONAL", 0, 0, 0, ""}, + { "NATURAL", 0, 0, 0, ""}, + { "NDB", 0, 0, 0, ""}, + { "NDBCLUSTER", 0, 0, 0, ""}, + { "NCHAR", 0, 0, 0, ""}, + { "NEW", 0, 0, 0, ""}, + { "NEXT", 0, 0, 0, ""}, + { "NO", 0, 0, 0, ""}, + { "NONE", 0, 0, 0, ""}, + { "NOT", 0, 0, 0, ""}, + { "NO_WRITE_TO_BINLOG", 0, 0, 0, ""}, + { "NULL", 0, 0, 0, ""}, + { "NUMERIC", 0, 0, 0, ""}, + { "NVARCHAR", 0, 0, 0, ""}, + { "OFFSET", 0, 0, 0, ""}, + { "OLD_PASSWORD", 0, 0, 0, ""}, + { "ON", 0, 0, 0, ""}, + { "ONE", 0, 0, 0, ""}, + { "ONE_SHOT", 0, 0, 0, ""}, + { "OPEN", 0, 0, 0, ""}, + { "OPTIMIZE", 0, 0, 0, ""}, + { "OPTION", 0, 0, 0, ""}, + { "OPTIONALLY", 0, 0, 0, ""}, + { "OR", 0, 0, 0, ""}, + { "ORDER", 0, 0, 0, ""}, + { "OUT", 0, 0, 0, ""}, + { "OUTER", 0, 0, 0, ""}, + { "OUTFILE", 0, 0, 0, ""}, + { "PACK_KEYS", 0, 0, 0, ""}, + { "PARTIAL", 0, 0, 0, ""}, + { "PASSWORD", 0, 0, 0, ""}, + { "PHASE", 0, 0, 0, ""}, + { "POINT", 0, 0, 0, ""}, + { "POLYGON", 0, 0, 0, ""}, + { "PRECISION", 0, 0, 0, ""}, + { "PREPARE", 0, 0, 0, ""}, + { "PREV", 0, 0, 0, ""}, + { "PRIMARY", 0, 0, 0, ""}, + { "PRIVILEGES", 0, 0, 0, ""}, + { "PROCEDURE", 0, 0, 0, ""}, + { "PROCESS", 0, 0, 0, ""}, + { "PROCESSLIST", 0, 0, 0, ""}, + { "PURGE", 0, 0, 0, ""}, + { "QUARTER", 0, 0, 0, ""}, + { "QUERY", 0, 0, 0, ""}, + { "QUICK", 0, 0, 0, ""}, + { "RAID0", 0, 0, 0, ""}, + { "RAID_CHUNKS", 0, 0, 0, ""}, + { "RAID_CHUNKSIZE", 0, 0, 0, ""}, + { "RAID_TYPE", 0, 0, 0, ""}, + { "READ", 0, 0, 0, ""}, + { "READS", 0, 0, 0, ""}, + { "REAL", 0, 0, 0, ""}, + { "RECOVER", 0, 0, 0, ""}, + { "REDUNDANT", 0, 0, 0, ""}, + { "REFERENCES", 0, 0, 0, ""}, + { "REGEXP", 0, 0, 0, ""}, + { "RELAY_LOG_FILE", 0, 0, 0, ""}, + { "RELAY_LOG_POS", 0, 0, 0, ""}, + { "RELAY_THREAD", 0, 0, 0, ""}, + { "RELEASE", 0, 0, 0, ""}, + { "RELOAD", 0, 0, 0, ""}, + { "RENAME", 0, 0, 0, ""}, + { "REPAIR", 0, 0, 0, ""}, + { "REPEATABLE", 0, 0, 0, ""}, + { "REPLACE", 0, 0, 0, ""}, + { "REPLICATION", 0, 0, 0, ""}, + { "REPEAT", 0, 0, 0, ""}, + { "REQUIRE", 0, 0, 0, ""}, + { "RESET", 0, 0, 0, ""}, + { "RESTORE", 0, 0, 0, ""}, + { "RESTRICT", 0, 0, 0, ""}, + { "RESUME", 0, 0, 0, ""}, + { "RETURN", 0, 0, 0, ""}, + { "RETURNS", 0, 0, 0, ""}, + { "REVOKE", 0, 0, 0, ""}, + { "RIGHT", 0, 0, 0, ""}, + { "RLIKE", 0, 0, 0, ""}, + { "ROLLBACK", 0, 0, 0, ""}, + { "ROLLUP", 0, 0, 0, ""}, + { "ROUTINE", 0, 0, 0, ""}, + { "ROW", 0, 0, 0, ""}, + { "ROWS", 0, 0, 0, ""}, + { "ROW_FORMAT", 0, 0, 0, ""}, + { "RTREE", 0, 0, 0, ""}, + { "SAVEPOINT", 0, 0, 0, ""}, + { "SCHEMA", 0, 0, 0, ""}, + { "SCHEMAS", 0, 0, 0, ""}, + { "SECOND", 0, 0, 0, ""}, + { "SECOND_MICROSECOND", 0, 0, 0, ""}, + { "SECURITY", 0, 0, 0, ""}, + { "SELECT", 0, 0, 0, ""}, + { "SENSITIVE", 0, 0, 0, ""}, + { "SEPARATOR", 0, 0, 0, ""}, + { "SERIAL", 0, 0, 0, ""}, + { "SERIALIZABLE", 0, 0, 0, ""}, + { "SESSION", 0, 0, 0, ""}, + { "SET", 0, 0, 0, ""}, + { "SHARE", 0, 0, 0, ""}, + { "SHOW", 0, 0, 0, ""}, + { "SHUTDOWN", 0, 0, 0, ""}, + { "SIGNED", 0, 0, 0, ""}, + { "SIMPLE", 0, 0, 0, ""}, + { "SLAVE", 0, 0, 0, ""}, + { "SNAPSHOT", 0, 0, 0, ""}, + { "SMALLINT", 0, 0, 0, ""}, + { "SOME", 0, 0, 0, ""}, + { "SONAME", 0, 0, 0, ""}, + { "SOUNDS", 0, 0, 0, ""}, + { "SPATIAL", 0, 0, 0, ""}, + { "SPECIFIC", 0, 0, 0, ""}, + { "SQL", 0, 0, 0, ""}, + { "SQLEXCEPTION", 0, 0, 0, ""}, + { "SQLSTATE", 0, 0, 0, ""}, + { "SQLWARNING", 0, 0, 0, ""}, + { "SQL_BIG_RESULT", 0, 0, 0, ""}, + { "SQL_BUFFER_RESULT", 0, 0, 0, ""}, + { "SQL_CACHE", 0, 0, 0, ""}, + { "SQL_CALC_FOUND_ROWS", 0, 0, 0, ""}, + { "SQL_NO_CACHE", 0, 0, 0, ""}, + { "SQL_SMALL_RESULT", 0, 0, 0, ""}, + { "SQL_THREAD", 0, 0, 0, ""}, + { "SQL_TSI_FRAC_SECOND", 0, 0, 0, ""}, + { "SQL_TSI_SECOND", 0, 0, 0, ""}, + { "SQL_TSI_MINUTE", 0, 0, 0, ""}, + { "SQL_TSI_HOUR", 0, 0, 0, ""}, + { "SQL_TSI_DAY", 0, 0, 0, ""}, + { "SQL_TSI_WEEK", 0, 0, 0, ""}, + { "SQL_TSI_MONTH", 0, 0, 0, ""}, + { "SQL_TSI_QUARTER", 0, 0, 0, ""}, + { "SQL_TSI_YEAR", 0, 0, 0, ""}, + { "SSL", 0, 0, 0, ""}, + { "START", 0, 0, 0, ""}, + { "STARTING", 0, 0, 0, ""}, + { "STATUS", 0, 0, 0, ""}, + { "STOP", 0, 0, 0, ""}, + { "STORAGE", 0, 0, 0, ""}, + { "STRAIGHT_JOIN", 0, 0, 0, ""}, + { "STRING", 0, 0, 0, ""}, + { "STRIPED", 0, 0, 0, ""}, + { "SUBJECT", 0, 0, 0, ""}, + { "SUPER", 0, 0, 0, ""}, + { "SUSPEND", 0, 0, 0, ""}, + { "TABLE", 0, 0, 0, ""}, + { "TABLES", 0, 0, 0, ""}, + { "TABLESPACE", 0, 0, 0, ""}, + { "TEMPORARY", 0, 0, 0, ""}, + { "TEMPTABLE", 0, 0, 0, ""}, + { "TERMINATED", 0, 0, 0, ""}, + { "TEXT", 0, 0, 0, ""}, + { "THEN", 0, 0, 0, ""}, + { "TIME", 0, 0, 0, ""}, + { "TIMESTAMP", 0, 0, 0, ""}, + { "TIMESTAMPADD", 0, 0, 0, ""}, + { "TIMESTAMPDIFF", 0, 0, 0, ""}, + { "TINYBLOB", 0, 0, 0, ""}, + { "TINYINT", 0, 0, 0, ""}, + { "TINYTEXT", 0, 0, 0, ""}, + { "TO", 0, 0, 0, ""}, + { "TRAILING", 0, 0, 0, ""}, + { "TRANSACTION", 0, 0, 0, ""}, + { "TRIGGER", 0, 0, 0, ""}, + { "TRIGGERS", 0, 0, 0, ""}, + { "TRUE", 0, 0, 0, ""}, + { "TRUNCATE", 0, 0, 0, ""}, + { "TYPE", 0, 0, 0, ""}, + { "TYPES", 0, 0, 0, ""}, + { "UNCOMMITTED", 0, 0, 0, ""}, + { "UNDEFINED", 0, 0, 0, ""}, + { "UNDO", 0, 0, 0, ""}, + { "UNICODE", 0, 0, 0, ""}, + { "UNION", 0, 0, 0, ""}, + { "UNIQUE", 0, 0, 0, ""}, + { "UNKNOWN", 0, 0, 0, ""}, + { "UNLOCK", 0, 0, 0, ""}, + { "UNSIGNED", 0, 0, 0, ""}, + { "UNTIL", 0, 0, 0, ""}, + { "UPDATE", 0, 0, 0, ""}, + { "UPGRADE", 0, 0, 0, ""}, + { "USAGE", 0, 0, 0, ""}, + { "USE", 0, 0, 0, ""}, + { "USER", 0, 0, 0, ""}, + { "USER_RESOURCES", 0, 0, 0, ""}, + { "USE_FRM", 0, 0, 0, ""}, + { "USING", 0, 0, 0, ""}, + { "UTC_DATE", 0, 0, 0, ""}, + { "UTC_TIME", 0, 0, 0, ""}, + { "UTC_TIMESTAMP", 0, 0, 0, ""}, + { "VALUE", 0, 0, 0, ""}, + { "VALUES", 0, 0, 0, ""}, + { "VARBINARY", 0, 0, 0, ""}, + { "VARCHAR", 0, 0, 0, ""}, + { "VARCHARACTER", 0, 0, 0, ""}, + { "VARIABLES", 0, 0, 0, ""}, + { "VARYING", 0, 0, 0, ""}, + { "WARNINGS", 0, 0, 0, ""}, + { "WEEK", 0, 0, 0, ""}, + { "WHEN", 0, 0, 0, ""}, + { "WHERE", 0, 0, 0, ""}, + { "WHILE", 0, 0, 0, ""}, + { "VIEW", 0, 0, 0, ""}, + { "WITH", 0, 0, 0, ""}, + { "WORK", 0, 0, 0, ""}, + { "WRITE", 0, 0, 0, ""}, + { "X509", 0, 0, 0, ""}, + { "XOR", 0, 0, 0, ""}, + { "XA", 0, 0, 0, ""}, + { "YEAR", 0, 0, 0, ""}, + { "YEAR_MONTH", 0, 0, 0, ""}, + { "ZEROFILL", 0, 0, 0, ""}, + { "ABS", 0, 0, 0, ""}, + { "ACOS", 0, 0, 0, ""}, + { "ADDDATE", 0, 0, 0, ""}, + { "ADDTIME", 0, 0, 0, ""}, + { "AES_ENCRYPT", 0, 0, 0, ""}, + { "AES_DECRYPT", 0, 0, 0, ""}, + { "AREA", 0, 0, 0, ""}, + { "ASIN", 0, 0, 0, ""}, + { "ASBINARY", 0, 0, 0, ""}, + { "ASTEXT", 0, 0, 0, ""}, + { "ASWKB", 0, 0, 0, ""}, + { "ASWKT", 0, 0, 0, ""}, + { "ATAN", 0, 0, 0, ""}, + { "ATAN2", 0, 0, 0, ""}, + { "BENCHMARK", 0, 0, 0, ""}, + { "BIN", 0, 0, 0, ""}, + { "BIT_COUNT", 0, 0, 0, ""}, + { "BIT_OR", 0, 0, 0, ""}, + { "BIT_AND", 0, 0, 0, ""}, + { "BIT_XOR", 0, 0, 0, ""}, + { "CAST", 0, 0, 0, ""}, + { "CEIL", 0, 0, 0, ""}, + { "CEILING", 0, 0, 0, ""}, + { "BIT_LENGTH", 0, 0, 0, ""}, + { "CENTROID", 0, 0, 0, ""}, + { "CHAR_LENGTH", 0, 0, 0, ""}, + { "CHARACTER_LENGTH", 0, 0, 0, ""}, + { "COALESCE", 0, 0, 0, ""}, + { "COERCIBILITY", 0, 0, 0, ""}, + { "COMPRESS", 0, 0, 0, ""}, + { "CONCAT", 0, 0, 0, ""}, + { "CONCAT_WS", 0, 0, 0, ""}, + { "CONNECTION_ID", 0, 0, 0, ""}, + { "CONV", 0, 0, 0, ""}, + { "CONVERT_TZ", 0, 0, 0, ""}, + { "COUNT", 0, 0, 0, ""}, + { "COS", 0, 0, 0, ""}, + { "COT", 0, 0, 0, ""}, + { "CRC32", 0, 0, 0, ""}, + { "CROSSES", 0, 0, 0, ""}, + { "CURDATE", 0, 0, 0, ""}, + { "CURTIME", 0, 0, 0, ""}, + { "DATE_ADD", 0, 0, 0, ""}, + { "DATEDIFF", 0, 0, 0, ""}, + { "DATE_FORMAT", 0, 0, 0, ""}, + { "DATE_SUB", 0, 0, 0, ""}, + { "DAYNAME", 0, 0, 0, ""}, + { "DAYOFMONTH", 0, 0, 0, ""}, + { "DAYOFWEEK", 0, 0, 0, ""}, + { "DAYOFYEAR", 0, 0, 0, ""}, + { "DECODE", 0, 0, 0, ""}, + { "DEGREES", 0, 0, 0, ""}, + { "DES_ENCRYPT", 0, 0, 0, ""}, + { "DES_DECRYPT", 0, 0, 0, ""}, + { "DIMENSION", 0, 0, 0, ""}, + { "DISJOINT", 0, 0, 0, ""}, + { "ELT", 0, 0, 0, ""}, + { "ENCODE", 0, 0, 0, ""}, + { "ENCRYPT", 0, 0, 0, ""}, + { "ENDPOINT", 0, 0, 0, ""}, + { "ENVELOPE", 0, 0, 0, ""}, + { "EQUALS", 0, 0, 0, ""}, + { "EXTERIORRING", 0, 0, 0, ""}, + { "EXTRACT", 0, 0, 0, ""}, + { "EXP", 0, 0, 0, ""}, + { "EXPORT_SET", 0, 0, 0, ""}, + { "FIELD", 0, 0, 0, ""}, + { "FIND_IN_SET", 0, 0, 0, ""}, + { "FLOOR", 0, 0, 0, ""}, + { "FORMAT", 0, 0, 0, ""}, + { "FOUND_ROWS", 0, 0, 0, ""}, + { "FROM_DAYS", 0, 0, 0, ""}, + { "FROM_UNIXTIME", 0, 0, 0, ""}, + { "GET_LOCK", 0, 0, 0, ""}, + { "GEOMETRYN", 0, 0, 0, ""}, + { "GEOMETRYTYPE", 0, 0, 0, ""}, + { "GEOMCOLLFROMTEXT", 0, 0, 0, ""}, + { "GEOMCOLLFROMWKB", 0, 0, 0, ""}, + { "GEOMETRYCOLLECTIONFROMTEXT", 0, 0, 0, ""}, + { "GEOMETRYCOLLECTIONFROMWKB", 0, 0, 0, ""}, + { "GEOMETRYFROMTEXT", 0, 0, 0, ""}, + { "GEOMETRYFROMWKB", 0, 0, 0, ""}, + { "GEOMFROMTEXT", 0, 0, 0, ""}, + { "GEOMFROMWKB", 0, 0, 0, ""}, + { "GLENGTH", 0, 0, 0, ""}, + { "GREATEST", 0, 0, 0, ""}, + { "GROUP_CONCAT", 0, 0, 0, ""}, + { "GROUP_UNIQUE_USERS", 0, 0, 0, ""}, + { "HEX", 0, 0, 0, ""}, + { "IFNULL", 0, 0, 0, ""}, + { "INET_ATON", 0, 0, 0, ""}, + { "INET_NTOA", 0, 0, 0, ""}, + { "INSTR", 0, 0, 0, ""}, + { "INTERIORRINGN", 0, 0, 0, ""}, + { "INTERSECTS", 0, 0, 0, ""}, + { "ISCLOSED", 0, 0, 0, ""}, + { "ISEMPTY", 0, 0, 0, ""}, + { "ISNULL", 0, 0, 0, ""}, + { "IS_FREE_LOCK", 0, 0, 0, ""}, + { "IS_USED_LOCK", 0, 0, 0, ""}, + { "LAST_INSERT_ID", 0, 0, 0, ""}, + { "ISSIMPLE", 0, 0, 0, ""}, + { "LAST_DAY", 0, 0, 0, ""}, + { "LCASE", 0, 0, 0, ""}, + { "LEAST", 0, 0, 0, ""}, + { "LENGTH", 0, 0, 0, ""}, + { "LN", 0, 0, 0, ""}, + { "LINEFROMTEXT", 0, 0, 0, ""}, + { "LINEFROMWKB", 0, 0, 0, ""}, + { "LINESTRINGFROMTEXT", 0, 0, 0, ""}, + { "LINESTRINGFROMWKB", 0, 0, 0, ""}, + { "LOAD_FILE", 0, 0, 0, ""}, + { "LOCATE", 0, 0, 0, ""}, + { "LOG", 0, 0, 0, ""}, + { "LOG2", 0, 0, 0, ""}, + { "LOG10", 0, 0, 0, ""}, + { "LOWER", 0, 0, 0, ""}, + { "LPAD", 0, 0, 0, ""}, + { "LTRIM", 0, 0, 0, ""}, + { "MAKE_SET", 0, 0, 0, ""}, + { "MAKEDATE", 0, 0, 0, ""}, + { "MAKETIME", 0, 0, 0, ""}, + { "MASTER_POS_WAIT", 0, 0, 0, ""}, + { "MAX", 0, 0, 0, ""}, + { "MBRCONTAINS", 0, 0, 0, ""}, + { "MBRDISJOINT", 0, 0, 0, ""}, + { "MBREQUAL", 0, 0, 0, ""}, + { "MBRINTERSECTS", 0, 0, 0, ""}, + { "MBROVERLAPS", 0, 0, 0, ""}, + { "MBRTOUCHES", 0, 0, 0, ""}, + { "MBRWITHIN", 0, 0, 0, ""}, + { "MD5", 0, 0, 0, ""}, + { "MID", 0, 0, 0, ""}, + { "MIN", 0, 0, 0, ""}, + { "MLINEFROMTEXT", 0, 0, 0, ""}, + { "MLINEFROMWKB", 0, 0, 0, ""}, + { "MPOINTFROMTEXT", 0, 0, 0, ""}, + { "MPOINTFROMWKB", 0, 0, 0, ""}, + { "MPOLYFROMTEXT", 0, 0, 0, ""}, + { "MPOLYFROMWKB", 0, 0, 0, ""}, + { "MONTHNAME", 0, 0, 0, ""}, + { "MULTILINESTRINGFROMTEXT", 0, 0, 0, ""}, + { "MULTILINESTRINGFROMWKB", 0, 0, 0, ""}, + { "MULTIPOINTFROMTEXT", 0, 0, 0, ""}, + { "MULTIPOINTFROMWKB", 0, 0, 0, ""}, + { "MULTIPOLYGONFROMTEXT", 0, 0, 0, ""}, + { "MULTIPOLYGONFROMWKB", 0, 0, 0, ""}, + { "NAME_CONST", 0, 0, 0, ""}, + { "NOW", 0, 0, 0, ""}, + { "NULLIF", 0, 0, 0, ""}, + { "NUMGEOMETRIES", 0, 0, 0, ""}, + { "NUMINTERIORRINGS", 0, 0, 0, ""}, + { "NUMPOINTS", 0, 0, 0, ""}, + { "OCTET_LENGTH", 0, 0, 0, ""}, + { "OCT", 0, 0, 0, ""}, + { "ORD", 0, 0, 0, ""}, + { "OVERLAPS", 0, 0, 0, ""}, + { "PERIOD_ADD", 0, 0, 0, ""}, + { "PERIOD_DIFF", 0, 0, 0, ""}, + { "PI", 0, 0, 0, ""}, + { "POINTFROMTEXT", 0, 0, 0, ""}, + { "POINTFROMWKB", 0, 0, 0, ""}, + { "POINTN", 0, 0, 0, ""}, + { "POLYFROMTEXT", 0, 0, 0, ""}, + { "POLYFROMWKB", 0, 0, 0, ""}, + { "POLYGONFROMTEXT", 0, 0, 0, ""}, + { "POLYGONFROMWKB", 0, 0, 0, ""}, + { "POSITION", 0, 0, 0, ""}, + { "POW", 0, 0, 0, ""}, + { "POWER", 0, 0, 0, ""}, + { "QUOTE", 0, 0, 0, ""}, + { "RADIANS", 0, 0, 0, ""}, + { "RAND", 0, 0, 0, ""}, + { "RELEASE_LOCK", 0, 0, 0, ""}, + { "REVERSE", 0, 0, 0, ""}, + { "ROUND", 0, 0, 0, ""}, + { "ROW_COUNT", 0, 0, 0, ""}, + { "RPAD", 0, 0, 0, ""}, + { "RTRIM", 0, 0, 0, ""}, + { "SEC_TO_TIME", 0, 0, 0, ""}, + { "SESSION_USER", 0, 0, 0, ""}, + { "SUBDATE", 0, 0, 0, ""}, + { "SIGN", 0, 0, 0, ""}, + { "SIN", 0, 0, 0, ""}, + { "SHA", 0, 0, 0, ""}, + { "SHA1", 0, 0, 0, ""}, + { "SLEEP", 0, 0, 0, ""}, + { "SOUNDEX", 0, 0, 0, ""}, + { "SPACE", 0, 0, 0, ""}, + { "SQRT", 0, 0, 0, ""}, + { "SRID", 0, 0, 0, ""}, + { "STARTPOINT", 0, 0, 0, ""}, + { "STD", 0, 0, 0, ""}, + { "STDDEV", 0, 0, 0, ""}, + { "STDDEV_POP", 0, 0, 0, ""}, + { "STDDEV_SAMP", 0, 0, 0, ""}, + { "STR_TO_DATE", 0, 0, 0, ""}, + { "STRCMP", 0, 0, 0, ""}, + { "SUBSTR", 0, 0, 0, ""}, + { "SUBSTRING", 0, 0, 0, ""}, + { "SUBSTRING_INDEX", 0, 0, 0, ""}, + { "SUBTIME", 0, 0, 0, ""}, + { "SUM", 0, 0, 0, ""}, + { "SYSDATE", 0, 0, 0, ""}, + { "SYSTEM_USER", 0, 0, 0, ""}, + { "TAN", 0, 0, 0, ""}, + { "TIME_FORMAT", 0, 0, 0, ""}, + { "TIME_TO_SEC", 0, 0, 0, ""}, + { "TIMEDIFF", 0, 0, 0, ""}, + { "TO_DAYS", 0, 0, 0, ""}, + { "TOUCHES", 0, 0, 0, ""}, + { "TRIM", 0, 0, 0, ""}, + { "UCASE", 0, 0, 0, ""}, + { "UNCOMPRESS", 0, 0, 0, ""}, + { "UNCOMPRESSED_LENGTH", 0, 0, 0, ""}, + { "UNHEX", 0, 0, 0, ""}, + { "UNIQUE_USERS", 0, 0, 0, ""}, + { "UNIX_TIMESTAMP", 0, 0, 0, ""}, + { "UPPER", 0, 0, 0, ""}, + { "UUID", 0, 0, 0, ""}, + { "VARIANCE", 0, 0, 0, ""}, + { "VAR_POP", 0, 0, 0, ""}, + { "VAR_SAMP", 0, 0, 0, ""}, + { "VERSION", 0, 0, 0, ""}, + { "WEEKDAY", 0, 0, 0, ""}, + { "WEEKOFYEAR", 0, 0, 0, ""}, + { "WITHIN", 0, 0, 0, ""}, + { "X", 0, 0, 0, ""}, + { "Y", 0, 0, 0, ""}, + { "YEARWEEK", 0, 0, 0, ""}, + /* end sentinel */ { (char *)NULL, 0, 0, 0, ""} }; @@ -1749,12 +2454,6 @@ static void build_completion_hash(bool rehash, bool write_info) if (status.batch || quick || !current_db) DBUG_VOID_RETURN; // We don't need completion in batches - - /* hash SQL commands */ - while (cmd->name) { - add_word(&ht,(char*) cmd->name); - cmd++; - } if (!rehash) DBUG_VOID_RETURN; @@ -1764,6 +2463,12 @@ static void build_completion_hash(bool rehash, bool write_info) completion_hash_clean(&ht); free_root(&hash_mem_root,MYF(0)); + /* hash this file's known subset of SQL commands */ + while (cmd->name) { + add_word(&ht,(char*) cmd->name); + cmd++; + } + /* hash MySQL functions (to be implemented) */ /* hash all database names */ From a3f80f54b46aaf64abd5e28c47e423880afc934f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 30 Jan 2008 19:00:20 -0700 Subject: [PATCH 114/527] Bug #32149 Long semaphore wait for adaptive hash latch Fix by calling ha_release_temporary_latches() before ::filesort(). sql/filesort.cc: Call ha_release_temporary_latches() before performing a (possibly long) ::filesort(). --- sql/filesort.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sql/filesort.cc b/sql/filesort.cc index 43b079e83d5..132e91363f3 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -112,6 +112,13 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, FILESORT_INFO table_sort; TABLE_LIST *tab= table->pos_in_table_list; Item_subselect *subselect= tab ? tab->containing_subselect() : 0; + + /* + Release InnoDB's adaptive hash index latch (if holding) before + running a sort. + */ + ha_release_temporary_latches(thd); + /* Don't use table->sort in filesort as it is also used by QUICK_INDEX_MERGE_SELECT. Work with a copy and put it back at the end From 53086d89accbd7219a861f8297eaac2575e4acae Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 15:56:02 +0400 Subject: [PATCH 115/527] Bug #25426 Prefix index on DECIMAL column causes warning. Error message modified to be consistent with the manual. mysql-test/r/alter_table.result: Bug #25426 Prefix index on DECIMAL column causes warning. test result fixed sql/share/errmsg.txt: Bug #25426 Prefix index on DECIMAL column causes warning. error messages modified --- mysql-test/r/alter_table.result | 8 +++--- mysql-test/r/bdb_notembedded.result | 35 ++++++++++++++++++++++++++ mysql-test/t/bdb_notembedded.test | 38 +++++++++++++++++++++++++++++ sql/share/errmsg.txt | 6 ++--- 4 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 mysql-test/r/bdb_notembedded.result create mode 100644 mysql-test/t/bdb_notembedded.test diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index 68b636829fc..3cec1f546d2 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -539,7 +539,7 @@ F2E5F1F2 drop table t1; create table t1 ( a timestamp ); alter table t1 add unique ( a(1) ); -ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys +ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys drop table t1; drop table if exists t1; create table t1 (a int, key(a)); @@ -953,12 +953,12 @@ t1 CREATE TABLE `t1` ( KEY `b_2` (`b`(50)) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE t2 (a INT, KEY (a(20))); -ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys +ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys ALTER TABLE t1 ADD d INT; ALTER TABLE t1 ADD KEY (d(20)); -ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys +ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys ALTER TABLE t1 ADD e GEOMETRY NOT NULL, ADD SPATIAL KEY (e(30)); -ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys +ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys DROP TABLE t1; CREATE TABLE t1 (s CHAR(8) BINARY); INSERT INTO t1 VALUES ('test'); diff --git a/mysql-test/r/bdb_notembedded.result b/mysql-test/r/bdb_notembedded.result new file mode 100644 index 00000000000..14cb5fad915 --- /dev/null +++ b/mysql-test/r/bdb_notembedded.result @@ -0,0 +1,35 @@ +set autocommit=1; +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; insert into bug16206 values(2) +drop table bug16206; +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +show binlog events; +Log_name Pos Event_type Server_id End_log_pos Info +f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4 +f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb +f n Query 1 n use `test`; insert into bug16206 values(0) +f n Query 1 n use `test`; insert into bug16206 values(1) +f n Query 1 n use `test`; BEGIN +f n Query 1 n use `test`; insert into bug16206 values(2) +f n Query 1 n use `test`; COMMIT +f n Query 1 n use `test`; insert into bug16206 values(3) +drop table bug16206; +set autocommit=0; +End of 5.0 tests diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test new file mode 100644 index 00000000000..24e64ebbfb2 --- /dev/null +++ b/mysql-test/t/bdb_notembedded.test @@ -0,0 +1,38 @@ +-- source include/not_embedded.inc +-- source include/have_bdb.inc + +# +# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode +# +set autocommit=1; + +let $VERSION=`select version()`; + +reset master; +create table bug16206 (a int); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +reset master; +create table bug16206 (a int) engine= bdb; +insert into bug16206 values(0); +insert into bug16206 values(1); +start transaction; +insert into bug16206 values(2); +commit; +insert into bug16206 values(3); +--replace_result $VERSION VERSION +--replace_column 1 f 2 n 5 n +show binlog events; +drop table bug16206; + +set autocommit=0; + + +--echo End of 5.0 tests diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 02e20ad7c5c..571335d877c 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -2146,14 +2146,14 @@ ER_WRONG_SUB_KEY cze "Chybn-Bá podèást klíèe -- není to øetìzec nebo je del¹í ne¾ délka èásti klíèe" dan "Forkert indeksdel. Den anvendte nøgledel er ikke en streng eller længden er større end nøglelængden" nla "Foutief sub-gedeelte van de zoeksleutel. De gebruikte zoeksleutel is geen onderdeel van een string of of de gebruikte lengte is langer dan de zoeksleutel" - eng "Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys" + eng "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys" est "Vigane võtme osa. Kasutatud võtmeosa ei ole string tüüpi, määratud pikkus on pikem kui võtmeosa või tabelihandler ei toeta seda tüüpi võtmeid" fre "Mauvaise sous-clef. Ce n'est pas un 'string' ou la longueur dépasse celle définie dans la clef" ger "Falscher Unterteilschlüssel. Der verwendete Schlüsselteil ist entweder kein String, die verwendete Länge ist länger als der Teilschlüssel oder die Speicher-Engine unterstützt keine Unterteilschlüssel" greek "ÅóöáëìÝíï sub part key. Ôï ÷ñçóéìïðïéïýìåíï key part äåí åßíáé string Þ ôï ìÞêïò ôïõ åßíáé ìåãáëýôåñï" hun "Rossz alkulcs. A hasznalt kulcsresz nem karaktersorozat vagy hosszabb, mint a kulcsresz" ita "Sotto-parte della chiave errata. La parte di chiave utilizzata non e` una stringa o la lunghezza e` maggiore della parte di chiave." - jpn "Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part" + jpn "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part" kor "ºÎÁ¤È®ÇÑ ¼­¹ö ÆÄÆ® Ű. »ç¿ëµÈ Ű ÆÄÆ®°¡ ½ºÆ®¸µÀÌ ¾Æ´Ï°Å³ª Ű ÆÄÆ®ÀÇ ±æÀ̰¡ ³Ê¹« ±é´Ï´Ù." nor "Feil delnøkkel. Den brukte delnøkkelen er ikke en streng eller den oppgitte lengde er lengre enn nøkkel lengden" norwegian-ny "Feil delnykkel. Den brukte delnykkelen er ikkje ein streng eller den oppgitte lengda er lengre enn nykkellengden" @@ -2162,7 +2162,7 @@ ER_WRONG_SUB_KEY rum "Componentul cheii este incorrect. Componentul folosit al cheii nu este un sir sau lungimea folosita este mai lunga decit lungimea cheii" rus "îÅËÏÒÒÅËÔÎÁÑ ÞÁÓÔØ ËÌÀÞÁ. éÓÐÏÌØÚÕÅÍÁÑ ÞÁÓÔØ ËÌÀÞÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÓÔÒÏËÏÊ, ÕËÁÚÁÎÎÁÑ ÄÌÉÎÁ ÂÏÌØÛÅ, ÞÅÍ ÄÌÉÎÁ ÞÁÓÔÉ ËÌÀÞÁ, ÉÌÉ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÕÎÉËÁÌØÎÙÅ ÞÁÓÔÉ ËÌÀÞÁ" serbian "Pogrešan pod-kljuè dela kljuèa. Upotrebljeni deo kljuèa nije string, upotrebljena dužina je veæa od dela kljuèa ili handler tabela ne podržava jedinstvene pod-kljuèeve" - slo "Incorrect sub part key; the used key part isn't a string or the used length is longer than the key part" + slo "Incorrect prefix key; the used key part isn't a string or the used length is longer than the key part" spa "Parte de la clave es erronea. Una parte de la clave no es una cadena o la longitud usada es tan grande como la parte de la clave" swe "Felaktig delnyckel. Nyckeldelen är inte en sträng eller den angivna längden är längre än kolumnlängden" ukr "îÅצÒÎÁ ÞÁÓÔÉÎÁ ËÌÀÞÁ. ÷ÉËÏÒÉÓÔÁÎÁ ÞÁÓÔÉÎÁ ËÌÀÞÁ ÎÅ ¤ ÓÔÒÏËÏÀ, ÚÁÄÏ×ÇÁ ÁÂÏ ×ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ ÕΦËÁÌØÎÉÈ ÞÁÓÔÉÎ ËÌÀÞÅÊ" From 3b5c7a033efec7ad17c83e3c4221357d74ff9e71 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 13:56:12 +0100 Subject: [PATCH 116/527] ndb - bug#34107 patch 1, kernel ndb/src/kernel/blocks/dbtup/Dbtup.hpp: bug#34107 check stored proc overflow ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: bug#34107 check stored proc overflow ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp: bug#34107 check stored proc overflow ndb/src/ndbapi/ndberror.c: bug#34107 check stored proc overflow --- ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 4 +++- ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp | 8 ++++++++ .../kernel/blocks/dbtup/DbtupStoredProcDef.cpp | 16 +++++++++++----- ndb/src/ndbapi/ndberror.c | 1 + 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index a80f4542fee..829156ef15a 100644 --- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -198,6 +198,7 @@ #define ZUNSUPPORTED_BRANCH 892 #define ZSTORED_SEIZE_ATTRINBUFREC_ERROR 873 // Part of Scan +#define ZSTORED_TOO_MUCH_ATTRINFO_ERROR 874 #define ZREAD_ONLY_CONSTRAINT_VIOLATION 893 #define ZVAR_SIZED_NOT_SUPPORTED 894 @@ -2173,7 +2174,8 @@ private: Operationrec* regOperPtr, Uint32 lenAttrInfo); void storedSeizeAttrinbufrecErrorLab(Signal* signal, - Operationrec* regOperPtr); + Operationrec* regOperPtr, + Uint32 errorCode); bool storedProcedureAttrInfo(Signal* signal, Operationrec* regOperPtr, Uint32 length, diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp index 298fb183bc3..9ab4fb34827 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp @@ -77,6 +77,14 @@ void Dbtup::copyAttrinfo(Signal* signal, RbufLen = copyAttrBufPtr.p->attrbuf[ZBUF_DATA_LEN]; Rnext = copyAttrBufPtr.p->attrbuf[ZBUF_NEXT]; Rfirst = cfirstfreeAttrbufrec; + /* + * ATTRINFO comes from 2 mutually exclusive places: + * 1) TUPKEYREQ (also interpreted part) + * 2) STORED_PROCREQ before scan start + * Assert here that both have a check for overflow. + * The "<" instead of "<=" is intentional. + */ + ndbrequire(RinBufIndex + RbufLen < ZATTR_BUFFER_SIZE); MEMCOPY_NO_WORDS(&inBuffer[RinBufIndex], ©AttrBufPtr.p->attrbuf[0], RbufLen); diff --git a/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp b/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp index 37fcd3df317..f4215b6da7d 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupStoredProcDef.cpp @@ -108,6 +108,11 @@ void Dbtup::scanProcedure(Signal* signal, regOperPtr->attrinbufLen = lenAttrInfo; regOperPtr->currentAttrinbufLen = 0; regOperPtr->pageOffset = storedPtr.i; + if (lenAttrInfo >= ZATTR_BUFFER_SIZE) { // yes ">=" + jam(); + // send REF and change state to ignore the ATTRINFO to come + storedSeizeAttrinbufrecErrorLab(signal, regOperPtr, ZSTORED_TOO_MUCH_ATTRINFO_ERROR); + } }//Dbtup::scanProcedure() void Dbtup::copyProcedure(Signal* signal, @@ -146,7 +151,7 @@ bool Dbtup::storedProcedureAttrInfo(Signal* signal, Uint32 RnoFree = cnoFreeAttrbufrec; if (ERROR_INSERTED(4004) && !copyProcedure) { CLEAR_ERROR_INSERT_VALUE; - storedSeizeAttrinbufrecErrorLab(signal, regOperPtr); + storedSeizeAttrinbufrecErrorLab(signal, regOperPtr, ZSTORED_SEIZE_ATTRINBUFREC_ERROR); return false; }//if regOperPtr->currentAttrinbufLen += length; @@ -162,7 +167,7 @@ bool Dbtup::storedProcedureAttrInfo(Signal* signal, regAttrPtr.p->attrbuf[ZBUF_NEXT] = RNIL; } else { ljam(); - storedSeizeAttrinbufrecErrorLab(signal, regOperPtr); + storedSeizeAttrinbufrecErrorLab(signal, regOperPtr, ZSTORED_SEIZE_ATTRINBUFREC_ERROR); return false; }//if if (regOperPtr->firstAttrinbufrec == RNIL) { @@ -190,7 +195,7 @@ bool Dbtup::storedProcedureAttrInfo(Signal* signal, }//if if (ERROR_INSERTED(4005) && !copyProcedure) { CLEAR_ERROR_INSERT_VALUE; - storedSeizeAttrinbufrecErrorLab(signal, regOperPtr); + storedSeizeAttrinbufrecErrorLab(signal, regOperPtr, ZSTORED_SEIZE_ATTRINBUFREC_ERROR); return false; }//if @@ -211,7 +216,8 @@ bool Dbtup::storedProcedureAttrInfo(Signal* signal, }//Dbtup::storedProcedureAttrInfo() void Dbtup::storedSeizeAttrinbufrecErrorLab(Signal* signal, - Operationrec* regOperPtr) + Operationrec* regOperPtr, + Uint32 errorCode) { StoredProcPtr storedPtr; c_storedProcPool.getPtr(storedPtr, (Uint32)regOperPtr->pageOffset); @@ -222,7 +228,7 @@ void Dbtup::storedSeizeAttrinbufrecErrorLab(Signal* signal, regOperPtr->lastAttrinbufrec = RNIL; regOperPtr->transstate = ERROR_WAIT_STORED_PROCREQ; signal->theData[0] = regOperPtr->userpointer; - signal->theData[1] = ZSTORED_SEIZE_ATTRINBUFREC_ERROR; + signal->theData[1] = errorCode; signal->theData[2] = regOperPtr->pageOffset; sendSignal(regOperPtr->userblockref, GSN_STORED_PROCREF, signal, 3, JBB); }//Dbtup::storedSeizeAttrinbufrecErrorLab() diff --git a/ndb/src/ndbapi/ndberror.c b/ndb/src/ndbapi/ndberror.c index 4c60e384e6c..27b640489f6 100644 --- a/ndb/src/ndbapi/ndberror.c +++ b/ndb/src/ndbapi/ndberror.c @@ -291,6 +291,7 @@ ErrorBundle ErrorCodes[] = { { 242, AE, "Zero concurrency in scan"}, { 244, AE, "Too high concurrency in scan"}, { 269, AE, "No condition and attributes to read in scan"}, + { 874, AE, "Too much attrinfo (e.g. scan filter) for scan in tuple manager" }, { 4600, AE, "Transaction is already started"}, { 4601, AE, "Transaction is not started"}, { 4602, AE, "You must call getNdbOperation before executeScan" }, From cd8a8a1ce0a896994f5717900b22b4704ca80416 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 13:58:29 +0100 Subject: [PATCH 117/527] ndb - bug#34107 patch 2, ndb api mysql-test/r/ndb_condition_pushdown.result: bug#34107 lower scanfilter max size to not hit TUP limit mysql-test/t/ndb_condition_pushdown.test: bug#34107 lower scanfilter max size to not hit TUP limit ndb/include/ndbapi/ndbapi_limits.h: bug#34107 lower scanfilter max size to not hit TUP limit --- mysql-test/r/ndb_condition_pushdown.result | 6 + mysql-test/t/ndb_condition_pushdown.test | 751 +-------------------- ndb/include/ndbapi/ndbapi_limits.h | 3 +- 3 files changed, 20 insertions(+), 740 deletions(-) diff --git a/mysql-test/r/ndb_condition_pushdown.result b/mysql-test/r/ndb_condition_pushdown.result index d49c0cd983e..b211b9079d0 100644 --- a/mysql-test/r/ndb_condition_pushdown.result +++ b/mysql-test/r/ndb_condition_pushdown.result @@ -1904,6 +1904,12 @@ 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 diff --git a/mysql-test/t/ndb_condition_pushdown.test b/mysql-test/t/ndb_condition_pushdown.test index b5b7e41fb21..ebfd9c7231a 100644 --- a/mysql-test/t/ndb_condition_pushdown.test +++ b/mysql-test/t/ndb_condition_pushdown.test @@ -1719,6 +1719,7 @@ set engine_condition_pushdown = 1; SELECT fname, lname FROM t1 WHERE (fname like 'Y%') or (lname like 'F%'); # bug#29390 (scan filter is too large, discarded) +# bug#34107 (previous limit was too large for TUP) drop table t1; @@ -1737,9 +1738,11 @@ 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, @@ -1870,745 +1873,15 @@ select a,b,d from t1 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, -0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, +0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,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 + +--echo -- big filter just above limit +--disable_query_log +select a,b,d from t1 + where b in ( +0,1,2,5,0,1,2,5,0,1,2, 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, 0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2,5,0,1,2, diff --git a/ndb/include/ndbapi/ndbapi_limits.h b/ndb/include/ndbapi/ndbapi_limits.h index e283913d059..98551866edc 100644 --- a/ndb/include/ndbapi/ndbapi_limits.h +++ b/ndb/include/ndbapi/ndbapi_limits.h @@ -26,6 +26,7 @@ #define NDB_MAX_TUPLE_SIZE (NDB_MAX_TUPLE_SIZE_IN_WORDS*4) #define NDB_MAX_ACTIVE_EVENTS 100 -#define NDB_MAX_SCANFILTER_SIZE_IN_WORDS 50000 +/* TUP ZATTR_BUFFER_SIZE 16384 (minus 1) minus place for getValue()s */ +#define NDB_MAX_SCANFILTER_SIZE_IN_WORDS (16384 - 1 - 1024) #endif From 5177c97ec0e11b65227868d6cf98de3970262340 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 18:51:20 +0400 Subject: [PATCH 118/527] BUG#22989 - START SLAVE causes Error on COM_REGISTER_SLAVE: 1105 'Wrong parameters to functi START SLAVE reports vague error when it fails to register on master: "Wrong parameters to function register_slave". If master failed to register slave because of too long 'report-host'/'report-user'/'report-password', return better error messages: "Failed to register slave: too long 'report-host'" "Failed to register slave: too long 'report-user'" "Failed to register slave; too long 'report-password'" No test case for this fix. sql/repl_failsafe.cc: Report descriptive error when master fails to register slave. --- sql/repl_failsafe.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 896315ec82f..f1826678c9f 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -109,11 +109,14 @@ void change_rpl_status(RPL_STATUS from_status, RPL_STATUS to_status) } -#define get_object(p, obj) \ +#define get_object(p, obj, msg) \ {\ uint len = (uint)*p++; \ if (p + len > p_end || len >= sizeof(obj)) \ + {\ + errmsg= msg;\ goto err; \ + }\ strmake(obj,(char*) p,len); \ p+= len; \ }\ @@ -158,6 +161,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) int res; SLAVE_INFO *si; uchar *p= packet, *p_end= packet + packet_length; + const char *errmsg= "Wrong parameters to function register_slave"; if (check_access(thd, REPL_SLAVE_ACL, any_db,0,0,0,0)) return 1; @@ -166,9 +170,9 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) thd->server_id= si->server_id= uint4korr(p); p+= 4; - get_object(p,si->host); - get_object(p,si->user); - get_object(p,si->password); + get_object(p,si->host, "Failed to register slave: too long 'report-host'"); + get_object(p,si->user, "Failed to register slave: too long 'report-user'"); + get_object(p,si->password, "Failed to register slave; too long 'report-password'"); if (p+10 > p_end) goto err; si->port= uint2korr(p); @@ -187,8 +191,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) err: my_free((gptr) si, MYF(MY_WME)); - my_message(ER_UNKNOWN_ERROR, "Wrong parameters to function register_slave", - MYF(0)); + my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); err2: return 1; } From e2bdd9b244851f9104f130fc62024879a4b7f8c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 16:00:06 +0100 Subject: [PATCH 119/527] Fixed support for specifying explicit database --- storage/ndb/test/tools/hugoPkUpdate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/ndb/test/tools/hugoPkUpdate.cpp b/storage/ndb/test/tools/hugoPkUpdate.cpp index b920a4f396a..3fa87da3145 100644 --- a/storage/ndb/test/tools/hugoPkUpdate.cpp +++ b/storage/ndb/test/tools/hugoPkUpdate.cpp @@ -106,7 +106,7 @@ int main(int argc, const char** argv){ NDBT_ThreadSet ths(_threads); // create Ndb object for each thread - if (ths.connect(&con, "TEST_DB") == -1) { + if (ths.connect(&con, db ? db : "TEST_DB") == -1) { ndbout << "connect failed: err=" << ths.get_err() << endl; return NDBT_ProgramExit(NDBT_FAILED); } From 8c8c0efd4132288396cbd5faf0316165ab539352 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 31 Jan 2008 16:12:54 +0100 Subject: [PATCH 120/527] fixes for bug#34190. BitKeeper/etc/ignore: Added libmysqld/sql_profile.cc to the ignore list --- .bzrignore | 1 + .../r/a_processlist_priv_no_prot.result | 30 +-- .../r/a_processlist_val_no_prot.result | 36 ++-- .../funcs_1/r/b_processlist_priv_ps.result | 30 +-- .../funcs_1/r/b_processlist_val_ps.result | 36 ++-- .../suite/funcs_1/r/innodb__datadict.result | 182 +++++++++++++++++- .../suite/funcs_1/r/innodb_storedproc.result | 26 +-- .../suite/funcs_1/r/innodb_trig_09.result | 5 +- .../suite/funcs_1/r/memory__datadict.result | 182 +++++++++++++++++- .../suite/funcs_1/r/memory_storedproc.result | 26 +-- .../suite/funcs_1/r/memory_trig_09.result | 5 +- .../suite/funcs_1/r/myisam__datadict.result | 182 +++++++++++++++++- .../suite/funcs_1/r/myisam_storedproc.result | 26 +-- .../suite/funcs_1/r/myisam_trig_09.result | 5 +- .../suite/funcs_1/r/ndb_storedproc.result | 28 +-- mysql-test/suite/funcs_1/r/ndb_trig_09.result | 5 +- .../funcs_1/storedproc/storedproc_master.inc | 1 + .../suite/funcs_1/triggers/triggers_09.inc | 4 + 18 files changed, 673 insertions(+), 137 deletions(-) diff --git a/.bzrignore b/.bzrignore index c54795778c8..7100d65064c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3017,3 +3017,4 @@ mysql-test/funcs_1.tar mysql-test/suite/funcs_1.tar.gz mysql-test/.DS_Store .DS_Store +libmysqld/sql_profile.cc diff --git a/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result index 233544ec134..8ed815ab667 100644 --- a/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/a_processlist_priv_no_prot.result @@ -39,11 +39,11 @@ Id User Host db Command Time State Info 2 ddicttestuser1 localhost information_schema Sleep TIME NULL SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO -1 root localhost information_schema Query TIME preparing SELECT * FROM processlist ORDER BY id +1 root localhost information_schema Query TIME executing SELECT * FROM processlist ORDER BY id 2 ddicttestuser1 localhost information_schema Sleep TIME NULL SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO -1 root localhost information_schema Query TIME preparing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id +1 root localhost information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id 2 ddicttestuser1 localhost information_schema Sleep TIME NULL CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist; UPDATE test.t_processlist SET user='horst' WHERE id=1 ; @@ -108,10 +108,10 @@ Id User Host db Command Time State Info 2 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO -2 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM processlist ORDER BY id +2 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM processlist ORDER BY id SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id; ID USER HOST DB COMMAND TIME STATE INFO -2 ddicttestuser1 localhost information_schema Query TIME preparing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id +2 ddicttestuser1 localhost information_schema Query TIME executing SELECT ID, USER, HOST, DB, COMMAND, TIME, STATE, INFO FROM processlist ORDER BY id CREATE TEMPORARY TABLE test.t_processlist AS SELECT * FROM processlist; UPDATE test.t_processlist SET user='horst' WHERE id=1 ; INSERT INTO processlist SELECT * FROM test.t_processlist; @@ -173,7 +173,7 @@ Id User Host db Command Time State Info 2 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -2 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +2 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist #################################################################################### 4.2 New connection con101 (ddicttestuser1 with PROCESS privilege) SHOW/SELECT shows all processes/threads. @@ -188,7 +188,7 @@ Id User Host db Command Time State Info 3 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -3 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +3 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 2 ddicttestuser1 localhost information_schema Sleep TIME NULL 1 root localhost information_schema Sleep TIME NULL #################################################################################### @@ -212,7 +212,7 @@ Id User Host db Command Time State Info 4 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -4 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +4 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 3 ddicttestuser1 localhost information_schema Sleep TIME NULL 2 ddicttestuser1 localhost information_schema Sleep TIME NULL 1 root localhost information_schema Sleep TIME NULL @@ -236,7 +236,7 @@ Id User Host db Command Time State Info 5 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -5 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +5 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 3 ddicttestuser1 localhost information_schema Sleep TIME NULL 2 ddicttestuser1 localhost information_schema Sleep TIME NULL #################################################################################### @@ -254,7 +254,7 @@ Grants for @localhost GRANT USAGE ON *.* TO ''@'localhost' SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -6 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +6 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 4 localhost information_schema Sleep TIME NULL #################################################################################### 8 Grant SUPER (does not imply PROCESS) privilege to ddicttestuser1 @@ -276,7 +276,7 @@ Id User Host db Command Time State Info 7 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -7 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +7 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 5 ddicttestuser1 localhost information_schema Sleep TIME NULL 3 ddicttestuser1 localhost information_schema Sleep TIME NULL 2 ddicttestuser1 localhost information_schema Sleep TIME NULL @@ -302,7 +302,7 @@ Id User Host db Command Time State Info 8 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -8 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +8 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 7 ddicttestuser1 localhost information_schema Sleep TIME NULL 5 ddicttestuser1 localhost information_schema Sleep TIME NULL 3 ddicttestuser1 localhost information_schema Sleep TIME NULL @@ -356,7 +356,7 @@ Id User Host db Command Time State Info 11 ddicttestuser2 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -11 ddicttestuser2 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +11 ddicttestuser2 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 10 ddicttestuser1 localhost information_schema Sleep TIME NULL 9 ddicttestuser1 localhost information_schema Sleep TIME NULL 8 ddicttestuser1 localhost information_schema Sleep TIME NULL @@ -385,7 +385,7 @@ Id User Host db Command Time State Info 12 ddicttestuser2 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -12 ddicttestuser2 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +12 ddicttestuser2 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 11 ddicttestuser2 localhost information_schema Sleep TIME NULL #################################################################################### 11.2 Revoke SUPER,PROCESS,GRANT OPTION privilege from user ddicttestuser1 @@ -414,7 +414,7 @@ Id User Host db Command Time State Info 13 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -13 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +13 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 10 ddicttestuser1 localhost information_schema Sleep TIME NULL 9 ddicttestuser1 localhost information_schema Sleep TIME NULL 8 ddicttestuser1 localhost information_schema Sleep TIME NULL @@ -450,7 +450,7 @@ Id User Host db Command Time State Info 14 ddicttestuser1 localhost information_schema Query TIME NULL SHOW processlist SELECT * FROM information_schema.processlist; ID USER HOST DB COMMAND TIME STATE INFO -14 ddicttestuser1 localhost information_schema Query TIME preparing SELECT * FROM information_schema.processlist +14 ddicttestuser1 localhost information_schema Query TIME executing SELECT * FROM information_schema.processlist 13 ddicttestuser1 localhost information_schema Sleep TIME NULL 10 ddicttestuser1 localhost information_schema Sleep TIME NULL 9 ddicttestuser1 localhost information_schema Sleep TIME NULL diff --git a/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result b/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result index 967c157f535..48ee2823a08 100644 --- a/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result +++ b/mysql-test/suite/funcs_1/r/a_processlist_val_no_prot.result @@ -24,14 +24,14 @@ COUNT(*) USE test; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; ID USER HOST DB COMMAND TIME STATE INFO - root localhost test Query 0 preparing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST + root localhost test Query 0 executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST SHOW FULL PROCESSLIST; Id User Host db Command Time State Info root localhost test Query 0 NULL SHOW FULL PROCESSLIST USE information_schema; SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST; ID USER HOST DB COMMAND TIME STATE INFO - root localhost information_schema Query
set = NULL -# WHERE ; -# However, this is currently allowed -- is -# set to the default value for the given datatype -# Might have to change this test depending on the action taken for -# Bug#33699 (addressing this behavior) ############################################################################## -- echo # ===== csv_not_null.3 ===== -- disable_warnings @@ -91,13 +85,15 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV; +--disable_warnings INSERT INTO t1 VALUES(); +--enable_warnings SELECT * FROM t1; +--disable_warnings UPDATE t1 set b = 'new_value' where a = 0; +--enable_warnings SELECT * FROM t1; -# Might need to change this depending on Bug#33699 -UPDATE allows NULL -# as new value on NOT NULL columns (= default datatype value) -# Currently sets to datatype default -- might throw error +--error ER_BAD_NULL_ERROR UPDATE t1 set b = NULL where b = 'new_value'; SELECT * FROM t1; From d740f5c67567479149d2aea524b2463748f3b7ac Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Feb 2008 16:33:11 +0300 Subject: [PATCH 229/527] Post-merge fix after merging the patch for bug#31590 to 5.1: suppress the "Out of sort memory" error in the error log. --- mysql-test/lib/mtr_report.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 73598fc1bac..1c1fe9aa6d5 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -363,7 +363,10 @@ sub mtr_report_stats ($) { # master /Slave: Unknown column 'c7' in 't15' Error_code: 1054/ or /Slave: Can't DROP 'c7'.* 1091/ or - /Slave: Key column 'c6'.* 1072/ + /Slave: Key column 'c6'.* 1072/ or + + # Test case for Bug#31590 produces the following error: + /Out of sort memory; increase server sort buffer size/ ) { next; # Skip these lines From df6d607c87054edf2b6e269359efd2a18f884571 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Feb 2008 18:23:58 +0400 Subject: [PATCH 230/527] After merge fix. --- storage/federated/ha_federated.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index 01c9e3df4ea..d7040c44fe8 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -1298,9 +1298,9 @@ bool ha_federated::create_where_from_key(String *to, "IS NULL", flag is set to HA_READ_KEY_EXACT. */ if (emit_key_part_name(&tmp, key_part) || - tmp.append(ranges[i]->flag == HA_READ_KEY_EXACT ? - STRING_WITH_LEN(" IS NULL ") : - STRING_WITH_LEN(" IS NOT NULL "))) + (ranges[i]->flag == HA_READ_KEY_EXACT ? + tmp.append(STRING_WITH_LEN(" IS NULL ")) : + tmp.append(STRING_WITH_LEN(" IS NOT NULL ")))) goto err; /* We need to adjust pointer and length to be prepared for next From 50bd4a438e72fdf6f46e2d714b2f13999fa460b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Feb 2008 16:28:32 +0200 Subject: [PATCH 231/527] bug#33329 extraneous ROLLBACK in binlog on connection does not use trans tables changes for an assert and an updated results file. mysql-test/r/mix_innodb_myisam_binlog.result: results file changed as there is no ROLLBACK query in binlog as it must be. sql/sql_update.cc: refining assert as the initial value of transactional_tables has been changed to zero. --- mysql-test/r/mix_innodb_myisam_binlog.result | 2 +- sql/sql_update.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index e1968ac7ef8..b1d328a61dc 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -447,7 +447,7 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 1 show master status /* the offset must denote there is the query */; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 369 +master-bin.000001 230 select count(*) from t1 /* must be 4 */; count(*) 4 diff --git a/sql/sql_update.cc b/sql/sql_update.cc index e5017058659..9c82bde9497 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1482,7 +1482,7 @@ void multi_update::send_error(uint errcode,const char *err) if (trans_safe) { - DBUG_ASSERT(transactional_tables); + DBUG_ASSERT(!updated || transactional_tables); (void) ha_autocommit_or_rollback(thd, 1); } else From 5704c7fe2cf52fb8bec0f8e8006f7a4b181e1660 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 14 Feb 2008 18:13:40 +0300 Subject: [PATCH 232/527] A patch for Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields. The actual problem here was that CREATE TABLE allowed zero date as a default value for a TIMESTAMP column in NO_ZERO_DATE mode. The thing is that for TIMESTAMP date type specific rule is applied: column_name TIMESTAMP == column_name TIMESTAMP DEFAULT 0 whever for any other date data type column_name TYPE == column_name TYPE DEFAULT NULL The fix is to raise an error when we're in NO_ZERO_DATE mode and there is TIMESTAMP column w/o default value. mysql-test/r/create.result: Update result file. mysql-test/t/create.test: Test case for Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields. sql/sql_table.cc: Report an error if NO_ZERO_MODE is set and we have zero date as a default. --- mysql-test/r/create.result | 44 ++++++++++++++++++++++++++ mysql-test/t/create.test | 64 ++++++++++++++++++++++++++++++++++++++ sql/sql_table.cc | 31 ++++++++++++++++++ 3 files changed, 139 insertions(+) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 4bdcca81b74..0dfc9c1e761 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1789,4 +1789,48 @@ DROP TABLE t2; # -- End of test case for Bug#21380. +# -- +# -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields +# -- + +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; + +CREATE TABLE t1(c1 TIMESTAMP, c2 TIMESTAMP); + +SET sql_mode = NO_ZERO_DATE; + +CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP DEFAULT 0); +ERROR 42000: Invalid default value for 'c2' + +CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP); +ERROR 42000: Invalid default value for 'c2' + +# -- Check that NULL column still can be created. +CREATE TABLE t2(c1 TIMESTAMP NULL); + +# -- Check ALTER TABLE. +ALTER TABLE t1 ADD INDEX(c1); +ERROR 42000: Invalid default value for 'c2' + +# -- Check DATETIME. +SET sql_mode = ''; + +CREATE TABLE t3(c1 DATETIME NOT NULL); +INSERT INTO t3 VALUES (0); + +SET sql_mode = TRADITIONAL; + +ALTER TABLE t3 ADD INDEX(c1); +ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'c1' at row 1 + +# -- Cleanup. +SET sql_mode = ''; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +# -- End of Bug#18834. + End of 5.1 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 09170cbc4f5..8912fd46b42 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1385,4 +1385,68 @@ DROP TABLE t2; --echo # -- End of test case for Bug#21380. --echo +--echo # -- +--echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields +--echo # -- +--echo + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +DROP TABLE IF EXISTS t3; +--enable_warnings + +--echo + +CREATE TABLE t1(c1 TIMESTAMP, c2 TIMESTAMP); + +--echo + +SET sql_mode = NO_ZERO_DATE; + +--echo +--error ER_INVALID_DEFAULT +CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP DEFAULT 0); + +--echo +--error ER_INVALID_DEFAULT +CREATE TABLE t2(c1 TIMESTAMP, c2 TIMESTAMP); + +--echo +--echo # -- Check that NULL column still can be created. +CREATE TABLE t2(c1 TIMESTAMP NULL); + +--echo +--echo # -- Check ALTER TABLE. +--error ER_INVALID_DEFAULT +ALTER TABLE t1 ADD INDEX(c1); + +--echo +--echo # -- Check DATETIME. +SET sql_mode = ''; + +--echo + +CREATE TABLE t3(c1 DATETIME NOT NULL); +INSERT INTO t3 VALUES (0); + +--echo +SET sql_mode = TRADITIONAL; + +--echo +--error ER_TRUNCATED_WRONG_VALUE +ALTER TABLE t3 ADD INDEX(c1); + +--echo +--echo # -- Cleanup. + +SET sql_mode = ''; +DROP TABLE t1; +DROP TABLE t2; +DROP TABLE t3; + +--echo +--echo # -- End of Bug#18834. +--echo + --echo End of 5.1 tests diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 505bcd1b421..05c73044ddd 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3001,6 +3001,37 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, (qsort_cmp) sort_keys); create_info->null_bits= null_fields; + /* Check fields. */ + it.rewind(); + while ((sql_field=it++)) + { + Field::utype type= (Field::utype) MTYP_TYPENR(sql_field->unireg_check); + + if (thd->variables.sql_mode & MODE_NO_ZERO_DATE && + !sql_field->def && + sql_field->sql_type == MYSQL_TYPE_TIMESTAMP && + (sql_field->flags & NOT_NULL_FLAG) && + (type == Field::NONE || type == Field::TIMESTAMP_UN_FIELD)) + { + /* + An error should be reported if: + - NO_ZERO_DATE SQL mode is active; + - there is no explicit DEFAULT clause (default column value); + - this is a TIMESTAMP column; + - the column is not NULL; + - this is not the DEFAULT CURRENT_TIMESTAMP column. + + In other words, an error should be reported if + - NO_ZERO_DATE SQL mode is active; + - the column definition is equivalent to + 'column_name TIMESTAMP DEFAULT 0'. + */ + + my_error(ER_INVALID_DEFAULT, MYF(0), sql_field->field_name); + DBUG_RETURN(TRUE); + } + } + DBUG_RETURN(FALSE); } From 410e2d64d14fc2ea5193fc0111142aca182ed348 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 10:24:13 +0100 Subject: [PATCH 233/527] Adding waits to events_scheduling to prevent the test from failing on heavily loaded systems. mysql-test/t/events_scheduling.test: Adding waits before statements since the scheduler is unpredictable on loaded systems and might be delayed. --- mysql-test/t/events_scheduling.test | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index 4541ee1eb36..a5133166495 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -76,11 +76,22 @@ let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_4' and status='enabled'; --source include/wait_condition.inc -# check the data +# Wait for the events to fire and check the data afterwards +let $wait_condition=SELECT SUM(a) >= 4 FROM table_1; +source include/wait_condition.inc; SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; + +let $wait_condition=SELECT SUM(a) >= 5 FROM table_2; +source include/wait_condition.inc; SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; + +let $wait_condition=SELECT SUM(a) >= 1 FROM table_3; +source include/wait_condition.inc; SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; + +let $wait_condition=SELECT SUM(a) >= 1 FROM table_4; +source include/wait_condition.inc; SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') From ea34b5e7aa2eb78a77a619875e33dab773185ed9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 14:14:09 +0300 Subject: [PATCH 234/527] Add a test case for Bug#21704: Renaming column does not update FK definition. mysql-test/r/innodb_mysql.result: Updated result file. --- mysql-test/include/mix1.inc | 29 +++++++++++++++++++++++++++++ mysql-test/r/innodb_mysql.result | 13 +++++++++++++ 2 files changed, 42 insertions(+) diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc index 703dfa44df0..c1fd5cac10c 100644 --- a/mysql-test/include/mix1.inc +++ b/mysql-test/include/mix1.inc @@ -1410,4 +1410,33 @@ SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC; DROP TABLE t1; +# +# Bug#21704: Renaming column does not update FK definition. +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings + +CREATE TABLE t1(id INT PRIMARY KEY) + ENGINE=innodb; + +CREATE TABLE t2( + t1_id INT PRIMARY KEY, + CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) + ENGINE=innodb; + +--echo + +--disable_result_log +--error ER_ERROR_ON_RENAME +ALTER TABLE t1 CHANGE id id2 INT; +--enable_result_log + +--echo + +DROP TABLE t2; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/r/innodb_mysql.result b/mysql-test/r/innodb_mysql.result index e9f00a667c0..ffc3ca25a99 100644 --- a/mysql-test/r/innodb_mysql.result +++ b/mysql-test/r/innodb_mysql.result @@ -1634,4 +1634,17 @@ vid tid idx name type 3 1 2 c1 NULL 3 1 1 pk NULL DROP TABLE t1; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1(id INT PRIMARY KEY) +ENGINE=innodb; +CREATE TABLE t2( +t1_id INT PRIMARY KEY, +CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id)) +ENGINE=innodb; + +ALTER TABLE t1 CHANGE id id2 INT; + +DROP TABLE t2; +DROP TABLE t1; End of 5.1 tests From 40176e196253b8b79156e6e8258f80fc7ea60903 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 12:56:44 +0100 Subject: [PATCH 235/527] Bug #34458 Extreneous use of templates in server code Replacing a template function with a normal static function. The template parameter, which previously was the class to find a binlogging function in, is now passed as a pointer to the actual binlogging function instead. The patch requires change of indention, but that is submitted as a separate patch. sql/handler.cc: Replacing template function with a normal static function. --- sql/handler.cc | 62 +++++++++++++++++--------------------------------- 1 file changed, 21 insertions(+), 41 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index 95d63740039..5b0a2693865 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3843,11 +3843,7 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) - table is not mysql.event */ -/* The Sun compiler cannot instantiate the template below if this is - declared static, but it works by putting it into an anonymous - namespace. */ -namespace { - bool check_table_binlog_row_based(THD *thd, TABLE *table) + static bool check_table_binlog_row_based(THD *thd, TABLE *table) { if (table->s->cached_row_logging_check == -1) { @@ -3864,7 +3860,6 @@ namespace { (thd->options & OPTION_BIN_LOG) && mysql_bin_log.is_open()); } -} /** @brief Write table maps for all (manually or automatically) locked tables @@ -3888,9 +3883,8 @@ namespace { THD::lock THD::locked_tables */ -namespace -{ - int write_locked_table_maps(THD *thd) + + static int write_locked_table_maps(THD *thd) { DBUG_ENTER("write_locked_table_maps"); DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx thd->locked_tables: 0x%lx " @@ -3935,10 +3929,14 @@ namespace DBUG_RETURN(0); } - template int - binlog_log_row(TABLE* table, - const uchar *before_record, - const uchar *after_record) + +typedef bool Log_func(THD*, TABLE*, bool, MY_BITMAP*, + uint, const uchar*, const uchar*); + + static int binlog_log_row(TABLE* table, + const uchar *before_record, + const uchar *after_record, + Log_func *log_func) { if (table->no_replicate) return 0; @@ -3965,15 +3963,10 @@ namespace { bitmap_set_all(&cols); if (likely(!(error= write_locked_table_maps(thd)))) - { - error= - RowsEventT::binlog_row_logging_function(thd, table, - table->file-> - has_transactions(), - &cols, table->s->fields, - before_record, - after_record); - } + error= (*log_func)(thd, table, table->file->has_transactions(), + &cols, table->s->fields, + before_record, after_record); + if (!use_bitbuf) bitmap_free(&cols); } @@ -3981,22 +3974,6 @@ namespace return error ? HA_ERR_RBR_LOGGING_FAILED : 0; } - /* - Instantiate the versions we need for the above template function, - because we have -fno-implicit-template as compiling option. - */ - - template int - binlog_log_row(TABLE *, const uchar *, const uchar *); - - template int - binlog_log_row(TABLE *, const uchar *, const uchar *); - - template int - binlog_log_row(TABLE *, const uchar *, const uchar *); -} - - int handler::ha_external_lock(THD *thd, int lock_type) { DBUG_ENTER("handler::ha_external_lock"); @@ -4041,10 +4018,11 @@ int handler::ha_reset() int handler::ha_write_row(uchar *buf) { int error; + Log_func *log_func= Write_rows_log_event::binlog_row_logging_function; DBUG_ENTER("handler::ha_write_row"); if (unlikely(error= write_row(buf))) DBUG_RETURN(error); - if (unlikely(error= binlog_log_row(table, 0, buf))) + if (unlikely(error= binlog_log_row(table, 0, buf, log_func))) DBUG_RETURN(error); /* purecov: inspected */ DBUG_RETURN(0); } @@ -4053,6 +4031,7 @@ int handler::ha_write_row(uchar *buf) int handler::ha_update_row(const uchar *old_data, uchar *new_data) { int error; + Log_func *log_func= Update_rows_log_event::binlog_row_logging_function; /* Some storage engines require that the new record is in record[0] @@ -4062,7 +4041,7 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) if (unlikely(error= update_row(old_data, new_data))) return error; - if (unlikely(error= binlog_log_row(table, old_data, new_data))) + if (unlikely(error= binlog_log_row(table, old_data, new_data, log_func))) return error; return 0; } @@ -4070,9 +4049,10 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) int handler::ha_delete_row(const uchar *buf) { int error; + Log_func *log_func= Delete_rows_log_event::binlog_row_logging_function; if (unlikely(error= delete_row(buf))) return error; - if (unlikely(error= binlog_log_row(table, buf, 0))) + if (unlikely(error= binlog_log_row(table, buf, 0, log_func))) return error; return 0; } From 38354149c87dcb16a97c79de34ab48c80c10c499 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 16:03:54 +0400 Subject: [PATCH 236/527] Fix for bug #33304: Test 'func_group' hangs on Mac OS X 10.4 PowerPC 64-bit Problem: SLEEP(0) never returns on 64-bit Mac OS X due to a bug in pthread_cond_timedwait(). Fix: when given a very short timeout just return immediately. sql/item_func.cc: Fix for bug #33304: Test 'func_group' hangs on Mac OS X 10.4 PowerPC 64-bit - if given a very short timeout (< 10 mcs) just return from SLEEP(). --- sql/item_func.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/item_func.cc b/sql/item_func.cc index 639e069d24e..e20b0762ea2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3729,6 +3729,18 @@ longlong Item_func_sleep::val_int() DBUG_ASSERT(fixed == 1); double time= args[0]->val_real(); + /* + On 64-bit OSX pthread_cond_timedwait() waits forever + if passed abstime time has already been exceeded by + the system time. + When given a very short timeout (< 10 mcs) just return + immediately. + We assume that the lines between this test and the call + to pthread_cond_timedwait() will be executed in less than 0.00001 sec. + */ + if (time < 0.00001) + return 0; + set_timespec_nsec(abstime, (ulonglong)(time * ULL(1000000000))); pthread_cond_init(&cond, NULL); From 450ed5aea667515c2b7f076f2c1b0a2ca0e6e01e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 13:06:28 +0100 Subject: [PATCH 237/527] Bug #34458 Extreneous use of templates in server code Patch to remove white-space left over after removing anonymous namespace. sql/handler.cc: Removing indentation and whitespace. --- sql/handler.cc | 173 +++++++++++++++++++++++++------------------------ 1 file changed, 87 insertions(+), 86 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index 5b0a2693865..a7a3d8ef53f 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3843,24 +3843,25 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) - table is not mysql.event */ - static bool check_table_binlog_row_based(THD *thd, TABLE *table) +static bool check_table_binlog_row_based(THD *thd, TABLE *table) +{ + if (table->s->cached_row_logging_check == -1) { - if (table->s->cached_row_logging_check == -1) - { - int const check(table->s->tmp_table == NO_TMP_TABLE && - binlog_filter->db_ok(table->s->db.str)); - table->s->cached_row_logging_check= check; - } - - DBUG_ASSERT(table->s->cached_row_logging_check == 0 || - table->s->cached_row_logging_check == 1); - - return (thd->current_stmt_binlog_row_based && - table->s->cached_row_logging_check && - (thd->options & OPTION_BIN_LOG) && - mysql_bin_log.is_open()); + int const check(table->s->tmp_table == NO_TMP_TABLE && + binlog_filter->db_ok(table->s->db.str)); + table->s->cached_row_logging_check= check; } + DBUG_ASSERT(table->s->cached_row_logging_check == 0 || + table->s->cached_row_logging_check == 1); + + return (thd->current_stmt_binlog_row_based && + table->s->cached_row_logging_check && + (thd->options & OPTION_BIN_LOG) && + mysql_bin_log.is_open()); +} + + /** @brief Write table maps for all (manually or automatically) locked tables to the binary log. @@ -3874,7 +3875,7 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) that are locked by the thread 'thd'. Either manually locked (stored in THD::locked_tables) and automatically locked (stored in THD::lock) are considered. - + RETURN VALUE 0 All OK 1 Failed to write all table maps @@ -3884,95 +3885,95 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) THD::locked_tables */ - static int write_locked_table_maps(THD *thd) +static int write_locked_table_maps(THD *thd) +{ + DBUG_ENTER("write_locked_table_maps"); + DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx thd->locked_tables: 0x%lx " + "thd->extra_lock: 0x%lx", + (long) thd, (long) thd->lock, + (long) thd->locked_tables, (long) thd->extra_lock)); + + if (thd->get_binlog_table_maps() == 0) { - DBUG_ENTER("write_locked_table_maps"); - DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx thd->locked_tables: 0x%lx " - "thd->extra_lock: 0x%lx", - (long) thd, (long) thd->lock, - (long) thd->locked_tables, (long) thd->extra_lock)); - - if (thd->get_binlog_table_maps() == 0) + MYSQL_LOCK *locks[3]; + locks[0]= thd->extra_lock; + locks[1]= thd->lock; + locks[2]= thd->locked_tables; + for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i ) { - MYSQL_LOCK *locks[3]; - locks[0]= thd->extra_lock; - locks[1]= thd->lock; - locks[2]= thd->locked_tables; - for (uint i= 0 ; i < sizeof(locks)/sizeof(*locks) ; ++i ) - { - MYSQL_LOCK const *const lock= locks[i]; - if (lock == NULL) - continue; + MYSQL_LOCK const *const lock= locks[i]; + if (lock == NULL) + continue; - TABLE **const end_ptr= lock->table + lock->table_count; - for (TABLE **table_ptr= lock->table ; - table_ptr != end_ptr ; - ++table_ptr) + TABLE **const end_ptr= lock->table + lock->table_count; + for (TABLE **table_ptr= lock->table ; + table_ptr != end_ptr ; + ++table_ptr) + { + TABLE *const table= *table_ptr; + DBUG_PRINT("info", ("Checking table %s", table->s->table_name.str)); + if (table->current_lock == F_WRLCK && + check_table_binlog_row_based(thd, table)) { - TABLE *const table= *table_ptr; - DBUG_PRINT("info", ("Checking table %s", table->s->table_name.str)); - if (table->current_lock == F_WRLCK && - check_table_binlog_row_based(thd, table)) - { - int const has_trans= table->file->has_transactions(); - int const error= thd->binlog_write_table_map(table, has_trans); - /* - If an error occurs, it is the responsibility of the caller to - roll back the transaction. - */ - if (unlikely(error)) - DBUG_RETURN(1); - } + int const has_trans= table->file->has_transactions(); + int const error= thd->binlog_write_table_map(table, has_trans); + /* + If an error occurs, it is the responsibility of the caller to + roll back the transaction. + */ + if (unlikely(error)) + DBUG_RETURN(1); } } } - DBUG_RETURN(0); } + DBUG_RETURN(0); +} typedef bool Log_func(THD*, TABLE*, bool, MY_BITMAP*, uint, const uchar*, const uchar*); - static int binlog_log_row(TABLE* table, - const uchar *before_record, - const uchar *after_record, - Log_func *log_func) +static int binlog_log_row(TABLE* table, + const uchar *before_record, + const uchar *after_record, + Log_func *log_func) +{ + if (table->no_replicate) + return 0; + bool error= 0; + THD *const thd= table->in_use; + + if (check_table_binlog_row_based(thd, table)) { - if (table->no_replicate) - return 0; - bool error= 0; - THD *const thd= table->in_use; + MY_BITMAP cols; + /* Potential buffer on the stack for the bitmap */ + uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)]; + uint n_fields= table->s->fields; + my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8; - if (check_table_binlog_row_based(thd, table)) + /* + If there are no table maps written to the binary log, this is + the first row handled in this statement. In that case, we need + to write table maps for all locked tables to the binary log. + */ + if (likely(!(error= bitmap_init(&cols, + use_bitbuf ? bitbuf : NULL, + (n_fields + 7) & ~7UL, + FALSE)))) { - MY_BITMAP cols; - /* Potential buffer on the stack for the bitmap */ - uint32 bitbuf[BITMAP_STACKBUF_SIZE/sizeof(uint32)]; - uint n_fields= table->s->fields; - my_bool use_bitbuf= n_fields <= sizeof(bitbuf)*8; + bitmap_set_all(&cols); + if (likely(!(error= write_locked_table_maps(thd)))) + error= (*log_func)(thd, table, table->file->has_transactions(), + &cols, table->s->fields, + before_record, after_record); - /* - If there are no table maps written to the binary log, this is - the first row handled in this statement. In that case, we need - to write table maps for all locked tables to the binary log. - */ - if (likely(!(error= bitmap_init(&cols, - use_bitbuf ? bitbuf : NULL, - (n_fields + 7) & ~7UL, - FALSE)))) - { - bitmap_set_all(&cols); - if (likely(!(error= write_locked_table_maps(thd)))) - error= (*log_func)(thd, table, table->file->has_transactions(), - &cols, table->s->fields, - before_record, after_record); - - if (!use_bitbuf) - bitmap_free(&cols); - } + if (!use_bitbuf) + bitmap_free(&cols); } - return error ? HA_ERR_RBR_LOGGING_FAILED : 0; } + return error ? HA_ERR_RBR_LOGGING_FAILED : 0; +} int handler::ha_external_lock(THD *thd, int lock_type) { From 3f0a603c9619f8cc45b8261d65ca737507212da0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 12:54:04 +0000 Subject: [PATCH 238/527] Problem: After I moved rpl/t/rpl_variables.test into t/variables.test, t/variables.test fails on embedded server. Moved out that part again, to a new test called t/variables-notembedded.test. mysql-test/t/variables-notembedded.test: BitKeeper file /home/sven/bk/debug-max/5.1-new-rpl/mysql-test/t/variables-notembedded.test mysql-test/r/variables-notembedded.result: Add -master.opt file to have a list of variables for slave_skip_errors. mysql-test/r/variables.result: Variable variables not available in embedded mode to a new test, variables-notembedded.test mysql-test/t/variables-notembedded-master.opt: Add --loose before --slave-skip-errors, so that it works if mtr is run with --embedded mysql-test/t/variables.test: Variable variables not available in embedded mode to a new test, variables-notembedded.test. Result file updated accordingly. --- mysql-test/r/variables-notembedded.result | 17 +++++++++++ mysql-test/r/variables.result | 14 --------- mysql-test/t/variables-master.opt | 1 - mysql-test/t/variables-notembedded-master.opt | 1 + mysql-test/t/variables-notembedded.test | 30 +++++++++++++++++++ mysql-test/t/variables.test | 19 ------------ 6 files changed, 48 insertions(+), 34 deletions(-) create mode 100644 mysql-test/r/variables-notembedded.result delete mode 100644 mysql-test/t/variables-master.opt create mode 100644 mysql-test/t/variables-notembedded-master.opt create mode 100644 mysql-test/t/variables-notembedded.test diff --git a/mysql-test/r/variables-notembedded.result b/mysql-test/r/variables-notembedded.result new file mode 100644 index 00000000000..48a1719e2c7 --- /dev/null +++ b/mysql-test/r/variables-notembedded.result @@ -0,0 +1,17 @@ +---- Init ---- +set @my_slave_net_timeout =@@global.slave_net_timeout; +---- Test ---- +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; +show variables like 'slave_compressed_protocol'; +Variable_name Value +slave_compressed_protocol OFF +show variables like 'slave_load_tmpdir'; +Variable_name Value +slave_load_tmpdir SLAVE_LOAD_TMPDIR +show variables like 'slave_skip_errors'; +Variable_name Value +slave_skip_errors 3,100,137,643,1752 +---- Clean Up ---- +set global slave_net_timeout=default; +set global sql_slave_skip_counter= 0; diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 395ba0eab48..e5c3c860c93 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -22,7 +22,6 @@ set @my_query_cache_limit =@@global.query_cache_limit; set @my_query_cache_type =@@global.query_cache_type; set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; set @my_server_id =@@global.server_id; -set @my_slave_net_timeout =@@global.slave_net_timeout; set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.storage_engine; set @my_thread_cache_size =@@global.thread_cache_size; @@ -982,17 +981,6 @@ show variables like 'hostname'; Variable_name Value hostname # End of 5.0 tests -set global slave_net_timeout=100; -set global sql_slave_skip_counter=100; -show variables like 'slave_compressed_protocol'; -Variable_name Value -slave_compressed_protocol OFF -show variables like 'slave_load_tmpdir'; -Variable_name Value -slave_load_tmpdir SLAVE_LOAD_TMPDIR -show variables like 'slave_skip_errors'; -Variable_name Value -slave_skip_errors 3,100,137,643,1752 set global binlog_cache_size =@my_binlog_cache_size; set global connect_timeout =@my_connect_timeout; set global delayed_insert_timeout =@my_delayed_insert_timeout; @@ -1018,9 +1006,7 @@ set global query_cache_limit =@my_query_cache_limit; set global query_cache_type =@my_query_cache_type; set global rpl_recovery_rank =@my_rpl_recovery_rank; set global server_id =@my_server_id; -set global slave_net_timeout =@my_slave_net_timeout; set global slow_launch_time =@my_slow_launch_time; -set global sql_slave_skip_counter =0; set global storage_engine =@my_storage_engine; set global thread_cache_size =@my_thread_cache_size; show global variables where Variable_name='table_definition_cache' or diff --git a/mysql-test/t/variables-master.opt b/mysql-test/t/variables-master.opt deleted file mode 100644 index a668c6bfbe8..00000000000 --- a/mysql-test/t/variables-master.opt +++ /dev/null @@ -1 +0,0 @@ ---slave-skip-errors=3,100,137,643,1752 diff --git a/mysql-test/t/variables-notembedded-master.opt b/mysql-test/t/variables-notembedded-master.opt new file mode 100644 index 00000000000..a684e591d10 --- /dev/null +++ b/mysql-test/t/variables-notembedded-master.opt @@ -0,0 +1 @@ +--loose-slave-skip-errors=3,100,137,643,1752 diff --git a/mysql-test/t/variables-notembedded.test b/mysql-test/t/variables-notembedded.test new file mode 100644 index 00000000000..79011a89b36 --- /dev/null +++ b/mysql-test/t/variables-notembedded.test @@ -0,0 +1,30 @@ +# Tests that variables work correctly (setting and showing). This +# test is like the main.variables test, but for variables not +# available in embedded mode. + +source include/not_embedded.inc; + +--echo ---- Init ---- +# Backup global variables so they can be restored at end of test. +set @my_slave_net_timeout =@@global.slave_net_timeout; + +--echo ---- Test ---- +set global slave_net_timeout=100; +set global sql_slave_skip_counter=100; + +# End of 4.1 tests + +# BUG #7800: Add various-slave related variables to SHOW VARIABLES +show variables like 'slave_compressed_protocol'; +--replace_column 2 SLAVE_LOAD_TMPDIR +show variables like 'slave_load_tmpdir'; +# We just set some arbitrary values in variables-master.opt so we can test +# that a list of values works correctly +show variables like 'slave_skip_errors'; + +--echo ---- Clean Up ---- + +set global slave_net_timeout=default; +# sql_slave_skip_counter is write-only, so we can't save previous +# value and restore it here. That's ok, because it's normally 0. +set global sql_slave_skip_counter= 0; diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 404a98d1827..51f8d6db1db 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -31,7 +31,6 @@ set @my_query_cache_limit =@@global.query_cache_limit; set @my_query_cache_type =@@global.query_cache_type; set @my_rpl_recovery_rank =@@global.rpl_recovery_rank; set @my_server_id =@@global.server_id; -set @my_slave_net_timeout =@@global.slave_net_timeout; set @my_slow_launch_time =@@global.slow_launch_time; set @my_storage_engine =@@global.storage_engine; set @my_thread_cache_size =@@global.thread_cache_size; @@ -738,20 +737,6 @@ show variables like 'hostname'; --echo End of 5.0 tests -# -# BUG #7800: SHOW VARIABLES does not show slave-related configuration -# -set global slave_net_timeout=100; -set global sql_slave_skip_counter=100; - -show variables like 'slave_compressed_protocol'; ---replace_column 2 SLAVE_LOAD_TMPDIR -show variables like 'slave_load_tmpdir'; -# We just set some arbitrary values in variables-master.opt so we can test -# that a list of values is printed correctly. -show variables like 'slave_skip_errors'; - -# # This is at the very after the versioned tests, since it involves doing # cleanup # @@ -783,11 +768,7 @@ set global query_cache_limit =@my_query_cache_limit; set global query_cache_type =@my_query_cache_type; set global rpl_recovery_rank =@my_rpl_recovery_rank; set global server_id =@my_server_id; -set global slave_net_timeout =@my_slave_net_timeout; set global slow_launch_time =@my_slow_launch_time; -# sql_slave_skip_counter is write-only, so we can't save previous -# value and restore it here. That's ok, because it's normally 0. -set global sql_slave_skip_counter =0; set global storage_engine =@my_storage_engine; set global thread_cache_size =@my_thread_cache_size; From cc2e929ac4b787220118f6d4dc4a72b796bf4ea0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 15 Feb 2008 15:47:32 +0200 Subject: [PATCH 239/527] Bug #31887: DML Select statement not returning same results when executed in version 5 Zero fill is a field attribute only. So we can't always propagate constants for zerofill fields : the values and expression results don't have that flag. Fixed by converting the const value to a string and using that in const propagation when the context allows it. Disable const propagation for fields with ZEROFILL flag in all the other cases. mysql-test/r/compare.result: Bug #31887: test case mysql-test/t/compare.test: Bug #31887: test case sql/item.cc: Bug #31887: If the context allows conversion of an int constant to a zero-filled string constant put the string constant instead of the int constant when doing const propagation sql/mysql_priv.h: Bug #31887: a macro to get all the Field_num descendant fields. --- mysql-test/r/compare.result | 38 +++++++++++++++++++++++++++++++++++++ mysql-test/t/compare.test | 31 ++++++++++++++++++++++++++++++ sql/item.cc | 31 ++++++++++++++++++++++++++++++ sql/mysql_priv.h | 1 + 4 files changed, 101 insertions(+) diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index c141b255716..c9ef41e0582 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -53,3 +53,41 @@ a b Warnings: Warning 1292 Truncated incorrect DOUBLE value: '' drop table if exists t1; +CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill); +INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2); +SELECT CONCAT(b,c), CONCAT(b,c) = '0101' FROM t1; +CONCAT(b,c) CONCAT(b,c) = '0101' +0102 0 +0101 1 +0202 0 +EXPLAIN EXTENDED SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat(_binary'01',`test`.`t1`.`c`) = _latin1'0101')) +SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; +b c +01 01 +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES (1),(2); +SELECT a, +(SELECT COUNT(*) FROM t1 +WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x +FROM t2 ORDER BY a; +a x +1 1 +2 0 +EXPLAIN EXTENDED +SELECT a, +(SELECT COUNT(*) FROM t1 +WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x +FROM t2 ORDER BY a; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using filesort +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where +Warnings: +Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 +Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 +Note 1003 select `test`.`t2`.`a` AS `a`,(select count(0) AS `COUNT(*)` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t2`.`a`) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = concat(_latin1'0',`test`.`t2`.`a`,_latin1'01')))) AS `x` from `test`.`t2` order by `test`.`t2`.`a` +DROP TABLE t1,t2; +End of 5.0 tests diff --git a/mysql-test/t/compare.test b/mysql-test/t/compare.test index 337035a8095..8863ed825c2 100644 --- a/mysql-test/t/compare.test +++ b/mysql-test/t/compare.test @@ -46,3 +46,34 @@ insert into t1 values (0x01,0x01); select * from t1 where a=b; select * from t1 where a=b and b=0x01; drop table if exists t1; + +# +# Bug #31887: DML Select statement not returning same results when executed +# in version 5 +# + +CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill); +INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2); + +SELECT CONCAT(b,c), CONCAT(b,c) = '0101' FROM t1; + +EXPLAIN EXTENDED SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; +SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; + +CREATE TABLE t2 (a int); +INSERT INTO t2 VALUES (1),(2); + +SELECT a, + (SELECT COUNT(*) FROM t1 + WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x +FROM t2 ORDER BY a; + +EXPLAIN EXTENDED +SELECT a, + (SELECT COUNT(*) FROM t1 + WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x +FROM t2 ORDER BY a; + +DROP TABLE t1,t2; + +--echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 3555df40060..e3e17a3ceea 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -4072,6 +4072,30 @@ bool Item_field::subst_argument_checker(byte **arg) } +/** + Convert a numeric value to a zero-filled string + + @param[in,out] item the item to operate on + @param field The field that this value is equated to + + This function converts a numeric value to a string. In this conversion + the zero-fill flag of the field is taken into account. + This is required so the resulting string value can be used instead of + the field reference when propagating equalities. +*/ + +static void convert_zerofill_number_to_string(Item **item, Field_num *field) +{ + char buff[MAX_FIELD_WIDTH],*pos; + String tmp(buff,sizeof(buff), field->charset()), *res; + + res= (*item)->val_str(&tmp); + field->prepend_zeros(res); + pos= (char *) sql_strmake (res->ptr(), res->length()); + *item= new Item_string(pos, res->length(), field->charset()); +} + + /* Set a pointer to the multiple equality the field reference belongs to (if any) @@ -4120,6 +4144,13 @@ Item *Item_field::equal_fields_propagator(byte *arg) if (!item || (cmp_context != (Item_result)-1 && item->cmp_context != cmp_context)) item= this; + else if (field && (field->flags & ZEROFILL_FLAG) && IS_NUM(field->type())) + { + if (item && cmp_context != INT_RESULT) + convert_zerofill_number_to_string(&item, (Field_num *)field); + else + item= this; + } return item; } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 47396748da6..821495ddecb 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -73,6 +73,7 @@ extern const char *primary_key_name; #include "mysql_com.h" #include #include "unireg.h" +#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL) void init_sql_alloc(MEM_ROOT *root, uint block_size, uint pre_alloc_size); gptr sql_alloc(unsigned size); From 512e8153cf502f0eca949202ea07d25c60486851 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 16 Feb 2008 11:11:13 +0200 Subject: [PATCH 240/527] merge of bug 31887 5.0-opt->5.1-opt --- mysql-test/r/compare.result | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index c9ef41e0582..b4e0dd6536d 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -61,8 +61,8 @@ CONCAT(b,c) CONCAT(b,c) = '0101' 0101 1 0202 0 EXPLAIN EXTENDED SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; -id select_type table type possible_keys key key_len ref rows Extra -1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using where +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat(_binary'01',`test`.`t1`.`c`) = _latin1'0101')) SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; @@ -82,9 +82,9 @@ SELECT a, (SELECT COUNT(*) FROM t1 WHERE b = t2.a AND CONCAT(b,c) = CONCAT('0',t2.a,'01')) x FROM t2 ORDER BY a; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t2 ALL NULL NULL NULL NULL 2 Using filesort -2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 Using where +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using filesort +2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 From d6be1a9b957b47c2cf67590932629984c1ef5a14 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Feb 2008 15:48:17 +0400 Subject: [PATCH 241/527] Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan" Problem is not about intervals and doesn't actually cause 'full table scan'. We have an optimization for DISTINCT when we have 'DISTINCT field_from_first_join_table' we don't need to read all the rows from the JOIN-ed table if we found one conforming row. It stopped working in 5.0 as we return NESTED_LOOP_OK if we came upon that case in the evaluate_join_record() and that doesn't break the recordreading loop in sub_select(). Fixed by returning NESTED_LOOP_NO_MORE_ROWS in this case. mysql-test/r/select.result: Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan". test result mysql-test/t/select.test: Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" test case sql/sql_select.cc: Bug #32942 now() - interval '7200' second NOT pre-calculated, causing "full table scan" return NESTED_LOOP_NO_MORE_ROWS when we don't need to read rows from this table anymore --- mysql-test/r/select.result | 21 +++++++++++++++++++++ mysql-test/t/select.test | 18 ++++++++++++++++++ sql/sql_select.cc | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 3ca84bcf34b..b70809d5d78 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -4328,4 +4328,25 @@ SELECT * FROM t1 WHERE c1 > NULL + 1; c1 DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT, c INT, KEY(a)); +INSERT INTO t1 VALUES (1, 1), (2, 2); +INSERT INTO t2 VALUES (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), +(2, 1), (2, 2), (2, 3), (2, 4), (2, 5), +(3, 1), (3, 2), (3, 3), (3, 4), (3, 5), +(4, 1), (4, 2), (4, 3), (4, 4), (4, 5); +FLUSH STATUS; +SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3; +b +1 +2 +SHOW STATUS LIKE 'Handler_read%'; +Variable_name Value +Handler_read_first 0 +Handler_read_key 2 +Handler_read_next 0 +Handler_read_prev 0 +Handler_read_rnd 0 +Handler_read_rnd_next 6 +DROP TABLE t1, t2; End of 5.0 tests diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test index c48f2771aa8..51e0aeace7c 100644 --- a/mysql-test/t/select.test +++ b/mysql-test/t/select.test @@ -3672,4 +3672,22 @@ DROP TABLE t1; --echo +# +# Bug #32942 now() - interval '7200' second is NOT pre-calculated, causing "full table scan" +# + +CREATE TABLE t1 (a INT, b INT); +CREATE TABLE t2 (a INT, c INT, KEY(a)); + +INSERT INTO t1 VALUES (1, 1), (2, 2); +INSERT INTO t2 VALUES (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), + (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), + (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), + (4, 1), (4, 2), (4, 3), (4, 4), (4, 5); + +FLUSH STATUS; +SELECT DISTINCT b FROM t1 LEFT JOIN t2 USING(a) WHERE c <= 3; +SHOW STATUS LIKE 'Handler_read%'; +DROP TABLE t1, t2; + --echo End of 5.0 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d6cb072ce9b..60ce01c9d89 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -10791,7 +10791,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab, we found a row, as no new rows can be added to the result. */ if (not_used_in_distinct && found_records != join->found_records) - return NESTED_LOOP_OK; + return NESTED_LOOP_NO_MORE_ROWS; } else join_tab->read_record.file->unlock_row(); From e31806674f134f456af312b62b981bf2735768e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 17 Feb 2008 15:07:41 +0300 Subject: [PATCH 242/527] Post-merge fix. --- mysql-test/t/sp.test | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index b9f5572864e..b9056d86d7e 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -7900,25 +7900,6 @@ DROP DATABASE db28318_a; DROP DATABASE db28318_b; use test; ---echo # ---echo # Bug#30787: Stored function ignores user defined alias. ---echo # -use test; ---disable_warnings -drop function if exists func30787; ---enable_warnings -create table t1(f1 int); -insert into t1 values(1),(2); -delimiter |; -create function func30787(p1 int) returns int -begin - return p1; -end | -delimiter ;| -select (select func30787(f1)) as ttt from t1; -drop function func30787; -drop table t1; - ########################################################################### # @@ -7996,6 +7977,25 @@ call proc_33618(20); drop table t_33618; drop procedure proc_33618; +--echo # +--echo # Bug#30787: Stored function ignores user defined alias. +--echo # +use test; +--disable_warnings +drop function if exists func30787; +--enable_warnings +create table t1(f1 int); +insert into t1 values(1),(2); +delimiter |; +create function func30787(p1 int) returns int +begin + return p1; +end | +delimiter ;| +select (select func30787(f1)) as ttt from t1; +drop function func30787; +drop table t1; + ########################################################################### --echo # ------------------------------------------------------------------ From 9191052de50cf4859c93e108d484b3887256ec83 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 14:35:44 +0300 Subject: [PATCH 243/527] Initialization order cleanups to get rid of warnings from the -Wreorder option added by the patch for bug#31326. --- sql/rpl_rli.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 03f790b934f..52656fe9973 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -33,12 +33,12 @@ Relay_log_info::Relay_log_info() :Slave_reporting_capability("SQL"), no_storage(FALSE), replicate_same_server_id(::replicate_same_server_id), info_fd(-1), cur_log_fd(-1), save_temporary_tables(0), - group_relay_log_pos(0), event_relay_log_pos(0), #if HAVE_purify is_fake(FALSE), #endif - cur_log_old_open_count(0), group_master_log_pos(0), log_space_total(0), - ignore_log_space_limit(0), last_master_timestamp(0), slave_skip_counter(0), + cur_log_old_open_count(0), group_relay_log_pos(0), event_relay_log_pos(0), + group_master_log_pos(0), log_space_total(0), ignore_log_space_limit(0), + last_master_timestamp(0), slave_skip_counter(0), abort_pos_wait(0), slave_run_id(0), sql_thd(0), inited(0), abort_slave(0), slave_running(0), until_condition(UNTIL_NONE), until_log_pos(0), retried_trans(0), From 6e11dd40b0b11eab8813c9247c247480923be831 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 15:16:39 +0100 Subject: [PATCH 244/527] Updating result files. mysql-test/r/multi_update.result: Result change. mysql-test/r/rpl_bug33931.result: Result change. mysql-test/suite/ndb/r/ndb_binlog_format.result: Result change. --- mysql-test/r/multi_update.result | 4 ++-- mysql-test/r/rpl_bug33931.result | 5 +++++ mysql-test/suite/ndb/r/ndb_binlog_format.result | 2 -- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index d96927deed5..421a63cd54c 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -627,7 +627,7 @@ a b 4 4 show master status /* there must be the UPDATE query event */; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 336 +master-bin.000001 197 delete from t1; delete from t2; insert into t1 values (1,2),(3,4),(4,4); @@ -637,7 +637,7 @@ UPDATE t2,t1 SET t2.a=t2.b where t2.a=t1.a; ERROR 23000: Duplicate entry '4' for key 'PRIMARY' show master status /* there must be the UPDATE query event */; File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000001 351 +master-bin.000001 212 drop table t1, t2; set @@session.binlog_format= @sav_binlog_format; drop table if exists t1, t2, t3; diff --git a/mysql-test/r/rpl_bug33931.result b/mysql-test/r/rpl_bug33931.result index 519bd73aa6a..4043f04215b 100644 --- a/mysql-test/r/rpl_bug33931.result +++ b/mysql-test/r/rpl_bug33931.result @@ -36,3 +36,8 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno 0 +Last_IO_Error +Last_SQL_Errno 0 +Last_SQL_Error diff --git a/mysql-test/suite/ndb/r/ndb_binlog_format.result b/mysql-test/suite/ndb/r/ndb_binlog_format.result index b42a528a460..30c2ca872ed 100644 --- a/mysql-test/suite/ndb/r/ndb_binlog_format.result +++ b/mysql-test/suite/ndb/r/ndb_binlog_format.result @@ -18,9 +18,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1,1), (1,2), (2 master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t2 VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; UPDATE t1, t2 SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t3 VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; UPDATE t1, t3 SET m = 2, e = 3 WHERE n = f From 641bc9a45f1c7cdeca495f0941928a6195c3abfc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 16:47:00 +0200 Subject: [PATCH 245/527] Fixed a previous patch. BitKeeper/etc/ignore: added libmysqld/sql_profile.cc client/mysqltest.c: Use my_micro_time() instead of my_getsystime() for faster execution. include/config-win.h: Moved a definition into a header file. mysys/my_getsystime.c: Use GetSystemTimeAsFileTime() instead of QueryPerformanceCounter() for faster execution. --- .bzrignore | 1 + client/mysqltest.c | 2 +- include/config-win.h | 4 +++- mysys/my_getsystime.c | 34 ++++++++++------------------------ 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.bzrignore b/.bzrignore index 6e09cdd7b5d..038627aade2 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3012,3 +3012,4 @@ win/vs8cache.txt ylwrap zlib/*.ds? zlib/*.vcproj +libmysqld/sql_profile.cc diff --git a/client/mysqltest.c b/client/mysqltest.c index f6af4b430c4..9b96810e732 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -7330,7 +7330,7 @@ void timer_output(void) ulonglong timer_now(void) { - return my_getsystime() / 10000; + return my_micro_time() / 1000; } diff --git a/include/config-win.h b/include/config-win.h index e0558ca4564..246e4da76a9 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -257,9 +257,11 @@ inline double ulonglong2double(ulonglong value) #define tell(A) _telli64(A) #endif - #define STACK_DIRECTION -1 +/* Difference between GetSystemTimeAsFileTime() and now() */ +#define OFFSET_TO_EPOCH ULL(116444736000000000) + /* Optimized store functions for Intel x86 */ #ifndef _WIN64 diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 4fdd979f4bb..e4f6abd1d68 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -41,7 +41,7 @@ ulonglong my_getsystime() { QueryPerformanceCounter(&t_cnt); return ((t_cnt.QuadPart / query_performance_frequency * 10000000) + - (t_cnt.QuadPart % query_performance_frequency * 10000000 / + ((t_cnt.QuadPart % query_performance_frequency) * 10000000 / query_performance_frequency) + query_performance_offset); } return 0; @@ -108,21 +108,14 @@ time_t my_time(myf flags __attribute__((unused))) ulonglong my_micro_time() { - ulonglong newtime; #if defined(__WIN__) - if (query_performance_frequency) - { - QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - return ((newtime / query_performance_frequency * 10000000) + - (newtime % query_performance_frequency * 10000000 / - query_performance_frequency)); - } - else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec */ - return newtime; + ulonglong newtime; + GetSystemTimeAsFileTime((FILETIME*)&newtime); + return (newtime/10); #elif defined(HAVE_GETHRTIME) return gethrtime()/1000; #else + ulonglong newtime; struct timeval t; /* The following loop is here because gettimeofday may fail on some systems @@ -161,19 +154,11 @@ ulonglong my_micro_time() ulonglong my_micro_time_and_time(time_t *time_arg) { - ulonglong newtime; #if defined(__WIN__) - if (query_performance_frequency) - { - QueryPerformanceCounter((LARGE_INTEGER*) &newtime); - return ((newtime / query_performance_frequency * 10000000) + - (newtime % query_performance_frequency * 10000000 / - query_performance_frequency)); - } - else - newtime= (GetTickCount() * 1000); /* GetTickCount only returns millisec. */ - (void) time(time_arg); - return newtime; + ulonglong newtime; + GetSystemTimeAsFileTime((FILETIME*)&newtime); + *time_arg= (newtime-OFFSET_TO_EPOCH)/10000000; + return (newtime/10); #elif defined(HAVE_GETHRTIME) /* Solaris has a very slow time() call. We optimize this by using the very @@ -194,6 +179,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg) pthread_mutex_unlock(&THR_LOCK_time); return cur_gethrtime/1000; #else + ulonglong newtime; struct timeval t; /* The following loop is here because gettimeofday may fail on some systems From ace6d43164995d20116b95fa4329030ba3a4913e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 15:48:17 +0100 Subject: [PATCH 246/527] Fixed broken result file. --- mysql-test/suite/bugs/r/rpl_bug31583.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/bugs/r/rpl_bug31583.result b/mysql-test/suite/bugs/r/rpl_bug31583.result index a5e38e9b2d8..74846607313 100644 --- a/mysql-test/suite/bugs/r/rpl_bug31583.result +++ b/mysql-test/suite/bugs/r/rpl_bug31583.result @@ -13,3 +13,4 @@ a b SELECT * FROM t1 ORDER BY a; a b 3 -3 +DROP TABLE t1; From 0ef346047d744225372dbb325ff9f398c64b0c2b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 18:21:14 +0200 Subject: [PATCH 247/527] Fixed duplicate defition warning for bug 31887 --- sql/item.cc | 1 + sql/mysql_priv.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/item.cc b/sql/item.cc index 049740f8538..c0d78aa4492 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -18,6 +18,7 @@ #pragma implementation // gcc: Class implementation #endif #include "mysql_priv.h" +#include #include #include "my_dir.h" #include "sp_rcontext.h" diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 2c0d4d6e2eb..ea552414d9a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -74,7 +74,6 @@ extern const char *primary_key_name; #include "mysql_com.h" #include #include "unireg.h" -#define IS_NUM(t) ((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR || (t) == FIELD_TYPE_NEWDECIMAL) void init_sql_alloc(MEM_ROOT *root, uint block_size, uint pre_alloc_size); void *sql_alloc(size_t); From 0baa5b64c3e77b629727fc3005fb566edb731b34 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 18:29:07 +0200 Subject: [PATCH 248/527] Added a missing cast. --- mysys/my_getsystime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index e4f6abd1d68..4a9cac09120 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -157,7 +157,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg) #if defined(__WIN__) ulonglong newtime; GetSystemTimeAsFileTime((FILETIME*)&newtime); - *time_arg= (newtime-OFFSET_TO_EPOCH)/10000000; + *time_arg= (time_t) (newtime - OFFSET_TO_EPOCH) / 10000000; return (newtime/10); #elif defined(HAVE_GETHRTIME) /* From 8224d684ae48c414e05dc2b7e82779b1949c6580 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 11:48:33 -0700 Subject: [PATCH 249/527] Bug #28460 mysqlhotcopy silently skips a database with two alphanumerics name Remove code from mysqlhotcopy which deals with the so-called "RAID" feature of older MyISAM. scripts/mysqlhotcopy.sh: Remove code which tried to handle the so-called "RAID" files. The "RAID" feature has been dropped from MySQL builds, and this code caused mysqlhotcopy to skip (silently) over databases with two-character names (e.g., "ab"). --- scripts/mysqlhotcopy.sh | 99 ++++++++++------------------------------- 1 file changed, 24 insertions(+), 75 deletions(-) diff --git a/scripts/mysqlhotcopy.sh b/scripts/mysqlhotcopy.sh index 6ad5c77b954..64e31e45a16 100644 --- a/scripts/mysqlhotcopy.sh +++ b/scripts/mysqlhotcopy.sh @@ -39,7 +39,7 @@ WARNING: THIS PROGRAM IS STILL IN BETA. Comments/patches welcome. # Documentation continued at end of file -my $VERSION = "1.22"; +my $VERSION = "1.23"; my $opt_tmpdir = $ENV{TMPDIR} || "/tmp"; @@ -132,7 +132,6 @@ GetOptions( \%opt, # 'target' - destination directory of the copy # 'tables' - array-ref to list of tables in the db # 'files' - array-ref to list of files to be copied -# (RAID files look like 'nn/name.MYD') # 'index' - array-ref to list of indexes to be copied # @@ -263,7 +262,6 @@ my $hc_locks = ""; my $hc_tables = ""; my $num_tables = 0; my $num_files = 0; -my $raid_dir_regex = '[A-Za-z0-9]{2}'; foreach my $rdb ( @db_desc ) { my $db = $rdb->{src}; @@ -292,20 +290,12 @@ foreach my $rdb ( @db_desc ) { or die "Cannot open dir '$db_dir': $!"; my %db_files; - my @raid_dir = (); while ( defined( my $name = readdir DBDIR ) ) { - if ( $name =~ /^$raid_dir_regex$/ && -d "$db_dir/$name" ) { - push @raid_dir, $name; - } - else { - $db_files{$name} = $1 if ( $name =~ /(.+)\.\w+$/ ); - } + $db_files{$name} = $1 if ( $name =~ /(.+)\.\w+$/ ); } closedir( DBDIR ); - scan_raid_dir( \%db_files, $db_dir, @raid_dir ); - unless( keys %db_files ) { warn "'$db' is an empty database\n"; } @@ -336,8 +326,6 @@ foreach my $rdb ( @db_desc ) { my @hc_tables = map { quote_names("$db.$_") } @dbh_tables; $rdb->{tables} = [ @hc_tables ]; - $rdb->{raid_dirs} = [ get_raid_dirs( $rdb->{files} ) ]; - $hc_locks .= ", " if ( length $hc_locks && @hc_tables ); $hc_locks .= join ", ", map { "$_ READ" } @hc_tables; $hc_tables .= ", " if ( length $hc_tables && @hc_tables ); @@ -411,27 +399,24 @@ if ($opt{method} =~ /^cp\b/) retire_directory( @existing ) if @existing && !$opt{addtodest}; foreach my $rdb ( @db_desc ) { - foreach my $td ( '', @{$rdb->{raid_dirs}} ) { - - my $tgt_dirpath = "$rdb->{target}/$td"; - # Remove trailing slashes (needed for Mac OS X) - substr($tgt_dirpath, 1) =~ s|/+$||; - if ( $opt{dryrun} ) { - print "mkdir $tgt_dirpath, 0750\n"; - } - elsif ($opt{method} =~ /^scp\b/) { - ## assume it's there? - ## ... - } - else { - mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n" - unless -d $tgt_dirpath; - if ($^O !~ m/^(NetWare)$/) - { - my @f_info= stat "$datadir/$rdb->{src}"; - chown $f_info[4], $f_info[5], $tgt_dirpath; - } - } + my $tgt_dirpath = "$rdb->{target}"; + # Remove trailing slashes (needed for Mac OS X) + substr($tgt_dirpath, 1) =~ s|/+$||; + if ( $opt{dryrun} ) { + print "mkdir $tgt_dirpath, 0750\n"; + } + elsif ($opt{method} =~ /^scp\b/) { + ## assume it's there? + ## ... + } + else { + mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n" + unless -d $tgt_dirpath; + if ($^O !~ m/^(NetWare)$/) + { + my @f_info= stat "$datadir/$rdb->{src}"; + chown $f_info[4], $f_info[5], $tgt_dirpath; + } } } @@ -489,7 +474,7 @@ foreach my $rdb ( @db_desc ) my @files = map { "$datadir/$rdb->{src}/$_" } @{$rdb->{files}}; next unless @files; - eval { copy_files($opt{method}, \@files, $rdb->{target}, $rdb->{raid_dirs} ); }; + eval { copy_files($opt{method}, \@files, $rdb->{target}); }; push @failed, "$rdb->{src} -> $rdb->{target} failed: $@" if ( $@ ); @@ -582,7 +567,7 @@ exit 0; # --- sub copy_files { - my ($method, $files, $target, $raid_dirs) = @_; + my ($method, $files, $target) = @_; my @cmd; print "Copying ".@$files." files...\n" unless $opt{quiet}; @@ -603,15 +588,8 @@ sub copy_files { # add recursive option for scp $cp.= " -r" if $^O =~ /m^(solaris|linux|freebsd|darwin)$/ && $method =~ /^scp\b/; - my @non_raid = map { "'$_'" } grep { ! m:/$raid_dir_regex/[^/]+$: } @$files; - - # add files to copy and the destination directory - safe_system( $cp, @non_raid, "'$target'" ) if (@non_raid); - - foreach my $rd ( @$raid_dirs ) { - my @raid = map { "'$_'" } grep { m:$rd/: } @$files; - safe_system( $cp, @raid, "'$target'/$rd" ) if ( @raid ); - } + # perform the actual copy + safe_system( $cp, (map { "'$_'" } @$files), "'$target'" ); } else { @@ -789,35 +767,6 @@ sub get_row_hash { return $sth->fetchrow_hashref(); } -sub scan_raid_dir { - my ( $r_db_files, $data_dir, @raid_dir ) = @_; - - local(*RAID_DIR); - - foreach my $rd ( @raid_dir ) { - - opendir(RAID_DIR, "$data_dir/$rd" ) - or die "Cannot open dir '$data_dir/$rd': $!"; - - while ( defined( my $name = readdir RAID_DIR ) ) { - $r_db_files->{"$rd/$name"} = $1 if ( $name =~ /(.+)\.\w+$/ ); - } - closedir( RAID_DIR ); - } -} - -sub get_raid_dirs { - my ( $r_files ) = @_; - - my %dirs = (); - foreach my $f ( @$r_files ) { - if ( $f =~ m:^($raid_dir_regex)/: ) { - $dirs{$1} = 1; - } - } - return sort keys %dirs; -} - sub get_list_of_tables { my ( $db ) = @_; From 36bfc5b825911e5df939946d3c44e6e12b7cc5d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 18 Feb 2008 12:03:39 -0700 Subject: [PATCH 250/527] Bug #28555 Upgrading MySQL Fails to shut down old server and kills socket file Check for an existing MySQL server package from a different vendor or major MySQL version. In such a case, refuse to install the server and recommend how to safely remove the old packages before installing the new ones. support-files/mysql.spec.sh: Add to the %pre server scriptlet checks to ensure that we're not upgrading from another vendor's package, or that this is not a major version upgrade. If an automatic upgrade isn't safe, print basic instructions on how to do a manual upgrade, and bail out. --- support-files/mysql.spec.sh | 74 ++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index 8c4909fc8d5..acf7d571710 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -15,6 +15,7 @@ # MA 02110-1301 USA. %define mysql_version @VERSION@ +%define mysql_vendor MySQL AB # use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x) # to enable static linking (off by default) @@ -69,7 +70,7 @@ License: %{license} Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ Packager: MySQL Production Engineering Team -Vendor: MySQL AB +Vendor: %{mysql_vendor} Provides: msqlormysql MySQL-server mysql BuildRequires: ncurses-devel Obsoletes: mysql @@ -420,6 +421,72 @@ touch $RBR%{_sysconfdir}/my.cnf touch $RBR%{_sysconfdir}/mysqlmanager.passwd %pre server +# Check if we can safely upgrade. An upgrade is only safe if it's from one +# of our RPMs in the same version family. + +installed=`rpm -q --whatprovides mysql-server 2> /dev/null` +if [ $? -eq 0 -a -n "$installed" ]; then + vendor=`rpm -q --queryformat='%{VENDOR}' "$installed" 2>&1` + version=`rpm -q --queryformat='%{VERSION}' "$installed" 2>&1` + myvendor='%{mysql_vendor}' + myversion='%{mysql_version}' + + old_family=`echo $version | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` + new_family=`echo $myversion | sed -n -e 's,^\([1-9][0-9]*\.[0-9][0-9]*\)\..*$,\1,p'` + + [ -z "$vendor" ] && vendor='' + [ -z "$old_family" ] && old_family="" + [ -z "$new_family" ] && new_family="" + + error_text= + if [ "$vendor" != "$myvendor" ]; then + error_text="$error_text +The current MySQL server package is provided by a different +vendor ($vendor) than $myvendor. Some files may be installed +to different locations, including log files and the service +startup script in %{_sysconfdir}/init.d/. +" + fi + + if [ "$old_family" != "$new_family" ]; then + error_text="$error_text +Upgrading directly from MySQL $old_family to MySQL $new_family may not +be safe in all cases. A manual dump and restore using mysqldump is +recommended. It is important to review the MySQL manual's Upgrading +section for version-specific incompatibilities. +" + fi + + if [ -n "$error_text" ]; then + cat <&2 + +****************************************************************** +A MySQL server package ($installed) is installed. +$error_text +A manual upgrade is required. + +- Ensure that you have a complete, working backup of your data and my.cnf + files +- Shut down the MySQL server cleanly +- Remove the existing MySQL packages. Usually this command will + list the packages you should remove: + rpm -qa | grep -i '^mysql-' + + You may choose to use 'rpm --nodeps -ev ' to remove + the package which contains the mysqlclient shared library. The + library will be reinstalled by the MySQL-shared-compat package. +- Install the new MySQL packages supplied by $myvendor +- Ensure that the MySQL server is started +- Run the 'mysql_upgrade' program + +This is a brief description of the upgrade process. Important details +can be found in the MySQL manual, in the Upgrading section. +****************************************************************** +HERE + exit 1 + fi +fi + # Shut down a previously installed server first if test -x %{_sysconfdir}/init.d/mysql then @@ -715,6 +782,11 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Mon Feb 18 2008 Timothy Smith + +- Require a manual upgrade if the alread-installed mysql-server is + from another vendor, or is of a different major version. + * Fri Nov 16 2007 Joerg Bruehe - When testing the debug server, use "make test-bt-debug". From 721d24124fee09a13da32cb49295fdfd45729592 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 12:37:39 +0100 Subject: [PATCH 251/527] Bug#31745 - crash handler does not work on Windows - Replace per-thread signal()'s with SetUnhandledExceptionFilter(). The only remaining signal() is for SIGABRT (default abort() handler in VS2005 is broken, i.e removes user exception filter) - remove MessageBox()'es from error handling code - Windows port for print_stacktrace() and write_core() - Cleanup, removed some unused functions sql/CMakeLists.txt: Implement stack tracing on and generating crash dumps on Windows sql/mysqld.cc: Correct signal handling on Windows. - For console events, like CTRL-C use SetConsoleCtrlHandler - For exceptions like access violation, use SetUnhandledExceptionFilter - For SIGABRT generate exception via __debugbreak() intrinsic if built with VS2005 and later , since default SIGABRT handler replaces unhandled exception filter specified by user - make provisions to debug exception filter, as it is not trivial (should be compiled with /DDEBUG_UNHANDLED_EXCEPTION_FILTER) sql/sql_parse.cc: Remove message box from windows signal handler. The only thread specific handler left is for SIGABRT, which is broken on VS2005 and later (user specified unhandled exception filter gets overwritten) sql/stacktrace.c: Stack tracing and generating crash dumps on Windows sql/stacktrace.h: Implement print_stacktrace and write_core on Windows --- sql/CMakeLists.txt | 2 +- sql/mysqld.cc | 225 +++++++++++++++++++++++++++++-------- sql/sql_parse.cc | 19 +--- sql/stacktrace.c | 275 ++++++++++++++++++++++++++++++++++++++++++++- sql/stacktrace.h | 23 +++- 5 files changed, 469 insertions(+), 75 deletions(-) diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 84b042a91b1..9ea9874c1b1 100755 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -48,7 +48,7 @@ ENDIF(DISABLE_GRANT_OPTIONS) ADD_EXECUTABLE(mysqld${MYSQLD_EXE_SUFFIX} ../sql-common/client.c derror.cc des_key_file.cc - discover.cc ../libmysql/errmsg.c field.cc field_conv.cc + discover.cc ../libmysql/errmsg.c field.cc stacktrace.c stacktrace.h field_conv.cc filesort.cc gstream.cc ha_blackhole.cc ha_archive.cc ha_heap.cc ha_myisam.cc ha_myisammrg.cc ha_innodb.cc ha_federated.cc ha_berkeley.cc diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 693b72f5c98..c0afd081846 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -138,6 +138,13 @@ extern "C" { // Because of SCO 3.2V4.2 #include #endif +#ifdef __WIN__ +#include +#define SIGNAL_FMT "exception 0x%x" +#else +#define SIGNAL_FMT "signal %d" +#endif + #ifdef __NETWARE__ #define zVOLSTATE_ACTIVE 6 #define zVOLSTATE_DEACTIVE 2 @@ -227,6 +234,7 @@ inline void set_proper_floating_point_mode() extern "C" int gethostname(char *name, int namelen); #endif +extern "C" sig_handler handle_segfault(int sig); /* Constants */ @@ -1031,9 +1039,6 @@ static void __cdecl kill_server(int sig_ptr) #endif close_connections(); if (sig != MYSQL_KILL_SIGNAL && -#ifdef __WIN__ - sig != SIGINT && /* Bug#18235 */ -#endif sig != 0) unireg_abort(1); /* purecov: inspected */ else @@ -1592,8 +1597,7 @@ static void network_init(void) FORMAT_MESSAGE_FROM_SYSTEM, NULL, error, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL ); - MessageBox(NULL, (LPTSTR) lpMsgBuf, "Error from CreateNamedPipe", - MB_OK|MB_ICONINFORMATION); + sql_perror((char *)lpMsgBuf); LocalFree(lpMsgBuf); unireg_abort(1); } @@ -1796,17 +1800,163 @@ extern "C" sig_handler abort_thread(int sig __attribute__((unused))) ******************************************************************************/ -#if defined(__WIN__) || defined(OS2) +#if defined(__WIN__) + + +/* + On Windows, we use native SetConsoleCtrlHandler for handle events like Ctrl-C + with graceful shutdown. + Also, we do not use signal(), but SetUnhandledExceptionFilter instead - as it + provides possibility to pass the exception to just-in-time debugger, collect + dumps and potentially also the exception and thread context used to output + callstack. +*/ + +static BOOL WINAPI console_event_handler( DWORD type ) +{ + DBUG_ENTER("console_event_handler"); + if(type == CTRL_C_EVENT) + { + /* + Do not shutdown before startup is finished and shutdown + thread is initialized. Otherwise there is a race condition + between main thread doing initialization and CTRL-C thread doing + cleanup, which can result into crash. + */ + if(hEventShutdown) + kill_mysql(); + else + sql_print_warning("CTRL-C ignored during startup"); + DBUG_RETURN(TRUE); + } + DBUG_RETURN(FALSE); +} + + +/* + In Visual Studio 2005 and later, default SIGABRT handler will overwrite + any unhandled exception filter set by the application and will try to + call JIT debugger. This is not what we want, this we calling __debugbreak + to stop in debugger, if process is being debugged or to generate + EXCEPTION_BREAKPOINT and then handle_segfault will do its magic. +*/ + +#if (_MSC_VER >= 1400) +static void my_sigabrt_handler(int sig) +{ + __debugbreak(); +} +#endif /*_MSC_VER >=1400 */ + +void win_install_sigabrt_handler(void) +{ +#if (_MSC_VER >=1400) + /*abort() should not override our exception filter*/ + _set_abort_behavior(0,_CALL_REPORTFAULT); + signal(SIGABRT,my_sigabrt_handler); +#endif /* _MSC_VER >=1400 */ +} + +#ifdef DEBUG_UNHANDLED_EXCEPTION_FILTER +#define DEBUGGER_ATTACH_TIMEOUT 120 +/* + Wait for debugger to attach and break into debugger. If debugger is not attached, + resume after timeout. +*/ +static void wait_for_debugger(int timeout_sec) +{ + if(!IsDebuggerPresent()) + { + int i; + printf("Waiting for debugger to attach, pid=%u\n",GetCurrentProcessId()); + fflush(stdout); + for(i= 0; i < timeout_sec; i++) + { + Sleep(1000); + if(IsDebuggerPresent()) + { + /* Break into debugger */ + __debugbreak(); + return; + } + } + printf("pid=%u, debugger not attached after %d seconds, resuming\n",GetCurrentProcessId(), + timeout_sec); + fflush(stdout); + } +} +#endif /* DEBUG_UNHANDLED_EXCEPTION_FILTER */ + +LONG WINAPI my_unhandler_exception_filter(EXCEPTION_POINTERS *ex_pointers) +{ + static BOOL first_time= TRUE; + if(!first_time) + { + /* + This routine can be called twice, typically + when detaching in JIT debugger. + Return EXCEPTION_EXECUTE_HANDLER to terminate process. + */ + return EXCEPTION_EXECUTE_HANDLER; + } + first_time= FALSE; +#ifdef DEBUG_UNHANDLED_EXCEPTION_FILTER + /* + Unfortunately there is no clean way to debug unhandled exception filters, + as debugger does not stop there(also documented in MSDN) + To overcome, one could put a MessageBox, but this will not work in service. + Better solution is to print error message and sleep some minutes + until debugger is attached + */ + wait_for_debugger(DEBUGGER_ATTACH_TIMEOUT); +#endif /* DEBUG_UNHANDLED_EXCEPTION_FILTER */ + __try + { + set_exception_pointers(ex_pointers); + handle_segfault(ex_pointers->ExceptionRecord->ExceptionCode); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + DWORD written; + const char msg[] = "Got exception in exception handler!\n"; + WriteFile(GetStdHandle(STD_OUTPUT_HANDLE),msg, sizeof(msg)-1, + &written,NULL); + } + /* + Return EXCEPTION_CONTINUE_SEARCH to give JIT debugger + (drwtsn32 or vsjitdebugger) possibility to attach, + if JIT debugger is configured. + Windows Error reporting might generate a dump here. + */ + return EXCEPTION_CONTINUE_SEARCH; +} + + static void init_signals(void) { - int signals[] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGABRT } ; - for (uint i=0 ; i < sizeof(signals)/sizeof(int) ; i++) - signal(signals[i], kill_server) ; -#if defined(__WIN__) - signal(SIGBREAK,SIG_IGN); //ignore SIGBREAK for NT -#else - signal(SIGBREAK, kill_server); -#endif + win_install_sigabrt_handler(); + if(opt_console) + SetConsoleCtrlHandler(console_event_handler,TRUE); + else + { + /* Avoid MessageBox()es*/ + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ERROR, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ERROR, _CRTDBG_FILE_STDERR); + _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE); + _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); + + /* + Do not use SEM_NOGPFAULTERRORBOX in the following SetErrorMode (), + because it would prevent JIT debugger and Windows error reporting + from working. We need WER or JIT-debugging, since our own unhandled + exception filter is not guaranteed to work in all situation + (like heap corruption or stack overflow) + */ + SetErrorMode(SetErrorMode(0)|SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX); + } + SetUnhandledExceptionFilter(my_unhandler_exception_filter); } static void start_signal_handler(void) @@ -2094,8 +2244,8 @@ static void start_signal_handler(void) static void check_data_home(const char *path) {} +#endif /*__WIN__ || __NETWARE || __EMX__*/ -#else /* if ! __WIN__ && ! __EMX__ */ #ifdef HAVE_LINUXTHREADS #define UNSAFE_DEFAULT_LINUX_THREADS 200 @@ -2115,7 +2265,7 @@ extern "C" sig_handler handle_segfault(int sig) */ if (segfaulted) { - fprintf(stderr, "Fatal signal %d while backtracing\n", sig); + fprintf(stderr, "Fatal " SIGNAL_FMT " while backtracing\n", sig); exit(1); } @@ -2125,7 +2275,7 @@ extern "C" sig_handler handle_segfault(int sig) localtime_r(&curr_time, &tm); fprintf(stderr,"\ -%02d%02d%02d %2d:%02d:%02d - mysqld got signal %d;\n\ +%02d%02d%02d %2d:%02d:%02d - mysqld got " SIGNAL_FMT " ;\n\ This could be because you hit a bug. It is also possible that this binary\n\ or one of the libraries it was linked against is corrupt, improperly built,\n\ or misconfigured. This error can also be caused by malfunctioning hardware.\n", @@ -2166,6 +2316,10 @@ the thread stack. Please read http://dev.mysql.com/doc/mysql/en/linux.html\n\n", if (!(test_flags & TEST_NO_STACKTRACE)) { fprintf(stderr,"thd=%p\n",thd); + fprintf(stderr,"\ +Attempting backtrace. You can use the following information to find out\n\ +where mysqld died. If you see no messages after this, something went\n\ +terribly wrong...\n"); print_stacktrace(thd ? (gptr) thd->thread_stack : (gptr) 0, thread_stack); } @@ -2214,15 +2368,22 @@ of those buggy OS calls. You should consider whether you really need the\n\ bugs.\n"); } +#ifdef HAVE_WRITE_CORE if (test_flags & TEST_CORE_ON_SIGNAL) { fprintf(stderr, "Writing a core file\n"); fflush(stderr); write_core(sig); } +#endif + +#ifndef __WIN__ + /* On Windows, do not terminate, but pass control to exception filter */ exit(1); +#endif } +#if !defined(__WIN__) && !defined(__NETWARE__) && !defined(__EMX__) #ifndef SA_RESETHAND #define SA_RESETHAND 0 #endif @@ -2567,19 +2728,6 @@ static void my_str_free_mysqld(void *ptr) #ifdef __WIN__ - -struct utsname -{ - char nodename[FN_REFLEN]; -}; - - -int uname(struct utsname *a) -{ - return -1; -} - - pthread_handler_t handle_shutdown(void *arg) { MSG msg; @@ -2593,18 +2741,6 @@ pthread_handler_t handle_shutdown(void *arg) kill_server(MYSQL_KILL_SIGNAL); return 0; } - - -int STDCALL handle_kill(ulong ctrl_type) -{ - if (ctrl_type == CTRL_CLOSE_EVENT || - ctrl_type == CTRL_SHUTDOWN_EVENT) - { - kill_server(MYSQL_KILL_SIGNAL); - return TRUE; - } - return FALSE; -} #endif @@ -3633,11 +3769,6 @@ we force server id to 2, but this MySQL server will not act as a slave."); freopen(log_error_file,"a+",stderr); FreeConsole(); // Remove window } - else - { - /* Don't show error dialog box when on foreground: it stops the server */ - SetErrorMode(SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS); - } #endif /* diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8af79d77fa1..493cc1a1a7e 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -98,22 +98,7 @@ static bool do_command(THD *thd); #endif // EMBEDDED_LIBRARY #ifdef __WIN__ -static void test_signal(int sig_ptr) -{ -#if !defined( DBUG_OFF) - MessageBox(NULL,"Test signal","DBUG",MB_OK); -#endif -#if defined(OS2) - fprintf(stderr, "Test signal %d\n", sig_ptr); - fflush(stderr); -#endif -} -static void init_signals(void) -{ - int signals[7] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGBREAK,SIGABRT } ; - for (int i=0 ; i < 7 ; i++) - signal( signals[i], test_signal) ; -} +extern void win_install_sigabrt_handler(void); #endif static void unlock_locked_tables(THD *thd) @@ -1124,7 +1109,7 @@ pthread_handler_t handle_one_connection(void *arg) /* now that we've called my_thread_init(), it is safe to call DBUG_* */ #if defined(__WIN__) - init_signals(); + win_install_sigabrt_handler(); #elif !defined(OS2) && !defined(__NETWARE__) sigset_t set; VOID(sigemptyset(&set)); // Get mask in use diff --git a/sql/stacktrace.c b/sql/stacktrace.c index c947beafac3..ce91d63d3f7 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -13,11 +13,15 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* Workaround for Bug#32082: VOID redefinition on Win results in compile errors*/ +#define DONT_DEFINE_VOID 1 + #include #include "stacktrace.h" + +#ifndef __WIN__ #include #include - #ifdef HAVE_STACKTRACE #include #include @@ -118,10 +122,7 @@ void print_stacktrace(gptr stack_bottom, ulong thread_stack) #endif LINT_INIT(fp); - fprintf(stderr,"\ -Attempting backtrace. You can use the following information to find out\n\ -where mysqld died. If you see no messages after this, something went\n\ -terribly wrong...\n"); + #ifdef __i386__ __asm __volatile__ ("movl %%ebp,%0" :"=r"(fp) @@ -257,3 +258,267 @@ void write_core(int sig) #endif } #endif +#else /* __WIN__*/ + +#include + +/* + Stack tracing on Windows is implemented using Debug Helper library(dbghelp.dll) + We do not redistribute dbghelp and the one comes with older OS (up to Windows 2000) + is missing some important functions like functions StackWalk64 or MinidumpWriteDump. + Hence, we have to load functions at runtime using LoadLibrary/GetProcAddress. +*/ + +typedef DWORD (WINAPI *SymSetOptions_FctType)(DWORD dwOptions); +typedef BOOL (WINAPI *SymGetModuleInfo64_FctType) + (HANDLE,DWORD64,PIMAGEHLP_MODULE64) ; +typedef BOOL (WINAPI *SymGetSymFromAddr64_FctType) + (HANDLE,DWORD64,PDWORD64,PIMAGEHLP_SYMBOL64) ; +typedef BOOL (WINAPI *SymGetLineFromAddr64_FctType) + (HANDLE,DWORD64,PDWORD,PIMAGEHLP_LINE64); +typedef BOOL (WINAPI *SymInitialize_FctType) + (HANDLE,PSTR,BOOL); +typedef BOOL (WINAPI *StackWalk64_FctType) + (DWORD,HANDLE,HANDLE,LPSTACKFRAME64,PVOID,PREAD_PROCESS_MEMORY_ROUTINE64, + PFUNCTION_TABLE_ACCESS_ROUTINE64,PGET_MODULE_BASE_ROUTINE64 , + PTRANSLATE_ADDRESS_ROUTINE64); +typedef BOOL (WINAPI *MiniDumpWriteDump_FctType)( + IN HANDLE hProcess, + IN DWORD ProcessId, + IN HANDLE hFile, + IN MINIDUMP_TYPE DumpType, + IN CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, OPTIONAL + IN CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, OPTIONAL + IN CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam OPTIONAL + ); + +static SymSetOptions_FctType pSymSetOptions; +static SymGetModuleInfo64_FctType pSymGetModuleInfo64; +static SymGetSymFromAddr64_FctType pSymGetSymFromAddr64; +static SymInitialize_FctType pSymInitialize; +static StackWalk64_FctType pStackWalk64; +static SymGetLineFromAddr64_FctType pSymGetLineFromAddr64; +static MiniDumpWriteDump_FctType pMiniDumpWriteDump; + +static EXCEPTION_POINTERS *exception_ptrs; + +#define MODULE64_SIZE_WINXP 576 +#define STACKWALK_MAX_FRAMES 64 + +/* + Dynamically load dbghelp functions +*/ +BOOL init_dbghelp_functions() +{ + static BOOL first_time= TRUE; + static BOOL rc; + HMODULE hDbghlp; + + if(first_time) + { + first_time= FALSE; + hDbghlp= LoadLibrary("dbghelp"); + if(!hDbghlp) + { + rc= FALSE; + return rc; + } + pSymSetOptions= (SymSetOptions_FctType) + GetProcAddress(hDbghlp,"SymSetOptions"); + pSymInitialize= (SymInitialize_FctType) + GetProcAddress(hDbghlp,"SymInitialize"); + pSymGetModuleInfo64= (SymGetModuleInfo64_FctType) + GetProcAddress(hDbghlp,"SymGetModuleInfo64"); + pSymGetLineFromAddr64= (SymGetLineFromAddr64_FctType) + GetProcAddress(hDbghlp,"SymGetLineFromAddr64"); + pSymGetSymFromAddr64=(SymGetSymFromAddr64_FctType) + GetProcAddress(hDbghlp,"SymGetSymFromAddr64"); + pStackWalk64= (StackWalk64_FctType) + GetProcAddress(hDbghlp,"StackWalk64"); + pMiniDumpWriteDump = (MiniDumpWriteDump_FctType) + GetProcAddress(hDbghlp,"MiniDumpWriteDump"); + + rc = (BOOL)(pSymSetOptions && pSymInitialize && pSymGetModuleInfo64 + && pSymGetLineFromAddr64 && pSymGetSymFromAddr64 && pStackWalk64); + } + return rc; +} + +void set_exception_pointers(EXCEPTION_POINTERS *ep) +{ + exception_ptrs = ep; +} + +/* Platform SDK in VS2003 does not have definition for SYMOPT_NO_PROMPTS*/ +#ifndef SYMOPT_NO_PROMPTS +#define SYMOPT_NO_PROMPTS 0 +#endif + +void print_stacktrace(gptr unused1, ulong unused2) +{ + HANDLE hProcess= GetCurrentProcess(); + HANDLE hThread= GetCurrentThread(); + static IMAGEHLP_MODULE64 module= {sizeof(module)}; + static IMAGEHLP_SYMBOL64_PACKAGE package; + DWORD64 addr; + DWORD machine; + int i; + CONTEXT context; + STACKFRAME64 frame={0}; + + if(!exception_ptrs || !init_dbghelp_functions()) + return; + + /* Copy context, as stackwalking on original will unwind the stack */ + context = *(exception_ptrs->ContextRecord); + /*Initialize symbols.*/ + pSymSetOptions(SYMOPT_LOAD_LINES|SYMOPT_NO_PROMPTS|SYMOPT_DEFERRED_LOADS|SYMOPT_DEBUG); + pSymInitialize(hProcess,NULL,TRUE); + + /*Prepare stackframe for the first StackWalk64 call*/ + frame.AddrFrame.Mode= frame.AddrPC.Mode= frame.AddrStack.Mode= AddrModeFlat; +#if (defined _M_IX86) + machine= IMAGE_FILE_MACHINE_I386; + frame.AddrFrame.Offset= context.Ebp; + frame.AddrPC.Offset= context.Eip; + frame.AddrStack.Offset= context.Esp; +#elif (defined _M_X64) + machine = IMAGE_FILE_MACHINE_AMD64; + frame.AddrFrame.Offset= context.Rbp; + frame.AddrPC.Offset= context.Rip; + frame.AddrStack.Offset= context.Rsp; +#else + /*There is currently no need to support IA64*/ +#pragma error ("unsupported architecture") +#endif + + package.sym.SizeOfStruct= sizeof(package.sym); + package.sym.MaxNameLength= sizeof(package.name); + + /*Walk the stack, output useful information*/ + for(i= 0; i< STACKWALK_MAX_FRAMES;i++) + { + DWORD64 function_offset= 0; + DWORD line_offset= 0; + IMAGEHLP_LINE64 line= {sizeof(line)}; + BOOL have_module= FALSE; + BOOL have_symbol= FALSE; + BOOL have_source= FALSE; + + if(!pStackWalk64(machine, hProcess, hThread, &frame, &context, 0, 0, 0 ,0)) + break; + addr= frame.AddrPC.Offset; + + have_module= pSymGetModuleInfo64(hProcess,addr,&module); +#ifdef _M_IX86 + if(!have_module) + { + /* + ModuleInfo structure has been "compatibly" extended in releases after XP, + and its size was increased. To make XP dbghelp.dll function + happy, pretend passing the old structure. + */ + module.SizeOfStruct= MODULE64_SIZE_WINXP; + have_module= pSymGetModuleInfo64(hProcess, addr, &module); + } +#endif + + have_symbol= pSymGetSymFromAddr64(hProcess, addr, &function_offset, + &(package.sym)); + have_source= pSymGetLineFromAddr64(hProcess, addr, &line_offset, &line); + + fprintf(stderr, "%p ", addr); + if(have_module) + { + char *base_image_name= strrchr(module.ImageName, '\\'); + if(base_image_name) + base_image_name++; + else + base_image_name= module.ImageName; + fprintf(stderr, "%s!", base_image_name); + } + if(have_symbol) + fprintf(stderr, "%s()", package.sym.Name); + else if(have_module) + fprintf(stderr, "???"); + + if(have_source) + { + char *base_file_name= strrchr(line.FileName, '\\'); + if(base_file_name) + base_file_name++; + else + base_file_name= line.FileName; + fprintf(stderr,"[%s:%u]", base_file_name, line.LineNumber); + } + fprintf(stderr, "\n"); + } + fflush(stderr); +} + + +/* + Write dump. The dump is created in current directory, + file name is constructed from executable name plus + ".dmp" extension +*/ +void write_core(int unused) +{ + char path[MAX_PATH]; + char dump_fname[MAX_PATH]= "core.dmp"; + MINIDUMP_EXCEPTION_INFORMATION info; + HANDLE hFile; + + if(!exception_ptrs || !init_dbghelp_functions() || !pMiniDumpWriteDump) + return; + + info.ExceptionPointers= exception_ptrs; + info.ClientPointers= FALSE; + info.ThreadId= GetCurrentThreadId(); + + if(GetModuleFileName(NULL, path, sizeof(path))) + { + _splitpath(path, NULL, NULL,dump_fname,NULL); + strncat(dump_fname, ".dmp", sizeof(dump_fname)); + } + + hFile= CreateFile(dump_fname, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, 0); + if(hFile) + { + /* Create minidump */ + if(pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), + hFile, MiniDumpNormal, &info, 0, 0)) + { + fprintf(stderr, "Minidump written to %s\n", + _fullpath(path, dump_fname, sizeof(path)) ? path : dump_fname); + } + else + { + fprintf(stderr,"MiniDumpWriteDump() failed, last error %u\n", + GetLastError()); + } + CloseHandle(hFile); + } + else + { + fprintf(stderr, "CreateFile(%s) failed, last error %u\n", dump_fname, + GetLastError()); + } + fflush(stderr); +} + + +void safe_print_str(const char *name, const char *val, int len) +{ + fprintf(stderr,"%s at %p", name, val); + __try + { + fprintf(stderr,"=%.*s\n", len, val); + } + __except(EXCEPTION_EXECUTE_HANDLER) + { + fprintf(stderr,"is an invalid string pointer\n"); + } +} +#endif /*__WIN__*/ diff --git a/sql/stacktrace.h b/sql/stacktrace.h index f5c92e54e1c..e5e17cc5b9b 100644 --- a/sql/stacktrace.h +++ b/sql/stacktrace.h @@ -29,20 +29,33 @@ extern char* heap_start; heap_start = (char*) &__bss_start; \ check_thread_lib(); \ } while(0); +void check_thread_lib(void); +#endif /* defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) */ +#elif defined (__WIN__) +#define HAVE_STACKTRACE +extern void set_exception_pointers(EXCEPTION_POINTERS *ep); +#define init_stacktrace() {} +#endif + +#ifdef HAVE_STACKTRACE void print_stacktrace(gptr stack_bottom, ulong thread_stack); void safe_print_str(const char* name, const char* val, int max_len); -void check_thread_lib(void); -#endif /* (defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) */ -#endif /* TARGET_OS_LINUX */ - +#else /* Define empty prototypes for functions that are not implemented */ -#ifndef HAVE_STACKTRACE #define init_stacktrace() {} #define print_stacktrace(A,B) {} #define safe_print_str(A,B,C) {} #endif /* HAVE_STACKTRACE */ + +#if !defined(__NETWARE__) +#define HAVE_WRITE_CORE +#endif + +#ifdef HAVE_WRITE_CORE void write_core(int sig); +#endif + #ifdef __cplusplus } From 526798dbb55c79b62e795a1cf40062030e2342bd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 14:43:01 +0300 Subject: [PATCH 252/527] A fix and a test case for Bug#12713 "Error in a stored function called from a SELECT doesn't cause ROLLBACK of statem". The idea of the fix is to ensure that we always commit the current statement at the end of dispatch_command(). In order to not issue redundant disc syncs, an optimization of the two-phase commit protocol is implemented to bypass the two phase commit if the transaction is read-only. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Update test results. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Update test results. mysql-test/suite/rpl_ndb/t/disabled.def: Disable the tests, for which this changeset reveals a bug: the injector thread does not always add 'statement commit' to the rows injected in circular replication set up. To be investigated separately. sql/ha_ndbcluster_binlog.cc: Add close_thread_tables() to run_query: this ensures that all tables are closed and there is no pending statement transaction. sql/handler.cc: Implement optimisation of read-only transactions. If a transaction consists only of DML statements that do not change data, we do not perform a two-phase commit for it (run one phase commit only). sql/handler.h: Implement optimisation of read-only transactions. If a transaction consists only of DML statements that do not change data, we do not perform a two-phase commit for it (run one phase commit only). sql/log.cc: Mark the binlog transaction read-write whenever it's started. We never read from binlog, so it's safe and least intrusive to add this mark up here. sql/log_event.cc: Update to the new layout of thd->transaction. sql/rpl_injector.cc: Always commit statement transaction before committing the global one. sql/sp.cc: Ad comments. sql/sp_head.cc: Add comments. sql/sql_base.cc: Commit transaction at the end of the statement. Always. sql/sql_class.cc: Update thd_ha_data to return the right pointer in the new layout. Fix select_dumpvar::send_data to properly return operation status. A test case from commit.inc would lead to an assertion failure in the diagnostics area (double assignment). Not test otherwise by the test suite. sql/sql_class.h: Implement a new layout of storage engine transaction info in which it is easy to access all members related to the handlerton only based on ht->slot. sql/sql_cursor.cc: Update to the new layout of thd->transaction. sql/sql_delete.cc: Remove wrong and now redundant calls to ha_autocommit_or_rollback. The transaction is committed in one place, at the end of the statement. Remove calls to mysql_unlock_tables, since some engines count locks and commit statement transaction in unlock_tables(), which essentially equates mysql_unlock_tables to ha_autocommit_or_rollback. Previously it was necessary to unlock tables soon because we wanted to avoid sending of 'ok' packet to the client under locked tables. This is no longer necessary, since OK packet is also sent from one place at the end of transaction. sql/sql_do.cc: Add DO always clears the error, we must rollback the current statement before this happens. Otherwise the statement will be committed, and not rolled back in the end. sql/sql_insert.cc: Remove wrong and now redundant calls to ha_autocommit_or_rollback. The transaction is committed in one place, at the end of the statement. Remove calls to mysql_unlock_tables, since some engines count locks and commit statement transaction in unlock_tables(), which essentially equates mysql_unlock_tables to ha_autocommit_or_rollback. Previously it was necessary to unlock tables soon because we wanted to avoid sending of 'ok' packet to the client under locked tables. This is no longer necessary, since OK packet is also sent from one place at the end of transaction. sql/sql_load.cc: Remove wrong and now redundant calls to ha_autocommit_or_rollback. The transaction is committed in one place, at the end of the statement. Remove calls to mysql_unlock_tables, since some engines count locks and commit statement transaction in unlock_tables(), which essentially equates mysql_unlock_tables to ha_autocommit_or_rollback. Previously it was necessary to unlock tables soon because we wanted to avoid sending of 'ok' packet to the client under locked tables. This is no longer necessary, since OK packet is also sent from one place at the end of transaction. sql/sql_parse.cc: Implement optimisation of read-only transactions: bypass 2-phase commit for them. Always commit statement transaction before commiting the global one. Fix an unrelated crash in check_table_access, when called from information_schema. sql/sql_partition.cc: Partitions commit at the end of a DDL operation. Make sure that send_ok() is done only if the commit has succeeded. sql/sql_table.cc: Use ha_autocommit_or_rollback and end_active_trans everywhere. Add end_trans to mysql_admin_table, so that it leaves no pending transaction. sql/sql_udf.cc: Remvove a redundant call to close_thread_tables() sql/sql_update.cc: Remove wrong and now redundant calls to ha_autocommit_or_rollback. The transaction is committed in one place, at the end of the statement. Remove calls to mysql_unlock_tables, since some engines count locks and commit statement transaction in unlock_tables(), which essentially equates mysql_unlock_tables to ha_autocommit_or_rollback. Previously it was necessary to unlock tables soon because we wanted to avoid sending of 'ok' packet to the client under locked tables. This is no longer necessary, since OK packet is also sent from one place at the end of transaction. mysql-test/include/commit.inc: New BitKeeper file ``mysql-test/include/commit.inc'' mysql-test/r/commit_1innodb.result: New BitKeeper file ``mysql-test/r/commit_1innodb.result'' mysql-test/t/commit_1innodb.test: New BitKeeper file ``mysql-test/t/commit_1innodb.test'' --- mysql-test/include/commit.inc | 742 +++++++++++++++ mysql-test/r/commit_1innodb.result | 888 ++++++++++++++++++ .../r/binlog_row_mix_innodb_myisam.result | 3 +- .../r/binlog_stm_mix_innodb_myisam.result | 4 +- mysql-test/suite/rpl_ndb/t/disabled.def | 2 + mysql-test/t/commit_1innodb.test | 6 + sql/ha_ndbcluster_binlog.cc | 1 + sql/handler.cc | 615 ++++++++++-- sql/handler.h | 122 ++- sql/log.cc | 10 + sql/log_event.cc | 2 +- sql/rpl_injector.cc | 20 + sql/sp.cc | 20 +- sql/sp_head.cc | 1 + sql/sql_base.cc | 58 +- sql/sql_class.cc | 4 +- sql/sql_class.h | 32 +- sql/sql_cursor.cc | 5 +- sql/sql_delete.cc | 38 +- sql/sql_do.cc | 12 +- sql/sql_insert.cc | 42 +- sql/sql_load.cc | 10 - sql/sql_parse.cc | 27 +- sql/sql_partition.cc | 38 +- sql/sql_table.cc | 21 +- sql/sql_udf.cc | 9 +- sql/sql_update.cc | 29 +- 27 files changed, 2514 insertions(+), 247 deletions(-) create mode 100644 mysql-test/include/commit.inc create mode 100644 mysql-test/r/commit_1innodb.result create mode 100644 mysql-test/t/commit_1innodb.test diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc new file mode 100644 index 00000000000..770871fbcca --- /dev/null +++ b/mysql-test/include/commit.inc @@ -0,0 +1,742 @@ +## Bug#12713 (Error in a stored function called from a SELECT doesn't cause +## ROLLBACK of statem) + +## +## Pre-Requisites : +## - $engine_type should be set +## + +set sql_mode=no_engine_substitution; +eval set storage_engine = $engine_type; +set autocommit=1; + +--disable_warnings +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop function if exists f2; +drop procedure if exists bug12713_call; +drop procedure if exists bug12713_dump_spvars; +drop procedure if exists dummy; +--enable_warnings + +create table t1 (a int); +create table t2 (a int unique); +create table t3 (a int); + +# a workaround for Bug#32633: Can not create any routine if +# SQL_MODE=no_engine_substitution + +set sql_mode=default; + +insert into t1 (a) values (1), (2); +insert into t3 (a) values (1), (2); + +delimiter |; + +## Cause a failure every time +create function f2(x int) returns int +begin + insert into t2 (a) values (x); + insert into t2 (a) values (x); + return x; +end| + +delimiter ;| + +set autocommit=0; + +flush status; +##============================================================================ +## Design notes +## +## In each case, statement rollback is expected. +## for transactional engines, the rollback should be properly executed +## for non transactional engines, the rollback may cause warnings. +## +## The test pattern is as follows +## - insert 1000+N +## - statement with a side effect, that fails to insert N twice +## - a statement rollback is expected (expecting 1 row 1000+N only) in t2 +## - a rollback is performed +## - expecting a clean table t2. +##============================================================================ + +insert into t2 (a) values (1001); +--error ER_DUP_ENTRY +insert into t1 (a) values (f2(1)); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1002); +--error ER_DUP_ENTRY +insert into t3 (a) select f2(2) from t1; +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1003); +--error ER_DUP_ENTRY +update t1 set a= a + f2(3); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1004); +--error ER_DUP_ENTRY +update t1, t3 set t1.a = 0, t3.a = 0 where (f2(4) = 4) and (t1.a = t3.a); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1005); +--error ER_DUP_ENTRY +delete from t1 where (a = f2(5)); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1006); +--error ER_DUP_ENTRY +delete from t1, t3 using t1, t3 where (f2(6) = 6) ; +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1007); +--error ER_DUP_ENTRY +replace t1 values (f2(7)); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1008); +--error ER_DUP_ENTRY +replace into t3 (a) select f2(8) from t1; +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1009); +--error ER_DUP_ENTRY +select f2(9) from t1 ; +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1010); +--error ER_DUP_ENTRY +show databases where (f2(10) = 10); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1011); +--error ER_DUP_ENTRY +show tables where (f2(11) = 11); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1012); +--error ER_DUP_ENTRY +show triggers where (f2(12) = 12); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1013); +--error ER_DUP_ENTRY +show table status where (f2(13) = 13); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1014); +--error ER_DUP_ENTRY +show open tables where (f2(14) = 14); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1015); +--error ER_DUP_ENTRY +show columns in mysql.proc where (f2(15) = 15); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1016); +--error ER_DUP_ENTRY +show status where (f2(16) = 16); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1017); +--error ER_DUP_ENTRY +show variables where (f2(17) = 17); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1018); +--error ER_DUP_ENTRY +show charset where (f2(18) = 18); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1019); +--error ER_DUP_ENTRY +show collation where (f2(19) = 19); +select * from t2; +rollback; +select * from t2; + +--echo # We need at least one procedure to make sure the WHERE clause is +--echo # evaluated +create procedure dummy() begin end; +insert into t2 (a) values (1020); +--error ER_DUP_ENTRY +show procedure status where (f2(20) = 20); +select * from t2; +rollback; +select * from t2; +drop procedure dummy; + +insert into t2 (a) values (1021); +--error ER_DUP_ENTRY +show function status where (f2(21) = 21); +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1022); +prepare stmt from "insert into t1 (a) values (f2(22))"; +--error ER_DUP_ENTRY +execute stmt; +select * from t2; +rollback; +select * from t2; + +insert into t2 (a) values (1023); +do (f2(23)); +select * from t2; +rollback; +select * from t2; + +## Please note : +## This will insert a record 1024 in t1 (statement commit) +## This will insert a record 24 in t1 (statement commit) +## then will rollback the second insert only (24) (statement rollback) +## then will rollback the complete transaction (transaction rollback) + +delimiter |; + +create procedure bug12713_call () +begin + insert into t2 (a) values (24); + insert into t2 (a) values (24); +end| + +delimiter ;| + +insert into t2 (a) values (1024); +--error ER_DUP_ENTRY +call bug12713_call(); +select * from t2; +rollback; +select * from t2; + +--echo ======================================================================= +--echo Testing select_to_file +--echo ======================================================================= + +insert into t2 (a) values (1025); + +--replace_result $MYSQLTEST_VARDIR .. +--error ER_DUP_ENTRY +eval select f2(25) into outfile "$MYSQLTEST_VARDIR/tmp/dml.out" from t1; +select * from t2; +rollback; +select * from t2; +--remove_file $MYSQLTEST_VARDIR/tmp/dml.out + +insert into t2 (a) values (1026); +--replace_result $MYSQLTEST_VARDIR .. +--error ER_DUP_ENTRY +eval load data infile "../std_data_ln/words.dat" into table t1 (a) set a:=f2(26); + +select * from t2; +rollback; +select * from t2; + +--echo ======================================================================= +--echo Testing select_dumpvar +--echo ======================================================================= + +insert into t2 (a) values (1027); +--error ER_DUP_ENTRY +select f2(27) into @foo; +select * from t2; +rollback; +select * from t2; + +--echo ======================================================================= +--echo Testing Select_fetch_into_spvars +--echo ======================================================================= + +delimiter |; + +create procedure bug12713_dump_spvars () +begin + declare foo int; + + declare continue handler for sqlexception + begin + select "Exception trapped"; + end; + + select f2(28) into foo; + select * from t2; +end| + +delimiter ;| + +insert into t2 (a) values (1028); +call bug12713_dump_spvars (); +rollback; +select * from t2; + +--echo ======================================================================= +--echo Cleanup +--echo ======================================================================= + +set autocommit=default; + +drop table t1; +drop table t2; +drop table t3; +drop function f2; +drop procedure bug12713_call; +drop procedure bug12713_dump_spvars; +--echo # +--echo # Bug#12713 Error in a stored function called from a SELECT doesn't +--echo # cause ROLLBACK of statem +--echo # +--echo # Verify that two-phase commit is not issued for read-only +--echo # transactions. +--echo # +--echo # Verify that two-phase commit is issued for read-write transactions, +--echo # even if the change is done inside a stored function called from +--echo # SELECT or SHOW statement. +--echo # +set autocommit=0; +--disable_warnings +drop table if exists t1; +drop table if exists t2; +drop function if exists f1; +drop procedure if exists p_verify_status_increment; +--enable_warnings + +set sql_mode=no_engine_substitution; +create table t1 (a int unique); +create table t2 (a int) engine=myisam; +set sql_mode=default; +--echo # +--echo # An auxiliary procedure to track Handler_prepare and Handler_commit +--echo # statistics. +--echo # +delimiter |; +create procedure +p_verify_status_increment(commit_inc_mixed int, prepare_inc_mixed int, + commit_inc_row int, prepare_inc_row int) +begin + declare commit_inc int; + declare prepare_inc int; + declare old_commit_count int default ifnull(@commit_count, 0); + declare old_prepare_count int default ifnull(@prepare_count, 0); + declare c_res int; +# Use a cursor to have just one access to I_S instead of 2, it is very slow +# and amounts for over 90% of test CPU time + declare c cursor for + select variable_value + from information_schema.session_status + where variable_name='Handler_commit' or variable_name='Handler_prepare' + order by variable_name; + + if @@global.binlog_format = 'ROW' then + set commit_inc= commit_inc_row; + set prepare_inc= prepare_inc_row; + else + set commit_inc= commit_inc_mixed; + set prepare_inc= prepare_inc_mixed; + end if; + + open c; + fetch c into c_res; + set @commit_count=c_res; + fetch c into c_res; + set @prepare_count=c_res; + close c; + + if old_commit_count + commit_inc <> @commit_count then + select concat("Expected commit increment: ", commit_inc, + " actual: ", @commit_count - old_commit_count) + as 'ERROR'; + elseif old_prepare_count + prepare_inc <> @prepare_count then + select concat("Expected prepare increment: ", prepare_inc, + " actual: ", @prepare_count - old_prepare_count) + as 'ERROR'; + else + select '' as 'SUCCESS'; + end if; +end| +delimiter ;| +--echo # Reset Handler_commit and Handler_prepare counters +flush status; +--echo # +--echo # 1. Read-only statement: SELECT +--echo # +select * from t1; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 2. Read-write statement: INSERT, insert 1 row. +--echo # +insert into t1 (a) values (1); +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 3. Read-write statement: UPDATE, update 1 row. +--echo # +update t1 set a=2; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 4. Read-write statement: UPDATE, update 0 rows, 1 row matches WHERE +--echo # +--echo # Note the wrong Handler_prepare/Handler_commit count is due to +--echo # Bug#29157 "UPDATE, changed rows incorrect" and +--echo # Bug#Bug #33846 UPDATE word:Wrong 'Changed rows' if InnoDB, unique +--echo # key and no rows qualify WHERE +--echo # +update t1 set a=2; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 5. Read-write statement: UPDATE, update 0 rows, 0 rows match WHERE +--echo # +--echo # In mixed replication mode, there is a read-only transaction +--echo # in InnoDB and also the statement is written to the binary log. +--echo # So we have two commits but no 2pc, since the first engine's +--echo # transaction is read-only. +--echo # In the row level replication mode, we only have the read-only +--echo # transaction in InnoDB and nothing is written to the binary log. +--echo # +update t1 set a=3 where a=1; +call p_verify_status_increment(2, 0, 1, 0); +commit; +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 6. Read-write statement: DELETE, delete 0 rows. +--echo # +delete from t1 where a=1; +call p_verify_status_increment(2, 0, 1, 0); +commit; +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 7. Read-write statement: DELETE, delete 1 row. +--echo # +delete from t1 where a=2; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 8. Read-write statement: unqualified DELETE +--echo # +--echo # In statement or mixed replication mode, we call +--echo # handler::ha_delete_all_rows() and write statement text +--echo # to the binary log. This results in two read-write transactions. +--echo # In row level replication mode, we do not call +--echo # handler::ha_delete_all_rows(), but delete rows one by one. +--echo # Since there are no rows, nothing is written to the binary log. +--echo # Thus we have just one read-only transaction in InnoDB. +delete from t1; +call p_verify_status_increment(2, 2, 1, 0); +commit; +call p_verify_status_increment(2, 2, 1, 0); + +--echo # 9. Read-write statement: REPLACE, change 1 row. +--echo # +replace t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 10. Read-write statement: REPLACE, change 0 rows. +--echo # +replace t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 11. Read-write statement: IODKU, change 1 row. +--echo # +insert t1 set a=1 on duplicate key update a=a+1; +call p_verify_status_increment(2, 2, 2, 2); +select * from t1; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 12. Read-write statement: IODKU, change 0 rows. +--echo # +insert t1 set a=2 on duplicate key update a=2; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 13. Read-write statement: INSERT IGNORE, change 0 rows. +--echo # +insert ignore t1 set a=2; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 14. Read-write statement: INSERT IGNORE, change 1 row. +--echo # +insert ignore t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); +--echo # 15. Read-write statement: UPDATE IGNORE, change 0 rows. +--echo # +update ignore t1 set a=2 where a=1; +call p_verify_status_increment(2, 2, 1, 0); +commit; +call p_verify_status_increment(2, 2, 1, 0); +--echo # +--echo # Create a stored function that modifies a +--echo # non-transactional table. Demonstrate that changes in +--echo # non-transactional tables do not affect the two phase commit +--echo # algorithm. +--echo # +delimiter |; +create function f1() returns int +begin + insert t2 set a=2; + return 2; +end| +delimiter ;| +call p_verify_status_increment(0, 0, 0, 0); + +--echo # 16. A function changes non-trans-table. +--echo # +select f1(); +call p_verify_status_increment(0, 0, 0, 0); +commit; +call p_verify_status_increment(0, 0, 0, 0); + +--echo # 17. Read-only statement, a function changes non-trans-table. +--echo # +select f1() from t1; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 18. Read-write statement: UPDATE, change 0 (transactional) rows. +--echo # +select count(*) from t2; +update t1 set a=2 where a=f1()+10; +select count(*) from t2; +call p_verify_status_increment(2, 0, 2, 0); +commit; +call p_verify_status_increment(2, 0, 2, 0); +--echo # +--echo # Replace the non-transactional table with a temporary +--echo # transactional table. Demonstrate that a change to a temporary +--echo # transactional table does not provoke 2-phase commit, although +--echo # does trigger a commit and a binlog write (in statement mode). +--echo # +drop table t2; +set sql_mode=no_engine_substitution; +create temporary table t2 (a int); +call p_verify_status_increment(0, 0, 0, 0); +set sql_mode=default; +--echo # 19. A function changes temp-trans-table. +--echo # +select f1(); +--echo # Two commits because a binary log record is written +call p_verify_status_increment(2, 0, 1, 0); +commit; +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 20. Read-only statement, a function changes non-trans-table. +--echo # +select f1() from t1; +--echo # Two commits because a binary log record is written +call p_verify_status_increment(2, 0, 1, 0); +commit; +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 21. Read-write statement: UPDATE, change 0 (transactional) rows. +--echo # +update t1 set a=2 where a=f1()+10; +call p_verify_status_increment(2, 0, 1, 0); +commit; +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 22. DDL: ALTER TEMPORARY TABLE, should not cause a 2pc +--echo # +alter table t2 add column b int default 5; +--echo # A commit is done internally by ALTER. +call p_verify_status_increment(2, 0, 2, 0); +commit; +--echo # There is nothing left to commit +call p_verify_status_increment(0, 0, 0, 0); + +--echo # 23. DDL: RENAME TEMPORARY TABLE, does not start a transaction +--echo +--echo # No test because of Bug#8729 "rename table fails on temporary table" + +--echo # 24. DDL: TRUNCATE TEMPORARY TABLE, does not start a transaction +--echo +truncate table t2; +call p_verify_status_increment(2, 0, 2, 0); +commit; +--echo # There is nothing left to commit +call p_verify_status_increment(0, 0, 0, 0); + +--echo # 25. Read-write statement: unqualified DELETE +--echo +delete from t2; +call p_verify_status_increment(2, 0, 1, 0); +commit; +--echo # There is nothing left to commit +call p_verify_status_increment(2, 0, 1, 0); + +--echo # 25. DDL: DROP TEMPORARY TABLE, does not start a transaction +--echo # +drop temporary table t2; +call p_verify_status_increment(0, 0, 0, 0); +commit; +call p_verify_status_increment(0, 0, 0, 0); + +--echo # 26. Verify that SET AUTOCOMMIT issues an implicit commit +--echo # +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +set autocommit=1; +call p_verify_status_increment(2, 2, 2, 2); +rollback; +select a from t1 where a=3; +call p_verify_status_increment(1, 0, 1, 0); +delete from t1 where a=3; +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(0, 0, 0, 0); +set autocommit=0; +call p_verify_status_increment(0, 0, 0, 0); +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +--echo # Sic: not actually changing the value of autocommit +set autocommit=0; +call p_verify_status_increment(0, 0, 0, 0); +rollback; +select a from t1 where a=3; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 27. Savepoint management +--echo # +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +savepoint a; +call p_verify_status_increment(0, 0, 0, 0); +insert t1 set a=4; +--echo # Sic: a bug. Binlog did not register itself this time. +call p_verify_status_increment(1, 0, 1, 0); +release savepoint a; +rollback; +call p_verify_status_increment(0, 0, 0, 0); +select a from t1 where a=3; +call p_verify_status_increment(1, 0, 1, 0); +commit; +call p_verify_status_increment(1, 0, 1, 0); + +--echo # 28. Read-write statement: DO +--echo # +create table t2 (a int); +call p_verify_status_increment(0, 0, 0, 0); +do (select f1() from t1 where a=2); +call p_verify_status_increment(2, 2, 2, 2); +commit; +call p_verify_status_increment(2, 2, 2, 2); + +--echo # 29. Read-write statement: MULTI-DELETE +--echo # +delete t1, t2 from t1 join t2 on (t1.a=t2.a) where t1.a=2; +commit; +call p_verify_status_increment(4, 4, 4, 4); + +--echo # 30. Read-write statement: INSERT-SELECT, MULTI-UPDATE, REPLACE-SELECT +--echo # +insert into t2 select a from t1; +commit; +replace into t2 select a from t1; +commit; +call p_verify_status_increment(8, 8, 8, 8); +# +# Multi-update is one of the few remaining statements that still +# locks the tables at prepare step (and hence starts the transaction. +# Disable the PS protocol, since in this protocol we get a different +# number of commmits (there is an extra commit after prepare +# +--disable_ps_protocol +update t1, t2 set t1.a=4, t2.a=8 where t1.a=t2.a and t1.a=1; +--enable_ps_protocol +commit; +call p_verify_status_increment(4, 4, 4, 4); + +--echo # 31. DDL: various DDL with transactional tables +--echo # +--echo # Sic: no table is created. +create table if not exists t2 (a int) select 6 union select 7; +--echo # Sic: first commits the statement, and then the transaction. +call p_verify_status_increment(4, 4, 4, 4); +create table t3 select a from t2; +call p_verify_status_increment(4, 4, 4, 4); +alter table t3 add column (b int); +call p_verify_status_increment(2, 0, 2, 0); +alter table t3 rename t4; +call p_verify_status_increment(1, 0, 1, 0); +rename table t4 to t3; +call p_verify_status_increment(1, 0, 1, 0); +truncate table t3; +call p_verify_status_increment(2, 2, 2, 2); +create view v1 as select * from t2; +call p_verify_status_increment(1, 0, 1, 0); +check table t1; +call p_verify_status_increment(3, 0, 3, 0); +--echo # Sic: after this bug is fixed, CHECK leaves no pending transaction +commit; +call p_verify_status_increment(0, 0, 0, 0); +check table t1, t2, t3; +call p_verify_status_increment(6, 0, 6, 0); +commit; +call p_verify_status_increment(0, 0, 0, 0); +drop view v1; +call p_verify_status_increment(0, 0, 0, 0); + +--echo # +--echo # Cleanup +--echo # +drop table t1; +drop procedure p_verify_status_increment; +drop function f1; diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result new file mode 100644 index 00000000000..87f4fc32bc8 --- /dev/null +++ b/mysql-test/r/commit_1innodb.result @@ -0,0 +1,888 @@ +set sql_mode=no_engine_substitution; +set storage_engine = InnoDB; +set autocommit=1; +drop table if exists t1; +drop table if exists t2; +drop table if exists t3; +drop function if exists f2; +drop procedure if exists bug12713_call; +drop procedure if exists bug12713_dump_spvars; +drop procedure if exists dummy; +create table t1 (a int); +create table t2 (a int unique); +create table t3 (a int); +set sql_mode=default; +insert into t1 (a) values (1), (2); +insert into t3 (a) values (1), (2); +create function f2(x int) returns int +begin +insert into t2 (a) values (x); +insert into t2 (a) values (x); +return x; +end| +set autocommit=0; +flush status; +insert into t2 (a) values (1001); +insert into t1 (a) values (f2(1)); +ERROR 23000: Duplicate entry '1' for key 'a' +select * from t2; +a +1001 +rollback; +select * from t2; +a +insert into t2 (a) values (1002); +insert into t3 (a) select f2(2) from t1; +ERROR 23000: Duplicate entry '2' for key 'a' +select * from t2; +a +1002 +rollback; +select * from t2; +a +insert into t2 (a) values (1003); +update t1 set a= a + f2(3); +ERROR 23000: Duplicate entry '3' for key 'a' +select * from t2; +a +1003 +rollback; +select * from t2; +a +insert into t2 (a) values (1004); +update t1, t3 set t1.a = 0, t3.a = 0 where (f2(4) = 4) and (t1.a = t3.a); +ERROR 23000: Duplicate entry '4' for key 'a' +select * from t2; +a +1004 +rollback; +select * from t2; +a +insert into t2 (a) values (1005); +delete from t1 where (a = f2(5)); +ERROR 23000: Duplicate entry '5' for key 'a' +select * from t2; +a +1005 +rollback; +select * from t2; +a +insert into t2 (a) values (1006); +delete from t1, t3 using t1, t3 where (f2(6) = 6) ; +ERROR 23000: Duplicate entry '6' for key 'a' +select * from t2; +a +1006 +rollback; +select * from t2; +a +insert into t2 (a) values (1007); +replace t1 values (f2(7)); +ERROR 23000: Duplicate entry '7' for key 'a' +select * from t2; +a +1007 +rollback; +select * from t2; +a +insert into t2 (a) values (1008); +replace into t3 (a) select f2(8) from t1; +ERROR 23000: Duplicate entry '8' for key 'a' +select * from t2; +a +1008 +rollback; +select * from t2; +a +insert into t2 (a) values (1009); +select f2(9) from t1 ; +ERROR 23000: Duplicate entry '9' for key 'a' +select * from t2; +a +1009 +rollback; +select * from t2; +a +insert into t2 (a) values (1010); +show databases where (f2(10) = 10); +ERROR 23000: Duplicate entry '10' for key 'a' +select * from t2; +a +1010 +rollback; +select * from t2; +a +insert into t2 (a) values (1011); +show tables where (f2(11) = 11); +ERROR 23000: Duplicate entry '11' for key 'a' +select * from t2; +a +1011 +rollback; +select * from t2; +a +insert into t2 (a) values (1012); +show triggers where (f2(12) = 12); +ERROR 23000: Duplicate entry '12' for key 'a' +select * from t2; +a +1012 +rollback; +select * from t2; +a +insert into t2 (a) values (1013); +show table status where (f2(13) = 13); +ERROR 23000: Duplicate entry '13' for key 'a' +select * from t2; +a +1013 +rollback; +select * from t2; +a +insert into t2 (a) values (1014); +show open tables where (f2(14) = 14); +ERROR 23000: Duplicate entry '14' for key 'a' +select * from t2; +a +1014 +rollback; +select * from t2; +a +insert into t2 (a) values (1015); +show columns in mysql.proc where (f2(15) = 15); +ERROR 23000: Duplicate entry '15' for key 'a' +select * from t2; +a +1015 +rollback; +select * from t2; +a +insert into t2 (a) values (1016); +show status where (f2(16) = 16); +ERROR 23000: Duplicate entry '16' for key 'a' +select * from t2; +a +1016 +rollback; +select * from t2; +a +insert into t2 (a) values (1017); +show variables where (f2(17) = 17); +ERROR 23000: Duplicate entry '17' for key 'a' +select * from t2; +a +1017 +rollback; +select * from t2; +a +insert into t2 (a) values (1018); +show charset where (f2(18) = 18); +ERROR 23000: Duplicate entry '18' for key 'a' +select * from t2; +a +1018 +rollback; +select * from t2; +a +insert into t2 (a) values (1019); +show collation where (f2(19) = 19); +ERROR 23000: Duplicate entry '19' for key 'a' +select * from t2; +a +1019 +rollback; +select * from t2; +a +# We need at least one procedure to make sure the WHERE clause is +# evaluated +create procedure dummy() begin end; +insert into t2 (a) values (1020); +show procedure status where (f2(20) = 20); +ERROR 23000: Duplicate entry '20' for key 'a' +select * from t2; +a +1020 +rollback; +select * from t2; +a +drop procedure dummy; +insert into t2 (a) values (1021); +show function status where (f2(21) = 21); +ERROR 23000: Duplicate entry '21' for key 'a' +select * from t2; +a +1021 +rollback; +select * from t2; +a +insert into t2 (a) values (1022); +prepare stmt from "insert into t1 (a) values (f2(22))"; +execute stmt; +ERROR 23000: Duplicate entry '22' for key 'a' +select * from t2; +a +1022 +rollback; +select * from t2; +a +insert into t2 (a) values (1023); +do (f2(23)); +Warnings: +Error 1062 Duplicate entry '23' for key 'a' +select * from t2; +a +1023 +rollback; +select * from t2; +a +create procedure bug12713_call () +begin +insert into t2 (a) values (24); +insert into t2 (a) values (24); +end| +insert into t2 (a) values (1024); +call bug12713_call(); +ERROR 23000: Duplicate entry '24' for key 'a' +select * from t2; +a +24 +1024 +rollback; +select * from t2; +a +======================================================================= +Testing select_to_file +======================================================================= +insert into t2 (a) values (1025); +select f2(25) into outfile "../tmp/dml.out" from t1; +ERROR 23000: Duplicate entry '25' for key 'a' +select * from t2; +a +1025 +rollback; +select * from t2; +a +insert into t2 (a) values (1026); +load data infile "../std_data_ln/words.dat" into table t1 (a) set a:=f2(26); +ERROR 23000: Duplicate entry '26' for key 'a' +select * from t2; +a +1026 +rollback; +select * from t2; +a +======================================================================= +Testing select_dumpvar +======================================================================= +insert into t2 (a) values (1027); +select f2(27) into @foo; +ERROR 23000: Duplicate entry '27' for key 'a' +select * from t2; +a +1027 +rollback; +select * from t2; +a +======================================================================= +Testing Select_fetch_into_spvars +======================================================================= +create procedure bug12713_dump_spvars () +begin +declare foo int; +declare continue handler for sqlexception +begin +select "Exception trapped"; +end; +select f2(28) into foo; +select * from t2; +end| +insert into t2 (a) values (1028); +call bug12713_dump_spvars (); +Exception trapped +Exception trapped +a +1028 +rollback; +select * from t2; +a +======================================================================= +Cleanup +======================================================================= +set autocommit=default; +drop table t1; +drop table t2; +drop table t3; +drop function f2; +drop procedure bug12713_call; +drop procedure bug12713_dump_spvars; +# +# Bug#12713 Error in a stored function called from a SELECT doesn't +# cause ROLLBACK of statem +# +# Verify that two-phase commit is not issued for read-only +# transactions. +# +# Verify that two-phase commit is issued for read-write transactions, +# even if the change is done inside a stored function called from +# SELECT or SHOW statement. +# +set autocommit=0; +drop table if exists t1; +drop table if exists t2; +drop function if exists f1; +drop procedure if exists p_verify_status_increment; +set sql_mode=no_engine_substitution; +create table t1 (a int unique); +create table t2 (a int) engine=myisam; +set sql_mode=default; +# +# An auxiliary procedure to track Handler_prepare and Handler_commit +# statistics. +# +create procedure +p_verify_status_increment(commit_inc_mixed int, prepare_inc_mixed int, +commit_inc_row int, prepare_inc_row int) +begin +declare commit_inc int; +declare prepare_inc int; +declare old_commit_count int default ifnull(@commit_count, 0); +declare old_prepare_count int default ifnull(@prepare_count, 0); +declare c_res int; +# Use a cursor to have just one access to I_S instead of 2, it is very slow +# and amounts for over 90% of test CPU time +declare c cursor for +select variable_value +from information_schema.session_status +where variable_name='Handler_commit' or variable_name='Handler_prepare' + order by variable_name; +if @@global.binlog_format = 'ROW' then +set commit_inc= commit_inc_row; +set prepare_inc= prepare_inc_row; +else +set commit_inc= commit_inc_mixed; +set prepare_inc= prepare_inc_mixed; +end if; +open c; +fetch c into c_res; +set @commit_count=c_res; +fetch c into c_res; +set @prepare_count=c_res; +close c; +if old_commit_count + commit_inc <> @commit_count then +select concat("Expected commit increment: ", commit_inc, +" actual: ", @commit_count - old_commit_count) +as 'ERROR'; +elseif old_prepare_count + prepare_inc <> @prepare_count then +select concat("Expected prepare increment: ", prepare_inc, +" actual: ", @prepare_count - old_prepare_count) +as 'ERROR'; +else +select '' as 'SUCCESS'; +end if; +end| +# Reset Handler_commit and Handler_prepare counters +flush status; +# +# 1. Read-only statement: SELECT +# +select * from t1; +a +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 2. Read-write statement: INSERT, insert 1 row. +# +insert into t1 (a) values (1); +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 3. Read-write statement: UPDATE, update 1 row. +# +update t1 set a=2; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 4. Read-write statement: UPDATE, update 0 rows, 1 row matches WHERE +# +# Note the wrong Handler_prepare/Handler_commit count is due to +# Bug#29157 "UPDATE, changed rows incorrect" and +# Bug#Bug #33846 UPDATE word:Wrong 'Changed rows' if InnoDB, unique +# key and no rows qualify WHERE +# +update t1 set a=2; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 5. Read-write statement: UPDATE, update 0 rows, 0 rows match WHERE +# +# In mixed replication mode, there is a read-only transaction +# in InnoDB and also the statement is written to the binary log. +# So we have two commits but no 2pc, since the first engine's +# transaction is read-only. +# In the row level replication mode, we only have the read-only +# transaction in InnoDB and nothing is written to the binary log. +# +update t1 set a=3 where a=1; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 6. Read-write statement: DELETE, delete 0 rows. +# +delete from t1 where a=1; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 7. Read-write statement: DELETE, delete 1 row. +# +delete from t1 where a=2; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 8. Read-write statement: unqualified DELETE +# +# In statement or mixed replication mode, we call +# handler::ha_delete_all_rows() and write statement text +# to the binary log. This results in two read-write transactions. +# In row level replication mode, we do not call +# handler::ha_delete_all_rows(), but delete rows one by one. +# Since there are no rows, nothing is written to the binary log. +# Thus we have just one read-only transaction in InnoDB. +delete from t1; +call p_verify_status_increment(2, 2, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 1, 0); +SUCCESS + +# 9. Read-write statement: REPLACE, change 1 row. +# +replace t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 10. Read-write statement: REPLACE, change 0 rows. +# +replace t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 11. Read-write statement: IODKU, change 1 row. +# +insert t1 set a=1 on duplicate key update a=a+1; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +select * from t1; +a +2 +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 12. Read-write statement: IODKU, change 0 rows. +# +insert t1 set a=2 on duplicate key update a=2; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 13. Read-write statement: INSERT IGNORE, change 0 rows. +# +insert ignore t1 set a=2; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 14. Read-write statement: INSERT IGNORE, change 1 row. +# +insert ignore t1 set a=1; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 15. Read-write statement: UPDATE IGNORE, change 0 rows. +# +update ignore t1 set a=2 where a=1; +call p_verify_status_increment(2, 2, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 1, 0); +SUCCESS + +# +# Create a stored function that modifies a +# non-transactional table. Demonstrate that changes in +# non-transactional tables do not affect the two phase commit +# algorithm. +# +create function f1() returns int +begin +insert t2 set a=2; +return 2; +end| +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# 16. A function changes non-trans-table. +# +select f1(); +f1() +2 +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +commit; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# 17. Read-only statement, a function changes non-trans-table. +# +select f1() from t1; +f1() +2 +2 +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 18. Read-write statement: UPDATE, change 0 (transactional) rows. +# +select count(*) from t2; +count(*) +3 +update t1 set a=2 where a=f1()+10; +select count(*) from t2; +count(*) +5 +call p_verify_status_increment(2, 0, 2, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 2, 0); +SUCCESS + +# +# Replace the non-transactional table with a temporary +# transactional table. Demonstrate that a change to a temporary +# transactional table does not provoke 2-phase commit, although +# does trigger a commit and a binlog write (in statement mode). +# +drop table t2; +set sql_mode=no_engine_substitution; +create temporary table t2 (a int); +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +set sql_mode=default; +# 19. A function changes temp-trans-table. +# +select f1(); +f1() +2 +# Two commits because a binary log record is written +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 20. Read-only statement, a function changes non-trans-table. +# +select f1() from t1; +f1() +2 +2 +# Two commits because a binary log record is written +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 21. Read-write statement: UPDATE, change 0 (transactional) rows. +# +update t1 set a=2 where a=f1()+10; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 22. DDL: ALTER TEMPORARY TABLE, should not cause a 2pc +# +alter table t2 add column b int default 5; +# A commit is done internally by ALTER. +call p_verify_status_increment(2, 0, 2, 0); +SUCCESS + +commit; +# There is nothing left to commit +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# 23. DDL: RENAME TEMPORARY TABLE, does not start a transaction + +# No test because of Bug#8729 "rename table fails on temporary table" +# 24. DDL: TRUNCATE TEMPORARY TABLE, does not start a transaction + +truncate table t2; +call p_verify_status_increment(2, 0, 2, 0); +SUCCESS + +commit; +# There is nothing left to commit +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# 25. Read-write statement: unqualified DELETE + +delete from t2; +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +commit; +# There is nothing left to commit +call p_verify_status_increment(2, 0, 1, 0); +SUCCESS + +# 25. DDL: DROP TEMPORARY TABLE, does not start a transaction +# +drop temporary table t2; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +commit; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# 26. Verify that SET AUTOCOMMIT issues an implicit commit +# +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +set autocommit=1; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +rollback; +select a from t1 where a=3; +a +3 +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +delete from t1 where a=3; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +set autocommit=0; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# Sic: not actually changing the value of autocommit +set autocommit=0; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +rollback; +select a from t1 where a=3; +a +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 27. Savepoint management +# +insert t1 set a=3; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +savepoint a; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +insert t1 set a=4; +# Sic: a bug. Binlog did not register itself this time. +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +release savepoint a; +rollback; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +select a from t1 where a=3; +a +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +commit; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +# 28. Read-write statement: DO +# +create table t2 (a int); +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +do (select f1() from t1 where a=2); +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +commit; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +# 29. Read-write statement: MULTI-DELETE +# +delete t1, t2 from t1 join t2 on (t1.a=t2.a) where t1.a=2; +commit; +call p_verify_status_increment(4, 4, 4, 4); +SUCCESS + +# 30. Read-write statement: INSERT-SELECT, MULTI-UPDATE, REPLACE-SELECT +# +insert into t2 select a from t1; +commit; +replace into t2 select a from t1; +commit; +call p_verify_status_increment(8, 8, 8, 8); +SUCCESS + +update t1, t2 set t1.a=4, t2.a=8 where t1.a=t2.a and t1.a=1; +commit; +call p_verify_status_increment(4, 4, 4, 4); +SUCCESS + +# 31. DDL: various DDL with transactional tables +# +# Sic: no table is created. +create table if not exists t2 (a int) select 6 union select 7; +Warnings: +Note 1050 Table 't2' already exists +# Sic: first commits the statement, and then the transaction. +call p_verify_status_increment(4, 4, 4, 4); +SUCCESS + +create table t3 select a from t2; +call p_verify_status_increment(4, 4, 4, 4); +SUCCESS + +alter table t3 add column (b int); +call p_verify_status_increment(2, 0, 2, 0); +SUCCESS + +alter table t3 rename t4; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +rename table t4 to t3; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +truncate table t3; +call p_verify_status_increment(2, 2, 2, 2); +SUCCESS + +create view v1 as select * from t2; +call p_verify_status_increment(1, 0, 1, 0); +SUCCESS + +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +call p_verify_status_increment(3, 0, 3, 0); +SUCCESS + +# Sic: after this bug is fixed, CHECK leaves no pending transaction +commit; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +check table t1, t2, t3; +Table Op Msg_type Msg_text +test.t1 check status OK +test.t2 check status OK +test.t3 check status OK +call p_verify_status_increment(6, 0, 6, 0); +SUCCESS + +commit; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +drop view v1; +call p_verify_status_increment(0, 0, 0, 0); +SUCCESS + +# +# Cleanup +# +drop table t1; +drop procedure p_verify_status_increment; +drop function f1; diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index f69d5717a1f..a3edec92d8d 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -373,7 +373,7 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t2 master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F @@ -384,7 +384,6 @@ master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index c15478bc826..62f8c66634e 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -244,7 +244,6 @@ master-bin.000001 # Query # # use `test`; insert into t2 values (20) master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb master-bin.000001 # Query # # use `test`; insert into ti values(1) -master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 # Query # # use `test`; insert t1 values (1) master-bin.000001 # Query # # use `test`; create table t0 (n int) @@ -349,11 +348,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (7,7) master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) master-bin.000001 # Query # # use `test`; TRUNCATE table t2 -master-bin.000001 # Xid # # COMMIT /* XID */ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) -master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1,t2 reset master; create table t1 (a int) engine=innodb; diff --git a/mysql-test/suite/rpl_ndb/t/disabled.def b/mysql-test/suite/rpl_ndb/t/disabled.def index bb701b9dc3e..9c2033b7ca2 100644 --- a/mysql-test/suite/rpl_ndb/t/disabled.def +++ b/mysql-test/suite/rpl_ndb/t/disabled.def @@ -21,3 +21,5 @@ rpl_ndb_mix_innodb : Bug #32720 Test rpl_ndb_mix_innodb fails on SPARC a # the below testcase have been reworked to avoid the bug, test contains comment, keep bug open #rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly +rpl_ndb_circular : Bug#33849 COMMIT event missing in cluster circular replication. +rpl_ndb_circular_simplex : Bug#33849 COMMIT event missing in cluster circular replication. diff --git a/mysql-test/t/commit_1innodb.test b/mysql-test/t/commit_1innodb.test new file mode 100644 index 00000000000..c4a29acdddd --- /dev/null +++ b/mysql-test/t/commit_1innodb.test @@ -0,0 +1,6 @@ +-- source include/have_log_bin.inc +-- source include/have_innodb.inc + +let $engine_type = InnoDB; + +-- source include/commit.inc diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 07b0d907229..f5fda16b391 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -283,6 +283,7 @@ static void run_query(THD *thd, char *buf, char *end, thd_ndb->m_error_code, (int) thd->is_error(), thd->is_slave_error); } + close_thread_tables(thd); /* XXX: this code is broken. mysql_parse()/mysql_reset_thd_for_next_command() can not be called from within a statement, and diff --git a/sql/handler.cc b/sql/handler.cc index 95d63740039..d831a1c53a0 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -575,6 +575,295 @@ void ha_close_connection(THD* thd) /* ======================================================================== ======================= TRANSACTIONS ===================================*/ +/** + Transaction handling in the server + ================================== + + In each client connection, MySQL maintains two transactional + states: + - a statement transaction, + - a standard, also called normal transaction. + + Historical note + --------------- + "Statement transaction" is a non-standard term that comes + from the times when MySQL supported BerkeleyDB storage engine. + + First of all, it should be said that in BerkeleyDB auto-commit + mode auto-commits operations that are atomic to the storage + engine itself, such as a write of a record, and are too + high-granular to be atomic from the application perspective + (MySQL). One SQL statement could involve many BerkeleyDB + auto-committed operations and thus BerkeleyDB auto-commit was of + little use to MySQL. + + Secondly, instead of SQL standard savepoints, BerkeleyDB + provided the concept of "nested transactions". In a nutshell, + transactions could be arbitrarily nested, but when the parent + transaction was committed or aborted, all its child (nested) + transactions were handled committed or aborted as well. + Commit of a nested transaction, in turn, made its changes + visible, but not durable: it destroyed the nested transaction, + all its changes would become available to the parent and + currently active nested transactions of this parent. + + So the mechanism of nested transactions was employed to + provide "all or nothing" guarantee of SQL statements + required by the standard. + A nested transaction would be created at start of each SQL + statement, and destroyed (committed or aborted) at statement + end. Such nested transaction was internally referred to as + a "statement transaction" and gave birth to the term. + + + + Since then a statement transaction is started for each statement + that accesses transactional tables or uses the binary log. If + the statement succeeds, the statement transaction is committed. + If the statement fails, the transaction is rolled back. Commits + of statement transactions are not durable -- each such + transaction is nested in the normal transaction, and if the + normal transaction is rolled back, the effects of all enclosed + statement transactions are undone as well. Technically, + a statement transaction can be viewed as a savepoint which is + maintained automatically in order to make effects of one + statement atomic. + + The normal transaction is started by the user and is ended + usually upon a user request as well. The normal transaction + encloses transactions of all statements issued between + its beginning and its end. + In autocommit mode, the normal transaction is equivalent + to the statement transaction. + + Since MySQL supports PSEA (pluggable storage engine + architecture), more than one transactional engine can be + active at a time. Hence transactions, from the server + point of view, are always distributed. In particular, + transactional state is maintained independently for each + engine. In order to commit a transaction the two phase + commit protocol is employed. + + Not all statements are executed in context of a transaction. + Administrative and status information statements do not modify + engine data, and thus do not start a statement transaction and + also have no effect on the normal transaction. Examples of such + statements are SHOW STATUS and RESET SLAVE. + + Similarly DDL statements are not transactional, + and therefore a transaction is [almost] never started for a DDL + statement. The difference between a DDL statement and a purely + administrative statement though is that a DDL statement always + commits the current transaction before proceeding, if there is + any. + + At last, SQL statements that work with non-transactional + engines also have no effect on the transaction state of the + connection. Even though they are written to the binary log, + and the binary log is, overall, transactional, the writes + are done in "write-through" mode, directly to the binlog + file, followed with a OS cache sync, in other words, + bypassing the binlog undo log (translog). + They do not commit the current normal transaction. + A failure of a statement that uses non-transactional tables + would cause a rollback of the statement transaction, but + in case there no non-transactional tables are used, + no statement transaction is started. + + Data layout + ----------- + + The server stores its transaction-related data in + thd->transaction. This structure has two members of type + THD_TRANS. These members correspond to the statement and + normal transactions respectively: + + - thd->transaction.stmt contains a list of engines + that are participating in the given statement + - thd->transaction.all contains a list of engines that + have participated in any of the statement transactions started + within the context of the normal transaction. + Each element of the list contains a pointer to the storage + engine, engine-specific transactional data, and engine-specific + transaction flags. + + In autocommit mode thd->transaction.all is empty. + Instead, data of thd->transaction.stmt is + used to commit/rollback the normal transaction. + + The list of registered engines has a few important properties: + - no engine is registered in the list twice + - engines are present in the list a reverse temporal order -- + new participants are always added to the beginning of the list. + + Transaction life cycle + ---------------------- + + When a new connection is established, thd->transaction + members are initialized to an empty state. + If a statement uses any tables, all affected engines + are registered in the statement engine list. In + non-autocommit mode, the same engines are registered in + the normal transaction list. + At the end of the statement, the server issues a commit + or a roll back for all engines in the statement list. + At this point transaction flags of an engine, if any, are + propagated from the statement list to the list of the normal + transaction. + When commit/rollback is finished, the statement list is + cleared. It will be filled in again by the next statement, + and emptied again at the next statement's end. + + The normal transaction is committed in a similar way + (by going over all engines in thd->transaction.all list) + but at different times: + - upon COMMIT SQL statement is issued by the user + - implicitly, by the server, at the beginning of a DDL statement + or SET AUTOCOMMIT={0|1} statement. + + The normal transaction can be rolled back as well: + - if the user has requested so, by issuing ROLLBACK SQL + statement + - if one of the storage engines requested a rollback + by setting thd->transaction_rollback_request. This may + happen in case, e.g., when the transaction in the engine was + chosen a victim of the internal deadlock resolution algorithm + and rolled back internally. When such a situation happens, there + is little the server can do and the only option is to rollback + transactions in all other participating engines. In this case + the rollback is accompanied by an error sent to the user. + + As follows from the use cases above, the normal transaction + is never committed when there is an outstanding statement + transaction. In most cases there is no conflict, since + commits of the normal transaction are issued by a stand-alone + administrative or DDL statement, thus no outstanding statement + transaction of the previous statement exists. Besides, + all statements that manipulate with the normal transaction + are prohibited in stored functions and triggers, therefore + no conflicting situation can occur in a sub-statement either. + The remaining rare cases when the server explicitly has + to commit the statement transaction prior to committing the normal + one cover error-handling scenarios (see for example + SQLCOM_LOCK_TABLES). + + When committing a statement or a normal transaction, the server + either uses the two-phase commit protocol, or issues a commit + in each engine independently. The two-phase commit protocol + is used only if: + - all participating engines support two-phase commit (provide + handlerton::prepare PSEA API call) and + - transactions in at least two engines modify data (i.e. are + not read-only). + + Note that the two phase commit is used for + statement transactions, even though they are not durable anyway. + This is done to ensure logical consistency of data in a multiple- + engine transaction. + For example, imagine that some day MySQL supports unique + constraint checks deferred till the end of statement. In such + case a commit in one of the engines may yield ER_DUP_KEY, + and MySQL should be able to gracefully abort statement + transactions of other participants. + + After the normal transaction has been committed, + thd->transaction.all list is cleared. + + When a connection is closed, the current normal transaction, if + any, is rolled back. + + Roles and responsibilities + -------------------------- + + The server has no way to know that an engine participates in + the statement and a transaction has been started + in it unless the engine says so. Thus, in order to be + a part of a transaction, the engine must "register" itself. + This is done by invoking trans_register_ha() server call. + Normally the engine registers itself whenever handler::external_lock() + is called. trans_register_ha() can be invoked many times: if + an engine is already registered, the call does nothing. + In case autocommit is not set, the engine must register itself + twice -- both in the statement list and in the normal transaction + list. + In which list to register is a parameter of trans_register_ha(). + + Note, that although the registration interface in itself is + fairly clear, the current usage practice often leads to undesired + effects. E.g. since a call to trans_register_ha() in most engines + is embedded into implementation of handler::external_lock(), some + DDL statements start a transaction (at least from the server + point of view) even though they are not expected to. E.g. + CREATE TABLE does not start a transaction, since + handler::external_lock() is never called during CREATE TABLE. But + CREATE TABLE ... SELECT does, since handler::external_lock() is + called for the table that is being selected from. This has no + practical effects currently, but must be kept in mind + nevertheless. + + Once an engine is registered, the server will do the rest + of the work. + + During statement execution, whenever any of data-modifying + PSEA API methods is used, e.g. handler::write_row() or + handler::update_row(), the read-write flag is raised in the + statement transaction for the involved engine. + Currently All PSEA calls are "traced", and the data can not be + changed in a way other than issuing a PSEA call. Important: + unless this invariant is preserved the server will not know that + a transaction in a given engine is read-write and will not + involve the two-phase commit protocol! + + At the end of a statement, server call + ha_autocommit_or_rollback() is invoked. This call in turn + invokes handlerton::prepare() for every involved engine. + Prepare is followed by a call to handlerton::commit_one_phase() + If a one-phase commit will suffice, handlerton::prepare() is not + invoked and the server only calls handlerton::commit_one_phase(). + At statement commit, the statement-related read-write engine + flag is propagated to the corresponding flag in the normal + transaction. When the commit is complete, the list of registered + engines is cleared. + + Rollback is handled in a similar fashion. + + Additional notes on DDL and the normal transaction. + --------------------------------------------------- + + DDLs and operations with non-transactional engines + do not "register" in thd->transaction lists, and thus do not + modify the transaction state. Besides, each DDL in + MySQL is prefixed with an implicit normal transaction commit + (a call to end_active_trans()), and thus leaves nothing + to modify. + However, as it has been pointed out with CREATE TABLE .. SELECT, + some DDL statements can start a *new* transaction. + + Behaviour of the server in this case is currently badly + defined. + DDL statements use a form of "semantic" logging + to maintain atomicity: if CREATE TABLE .. SELECT failed, + the newly created table is deleted. + In addition, some DDL statements issue interim transaction + commits: e.g. ALTER TABLE issues a commit after data is copied + from the original table to the internal temporary table. Other + statements, e.g. CREATE TABLE ... SELECT do not always commit + after itself. + And finally there is a group of DDL statements such as + RENAME/DROP TABLE that doesn't start a new transaction + and doesn't commit. + + This diversity makes it hard to say what will happen if + by chance a stored function is invoked during a DDL -- + whether any modifications it makes will be committed or not + is not clear. Fortunately, SQL grammar of few DDLs allows + invocation of a stored function. + + A consistent behaviour is perhaps to always commit the normal + transaction after all DDLs, just like the statement transaction + is always committed at the end of all statements. +*/ + /** Register a storage engine for a transaction. @@ -592,7 +881,7 @@ void ha_close_connection(THD* thd) void trans_register_ha(THD *thd, bool all, handlerton *ht_arg) { THD_TRANS *trans; - handlerton **ht; + Ha_trx_info *ha_info; DBUG_ENTER("trans_register_ha"); DBUG_PRINT("enter",("%s", all ? "all" : "stmt")); @@ -604,12 +893,13 @@ void trans_register_ha(THD *thd, bool all, handlerton *ht_arg) else trans= &thd->transaction.stmt; - for (ht=trans->ht; *ht; ht++) - if (*ht == ht_arg) - DBUG_VOID_RETURN; /* already registered, return */ + ha_info= thd->ha_data[ht_arg->slot].ha_info + static_cast(all); + + if (ha_info->is_started()) + DBUG_VOID_RETURN; /* already registered, return */ + + ha_info->register_ha(trans, ht_arg); - trans->ht[trans->nht++]=ht_arg; - DBUG_ASSERT(*ht == ht_arg); trans->no_2pc|=(ht_arg->prepare==0); if (thd->transaction.xid_state.xid.is_null()) thd->transaction.xid_state.xid.set(thd->query_id); @@ -626,18 +916,19 @@ int ha_prepare(THD *thd) { int error=0, all=1; THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; - handlerton **ht=trans->ht; + Ha_trx_info *ha_info= trans->ha_list; DBUG_ENTER("ha_prepare"); #ifdef USING_TRANSACTIONS - if (trans->nht) + if (ha_info) { - for (; *ht; ht++) + for (; ha_info; ha_info= ha_info->next()) { int err; + handlerton *ht= ha_info->ht(); status_var_increment(thd->status_var.ha_prepare_count); - if ((*ht)->prepare) + if (ht->prepare) { - if ((err= (*(*ht)->prepare)(*ht, thd, all))) + if ((err= ht->prepare(ht, thd, all))) { my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); ha_rollback_trans(thd, all); @@ -649,7 +940,7 @@ int ha_prepare(THD *thd) { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_ILLEGAL_HA, ER(ER_ILLEGAL_HA), - ha_resolve_storage_engine_name(*ht)); + ha_resolve_storage_engine_name(ht)); } } } @@ -657,6 +948,62 @@ int ha_prepare(THD *thd) DBUG_RETURN(error); } +/** + Check if we can skip the two-phase commit. + + A helper function to evaluate if two-phase commit is mandatory. + As a side effect, propagates the read-only/read-write flags + of the statement transaction to its enclosing normal transaction. + + @retval TRUE we must run a two-phase commit. Returned + if we have at least two engines with read-write changes. + @retval FALSE Don't need two-phase commit. Even if we have two + transactional engines, we can run two independent + commits if changes in one of the engines are read-only. +*/ + +static +bool +ha_check_and_coalesce_trx_read_only(THD *thd, Ha_trx_info *ha_list, + bool all) +{ + /* The number of storage engines that have actual changes. */ + unsigned rw_ha_count= 0; + Ha_trx_info *ha_info; + + for (ha_info= ha_list; ha_info; ha_info= ha_info->next()) + { + if (ha_info->is_trx_read_write()) + ++rw_ha_count; + + if (! all) + { + Ha_trx_info *ha_info_all= &thd->ha_data[ha_info->ht()->slot].ha_info[1]; + DBUG_ASSERT(ha_info != ha_info_all); + /* + Merge read-only/read-write information about statement + transaction to its enclosing normal transaction. Do this + only if in a real transaction -- that is, if we know + that ha_info_all is registered in thd->transaction.all. + Since otherwise we only clutter the normal transaction flags. + */ + if (ha_info_all->is_started()) /* FALSE if autocommit. */ + ha_info_all->coalesce_trx_with(ha_info); + } + else if (rw_ha_count > 1) + { + /* + It is a normal transaction, so we don't need to merge read/write + information up, and the need for two-phase commit has been + already established. Break the loop prematurely. + */ + break; + } + } + return rw_ha_count > 1; +} + + /** @retval 0 ok @@ -674,12 +1021,25 @@ int ha_prepare(THD *thd) int ha_commit_trans(THD *thd, bool all) { int error= 0, cookie= 0; + /* + 'all' means that this is either an explicit commit issued by + user, or an implicit commit issued by a DDL. + */ THD_TRANS *trans= all ? &thd->transaction.all : &thd->transaction.stmt; - bool is_real_trans= all || thd->transaction.all.nht == 0; - handlerton **ht= trans->ht; + bool is_real_trans= all || thd->transaction.all.ha_list == 0; + Ha_trx_info *ha_info= trans->ha_list; my_xid xid= thd->transaction.xid_state.xid.get_my_xid(); DBUG_ENTER("ha_commit_trans"); + /* + We must not commit the normal transaction if a statement + transaction is pending. Otherwise statement transaction + flags will not get propagated to its normal transaction's + counterpart. + */ + DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL || + trans == &thd->transaction.stmt); + if (thd->in_sub_stmt) { /* @@ -701,8 +1061,10 @@ int ha_commit_trans(THD *thd, bool all) DBUG_RETURN(2); } #ifdef USING_TRANSACTIONS - if (trans->nht) + if (ha_info) { + bool must_2pc; + if (is_real_trans && wait_if_global_read_lock(thd, 0, 0)) { ha_rollback_trans(thd, all); @@ -727,12 +1089,26 @@ int ha_commit_trans(THD *thd, bool all) if (is_real_trans) /* not a statement commit */ thd->stmt_map.close_transient_cursors(); - if (!trans->no_2pc && trans->nht > 1) + must_2pc= ha_check_and_coalesce_trx_read_only(thd, ha_info, all); + + if (!trans->no_2pc && must_2pc) { - for (; *ht && !error; ht++) + for (; ha_info && !error; ha_info= ha_info->next()) { int err; - if ((err= (*(*ht)->prepare)(*ht, thd, all))) + handlerton *ht= ha_info->ht(); + /* + Do not call two-phase commit if this particular + transaction is read-only. This allows for simpler + implementation in engines that are always read-only. + */ + if (! ha_info->is_trx_read_write()) + continue; + /* + Sic: we know that prepare() is not NULL since otherwise + trans->no_2pc would have been set. + */ + if ((err= ht->prepare(ht, thd, all))) { my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); error= 1; @@ -770,24 +1146,26 @@ int ha_commit_one_phase(THD *thd, bool all) { int error=0; THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; - bool is_real_trans=all || thd->transaction.all.nht == 0; - handlerton **ht=trans->ht; + bool is_real_trans=all || thd->transaction.all.ha_list == 0; + Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; DBUG_ENTER("ha_commit_one_phase"); #ifdef USING_TRANSACTIONS - if (trans->nht) + if (ha_info) { - for (ht=trans->ht; *ht; ht++) + for (; ha_info; ha_info= ha_info_next) { int err; - if ((err= (*(*ht)->commit)(*ht, thd, all))) + handlerton *ht= ha_info->ht(); + if ((err= ht->commit(ht, thd, all))) { my_error(ER_ERROR_DURING_COMMIT, MYF(0), err); error=1; } status_var_increment(thd->status_var.ha_commit_count); - *ht= 0; + ha_info_next= ha_info->next(); + ha_info->reset(); /* keep it conveniently zero-filled */ } - trans->nht=0; + trans->ha_list= 0; trans->no_2pc=0; if (is_real_trans) thd->transaction.xid_state.xid.null(); @@ -810,8 +1188,17 @@ int ha_rollback_trans(THD *thd, bool all) { int error=0; THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt; - bool is_real_trans=all || thd->transaction.all.nht == 0; + Ha_trx_info *ha_info= trans->ha_list, *ha_info_next; + bool is_real_trans=all || thd->transaction.all.ha_list == 0; DBUG_ENTER("ha_rollback_trans"); + + /* + We must not rollback the normal transaction if a statement + transaction is pending. + */ + DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL || + trans == &thd->transaction.stmt); + if (thd->in_sub_stmt) { /* @@ -826,24 +1213,26 @@ int ha_rollback_trans(THD *thd, bool all) DBUG_RETURN(1); } #ifdef USING_TRANSACTIONS - if (trans->nht) + if (ha_info) { /* Close all cursors that can not survive ROLLBACK */ if (is_real_trans) /* not a statement commit */ thd->stmt_map.close_transient_cursors(); - for (handlerton **ht=trans->ht; *ht; ht++) + for (; ha_info; ha_info= ha_info_next) { int err; - if ((err= (*(*ht)->rollback)(*ht, thd, all))) + handlerton *ht= ha_info->ht(); + if ((err= ht->rollback(ht, thd, all))) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error=1; } status_var_increment(thd->status_var.ha_rollback_count); - *ht= 0; + ha_info_next= ha_info->next(); + ha_info->reset(); /* keep it conveniently zero-filled */ } - trans->nht=0; + trans->ha_list= 0; trans->no_2pc=0; if (is_real_trans) thd->transaction.xid_state.xid.null(); @@ -889,17 +1278,19 @@ int ha_autocommit_or_rollback(THD *thd, int error) { DBUG_ENTER("ha_autocommit_or_rollback"); #ifdef USING_TRANSACTIONS - if (thd->transaction.stmt.nht) + if (thd->transaction.stmt.ha_list) { if (!error) { - if (ha_commit_stmt(thd)) + if (ha_commit_trans(thd, 0)) error=1; } - else if (thd->transaction_rollback_request && !thd->in_sub_stmt) - (void) ha_rollback(thd); - else - (void) ha_rollback_stmt(thd); + else + { + (void) ha_rollback_trans(thd, 0); + if (thd->transaction_rollback_request && !thd->in_sub_stmt) + (void) ha_rollback(thd); + } thd->variables.tx_isolation=thd->session_tx_isolation; } @@ -1246,43 +1637,49 @@ int ha_rollback_to_savepoint(THD *thd, SAVEPOINT *sv) int error=0; THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : &thd->transaction.all); - handlerton **ht=trans->ht, **end_ht; + Ha_trx_info *ha_info, *ha_info_next; + DBUG_ENTER("ha_rollback_to_savepoint"); - trans->nht=sv->nht; trans->no_2pc=0; - end_ht=ht+sv->nht; /* rolling back to savepoint in all storage engines that were part of the transaction when the savepoint was set */ - for (; ht < end_ht; ht++) + for (ha_info= sv->ha_list; ha_info; ha_info= ha_info->next()) { int err; - DBUG_ASSERT((*ht)->savepoint_set != 0); - if ((err= (*(*ht)->savepoint_rollback)(*ht, thd, (uchar *)(sv+1)+(*ht)->savepoint_offset))) + handlerton *ht= ha_info->ht(); + DBUG_ASSERT(ht); + DBUG_ASSERT(ht->savepoint_set != 0); + if ((err= ht->savepoint_rollback(ht, thd, + (uchar *)(sv+1)+ht->savepoint_offset))) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error=1; } status_var_increment(thd->status_var.ha_savepoint_rollback_count); - trans->no_2pc|=(*ht)->prepare == 0; + trans->no_2pc|= ht->prepare == 0; } /* rolling back the transaction in all storage engines that were not part of the transaction when the savepoint was set */ - for (; *ht ; ht++) + for (ha_info= trans->ha_list; ha_info != sv->ha_list; + ha_info= ha_info_next) { int err; - if ((err= (*(*ht)->rollback)(*ht, thd, !thd->in_sub_stmt))) + handlerton *ht= ha_info->ht(); + if ((err= ht->rollback(ht, thd, !thd->in_sub_stmt))) { // cannot happen my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), err); error=1; } status_var_increment(thd->status_var.ha_rollback_count); - *ht=0; // keep it conveniently zero-filled + ha_info_next= ha_info->next(); + ha_info->reset(); /* keep it conveniently zero-filled */ } + trans->ha_list= sv->ha_list; DBUG_RETURN(error); } @@ -1297,26 +1694,32 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv) int error=0; THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : &thd->transaction.all); - handlerton **ht=trans->ht; + Ha_trx_info *ha_info= trans->ha_list; DBUG_ENTER("ha_savepoint"); #ifdef USING_TRANSACTIONS - for (; *ht; ht++) + for (; ha_info; ha_info= ha_info->next()) { int err; - if (! (*ht)->savepoint_set) + handlerton *ht= ha_info->ht(); + DBUG_ASSERT(ht); + if (! ht->savepoint_set) { my_error(ER_CHECK_NOT_IMPLEMENTED, MYF(0), "SAVEPOINT"); error=1; break; } - if ((err= (*(*ht)->savepoint_set)(*ht, thd, (uchar *)(sv+1)+(*ht)->savepoint_offset))) + if ((err= ht->savepoint_set(ht, thd, (uchar *)(sv+1)+ht->savepoint_offset))) { // cannot happen my_error(ER_GET_ERRNO, MYF(0), err); error=1; } status_var_increment(thd->status_var.ha_savepoint_count); } - sv->nht=trans->nht; + /* + Remember the list of registered storage engines. All new + engines are prepended to the beginning of the list. + */ + sv->ha_list= trans->ha_list; #endif /* USING_TRANSACTIONS */ DBUG_RETURN(error); } @@ -1324,20 +1727,19 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv) int ha_release_savepoint(THD *thd, SAVEPOINT *sv) { int error=0; - THD_TRANS *trans= (thd->in_sub_stmt ? &thd->transaction.stmt : - &thd->transaction.all); - handlerton **ht=trans->ht, **end_ht; + Ha_trx_info *ha_info= sv->ha_list; DBUG_ENTER("ha_release_savepoint"); - end_ht=ht+sv->nht; - for (; ht < end_ht; ht++) + for (; ha_info; ha_info= ha_info->next()) { int err; - if (!(*ht)->savepoint_release) + handlerton *ht= ha_info->ht(); + /* Savepoint life time is enclosed into transaction life time. */ + DBUG_ASSERT(ht); + if (!ht->savepoint_release) continue; - if ((err= (*(*ht)->savepoint_release)(*ht, thd, - (uchar *)(sv+1)+ - (*ht)->savepoint_offset))) + if ((err= ht->savepoint_release(ht, thd, + (uchar *)(sv+1) + ht->savepoint_offset))) { // cannot happen my_error(ER_GET_ERRNO, MYF(0), err); error=1; @@ -2506,6 +2908,36 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt) return update_frm_version(table); } +/** + A helper function to mark a transaction read-write, + if it is started. +*/ + +inline +void +handler::mark_trx_read_write() +{ + Ha_trx_info *ha_info= &ha_thd()->ha_data[ht->slot].ha_info[0]; + /* + When a storage engine method is called, the transaction must + have been started, unless it's a DDL call, for which the + storage engine starts the transaction internally, and commits + it internally, without registering in the ha_list. + Unfortunately here we can't know know for sure if the engine + has registered the transaction or not, so we must check. + */ + if (ha_info->is_started()) + { + DBUG_ASSERT(has_transactions()); + /* + table_share can be NULL in ha_delete_table(). See implementation + of standalone function ha_delete_table() in sql_base.cc. + */ + if (table_share == NULL || table_share->tmp_table == NO_TMP_TABLE) + ha_info->set_trx_read_write(); + } +} + /** Repair table: public interface. @@ -2516,6 +2948,9 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt) int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt) { int result; + + mark_trx_read_write(); + if ((result= repair(thd, check_opt))) return result; return update_frm_version(table); @@ -2532,6 +2967,8 @@ int handler::ha_bulk_update_row(const uchar *old_data, uchar *new_data, uint *dup_key_found) { + mark_trx_read_write(); + return bulk_update_row(old_data, new_data, dup_key_found); } @@ -2545,6 +2982,8 @@ handler::ha_bulk_update_row(const uchar *old_data, uchar *new_data, int handler::ha_delete_all_rows() { + mark_trx_read_write(); + return delete_all_rows(); } @@ -2558,6 +2997,8 @@ handler::ha_delete_all_rows() int handler::ha_reset_auto_increment(ulonglong value) { + mark_trx_read_write(); + return reset_auto_increment(value); } @@ -2571,6 +3012,8 @@ handler::ha_reset_auto_increment(ulonglong value) int handler::ha_backup(THD* thd, HA_CHECK_OPT* check_opt) { + mark_trx_read_write(); + return backup(thd, check_opt); } @@ -2584,6 +3027,8 @@ handler::ha_backup(THD* thd, HA_CHECK_OPT* check_opt) int handler::ha_restore(THD* thd, HA_CHECK_OPT* check_opt) { + mark_trx_read_write(); + return restore(thd, check_opt); } @@ -2597,6 +3042,8 @@ handler::ha_restore(THD* thd, HA_CHECK_OPT* check_opt) int handler::ha_optimize(THD* thd, HA_CHECK_OPT* check_opt) { + mark_trx_read_write(); + return optimize(thd, check_opt); } @@ -2610,6 +3057,8 @@ handler::ha_optimize(THD* thd, HA_CHECK_OPT* check_opt) int handler::ha_analyze(THD* thd, HA_CHECK_OPT* check_opt) { + mark_trx_read_write(); + return analyze(thd, check_opt); } @@ -2623,6 +3072,8 @@ handler::ha_analyze(THD* thd, HA_CHECK_OPT* check_opt) bool handler::ha_check_and_repair(THD *thd) { + mark_trx_read_write(); + return check_and_repair(thd); } @@ -2636,6 +3087,8 @@ handler::ha_check_and_repair(THD *thd) int handler::ha_disable_indexes(uint mode) { + mark_trx_read_write(); + return disable_indexes(mode); } @@ -2649,6 +3102,8 @@ handler::ha_disable_indexes(uint mode) int handler::ha_enable_indexes(uint mode) { + mark_trx_read_write(); + return enable_indexes(mode); } @@ -2662,6 +3117,8 @@ handler::ha_enable_indexes(uint mode) int handler::ha_discard_or_import_tablespace(my_bool discard) { + mark_trx_read_write(); + return discard_or_import_tablespace(discard); } @@ -2677,6 +3134,8 @@ handler::ha_discard_or_import_tablespace(my_bool discard) void handler::ha_prepare_for_alter() { + mark_trx_read_write(); + prepare_for_alter(); } @@ -2690,6 +3149,8 @@ handler::ha_prepare_for_alter() int handler::ha_rename_table(const char *from, const char *to) { + mark_trx_read_write(); + return rename_table(from, to); } @@ -2703,6 +3164,8 @@ handler::ha_rename_table(const char *from, const char *to) int handler::ha_delete_table(const char *name) { + mark_trx_read_write(); + return delete_table(name); } @@ -2716,6 +3179,8 @@ handler::ha_delete_table(const char *name) void handler::ha_drop_table(const char *name) { + mark_trx_read_write(); + return drop_table(name); } @@ -2729,6 +3194,8 @@ handler::ha_drop_table(const char *name) int handler::ha_create(const char *name, TABLE *form, HA_CREATE_INFO *info) { + mark_trx_read_write(); + return create(name, form, info); } @@ -2743,6 +3210,8 @@ int handler::ha_create_handler_files(const char *name, const char *old_name, int action_flag, HA_CREATE_INFO *info) { + mark_trx_read_write(); + return create_handler_files(name, old_name, action_flag, info); } @@ -2761,6 +3230,8 @@ handler::ha_change_partitions(HA_CREATE_INFO *create_info, const uchar *pack_frm_data, size_t pack_frm_len) { + mark_trx_read_write(); + return change_partitions(create_info, path, copied, deleted, pack_frm_data, pack_frm_len); } @@ -2775,6 +3246,8 @@ handler::ha_change_partitions(HA_CREATE_INFO *create_info, int handler::ha_drop_partitions(const char *path) { + mark_trx_read_write(); + return drop_partitions(path); } @@ -2788,6 +3261,8 @@ handler::ha_drop_partitions(const char *path) int handler::ha_rename_partitions(const char *path) { + mark_trx_read_write(); + return rename_partitions(path); } @@ -2801,6 +3276,8 @@ handler::ha_rename_partitions(const char *path) int handler::ha_optimize_partitions(THD *thd) { + mark_trx_read_write(); + return optimize_partitions(thd); } @@ -2814,6 +3291,8 @@ handler::ha_optimize_partitions(THD *thd) int handler::ha_analyze_partitions(THD *thd) { + mark_trx_read_write(); + return analyze_partitions(thd); } @@ -2827,6 +3306,8 @@ handler::ha_analyze_partitions(THD *thd) int handler::ha_check_partitions(THD *thd) { + mark_trx_read_write(); + return check_partitions(thd); } @@ -2840,6 +3321,8 @@ handler::ha_check_partitions(THD *thd) int handler::ha_repair_partitions(THD *thd) { + mark_trx_read_write(); + return repair_partitions(thd); } @@ -2866,7 +3349,7 @@ int ha_enable_transaction(THD *thd, bool on) is an optimization hint that storage engine is free to ignore. So, let's commit an open transaction (if any) now. */ - if (!(error= ha_commit_stmt(thd))) + if (!(error= ha_commit_trans(thd, 0))) error= end_trans(thd, COMMIT); } DBUG_RETURN(error); @@ -4042,6 +4525,9 @@ int handler::ha_write_row(uchar *buf) { int error; DBUG_ENTER("handler::ha_write_row"); + + mark_trx_read_write(); + if (unlikely(error= write_row(buf))) DBUG_RETURN(error); if (unlikely(error= binlog_log_row(table, 0, buf))) @@ -4060,6 +4546,8 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) */ DBUG_ASSERT(new_data == table->record[0]); + mark_trx_read_write(); + if (unlikely(error= update_row(old_data, new_data))) return error; if (unlikely(error= binlog_log_row(table, old_data, new_data))) @@ -4070,6 +4558,9 @@ int handler::ha_update_row(const uchar *old_data, uchar *new_data) int handler::ha_delete_row(const uchar *buf) { int error; + + mark_trx_read_write(); + if (unlikely(error= delete_row(buf))) return error; if (unlikely(error= binlog_log_row(table, buf, 0))) diff --git a/sql/handler.h b/sql/handler.h index b3a4b408589..9800f4974c3 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -721,14 +721,14 @@ struct handlerton #define HTON_SUPPORT_LOG_TABLES (1 << 7) //Engine supports log tables #define HTON_NO_PARTITION (1 << 8) //You can not partition these tables -typedef struct st_thd_trans +class Ha_trx_info; + +struct THD_TRANS { - /* number of entries in the ht[] */ - uint nht; /* true is not all entries in the ht[] support 2pc */ bool no_2pc; - /* storage engines that registered themselves for this transaction */ - handlerton *ht[MAX_HA]; + /* storage engines that registered in this transaction */ + Ha_trx_info *ha_list; /* The purpose of this flag is to keep track of non-transactional tables that were modified in scope of: @@ -758,7 +758,106 @@ typedef struct st_thd_trans saved value. */ bool modified_non_trans_table; -} THD_TRANS; + + void reset() { no_2pc= FALSE; modified_non_trans_table= FALSE; } +}; + + +/** + Either statement transaction or normal transaction - related + thread-specific storage engine data. + + If a storage engine participates in a statement/transaction, + an instance of this class is present in + thd->transaction.{stmt|all}.ha_list. The addition to + {stmt|all}.ha_list is made by trans_register_ha(). + + When it's time to commit or rollback, each element of ha_list + is used to access storage engine's prepare()/commit()/rollback() + methods, and also to evaluate if a full two phase commit is + necessary. + + @sa General description of transaction handling in handler.cc. +*/ + +class Ha_trx_info +{ +public: + /** Register this storage engine in the given transaction context. */ + void register_ha(THD_TRANS *trans, handlerton *ht_arg) + { + DBUG_ASSERT(m_flags == 0); + DBUG_ASSERT(m_ht == NULL); + DBUG_ASSERT(m_next == NULL); + + m_ht= ht_arg; + m_flags= (int) TRX_READ_ONLY; /* Assume read-only at start. */ + + m_next= trans->ha_list; + trans->ha_list= this; + } + + /** Clear, prepare for reuse. */ + void reset() + { + m_next= NULL; + m_ht= NULL; + m_flags= 0; + } + + Ha_trx_info() { reset(); } + + void set_trx_read_write() + { + DBUG_ASSERT(is_started()); + m_flags|= (int) TRX_READ_WRITE; + } + bool is_trx_read_write() const + { + DBUG_ASSERT(is_started()); + return m_flags & (int) TRX_READ_WRITE; + } + bool is_started() const { return m_ht != NULL; } + /** Mark this transaction read-write if the argument is read-write. */ + void coalesce_trx_with(const Ha_trx_info *stmt_trx) + { + /* + Must be called only after the transaction has been started. + Can be called many times, e.g. when we have many + read-write statements in a transaction. + */ + DBUG_ASSERT(is_started()); + if (stmt_trx->is_trx_read_write()) + set_trx_read_write(); + } + Ha_trx_info *next() const + { + DBUG_ASSERT(is_started()); + return m_next; + } + handlerton *ht() const + { + DBUG_ASSERT(is_started()); + return m_ht; + } +private: + enum { TRX_READ_ONLY= 0, TRX_READ_WRITE= 1 }; + /** Auxiliary, used for ha_list management */ + Ha_trx_info *m_next; + /** + Although a given Ha_trx_info instance is currently always used + for the same storage engine, 'ht' is not-NULL only when the + corresponding storage is a part of a transaction. + */ + handlerton *m_ht; + /** + Transaction flags related to this engine. + Not-null only if this instance is a part of transaction. + May assume a combination of enum values above. + */ + uchar m_flags; +}; + enum enum_tx_isolation { ISO_READ_UNCOMMITTED, ISO_READ_COMMITTED, ISO_REPEATABLE_READ, ISO_SERIALIZABLE}; @@ -1640,7 +1739,14 @@ protected: provide useful functionality. */ virtual int rename_table(const char *from, const char *to); + /** + Delete a table in the engine. Called for base as well as temporary + tables. + */ virtual int delete_table(const char *name); +private: + /* Private helpers */ + inline void mark_trx_read_write(); private: /* Low-level primitives for storage engines. These should be @@ -1821,9 +1927,7 @@ extern TYPELIB tx_isolation_typelib; extern TYPELIB myisam_stats_method_typelib; extern ulong total_ha, total_ha_2pc; - /* Wrapper functions */ -#define ha_commit_stmt(thd) (ha_commit_trans((thd), FALSE)) -#define ha_rollback_stmt(thd) (ha_rollback_trans((thd), FALSE)) + /* Wrapper functions */ #define ha_commit(thd) (ha_commit_trans((thd), TRUE)) #define ha_rollback(thd) (ha_rollback_trans((thd), TRUE)) diff --git a/sql/log.cc b/sql/log.cc index 3a09acd8fca..af9359ed6cc 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3332,6 +3332,16 @@ THD::binlog_start_trans_and_stmt() if (options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) trans_register_ha(this, TRUE, binlog_hton); trans_register_ha(this, FALSE, binlog_hton); + /* + Mark statement transaction as read/write. We never start + a binary log transaction and keep it read-only, + therefore it's best to mark the transaction read/write just + at the same time we start it. + Not necessary to mark the normal transaction read/write + since the statement-level flag will be propagated automatically + inside ha_commit_trans. + */ + ha_data[binlog_hton->slot].ha_info[0].set_trx_read_write(); } DBUG_VOID_RETURN; } diff --git a/sql/log_event.cc b/sql/log_event.cc index cf03dd5bf44..0d5aefd4422 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2898,7 +2898,7 @@ int Format_description_log_event::do_apply_event(Relay_log_info const *rli) original place when it comes to us; we'll know this by checking log_pos ("artificial" events have log_pos == 0). */ - if (!artificial_event && created && thd->transaction.all.nht) + if (!artificial_event && created && thd->transaction.all.ha_list) { /* This is not an error (XA is safe), just an information */ rli->report(INFORMATION_LEVEL, 0, diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc index aa3020c42be..684655d1c3b 100644 --- a/sql/rpl_injector.cc +++ b/sql/rpl_injector.cc @@ -62,6 +62,26 @@ int injector::transaction::commit() { DBUG_ENTER("injector::transaction::commit()"); m_thd->binlog_flush_pending_rows_event(true); + /* + Cluster replication does not preserve statement or + transaction boundaries of the master. Instead, a new + transaction on replication slave is started when a new GCI + (global checkpoint identifier) is issued, and is committed + when the last event of the check point has been received and + processed. This ensures consistency of each cluster in + cluster replication, and there is no requirement for stronger + consistency: MySQL replication is asynchronous with other + engines as well. + + A practical consequence of that is that row level replication + stream passed through the injector thread never contains + COMMIT events. + Here we should preserve the server invariant that there is no + outstanding statement transaction when the normal transaction + is committed by committing the statement transaction + explicitly. + */ + ha_autocommit_or_rollback(m_thd, 0); end_trans(m_thd, COMMIT); DBUG_RETURN(0); } diff --git a/sql/sp.cc b/sql/sp.cc index 99ffc18deea..ae738cd0a71 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -665,8 +665,16 @@ sp_returns_type(THD *thd, String &result, sp_head *sp) (TYPE_ENUM_PROCEDURE or TYPE_ENUM_FUNCTION). @param sp Stored routine object to store. - @return Error code. SP_OK is returned on success. Other SP_ constants are - used to indicate about errors. + @note Opens and closes the thread tables. Therefore assumes + that there are no locked tables in this thread at the time of + invocation. + Unlike some other DDL statements, *does* close the tables + in the end, since the call to this function is normally + followed by an implicit grant (sp_grant_privileges()) + and this subsequent call opens and closes mysql.procs_priv. + + @return Error code. SP_OK is returned on success. Other + SP_ constants are used to indicate about errors. */ int @@ -1223,7 +1231,13 @@ done: } -/* Drop all routines in database 'db' */ +/** + Drop all routines in database 'db' + + @note Close the thread tables, the calling code might want to + delete from other system tables afterwards. +*/ + int sp_drop_db_routines(THD *thd, char *db) { diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 8e6f5a96640..1d443b70737 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2700,6 +2700,7 @@ sp_lex_keeper::reset_lex_and_exec_core(THD *thd, uint *nextp, m_lex->unit.cleanup(); thd_proc_info(thd, "closing tables"); + /* Here we also commit or rollback the current statement. */ close_thread_tables(thd); thd_proc_info(thd, 0); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index e5a5b51fcf6..4a417dc05b1 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1324,29 +1324,45 @@ void close_thread_tables(THD *thd) Mark all temporary tables used by this statement as free for reuse. */ mark_temp_tables_as_free_for_reuse(thd); + /* + Let us commit transaction for statement. Since in 5.0 we only have + one statement transaction and don't allow several nested statement + transactions this call will do nothing if we are inside of stored + function or trigger (i.e. statement transaction is already active and + does not belong to statement for which we do close_thread_tables()). + TODO: This should be fixed in later releases. + */ + if (!(thd->state_flags & Open_tables_state::BACKUPS_AVAIL)) + { + thd->main_da.can_overwrite_status= TRUE; + ha_autocommit_or_rollback(thd, thd->is_error()); + thd->main_da.can_overwrite_status= FALSE; + + /* + Reset transaction state, but only if we're not inside a + sub-statement of a prelocked statement. + */ + if (! prelocked_mode || thd->lex->requires_prelocking()) + thd->transaction.stmt.reset(); + } if (thd->locked_tables || prelocked_mode) { - /* - Let us commit transaction for statement. Since in 5.0 we only have - one statement transaction and don't allow several nested statement - transactions this call will do nothing if we are inside of stored - function or trigger (i.e. statement transaction is already active and - does not belong to statement for which we do close_thread_tables()). - TODO: This should be fixed in later releases. - */ - ha_commit_stmt(thd); /* Ensure we are calling ha_reset() for all used tables */ mark_used_tables_as_free_for_reuse(thd, thd->open_tables); - /* We are under simple LOCK TABLES so should not do anything else. */ + /* + We are under simple LOCK TABLES or we're inside a sub-statement + of a prelocked statement, so should not do anything else. + */ if (!prelocked_mode || !thd->lex->requires_prelocking()) DBUG_VOID_RETURN; /* - We are in prelocked mode, so we have to leave it now with doing - implicit UNLOCK TABLES if need. + We are in the top-level statement of a prelocked statement, + so we have to leave the prelocked mode now with doing implicit + UNLOCK TABLES if needed. */ DBUG_PRINT("info",("thd->prelocked_mode= NON_PRELOCKED")); thd->prelocked_mode= NON_PRELOCKED; @@ -1374,19 +1390,6 @@ void close_thread_tables(THD *thd) mysql_unlock_tables(thd, thd->lock); thd->lock=0; } - /* - assume handlers auto-commit (if some doesn't - transaction handling - in MySQL should be redesigned to support it; it's a big change, - and it's not worth it - better to commit explicitly only writing - transactions, read-only ones should better take care of themselves. - saves some work in 2pc too) - see also sql_parse.cc - dispatch_command() - */ - if (!(thd->state_flags & Open_tables_state::BACKUPS_AVAIL)) - bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt)); - if (!thd->active_transaction()) - thd->transaction.xid_state.xid.null(); - /* Note that we need to hold LOCK_open while changing the open_tables list. Another thread may work on it. @@ -5059,10 +5062,7 @@ int decide_logging_format(THD *thd, TABLE_LIST *tables) DBUG_PRINT("info", ("error: %d", error)); if (error) - { - ha_rollback_stmt(thd); return -1; - } /* We switch to row-based format if we are in mixed mode and one of @@ -5216,7 +5216,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen) table->table->query_id= thd->query_id; if (check_lock_and_start_stmt(thd, table->table, table->lock_type)) { - ha_rollback_stmt(thd); mysql_unlock_tables(thd, thd->locked_tables); thd->locked_tables= 0; thd->options&= ~(OPTION_TABLE_LOCK); @@ -5251,7 +5250,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen) if (!table->placeholder() && check_lock_and_start_stmt(thd, table->table, table->lock_type)) { - ha_rollback_stmt(thd); DBUG_RETURN(-1); } } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 75376c53f68..2781eec4eaf 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -264,7 +264,7 @@ const char *set_thd_proc_info(THD *thd, const char *info, extern "C" void **thd_ha_data(const THD *thd, const struct handlerton *hton) { - return (void **) thd->ha_data + hton->slot; + return (void **) &thd->ha_data[hton->slot].ha_ptr; } extern "C" @@ -2513,7 +2513,7 @@ bool select_dumpvar::send_data(List &items) suv->update(); } } - DBUG_RETURN(0); + DBUG_RETURN(thd->is_error()); } bool select_dumpvar::send_eof() diff --git a/sql/sql_class.h b/sql/sql_class.h index e8f28b19213..2a9941f78d0 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -686,7 +686,8 @@ private: struct st_savepoint { struct st_savepoint *prev; char *name; - uint length, nht; + uint length; + Ha_trx_info *ha_list; }; enum xa_states {XA_NOTR=0, XA_ACTIVE, XA_IDLE, XA_PREPARED}; @@ -1092,6 +1093,33 @@ private: }; +/** + Storage engine specific thread local data. +*/ + +struct Ha_data +{ + /** + Storage engine specific thread local data. + Lifetime: one user connection. + */ + void *ha_ptr; + /** + 0: Life time: one statement within a transaction. If @@autocommit is + on, also represents the entire transaction. + @sa trans_register_ha() + + 1: Life time: one transaction within a connection. + If the storage engine does not participate in a transaction, + this should not be used. + @sa trans_register_ha() + */ + Ha_trx_info ha_info[2]; + + Ha_data() :ha_ptr(NULL) {} +}; + + /** @class THD For each client connection we create a separate thread with THD serving as @@ -1231,7 +1259,7 @@ public: uint in_sub_stmt; /* container for handler's private per-connection data */ - void *ha_data[MAX_HA]; + Ha_data ha_data[MAX_HA]; #ifndef MYSQL_CLIENT int binlog_setup_trx_data(); diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 2301b561797..6f2bac73dc4 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -322,9 +322,10 @@ Sensitive_cursor::post_open(THD *thd) close_at_commit= FALSE; /* reset in case we're reusing the cursor */ info= &ht_info[0]; - for (handlerton **pht= thd->transaction.stmt.ht; *pht; pht++) + for (Ha_trx_info *ha_trx_info= thd->transaction.stmt.ha_list; + ha_trx_info; ha_trx_info= ha_trx_info->next()) { - handlerton *ht= *pht; + handlerton *ht= ha_trx_info->ht(); close_at_commit|= test(ht->flags & HTON_CLOSE_CURSORS_AT_COMMIT); if (ht->create_cursor_read_view) { diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index c6435387f44..234ee35ecca 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -24,6 +24,14 @@ #include "sp_head.h" #include "sql_trigger.h" +/** + Implement DELETE SQL word. + + @note Like implementations of other DDL/DML in MySQL, this function + relies on the caller to close the thread tables. This is done in the + end of dispatch_command(). +*/ + bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows limit, ulonglong options, bool reset_auto_increment) @@ -380,17 +388,6 @@ cleanup: } DBUG_ASSERT(transactional_table || !deleted || thd->transaction.stmt.modified_non_trans_table); free_underlaid_joins(thd, select_lex); - if (transactional_table) - { - if (ha_autocommit_or_rollback(thd,error >= 0)) - error=1; - } - - if (thd->lock) - { - mysql_unlock_tables(thd, thd->lock); - thd->lock=0; - } if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error)) { thd->row_count_func= deleted; @@ -751,11 +748,9 @@ void multi_delete::abort() The same if all tables are transactional, regardless of where we are. In all other cases do attempt deletes ... */ - if ((table_being_deleted == delete_tables && - table_being_deleted->table->file->has_transactions()) || - !normal_tables) - ha_rollback_stmt(thd); - else if (do_delete) + if (do_delete && normal_tables && + (table_being_deleted != delete_tables || + !table_being_deleted->table->file->has_transactions())) { /* We have to execute the recorded do_deletes() and write info into the @@ -921,11 +916,6 @@ bool multi_delete::send_eof() if (local_error != 0) error_handled= TRUE; // to force early leave from ::send_error() - /* Commit or rollback the current SQL statement */ - if (transactional_tables) - if (ha_autocommit_or_rollback(thd,local_error > 0)) - local_error=1; - if (!local_error) { thd->row_count_func= deleted; @@ -1055,6 +1045,12 @@ trunc_by_del: error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0, HA_POS_ERROR, LL(0), TRUE); ha_enable_transaction(thd, TRUE); + /* + Safety, in case the engine ignored ha_enable_transaction(FALSE) + above. Also clears thd->transaction.*. + */ + error= ha_autocommit_or_rollback(thd, error); + ha_commit(thd); thd->options= save_options; thd->current_stmt_binlog_row_based= save_binlog_row_based; DBUG_RETURN(error); diff --git a/sql/sql_do.cc b/sql/sql_do.cc index a3eb93f87da..af9fa9444e8 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -28,7 +28,17 @@ bool mysql_do(THD *thd, List &values) while ((value = li++)) value->val_int(); free_underlaid_joins(thd, &thd->lex->select_lex); - thd->clear_error(); // DO always is OK + + if (thd->is_error()) + { + /* + Rollback the effect of the statement, since next instruction + will clear the error and the rollback in the end of + dispatch_command() won't work. + */ + ha_autocommit_or_rollback(thd, thd->is_error()); + thd->clear_error(); // DO always is OK + } send_ok(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c2b1990f6c7..b03e786d1a1 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -541,6 +541,10 @@ bool open_and_lock_for_insert_delayed(THD *thd, TABLE_LIST *table_list) /** INSERT statement implementation + + @note Like implementations of other DDL/DML in MySQL, this function + relies on the caller to close the thread tables. This is done in the + end of dispatch_command(). */ bool mysql_insert(THD *thd,TABLE_LIST *table_list, @@ -893,12 +897,9 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, } DBUG_ASSERT(transactional_table || !changed || thd->transaction.stmt.modified_non_trans_table); - if (transactional_table) - error=ha_autocommit_or_rollback(thd,error); - + if (thd->lock) { - mysql_unlock_tables(thd, thd->lock); /* Invalidate the table in the query cache if something changed after unlocking when changes become fisible. @@ -909,7 +910,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, { query_cache_invalidate3(thd, table_list, 1); } - thd->lock=0; } } thd_proc_info(thd, "end"); @@ -2445,7 +2445,7 @@ err: first call to ha_*_row() instead. Remove code that are used to cover for the case outlined above. */ - ha_rollback_stmt(thd); + ha_autocommit_or_rollback(thd, 1); #ifndef __WIN__ end: @@ -3139,18 +3139,6 @@ bool select_insert::send_eof() thd->query, thd->query_length, trans_table, FALSE, killed_status); } - /* - We will call ha_autocommit_or_rollback() also for - non-transactional tables under row-based replication: there might - be events in the binary logs transaction, and we need to write - them to the binary log. - */ - if (trans_table || thd->current_stmt_binlog_row_based) - { - int error2= ha_autocommit_or_rollback(thd, error); - if (error2 && !error) - error= error2; - } table->file->ha_release_auto_increment(); if (error) @@ -3228,7 +3216,6 @@ void select_insert::abort() { table->file->ha_release_auto_increment(); } - ha_rollback_stmt(thd); DBUG_VOID_RETURN; } @@ -3667,7 +3654,10 @@ bool select_create::send_eof() nevertheless. */ if (!table->s->tmp_table) - ha_commit(thd); // Can fail, but we proceed anyway + { + ha_autocommit_or_rollback(thd, 0); + end_active_trans(thd); + } table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE); @@ -3691,12 +3681,9 @@ void select_create::abort() by removing the table, even for non-transactional tables. */ tmp_disable_binlog(thd); - select_insert::abort(); - reenable_binlog(thd); - /* - We roll back the statement, including truncating the transaction - cache of the binary log, if the statement failed. + In select_insert::abort() we roll back the statement, including + truncating the transaction cache of the binary log. We roll back the statement prior to deleting the table and prior to releasing the lock on the table, since there might be potential @@ -3707,8 +3694,9 @@ void select_create::abort() of the table succeeded or not, since we need to reset the binary log state. */ - if (thd->current_stmt_binlog_row_based) - ha_rollback_stmt(thd); + select_insert::abort(); + reenable_binlog(thd); + if (m_plock) { diff --git a/sql/sql_load.cc b/sql/sql_load.cc index c96fbb80b0c..d50f6c19a33 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -470,9 +470,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } } #endif /*!EMBEDDED_LIBRARY*/ - if (transactional_table) - ha_autocommit_or_rollback(thd,error); - error= -1; // Error on read goto err; } @@ -510,8 +507,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, } } #endif /*!EMBEDDED_LIBRARY*/ - if (transactional_table) - error=ha_autocommit_or_rollback(thd,error); /* ok to client sent only after binlog write and engine commit */ send_ok(thd, info.copied + info.deleted, 0L, name); @@ -519,11 +514,6 @@ err: DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) || thd->transaction.stmt.modified_non_trans_table); table->file->ha_release_auto_increment(); - if (thd->lock) - { - mysql_unlock_tables(thd, thd->lock); - thd->lock=0; - } table->auto_increment_field_not_null= FALSE; thd->abort_on_warning= 0; DBUG_RETURN(error); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 221c156fe6b..9b69dd60c45 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1465,21 +1465,13 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; } - thd_proc_info(thd, "closing tables"); - /* Free tables */ - close_thread_tables(thd); + /* If commit fails, we should be able to reset the OK status. */ + thd->main_da.can_overwrite_status= TRUE; + ha_autocommit_or_rollback(thd, thd->is_error()); + thd->main_da.can_overwrite_status= FALSE; + + thd->transaction.stmt.reset(); - /* - assume handlers auto-commit (if some doesn't - transaction handling - in MySQL should be redesigned to support it; it's a big change, - and it's not worth it - better to commit explicitly only writing - transactions, read-only ones should better take care of themselves. - saves some work in 2pc too) - see also sql_base.cc - close_thread_tables() - */ - bzero(&thd->transaction.stmt, sizeof(thd->transaction.stmt)); - if (!thd->active_transaction()) - thd->transaction.xid_state.xid.null(); /* report error issued during command execution */ if (thd->killed_errno()) @@ -1496,6 +1488,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd, net_end_statement(thd); query_cache_end_of_result(thd); + thd->proc_info= "closing tables"; + /* Free tables */ + close_thread_tables(thd); + log_slow_statement(thd); thd_proc_info(thd, "cleaning up"); @@ -3011,10 +3007,8 @@ end_with_restore_list: /* INSERT ... SELECT should invalidate only the very first table */ TABLE_LIST *save_table= first_table->next_local; first_table->next_local= 0; - mysql_unlock_tables(thd, thd->lock); query_cache_invalidate3(thd, first_table, 1); first_table->next_local= save_table; - thd->lock=0; } delete sel_result; } @@ -3985,7 +3979,6 @@ end_with_restore_list: push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_PROC_AUTO_GRANT_FAIL, ER(ER_PROC_AUTO_GRANT_FAIL)); - close_thread_tables(thd); } #endif break; diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index eabf4526f7b..cf0aeee938b 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3968,31 +3968,35 @@ static int fast_end_partition(THD *thd, ulonglong copied, bool written_bin_log) { int error; + char tmp_name[80]; DBUG_ENTER("fast_end_partition"); thd->proc_info="end"; + if (!is_empty) query_cache_invalidate3(thd, table_list, 0); - error= ha_commit_stmt(thd); - if (ha_commit(thd)) + + error= ha_autocommit_or_rollback(thd, 0); + if (end_active_trans(thd)) error= 1; - if (!error || is_empty) + + if (error) { - char tmp_name[80]; - if ((!is_empty) && (!written_bin_log) && - (!thd->lex->no_write_to_binlog)) - write_bin_log(thd, FALSE, thd->query, thd->query_length); - close_thread_tables(thd); - my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO), - (ulong) (copied + deleted), - (ulong) deleted, - (ulong) 0); - send_ok(thd, (ha_rows) (copied+deleted),0L,tmp_name); - DBUG_RETURN(FALSE); + /* If error during commit, no need to rollback, it's done. */ + table->file->print_error(error, MYF(0)); + DBUG_RETURN(TRUE); } - table->file->print_error(error, MYF(0)); - close_thread_tables(thd); - DBUG_RETURN(TRUE); + + if ((!is_empty) && (!written_bin_log) && + (!thd->lex->no_write_to_binlog)) + write_bin_log(thd, FALSE, thd->query, thd->query_length); + + my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO), + (ulong) (copied + deleted), + (ulong) deleted, + (ulong) 0); + send_ok(thd, (ha_rows) (copied+deleted),0L, tmp_name); + DBUG_RETURN(FALSE); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 505bcd1b421..61f8ff342b1 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4131,6 +4131,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, switch ((*prepare_func)(thd, table, check_opt)) { case 1: // error, message written to net ha_autocommit_or_rollback(thd, 1); + end_trans(thd, ROLLBACK); close_thread_tables(thd); DBUG_PRINT("admin", ("simple error, admin next table")); continue; @@ -4189,6 +4190,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, table_name); protocol->store(buff, length, system_charset_info); ha_autocommit_or_rollback(thd, 0); + end_trans(thd, COMMIT); close_thread_tables(thd); lex->reset_query_tables_list(FALSE); table->table=0; // For query cache @@ -4461,6 +4463,7 @@ send_result_message: } } ha_autocommit_or_rollback(thd, 0); + end_trans(thd, COMMIT); close_thread_tables(thd); table->table=0; // For query cache if (protocol->write()) @@ -4470,8 +4473,9 @@ send_result_message: send_eof(thd); DBUG_RETURN(FALSE); - err: +err: ha_autocommit_or_rollback(thd, 1); + end_trans(thd, ROLLBACK); close_thread_tables(thd); // Shouldn't be needed if (table) table->table=0; @@ -4994,8 +4998,8 @@ mysql_discard_or_import_tablespace(THD *thd, query_cache_invalidate3(thd, table_list, 0); /* The ALTER TABLE is always in its own transaction */ - error = ha_commit_stmt(thd); - if (ha_commit(thd)) + error = ha_autocommit_or_rollback(thd, 0); + if (end_active_trans(thd)) error=1; if (error) goto err; @@ -5003,7 +5007,6 @@ mysql_discard_or_import_tablespace(THD *thd, err: ha_autocommit_or_rollback(thd, error); - close_thread_tables(thd); thd->tablespace_op=FALSE; if (error == 0) @@ -6526,8 +6529,8 @@ view_err: VOID(pthread_mutex_unlock(&LOCK_open)); alter_table_manage_keys(table, table->file->indexes_are_disabled(), alter_info->keys_onoff); - error= ha_commit_stmt(thd); - if (ha_commit(thd)) + error= ha_autocommit_or_rollback(thd, 0); + if (end_active_trans(thd)) error= 1; } thd->count_cuted_fields= CHECK_FIELD_IGNORE; @@ -6615,7 +6618,7 @@ view_err: /* Need to commit before a table is unlocked (NDB requirement). */ DBUG_PRINT("info", ("Committing before unlocking table")); - if (ha_commit_stmt(thd) || ha_commit(thd)) + if (ha_autocommit_or_rollback(thd, 0) || end_active_trans(thd)) goto err1; committed= 1; } @@ -7116,9 +7119,9 @@ copy_data_between_tables(TABLE *from,TABLE *to, Ensure that the new table is saved properly to disk so that we can do a rename */ - if (ha_commit_stmt(thd)) + if (ha_autocommit_or_rollback(thd, 0)) error=1; - if (ha_commit(thd)) + if (end_active_trans(thd)) error=1; err: diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index 30e8829d764..ae3f43eba5b 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -382,6 +382,14 @@ static udf_func *add_udf(LEX_STRING *name, Item_result ret, char *dl, } +/** + Create a user defined function. + + @note Like implementations of other DDL/DML in MySQL, this function + relies on the caller to close the thread tables. This is done in the + end of dispatch_command(). +*/ + int mysql_create_function(THD *thd,udf_func *udf) { int error; @@ -489,7 +497,6 @@ int mysql_create_function(THD *thd,udf_func *udf) table->field[3]->store((longlong) u_d->type, TRUE); error = table->file->ha_write_row(table->record[0]); - close_thread_tables(thd); if (error) { my_error(ER_ERROR_ON_WRITE, MYF(0), "mysql.func", error); diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 4d075e3308d..b1485389db3 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -803,17 +803,6 @@ int mysql_update(THD *thd, } DBUG_ASSERT(transactional_table || !updated || thd->transaction.stmt.modified_non_trans_table); free_underlaid_joins(thd, select_lex); - if (transactional_table) - { - if (ha_autocommit_or_rollback(thd, error >= 0)) - error=1; - } - - if (thd->lock) - { - mysql_unlock_tables(thd, thd->lock); - thd->lock=0; - } /* If LAST_INSERT_ID(X) was used, report X */ id= thd->arg_of_last_insert_id_function ? @@ -1716,13 +1705,8 @@ void multi_update::abort() If not attempt to do remaining updates. */ - if (trans_safe) + if (! trans_safe) { - DBUG_ASSERT(transactional_tables); - (void) ha_autocommit_or_rollback(thd, 1); - } - else - { DBUG_ASSERT(thd->transaction.stmt.modified_non_trans_table); if (do_update && table_count > 1) { @@ -1754,11 +1738,6 @@ void multi_update::abort() thd->transaction.all.modified_non_trans_table= TRUE; } DBUG_ASSERT(trans_safe || !updated || thd->transaction.stmt.modified_non_trans_table); - - if (transactional_tables) - { - (void) ha_autocommit_or_rollback(thd, 1); - } } @@ -1996,12 +1975,6 @@ bool multi_update::send_eof() if (local_error != 0) error_handled= TRUE; // to force early leave from ::send_error() - if (transactional_tables) - { - if (ha_autocommit_or_rollback(thd, local_error != 0)) - local_error=1; - } - if (local_error > 0) // if the above log write did not fail ... { /* Safety: If we haven't got an error before (can happen in do_updates) */ From 14021c96c464406812f84bec45c5f73ac0b96e1a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 15:45:21 +0300 Subject: [PATCH 253/527] Rename send_ok to my_ok. Similarly to my_error, it only records the status, does not send it to the client. --- sql/protocol.cc | 8 ++-- sql/repl_failsafe.cc | 2 +- sql/sql_acl.cc | 6 +-- sql/sql_binlog.cc | 2 +- sql/sql_class.cc | 4 +- sql/sql_class.h | 4 +- sql/sql_connect.cc | 4 +- sql/sql_db.cc | 10 ++-- sql/sql_delete.cc | 12 ++--- sql/sql_do.cc | 2 +- sql/sql_handler.cc | 4 +- sql/sql_insert.cc | 6 +-- sql/sql_load.cc | 2 +- sql/sql_parse.cc | 108 +++++++++++++++++++++---------------------- sql/sql_partition.cc | 2 +- sql/sql_prepare.cc | 6 +-- sql/sql_rename.cc | 2 +- sql/sql_repl.cc | 12 ++--- sql/sql_table.cc | 10 ++-- sql/sql_trigger.cc | 2 +- sql/sql_update.cc | 8 ++-- sql/sql_view.cc | 4 +- 22 files changed, 109 insertions(+), 111 deletions(-) diff --git a/sql/protocol.cc b/sql/protocol.cc index 9e1b3c65538..5fe56724d08 100644 --- a/sql/protocol.cc +++ b/sql/protocol.cc @@ -112,8 +112,6 @@ void net_send_error(THD *thd, uint sql_errno, const char *err) - message : Stored as packed length (1-9 bytes) + message. Is not stored if no message. - If net->no_send_ok return without sending packet. - @param thd Thread handler @param affected_rows Number of rows changed by statement @param id Auto_increment id for first row (if used) @@ -128,7 +126,7 @@ net_send_ok(THD *thd, { NET *net= &thd->net; uchar buff[MYSQL_ERRMSG_SIZE+10],*pos; - DBUG_ENTER("send_ok"); + DBUG_ENTER("my_ok"); if (! net->vio) // hack for re-parsing queries { @@ -425,8 +423,8 @@ void net_end_statement(THD *thd) /**************************************************************************** - Functions used by the protocol functions (like send_ok) to store strings - and numbers in the header result packet. + Functions used by the protocol functions (like net_send_ok) to store + strings and numbers in the header result packet. ****************************************************************************/ /* The following will only be used for short strings < 65K */ diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 589ee8b2605..6f4b4b2571d 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -1011,7 +1011,7 @@ err: mysql_close(&mysql); // safe to call since we always do mysql_init() if (!error) - send_ok(thd); + my_ok(thd); return error; } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b04f624f746..040a7822d9d 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -3176,7 +3176,7 @@ bool mysql_table_grant(THD *thd, TABLE_LIST *table_list, rw_unlock(&LOCK_grant); if (!result) /* success */ - send_ok(thd); + my_ok(thd); /* Tables are automatically closed */ thd->lex->restore_backup_query_tables_list(&backup); @@ -3344,7 +3344,7 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, rw_unlock(&LOCK_grant); if (!result && !no_error) - send_ok(thd); + my_ok(thd); /* Tables are automatically closed */ DBUG_RETURN(result); @@ -3460,7 +3460,7 @@ bool mysql_grant(THD *thd, const char *db, List &list, close_thread_tables(thd); if (!result) - send_ok(thd); + my_ok(thd); DBUG_RETURN(result); } diff --git a/sql/sql_binlog.cc b/sql/sql_binlog.cc index 462806ab10d..a6d0c8c9e9b 100644 --- a/sql/sql_binlog.cc +++ b/sql/sql_binlog.cc @@ -231,7 +231,7 @@ void mysql_client_binlog_statement(THD* thd) DBUG_PRINT("info",("binlog base64 execution finished successfully")); - send_ok(thd); + my_ok(thd); end: thd->rli_fake->clear_tables_to_lock(); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index a24266c775c..1fb3fc74151 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1583,7 +1583,7 @@ bool select_to_file::send_eof() function, SELECT INTO has to have an own SQLCOM. TODO: split from SQLCOM_SELECT */ - ::send_ok(thd,row_count); + ::my_ok(thd,row_count); } file= -1; return error; @@ -2533,7 +2533,7 @@ bool select_dumpvar::send_eof() function, SELECT INTO has to have an own SQLCOM. TODO: split from SQLCOM_SELECT */ - ::send_ok(thd,row_count); + ::my_ok(thd,row_count); return 0; } diff --git a/sql/sql_class.h b/sql/sql_class.h index 6e22ddd972b..565375fef95 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -993,7 +993,7 @@ public: { /** The area is cleared at start of a statement. */ DA_EMPTY= 0, - /** Set whenever one calls send_ok(). */ + /** Set whenever one calls my_ok(). */ DA_OK, /** Set whenever one calls send_eof(). */ DA_EOF, @@ -2141,7 +2141,7 @@ private: /** A short cut for thd->main_da.set_ok_status(). */ inline void -send_ok(THD *thd, ha_rows affected_rows= 0, ulonglong id= 0, +my_ok(THD *thd, ha_rows affected_rows= 0, ulonglong id= 0, const char *message= NULL) { thd->main_da.set_ok_status(thd, affected_rows, id, message); diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 309a1c7ab5d..ac9c745bb44 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -334,7 +334,7 @@ check_user(THD *thd, enum enum_server_command command, if (mysql_change_db(thd, &db_str, FALSE)) DBUG_RETURN(1); } - send_ok(thd); + my_ok(thd); DBUG_RETURN(0); #else @@ -483,7 +483,7 @@ check_user(THD *thd, enum enum_server_command command, DBUG_RETURN(1); } } - send_ok(thd); + my_ok(thd); thd->password= test(passwd_len); // remember for error messages /* Ready to handle queries */ DBUG_RETURN(0); diff --git a/sql/sql_db.cc b/sql/sql_db.cc index b5f49b97ec9..d03ac7921ac 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -595,7 +595,7 @@ CHARSET_INFO *get_default_db_collation(THD *thd, const char *db_name) In this case the entry should not be logged. SIDE-EFFECTS - 1. Report back to client that command succeeded (send_ok) + 1. Report back to client that command succeeded (my_ok) 2. Report errors to client 3. Log event to binary log (The 'silent' flags turns off 1 and 3.) @@ -660,7 +660,7 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db); if (!silent) - send_ok(thd); + my_ok(thd); error= 0; goto exit; } @@ -749,7 +749,7 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, /* These DDL methods and logging protected with LOCK_mysql_create_db */ mysql_bin_log.write(&qinfo); } - send_ok(thd, result); + my_ok(thd, result); } exit: @@ -826,7 +826,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info) /* These DDL methods and logging protected with LOCK_mysql_create_db */ mysql_bin_log.write(&qinfo); } - send_ok(thd, result); + my_ok(thd, result); exit: VOID(pthread_mutex_unlock(&LOCK_mysql_create_db)); @@ -960,7 +960,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) } thd->clear_error(); thd->server_status|= SERVER_STATUS_DB_DROPPED; - send_ok(thd, (ulong) deleted); + my_ok(thd, (ulong) deleted); thd->server_status&= ~SERVER_STATUS_DB_DROPPED; } else if (mysql_bin_log.is_open()) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 234ee35ecca..990f7713561 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -158,7 +158,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, { free_underlaid_joins(thd, select_lex); thd->row_count_func= 0; - send_ok(thd, (ha_rows) thd->row_count_func); // No matching records + my_ok(thd, (ha_rows) thd->row_count_func); // No matching records DBUG_RETURN(0); } #endif @@ -175,7 +175,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, delete select; free_underlaid_joins(thd, select_lex); thd->row_count_func= 0; - send_ok(thd, (ha_rows) thd->row_count_func); + my_ok(thd, (ha_rows) thd->row_count_func); /* We don't need to call reset_auto_increment in this case, because mysql_truncate always gives a NULL conds argument, hence we never @@ -391,7 +391,7 @@ cleanup: if (error < 0 || (thd->lex->ignore && !thd->is_fatal_error)) { thd->row_count_func= deleted; - send_ok(thd, (ha_rows) thd->row_count_func); + my_ok(thd, (ha_rows) thd->row_count_func); DBUG_PRINT("info",("%ld records deleted",(long) deleted)); } DBUG_RETURN(error >= 0 || thd->is_error()); @@ -919,7 +919,7 @@ bool multi_delete::send_eof() if (!local_error) { thd->row_count_func= deleted; - ::send_ok(thd, (ha_rows) thd->row_count_func); + ::my_ok(thd, (ha_rows) thd->row_count_func); } return 0; } @@ -973,7 +973,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) my_free((char*) table,MYF(0)); /* If we return here we will not have logged the truncation to the bin log - and we will not send_ok() to the client. + and we will not my_ok() to the client. */ goto end; } @@ -1019,7 +1019,7 @@ end: we don't test current_stmt_binlog_row_based. */ write_bin_log(thd, TRUE, thd->query, thd->query_length); - send_ok(thd); // This should return record count + my_ok(thd); // This should return record count } VOID(pthread_mutex_lock(&LOCK_open)); unlock_table_name(thd, table_list); diff --git a/sql/sql_do.cc b/sql/sql_do.cc index af9fa9444e8..8406a9eaf45 100644 --- a/sql/sql_do.cc +++ b/sql/sql_do.cc @@ -39,6 +39,6 @@ bool mysql_do(THD *thd, List &values) ha_autocommit_or_rollback(thd, thd->is_error()); thd->clear_error(); // DO always is OK } - send_ok(thd); + my_ok(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index a4ba6f1140b..3d47d16ea56 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -298,7 +298,7 @@ bool mysql_ha_open(THD *thd, TABLE_LIST *tables, bool reopen) tables->table->open_by_handler= 1; if (! reopen) - send_ok(thd); + my_ok(thd); DBUG_PRINT("exit",("OK")); DBUG_RETURN(FALSE); @@ -350,7 +350,7 @@ bool mysql_ha_close(THD *thd, TABLE_LIST *tables) DBUG_RETURN(TRUE); } - send_ok(thd); + my_ok(thd); DBUG_PRINT("exit", ("OK")); DBUG_RETURN(FALSE); } diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index b03e786d1a1..2be932a6040 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -946,7 +946,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, thd->row_count_func= info.copied + info.deleted + ((thd->client_capabilities & CLIENT_FOUND_ROWS) ? info.touched : info.updated); - send_ok(thd, (ulong) thd->row_count_func, id); + my_ok(thd, (ulong) thd->row_count_func, id); } else { @@ -961,7 +961,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records, (ulong) (info.deleted + updated), (ulong) thd->cuted_fields); thd->row_count_func= info.copied + info.deleted + updated; - ::send_ok(thd, (ulong) thd->row_count_func, id, buff); + ::my_ok(thd, (ulong) thd->row_count_func, id, buff); } thd->abort_on_warning= 0; DBUG_RETURN(FALSE); @@ -3162,7 +3162,7 @@ bool select_insert::send_eof() (thd->arg_of_last_insert_id_function ? thd->first_successful_insert_id_in_prev_stmt : (info.copied ? autoinc_value_of_last_inserted_row : 0)); - ::send_ok(thd, (ulong) thd->row_count_func, id, buff); + ::my_ok(thd, (ulong) thd->row_count_func, id, buff); DBUG_RETURN(0); } diff --git a/sql/sql_load.cc b/sql/sql_load.cc index d50f6c19a33..4d5dc8e6f06 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -509,7 +509,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, #endif /*!EMBEDDED_LIBRARY*/ /* ok to client sent only after binlog write and engine commit */ - send_ok(thd, info.copied + info.deleted, 0L, name); + my_ok(thd, info.copied + info.deleted, 0L, name); err: DBUG_ASSERT(transactional_table || !(info.copied || info.deleted) || thd->transaction.stmt.modified_non_trans_table); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 94306132027..11fa77ca2fc 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -913,7 +913,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, if (!mysql_change_db(thd, &tmp, FALSE)) { general_log_write(thd, command, thd->db, thd->db_length); - send_ok(thd); + my_ok(thd); } break; } @@ -921,7 +921,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, case COM_REGISTER_SLAVE: { if (!register_slave(thd, (uchar*)packet, packet_length)) - send_ok(thd); + my_ok(thd); break; } #endif @@ -1322,7 +1322,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; general_log_print(thd, command, NullS); if (!reload_acl_and_cache(thd, options, (TABLE_LIST*) 0, ¬_used)) - send_ok(thd); + my_ok(thd); break; } #ifndef EMBEDDED_LIBRARY @@ -1386,7 +1386,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, (uint) (queries_per_second1000 % 1000)); #ifdef EMBEDDED_LIBRARY /* Store the buffer in permanent memory */ - send_ok(thd, 0, 0, buff); + my_ok(thd, 0, 0, buff); #endif #ifdef SAFEMALLOC if (sf_malloc_cur_memory) // Using SAFEMALLOC @@ -1407,7 +1407,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } case COM_PING: status_var_increment(thd->status_var.com_other); - send_ok(thd); // Tell client we are alive + my_ok(thd); // Tell client we are alive break; case COM_PROCESS_INFO: status_var_increment(thd->status_var.com_stat[SQLCOM_SHOW_PROCESSLIST]); @@ -2075,7 +2075,7 @@ mysql_execute_command(THD *thd) break; case SQLCOM_EMPTY_QUERY: - send_ok(thd); + my_ok(thd); break; case SQLCOM_HELP: @@ -2242,7 +2242,7 @@ mysql_execute_command(THD *thd) { push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, "the master info structure does not exist"); - send_ok(thd); + my_ok(thd); } pthread_mutex_unlock(&LOCK_active_mi); break; @@ -2300,7 +2300,7 @@ mysql_execute_command(THD *thd) if (!fetch_master_table(thd, first_table->db, first_table->table_name, active_mi, 0, 0)) { - send_ok(thd); + my_ok(thd); } pthread_mutex_unlock(&LOCK_active_mi); break; @@ -2511,7 +2511,7 @@ mysql_execute_command(THD *thd) &alter_info, 0, 0); } if (!res) - send_ok(thd); + my_ok(thd); } /* put tables back for PS rexecuting */ @@ -3194,7 +3194,7 @@ end_with_restore_list: LEX_STRING db_str= { (char *) select_lex->db, strlen(select_lex->db) }; if (!mysql_change_db(thd, &db_str, FALSE)) - send_ok(thd); + my_ok(thd); break; } @@ -3247,7 +3247,7 @@ end_with_restore_list: about the ONE_SHOT property of that SET. So we use a |= instead of = . */ thd->one_shot_set|= lex->one_shot_set; - send_ok(thd); + my_ok(thd); } break; } @@ -3267,7 +3267,7 @@ end_with_restore_list: } if (thd->global_read_lock) unlock_global_read_lock(thd); - send_ok(thd); + my_ok(thd); break; case SQLCOM_LOCK_TABLES: unlock_locked_tables(thd); @@ -3288,7 +3288,7 @@ end_with_restore_list: #endif /*HAVE_QUERY_CACHE*/ thd->locked_tables=thd->lock; thd->lock=0; - send_ok(thd); + my_ok(thd); } else { @@ -3425,7 +3425,7 @@ end_with_restore_list: res= mysql_upgrade_db(thd, db); if (!res) - send_ok(thd); + my_ok(thd); break; } case SQLCOM_ALTER_DB: @@ -3510,7 +3510,7 @@ end_with_restore_list: } DBUG_PRINT("info",("DDL error code=%d", res)); if (!res) - send_ok(thd); + my_ok(thd); } while (0); /* Don't do it, if we are inside a SP */ @@ -3529,7 +3529,7 @@ end_with_restore_list: if (!(res= Events::drop_event(thd, lex->spname->m_db, lex->spname->m_name, lex->drop_if_exists))) - send_ok(thd); + my_ok(thd); break; case SQLCOM_CREATE_FUNCTION: // UDF function { @@ -3537,7 +3537,7 @@ end_with_restore_list: break; #ifdef HAVE_DLOPEN if (!(res = mysql_create_function(thd, &lex->udf))) - send_ok(thd); + my_ok(thd); #else my_error(ER_CANT_OPEN_LIBRARY, MYF(0), lex->udf.dl, 0, "feature disabled"); res= TRUE; @@ -3554,7 +3554,7 @@ end_with_restore_list: goto error; /* Conditionally writes to binlog */ if (!(res= mysql_create_user(thd, lex->users_list))) - send_ok(thd); + my_ok(thd); break; } case SQLCOM_DROP_USER: @@ -3566,7 +3566,7 @@ end_with_restore_list: goto error; /* Conditionally writes to binlog */ if (!(res= mysql_drop_user(thd, lex->users_list))) - send_ok(thd); + my_ok(thd); break; } case SQLCOM_RENAME_USER: @@ -3578,7 +3578,7 @@ end_with_restore_list: goto error; /* Conditionally writes to binlog */ if (!(res= mysql_rename_user(thd, lex->users_list))) - send_ok(thd); + my_ok(thd); break; } case SQLCOM_REVOKE_ALL: @@ -3590,7 +3590,7 @@ end_with_restore_list: break; /* Conditionally writes to binlog */ if (!(res = mysql_revoke_all(thd, lex->users_list))) - send_ok(thd); + my_ok(thd); break; } case SQLCOM_REVOKE: @@ -3727,7 +3727,7 @@ end_with_restore_list: { write_bin_log(thd, FALSE, thd->query, thd->query_length); } - send_ok(thd); + my_ok(thd); } break; @@ -3799,19 +3799,19 @@ end_with_restore_list: } if (begin_trans(thd)) goto error; - send_ok(thd); + my_ok(thd); break; case SQLCOM_COMMIT: if (end_trans(thd, lex->tx_release ? COMMIT_RELEASE : lex->tx_chain ? COMMIT_AND_CHAIN : COMMIT)) goto error; - send_ok(thd); + my_ok(thd); break; case SQLCOM_ROLLBACK: if (end_trans(thd, lex->tx_release ? ROLLBACK_RELEASE : lex->tx_chain ? ROLLBACK_AND_CHAIN : ROLLBACK)) goto error; - send_ok(thd); + my_ok(thd); break; case SQLCOM_RELEASE_SAVEPOINT: { @@ -3828,7 +3828,7 @@ end_with_restore_list: if (ha_release_savepoint(thd, sv)) res= TRUE; // cannot happen else - send_ok(thd); + my_ok(thd); thd->transaction.savepoints=sv->prev; } else @@ -3857,7 +3857,7 @@ end_with_restore_list: push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARNING_NOT_COMPLETE_ROLLBACK, ER(ER_WARNING_NOT_COMPLETE_ROLLBACK)); - send_ok(thd); + my_ok(thd); } thd->transaction.savepoints=sv; } @@ -3868,7 +3868,7 @@ end_with_restore_list: case SQLCOM_SAVEPOINT: if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) || thd->in_sub_stmt) || !opt_using_transactions) - send_ok(thd); + my_ok(thd); else { SAVEPOINT **sv, *newsv; @@ -3905,7 +3905,7 @@ end_with_restore_list: { newsv->prev=thd->transaction.savepoints; thd->transaction.savepoints=newsv; - send_ok(thd); + my_ok(thd); } } break; @@ -4005,7 +4005,7 @@ end_with_restore_list: create_sp_error: if (sp_result != SP_OK ) goto error; - send_ok(thd); + my_ok(thd); break; /* break super switch */ } /* end case group bracket */ case SQLCOM_CALL: @@ -4098,8 +4098,8 @@ create_sp_error: thd->server_status&= ~bits_to_be_cleared; if (!res) - send_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 : - thd->row_count_func)); + my_ok(thd, (ulong) (thd->row_count_func < 0 ? 0 : + thd->row_count_func)); else { DBUG_ASSERT(thd->is_error() || thd->killed); @@ -4176,7 +4176,7 @@ create_sp_error: switch (sp_result) { case SP_OK: - send_ok(thd); + my_ok(thd); break; case SP_KEY_NOT_FOUND: my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4241,7 +4241,7 @@ create_sp_error: if (!(res = mysql_drop_function(thd, &lex->spname->m_name))) { - send_ok(thd); + my_ok(thd); break; } } @@ -4258,7 +4258,7 @@ create_sp_error: res= sp_result; switch (sp_result) { case SP_OK: - send_ok(thd); + my_ok(thd); break; case SP_KEY_NOT_FOUND: if (lex->drop_if_exists) @@ -4267,7 +4267,7 @@ create_sp_error: ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), SP_COM_STRING(lex), lex->spname->m_name.str); res= FALSE; - send_ok(thd); + my_ok(thd); break; } my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4399,7 +4399,7 @@ create_sp_error: break; } thd->transaction.xid_state.xa_state=XA_ACTIVE; - send_ok(thd); + my_ok(thd); break; } if (thd->lex->xa_opt != XA_NONE) @@ -4430,7 +4430,7 @@ create_sp_error: thd->transaction.all.modified_non_trans_table= FALSE; thd->options= ((thd->options & ~(OPTION_KEEP_LOG)) | OPTION_BEGIN); thd->server_status|= SERVER_STATUS_IN_TRANS; - send_ok(thd); + my_ok(thd); break; case SQLCOM_XA_END: /* fake it */ @@ -4451,7 +4451,7 @@ create_sp_error: break; } thd->transaction.xid_state.xa_state=XA_IDLE; - send_ok(thd); + my_ok(thd); break; case SQLCOM_XA_PREPARE: if (thd->transaction.xid_state.xa_state != XA_IDLE) @@ -4473,7 +4473,7 @@ create_sp_error: break; } thd->transaction.xid_state.xa_state=XA_PREPARED; - send_ok(thd); + my_ok(thd); break; case SQLCOM_XA_COMMIT: if (!thd->transaction.xid_state.xid.eq(thd->lex->xid)) @@ -4485,7 +4485,7 @@ create_sp_error: { ha_commit_or_rollback_by_xid(thd->lex->xid, 1); xid_cache_delete(xs); - send_ok(thd); + my_ok(thd); } break; } @@ -4496,7 +4496,7 @@ create_sp_error: if ((r= ha_commit(thd))) my_error(r == 1 ? ER_XA_RBROLLBACK : ER_XAER_RMERR, MYF(0)); else - send_ok(thd); + my_ok(thd); } else if (thd->transaction.xid_state.xa_state == XA_PREPARED && thd->lex->xa_opt == XA_NONE) @@ -4511,7 +4511,7 @@ create_sp_error: if (ha_commit_one_phase(thd, 1)) my_error(ER_XAER_RMERR, MYF(0)); else - send_ok(thd); + my_ok(thd); start_waiting_global_read_lock(thd); } } @@ -4537,7 +4537,7 @@ create_sp_error: { ha_commit_or_rollback_by_xid(thd->lex->xid, 0); xid_cache_delete(xs); - send_ok(thd); + my_ok(thd); } break; } @@ -4551,7 +4551,7 @@ create_sp_error: if (ha_rollback(thd)) my_error(ER_XAER_RMERR, MYF(0)); else - send_ok(thd); + my_ok(thd); thd->options&= ~(OPTION_BEGIN | OPTION_KEEP_LOG); thd->transaction.all.modified_non_trans_table= FALSE; thd->server_status&= ~SERVER_STATUS_IN_TRANS; @@ -4565,16 +4565,16 @@ create_sp_error: if (check_access(thd, ALTER_ACL, thd->db, 0, 1, 0, thd->db ? is_schema_db(thd->db) : 0)) break; if (!(res= mysql_alter_tablespace(thd, lex->alter_tablespace_info))) - send_ok(thd); + my_ok(thd); break; case SQLCOM_INSTALL_PLUGIN: if (! (res= mysql_install_plugin(thd, &thd->lex->comment, &thd->lex->ident))) - send_ok(thd); + my_ok(thd); break; case SQLCOM_UNINSTALL_PLUGIN: if (! (res= mysql_uninstall_plugin(thd, &thd->lex->comment))) - send_ok(thd); + my_ok(thd); break; case SQLCOM_BINLOG_BASE64_EVENT: { @@ -4601,7 +4601,7 @@ create_sp_error: my_error(error, MYF(0), lex->server_options.server_name); break; } - send_ok(thd, 1); + my_ok(thd, 1); break; } case SQLCOM_ALTER_SERVER: @@ -4620,7 +4620,7 @@ create_sp_error: my_error(error, MYF(0), lex->server_options.server_name); break; } - send_ok(thd, 1); + my_ok(thd, 1); break; } case SQLCOM_DROP_SERVER: @@ -4642,18 +4642,18 @@ create_sp_error: } else { - send_ok(thd, 0); + my_ok(thd, 0); } break; } - send_ok(thd, 1); + my_ok(thd, 1); break; } default: #ifndef EMBEDDED_LIBRARY DBUG_ASSERT(0); /* Impossible */ #endif - send_ok(thd); + my_ok(thd); break; } thd_proc_info(thd, "query end"); @@ -6660,7 +6660,7 @@ void sql_kill(THD *thd, ulong id, bool only_kill_query) { uint error; if (!(error= kill_one_thread(thd, id, only_kill_query))) - send_ok(thd); + my_ok(thd); else my_error(error, MYF(0), id); } diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index cf0aeee938b..45a82782de0 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3995,7 +3995,7 @@ static int fast_end_partition(THD *thd, ulonglong copied, (ulong) (copied + deleted), (ulong) deleted, (ulong) 0); - send_ok(thd, (ha_rows) (copied+deleted),0L, tmp_name); + my_ok(thd, (ha_rows) (copied+deleted),0L, tmp_name); DBUG_RETURN(FALSE); } diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 5a903a4fe1c..e03f7cfb6a0 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2111,7 +2111,7 @@ void mysql_sql_stmt_prepare(THD *thd) thd->stmt_map.erase(stmt); } else - send_ok(thd, 0L, 0L, "Statement prepared"); + my_ok(thd, 0L, 0L, "Statement prepared"); DBUG_VOID_RETURN; } @@ -2494,7 +2494,7 @@ void mysql_stmt_reset(THD *thd, char *packet) stmt->state= Query_arena::PREPARED; - send_ok(thd); + my_ok(thd); DBUG_VOID_RETURN; } @@ -2557,7 +2557,7 @@ void mysql_sql_stmt_close(THD *thd) } if (stmt->deallocate() == 0) - send_ok(thd); + my_ok(thd); } /** diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index 9dd8e1b70d4..fc87356e452 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -178,7 +178,7 @@ bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list, bool silent) if (!silent && !error) { write_bin_log(thd, TRUE, thd->query, thd->query_length); - send_ok(thd); + my_ok(thd); } if (!error) diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index cdce2fa695b..573a257cd3d 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -252,7 +252,7 @@ bool purge_error_message(THD* thd, int res) my_message(errmsg, ER(errmsg), MYF(0)); return TRUE; } - send_ok(thd); + my_ok(thd); return FALSE; } @@ -262,7 +262,7 @@ bool purge_master_logs(THD* thd, const char* to_log) char search_file_name[FN_REFLEN]; if (!mysql_bin_log.is_open()) { - send_ok(thd); + my_ok(thd); return FALSE; } @@ -277,7 +277,7 @@ bool purge_master_logs_before_date(THD* thd, time_t purge_time) { if (!mysql_bin_log.is_open()) { - send_ok(thd); + my_ok(thd); return 0; } return purge_error_message(thd, @@ -884,7 +884,7 @@ int start_slave(THD* thd , Master_info* mi, bool net_report) DBUG_RETURN(1); } else if (net_report) - send_ok(thd); + my_ok(thd); DBUG_RETURN(0); } @@ -936,7 +936,7 @@ int stop_slave(THD* thd, Master_info* mi, bool net_report ) DBUG_RETURN(1); } else if (net_report) - send_ok(thd); + my_ok(thd); DBUG_RETURN(0); } @@ -1279,7 +1279,7 @@ bool change_master(THD* thd, Master_info* mi) unlock_slave_threads(mi); thd_proc_info(thd, 0); - send_ok(thd); + my_ok(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index d4f4cfdedab..07ba9d0ec56 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1497,7 +1497,7 @@ bool mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists, if (error) DBUG_RETURN(TRUE); - send_ok(thd); + my_ok(thd); DBUG_RETURN(FALSE); } @@ -5042,7 +5042,7 @@ err: if (error == 0) { - send_ok(thd); + my_ok(thd); DBUG_RETURN(0); } @@ -6006,7 +6006,7 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name, Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE); mysql_bin_log.write(&qinfo); } - send_ok(thd); + my_ok(thd); } unlock_table_names(thd, table_list, (TABLE_LIST*) 0); @@ -6244,7 +6244,7 @@ view_err: if (!error) { write_bin_log(thd, TRUE, thd->query, thd->query_length); - send_ok(thd); + my_ok(thd); } else if (error > 0) { @@ -6880,7 +6880,7 @@ end_temporary: my_snprintf(tmp_name, sizeof(tmp_name), ER(ER_INSERT_INFO), (ulong) (copied + deleted), (ulong) deleted, (ulong) thd->cuted_fields); - send_ok(thd, copied + deleted, 0L, tmp_name); + my_ok(thd, copied + deleted, 0L, tmp_name); thd->some_tables_deleted=0; DBUG_RETURN(FALSE); diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 4cd1d542375..d426904e4b2 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -516,7 +516,7 @@ end: start_waiting_global_read_lock(thd); if (!result) - send_ok(thd); + my_ok(thd); DBUG_RETURN(result); } diff --git a/sql/sql_update.cc b/sql/sql_update.cc index b1485389db3..61df6b0b871 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -319,7 +319,7 @@ int mysql_update(THD *thd, if (prune_partitions(thd, table, conds)) { free_underlaid_joins(thd, select_lex); - send_ok(thd); // No matching records + my_ok(thd); // No matching records DBUG_RETURN(0); } #endif @@ -336,7 +336,7 @@ int mysql_update(THD *thd, { DBUG_RETURN(1); // Error in where } - send_ok(thd); // No matching records + my_ok(thd); // No matching records DBUG_RETURN(0); } if (!select && limit != HA_POS_ERROR) @@ -815,7 +815,7 @@ int mysql_update(THD *thd, (ulong) thd->cuted_fields); thd->row_count_func= (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated; - send_ok(thd, (ulong) thd->row_count_func, id, buff); + my_ok(thd, (ulong) thd->row_count_func, id, buff); DBUG_PRINT("info",("%ld records updated", (long) updated)); } thd->count_cuted_fields= CHECK_FIELD_IGNORE; /* calc cuted fields */ @@ -1989,6 +1989,6 @@ bool multi_update::send_eof() (ulong) thd->cuted_fields); thd->row_count_func= (thd->client_capabilities & CLIENT_FOUND_ROWS) ? found : updated; - ::send_ok(thd, (ulong) thd->row_count_func, id, buff); + ::my_ok(thd, (ulong) thd->row_count_func, id, buff); DBUG_RETURN(FALSE); } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 1a4d7d515a8..0b0763afb84 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -599,7 +599,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, if (res) goto err; - send_ok(thd); + my_ok(thd); lex->link_first_table_back(view, link_to_local); DBUG_RETURN(0); @@ -1552,7 +1552,7 @@ bool mysql_drop_view(THD *thd, TABLE_LIST *views, enum_drop_mode drop_mode) { DBUG_RETURN(TRUE); } - send_ok(thd); + my_ok(thd); DBUG_RETURN(FALSE); } From 9060b50f144a6172742ff0089f9cfe36b433c11e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 15:58:08 +0300 Subject: [PATCH 254/527] Rename send_eof() to my_eof() for consistency with my_ok() and my_error() --- sql/events.cc | 2 +- sql/handler.cc | 4 ++-- sql/repl_failsafe.cc | 4 ++-- sql/slave.cc | 2 +- sql/sp.cc | 2 +- sql/sp_head.cc | 4 ++-- sql/sql_acl.cc | 2 +- sql/sql_class.cc | 2 +- sql/sql_class.h | 6 +++--- sql/sql_error.cc | 2 +- sql/sql_handler.cc | 2 +- sql/sql_help.cc | 2 +- sql/sql_parse.cc | 8 ++++---- sql/sql_prepare.cc | 2 +- sql/sql_repl.cc | 8 ++++---- sql/sql_show.cc | 18 +++++++++--------- sql/sql_table.cc | 4 ++-- 17 files changed, 37 insertions(+), 37 deletions(-) diff --git a/sql/events.cc b/sql/events.cc index 87385082a82..fc736a5379b 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -737,7 +737,7 @@ send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol) if (protocol->write()) DBUG_RETURN(TRUE); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } diff --git a/sql/handler.cc b/sql/handler.cc index d831a1c53a0..4cf73874f22 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1590,7 +1590,7 @@ bool mysql_xa_recover(THD *thd) } pthread_mutex_unlock(&LOCK_xid_cache); - send_eof(thd); + my_eof(thd); DBUG_RETURN(0); } @@ -4309,7 +4309,7 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat) } if (!result) - send_eof(thd); + my_eof(thd); return result; } diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 6f4b4b2571d..f8f01d2cad1 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -475,7 +475,7 @@ bool show_new_master(THD* thd) protocol->store((ulonglong) lex_mi->pos); if (protocol->write()) DBUG_RETURN(TRUE); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } } @@ -688,7 +688,7 @@ bool show_slave_hosts(THD* thd) } } pthread_mutex_unlock(&LOCK_slave_list); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } diff --git a/sql/slave.cc b/sql/slave.cc index ea0dde942da..d9dc014b025 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1451,7 +1451,7 @@ bool show_master_info(THD* thd, Master_info* mi) if (my_net_write(&thd->net, (uchar*) thd->packet.ptr(), packet->length())) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sp.cc b/sql/sp.cc index e69bf83d552..b486e58883a 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1259,7 +1259,7 @@ sp_show_status_routine(THD *thd, int type, const char *name_pattern) } err_case1: - send_eof(thd); + my_eof(thd); err_case: table->file->ha_index_end(); close_thread_tables(thd); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 1d443b70737..f42a5dde8ed 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2419,7 +2419,7 @@ sp_head::show_create_routine(THD *thd, int type) err_status= protocol->write(); if (!err_status) - send_eof(thd); + my_eof(thd); DBUG_RETURN(err_status); } @@ -2611,7 +2611,7 @@ sp_head::show_routine_code(THD *thd) } if (!res) - send_eof(thd); + my_eof(thd); DBUG_RETURN(res); } diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 040a7822d9d..3805d9fa8b6 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -4815,7 +4815,7 @@ end: VOID(pthread_mutex_unlock(&acl_cache->lock)); rw_unlock(&LOCK_grant); - send_eof(thd); + my_eof(thd); DBUG_RETURN(error); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 1fb3fc74151..3ce1b350027 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1548,7 +1548,7 @@ bool select_send::send_eof() mysql_unlock_tables(thd, thd->lock); thd->lock=0; } - ::send_eof(thd); + ::my_eof(thd); is_result_set_started= 0; return FALSE; } diff --git a/sql/sql_class.h b/sql/sql_class.h index 565375fef95..2f225834545 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -995,7 +995,7 @@ public: DA_EMPTY= 0, /** Set whenever one calls my_ok(). */ DA_OK, - /** Set whenever one calls send_eof(). */ + /** Set whenever one calls my_eof(). */ DA_EOF, /** Set whenever one calls my_error() or my_message(). */ DA_ERROR, @@ -1063,7 +1063,7 @@ private: Copied from thd->server_status when the diagnostics area is assigned. We need this member as some places in the code use the following pattern: thd->server_status|= ... - send_eof(thd); + my_eof(thd); thd->server_status&= ~... Assigned by OK, EOF or ERROR. */ @@ -2151,7 +2151,7 @@ my_ok(THD *thd, ha_rows affected_rows= 0, ulonglong id= 0, /** A short cut for thd->main_da.set_eof_status(). */ inline void -send_eof(THD *thd) +my_eof(THD *thd) { thd->main_da.set_eof_status(thd); } diff --git a/sql/sql_error.cc b/sql/sql_error.cc index 89cff73d153..0b74e3455eb 100644 --- a/sql/sql_error.cc +++ b/sql/sql_error.cc @@ -249,6 +249,6 @@ bool mysqld_show_warnings(THD *thd, ulong levels_to_show) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index 3d47d16ea56..28a9fb5c78e 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -658,7 +658,7 @@ retry: } ok: mysql_unlock_tables(thd,lock); - send_eof(thd); + my_eof(thd); DBUG_PRINT("exit",("OK")); DBUG_RETURN(FALSE); diff --git a/sql/sql_help.cc b/sql/sql_help.cc index 0d633ce86ac..e424425272e 100644 --- a/sql/sql_help.cc +++ b/sql/sql_help.cc @@ -779,7 +779,7 @@ bool mysqld_help(THD *thd, const char *mask) if (send_variant_2_list(mem_root,protocol, &categories_list, "Y", 0)) goto error; } - send_eof(thd); + my_eof(thd); close_system_tables(thd, &open_tables_state_backup); DBUG_RETURN(FALSE); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 11fa77ca2fc..a78ac978a4a 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1348,7 +1348,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, } DBUG_PRINT("quit",("Got shutdown command for level %u", level)); general_log_print(thd, command, NullS); - send_eof(thd); + my_eof(thd); close_thread_tables(thd); // Free before kill kill_mysql(); error=TRUE; @@ -1434,11 +1434,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd, switch (opt_command) { case (int) MYSQL_OPTION_MULTI_STATEMENTS_ON: thd->client_capabilities|= CLIENT_MULTI_STATEMENTS; - send_eof(thd); + my_eof(thd); break; case (int) MYSQL_OPTION_MULTI_STATEMENTS_OFF: thd->client_capabilities&= ~CLIENT_MULTI_STATEMENTS; - send_eof(thd); + my_eof(thd); break; default: my_message(ER_UNKNOWN_COM_ERROR, ER(ER_UNKNOWN_COM_ERROR), MYF(0)); @@ -1452,7 +1452,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; /* purecov: inspected */ mysql_print_status(); general_log_print(thd, command, NullS); - send_eof(thd); + my_eof(thd); break; case COM_SLEEP: case COM_CONNECT: // Impossible here diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index e03f7cfb6a0..02d8ed00c32 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2662,7 +2662,7 @@ bool Select_fetch_protocol_binary::send_fields(List &list, uint flags) bool Select_fetch_protocol_binary::send_eof() { - ::send_eof(thd); + ::my_eof(thd); return FALSE; } diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 573a257cd3d..932b7a67b4d 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -738,7 +738,7 @@ end: end_io_cache(&log); (void)my_close(file, MYF(MY_WME)); - send_eof(thd); + my_eof(thd); thd_proc_info(thd, "Waiting to finalize termination"); pthread_mutex_lock(&LOCK_thread_count); thd->current_linfo = 0; @@ -1453,7 +1453,7 @@ err: my_error(ER_ERROR_WHEN_EXECUTING_COMMAND, MYF(0), "SHOW BINLOG EVENTS", errmsg); else - send_eof(thd); + my_eof(thd); pthread_mutex_lock(&LOCK_thread_count); thd->current_linfo = 0; @@ -1490,7 +1490,7 @@ bool show_binlog_info(THD* thd) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -1572,7 +1572,7 @@ bool show_binlogs(THD* thd) goto err; } mysql_bin_log.unlock_index(); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); err: diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6d817cb0620..9f56933a114 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -224,7 +224,7 @@ bool mysqld_show_authors(THD *thd) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -258,7 +258,7 @@ bool mysqld_show_contributors(THD *thd) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -331,7 +331,7 @@ bool mysqld_show_privileges(THD *thd) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -419,7 +419,7 @@ bool mysqld_show_column_types(THD *thd) if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -666,7 +666,7 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) if (protocol->write()) DBUG_RETURN(TRUE); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -747,7 +747,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname, if (protocol->write()) DBUG_RETURN(TRUE); - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } @@ -789,7 +789,7 @@ mysqld_list_fields(THD *thd, TABLE_LIST *table_list, const char *wild) table->use_all_columns(); if (thd->protocol->send_fields(&field_list, Protocol::SEND_DEFAULTS)) DBUG_VOID_RETURN; - send_eof(thd); + my_eof(thd); DBUG_VOID_RETURN; } @@ -1738,7 +1738,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) if (protocol->write()) break; /* purecov: inspected */ } - send_eof(thd); + my_eof(thd); DBUG_VOID_RETURN; } @@ -6760,7 +6760,7 @@ static bool show_create_trigger_impl(THD *thd, ret_code= p->write(); if (!ret_code) - send_eof(thd); + my_eof(thd); return ret_code != 0; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 07ba9d0ec56..c62d0545fda 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4501,7 +4501,7 @@ send_result_message: goto err; } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); err: @@ -7311,7 +7311,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, goto err; } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); err: From 8b91756be1b32102a37f492d97a2be8eb731377e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 14:25:26 +0100 Subject: [PATCH 255/527] Post-merge fix --- sql/sql_connect.cc | 19 ++----------------- sql/stacktrace.c | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index 309a1c7ab5d..c3541cb4eb4 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -39,22 +39,7 @@ #endif /* HAVE_OPENSSL */ #ifdef __WIN__ -static void test_signal(int sig_ptr) -{ -#if !defined( DBUG_OFF) - MessageBox(NULL,"Test signal","DBUG",MB_OK); -#endif -#if defined(OS2) - fprintf(stderr, "Test signal %d\n", sig_ptr); - fflush(stderr); -#endif -} -static void init_signals(void) -{ - int signals[7] = {SIGINT,SIGILL,SIGFPE,SIGSEGV,SIGTERM,SIGBREAK,SIGABRT } ; - for (int i=0 ; i < 7 ; i++) - signal( signals[i], test_signal) ; -} +extern void win_install_sigabrt_handler(); #endif /* @@ -626,7 +611,7 @@ bool init_new_connection_handler_thread() { pthread_detach_this_thread(); #if defined(__WIN__) - init_signals(); + win_install_sigabrt_handler(); #else /* Win32 calls this in pthread_create */ if (my_thread_init()) diff --git a/sql/stacktrace.c b/sql/stacktrace.c index 0186212900e..49e31fabd23 100644 --- a/sql/stacktrace.c +++ b/sql/stacktrace.c @@ -341,7 +341,7 @@ void set_exception_pointers(EXCEPTION_POINTERS *ep) #define SYMOPT_NO_PROMPTS 0 #endif -void print_stacktrace(gptr unused1, ulong unused2) +void print_stacktrace(uchar* unused1, ulong unused2) { HANDLE hProcess= GetCurrentProcess(); HANDLE hThread= GetCurrentThread(); From f802cd51238c7842b789e49ba27d3c119ebb8ce3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 18:16:17 +0400 Subject: [PATCH 256/527] BUG#34289 - Incorrect NAME_CONST substitution in stored procedures breaks replication NAME_CONST() didn't replicate constant character set and collation correctly. With this fix NAME_CONST() inherits collation from the value argument. mysql-test/r/func_misc.result: A test case for BUG#34289. mysql-test/t/func_misc.test: A test case for BUG#34289. sql/item.cc: Inherit collation from value argument. --- mysql-test/r/func_misc.result | 3 +++ mysql-test/t/func_misc.test | 6 ++++++ sql/item.cc | 1 + 3 files changed, 10 insertions(+) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 4f6b6d3a0d8..fa9ca3539d6 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -225,4 +225,7 @@ select min(a) from t1 group by inet_ntoa(a); min(a) -2 drop table t1; +SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs; +NAME_CONST('var', 'value') COLLATE latin1_general_cs +value End of 5.0 tests diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index ccb59df5677..17a0dbe50a7 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -237,5 +237,11 @@ insert into t1 values (-1), (-2); select min(a) from t1 group by inet_ntoa(a); drop table t1; +# +# BUG#34289 - Incorrect NAME_CONST substitution in stored procedures breaks +# replication +# +SELECT NAME_CONST('var', 'value') COLLATE latin1_general_cs; + --echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index ffb18054750..d0dc8201577 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1240,6 +1240,7 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref) return TRUE; } set_name(item_name->ptr(), (uint) item_name->length(), system_charset_info); + collation.set(value_item->collation.collation, DERIVATION_IMPLICIT); max_length= value_item->max_length; decimals= value_item->decimals; fixed= 1; From 1ac319248f6d9ed920c402cb90ed52690161750c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 17:27:18 +0200 Subject: [PATCH 257/527] Bug #30604: different flagging of time_zone_used in normal and ps-protocol Finding a routine should be a transparent operation as far as the binary log is concerned. But it was influencing the binary log because of the TIMESTAMP column in the proc table. Fixed by preserving and restoring the time_zone usage flag when searching for a stored routine in the proc table. mysql-test/r/binlog_innodb.result: Bug #30604: test case mysql-test/r/ctype_cp932_binlog.result: Bug #30604: updated test results (a procedure call before that) mysql-test/t/binlog_innodb.test: Bug #30604: test case sql/sp.cc: Bug #30604: finding a routine should be a transparent operation as far as the binary log is concerned. Fixed by preserving and restoring the time_zone usage flag. --- mysql-test/r/binlog_innodb.result | 16 ++++++++++++++++ mysql-test/r/ctype_cp932_binlog.result | 6 +++--- mysql-test/t/binlog_innodb.test | 25 +++++++++++++++++++++++++ sql/sp.cc | 6 ++++++ 4 files changed, 50 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/binlog_innodb.result b/mysql-test/r/binlog_innodb.result index 93414a13ba1..18b4b7c1c93 100644 --- a/mysql-test/r/binlog_innodb.result +++ b/mysql-test/r/binlog_innodb.result @@ -21,3 +21,19 @@ show status like "binlog_cache_disk_use"; Variable_name Value Binlog_cache_disk_use 1 drop table t1; +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=MyISAM; +CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; +CREATE FUNCTION bug23333() +RETURNS int(11) +DETERMINISTIC +BEGIN +INSERT INTO t1 VALUES (NULL); +SELECT COUNT(*) FROM t1 INTO @a; +RETURN @a; +END| +INSERT INTO t2 VALUES (2),(10+bug23333()); +SHOW MASTER STATUS; +File Position Binlog_Do_DB Binlog_Ignore_DB +# 184136 +DROP FUNCTION bug23333; +DROP TABLE t1, t2; diff --git a/mysql-test/r/ctype_cp932_binlog.result b/mysql-test/r/ctype_cp932_binlog.result index 3385cd20ec4..0b4ca93a0dd 100644 --- a/mysql-test/r/ctype_cp932_binlog.result +++ b/mysql-test/r/ctype_cp932_binlog.result @@ -40,6 +40,6 @@ IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 776 Query 1 995 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) -master-bin.000001 995 Query 1 1084 use `test`; DROP PROCEDURE bug18293 -master-bin.000001 1084 Query 1 1163 use `test`; DROP TABLE t4 +master-bin.000001 776 Query 1 987 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) +master-bin.000001 987 Query 1 1076 use `test`; DROP PROCEDURE bug18293 +master-bin.000001 1076 Query 1 1155 use `test`; DROP TABLE t4 diff --git a/mysql-test/t/binlog_innodb.test b/mysql-test/t/binlog_innodb.test index 2da7b2b0895..47b09719ef5 100644 --- a/mysql-test/t/binlog_innodb.test +++ b/mysql-test/t/binlog_innodb.test @@ -37,3 +37,28 @@ show status like "binlog_cache_disk_use"; drop table t1; +# +# Bug #30604: different flagging of time_zone_used in normal and ps-protocol +# + +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=MyISAM; +CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB; + +DELIMITER |; +# the function does not deal with time objects +CREATE FUNCTION bug23333() +RETURNS int(11) +DETERMINISTIC +BEGIN + INSERT INTO t1 VALUES (NULL); + SELECT COUNT(*) FROM t1 INTO @a; + RETURN @a; +END| + +DELIMITER ;| + +INSERT INTO t2 VALUES (2),(10+bug23333()); +--replace_column 1 # +SHOW MASTER STATUS; +DROP FUNCTION bug23333; +DROP TABLE t1, t2; diff --git a/sql/sp.cc b/sql/sp.cc index f8b039626f9..7224d3c4f0e 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -261,6 +261,7 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp) char buff[65]; String str(buff, sizeof(buff), &my_charset_bin); ulong sql_mode; + bool saved_time_zone_used= thd->time_zone_used; Open_tables_state open_tables_state_backup; DBUG_ENTER("db_find_routine"); DBUG_PRINT("enter", ("type: %d name: %.*s", @@ -370,6 +371,11 @@ db_find_routine(THD *thd, int type, sp_name *name, sp_head **sphp) definer, created, modified); done: + /* + Restore the time zone flag as the timezone usage in proc table + does not affect replication. + */ + thd->time_zone_used= saved_time_zone_used; if (table) close_proc_table(thd, &open_tables_state_backup); DBUG_RETURN(ret); From 4b25d5b10cfc47b4ab54f7bcc8dfb4d91c1f4e6d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 09:44:09 -0700 Subject: [PATCH 258/527] Applied InnoDB snapshot innodb-5.1-ss2298 Fixes the following bugs: - Bug #33349: possible race condition revolving around data dictionary and repartitioning Introduce retry/sleep logic as a workaround for a transient bug where ::open fails for partitioned tables randomly if we are using one file per table. - Bug #34053: normal users can enable innodb_monitor logging In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. - Bug #22868: 'Thread thrashing' with > 50 concurrent conns under an upd-intensive workloadw - Bug #29560: InnoDB >= 5.0.30 hangs on adaptive hash rw-lock 'waiting for an X-lock' This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. - Bug #30930: Add auxiliary function to retrieve THD::thread_id Add thd_get_thread_id() function. Also make check_global_access() function visible to InnoDB under INNODB_COMPATIBILITY_HOOKS #define. include/mysql/plugin.h: Add thd_get_thread_id() accessor function mysql-test/r/innodb.result: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2261: branches/5.1: Merge a change from MySQL AB: ChangeSet@2007-10-13 15:49:42+03:00, aelkin@koti.dsl.inet.fi Bug #29136 erred multi-delete on trans table does not rollback the statement innodb.test, innodb.result: trans table specific test added mysql-test/t/innodb.test: Applied InnoDB snapshot innodb-5.1-ss2298 sql/mysql_priv.h: Make check_global_access() declaration available if when INNODB_COMPATIBILITY_HOOKS is defined. sql/sql_class.cc: Add thd_get_thread_id() accessor function. Add 'extern "C"' to definition for thd_get_xid(). Not strictly needed, but in keeping with our coding style. storage/innobase/btr/btr0cur.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2295: branches/5.1: Merge r2294 from branches/5.0: Fix typo and add comma in comment. storage/innobase/handler/ha_innodb.cc: Applied InnoDB snapshot innodb-5.1-ss2298 - But remove the declaration of check_global_access() from ha_innodb.cc, because it is now visible in mysql_priv.h under INNODB_COMPATIBILITY_HOOKS Revision r2270: branches/5.1: Rename the user visible parameter innodb-use-adaptive-hash-indexes to innodb-adaptive-hash-index so that it is in sync with MySQL 5.0. Suggested by: Heikki Approved by: Heikki Revision r2236: branches/5.1: bug#33349 Introduce retry/sleep logic as a workaround for a transient bug where ::open fails for partitioned tables randomly if we are using one file per table. Reviewed by: Heikki Revision r2282: branches/5.1: Fix Bug#34053: * In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. * Implement a mysql-test testcase. Approved by: Heikki Revision r2246: branches/5.1: Fix formatting of the autoinc-lock-mode command line parameter. Old view (./mysqld --help --verbose): --innodb-autoinc-lock-mode=# The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility) 1 => New style AUTOINC locking 2 => No AUTOINC locking (unsafe for SBR) New view: --innodb-autoinc-lock-mode=# The AUTOINC lock modes supported by InnoDB: 0 => Old style AUTOINC locking (for backward compatibility) 1 => New style AUTOINC locking 2 => No AUTOINC locking (unsafe for SBR) Looks like these strings are "automatically" wrapped by MySQL in the following way: * newlines (\n) in the string are ignored * newline separator (\n) is inserted every 57 or so characters. * lots of white space is appended to each inserted new line. Approved by: Heikki storage/innobase/include/os0sync.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/include/read0read.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2188: branches/5.1: Remove unused field can_be_too_old from read_view_struct. storage/innobase/include/row0mysql.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2282: branches/5.1: Fix Bug#34053: * In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. * Implement a mysql-test testcase. Approved by: Heikki Revision r2272: branches/5.1: Fix typo in comment. storage/innobase/include/sync0arr.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/include/sync0rw.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/include/sync0rw.ic: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/include/sync0sync.h: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/include/sync0sync.ic: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/os/os0sync.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/read/read0read.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2188: branches/5.1: Remove unused field can_be_too_old from read_view_struct. storage/innobase/row/row0mysql.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2282: branches/5.1: Fix Bug#34053: * In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. * Implement a mysql-test testcase. Approved by: Heikki Revision r2272: branches/5.1: Fix typo in comment. storage/innobase/srv/srv0srv.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/sync/sync0arr.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/sync/sync0rw.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki storage/innobase/sync/sync0sync.c: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2268: branches/5.1: Port of r2267 This is a combination of changes that forward port the scalability fix applied to 5.0 through r1001. It reverts changes r149 and r122 (these were 5.1 specific changes made in lieu of scalability fix of 5.0) Then it applies r1001 to 5.0 which is the original scalability fix. Finally it applies r2082 which fixes an issue with the original fix. Reviewed by: Heikki mysql-test/r/innodb_bug34053.result: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2282: branches/5.1: Fix Bug#34053: * In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. * Implement a mysql-test testcase. Approved by: Heikki mysql-test/t/innodb_bug34053.test: Applied InnoDB snapshot innodb-5.1-ss2298 Revision r2282: branches/5.1: Fix Bug#34053: * In CREATE TABLE and DROP TABLE check whether the table in question is one of the magic innodb_monitor tables and whether the user has enough rights to mess with it before doing anything else. * Implement a mysql-test testcase. Approved by: Heikki --- include/mysql/plugin.h | 10 + mysql-test/r/innodb.result | 17 +- mysql-test/r/innodb_bug34053.result | 1 + mysql-test/t/innodb.test | 32 +++ mysql-test/t/innodb_bug34053.test | 49 ++++ sql/mysql_priv.h | 10 +- sql/sql_class.cc | 12 + storage/innobase/btr/btr0cur.c | 2 +- storage/innobase/handler/ha_innodb.cc | 69 +++-- storage/innobase/include/os0sync.h | 38 ++- storage/innobase/include/read0read.h | 4 - storage/innobase/include/row0mysql.h | 12 +- storage/innobase/include/sync0arr.h | 21 +- storage/innobase/include/sync0rw.h | 12 + storage/innobase/include/sync0rw.ic | 12 +- storage/innobase/include/sync0sync.h | 1 + storage/innobase/include/sync0sync.ic | 2 +- storage/innobase/os/os0sync.c | 111 ++++++- storage/innobase/read/read0read.c | 5 - storage/innobase/row/row0mysql.c | 62 ++-- storage/innobase/srv/srv0srv.c | 16 +- storage/innobase/sync/sync0arr.c | 398 +++++++++++--------------- storage/innobase/sync/sync0rw.c | 20 +- storage/innobase/sync/sync0sync.c | 51 +++- 24 files changed, 632 insertions(+), 335 deletions(-) create mode 100644 mysql-test/r/innodb_bug34053.result create mode 100644 mysql-test/t/innodb_bug34053.test diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 50ec051d111..7f96d3f33b7 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -714,6 +714,16 @@ int mysql_tmpfile(const char *prefix); */ int thd_killed(const MYSQL_THD thd); + +/** + Return the thread id of a user thread + + @param thd user thread connection handle + @return thread id +*/ +unsigned long thd_get_thread_id(const MYSQL_THD thd); + + /** Allocate memory in the connection's local memory pool diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 0a2cb61b18d..15d451c03ae 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1062,6 +1062,19 @@ select count(*) from t2 /* must be 2 as restored after rollback caused by the er count(*) 2 drop table t1, t2; +drop table if exists t1, t2; +CREATE TABLE t1 (a int, PRIMARY KEY (a)); +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; +create trigger trg_del_t2 after delete on t2 for each row +insert into t1 values (1); +insert into t1 values (1); +insert into t2 values (1),(2); +delete t2 from t2; +ERROR 23000: Duplicate entry '1' for key 'PRIMARY' +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */; +count(*) +2 +drop table t1, t2; create table t1 (a int, b int) engine=innodb; insert into t1 values(20,null); select t2.b, ifnull(t2.b,"this is null") from t1 as t2 left join t1 as t3 on @@ -1727,10 +1740,10 @@ Variable_name Value Innodb_page_size 16384 show status like "Innodb_rows_deleted"; Variable_name Value -Innodb_rows_deleted 70 +Innodb_rows_deleted 71 show status like "Innodb_rows_inserted"; Variable_name Value -Innodb_rows_inserted 1082 +Innodb_rows_inserted 1084 show status like "Innodb_rows_updated"; Variable_name Value Innodb_rows_updated 885 diff --git a/mysql-test/r/innodb_bug34053.result b/mysql-test/r/innodb_bug34053.result new file mode 100644 index 00000000000..195775f74c8 --- /dev/null +++ b/mysql-test/r/innodb_bug34053.result @@ -0,0 +1 @@ +SET storage_engine=InnoDB; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index bfe7d4ea9b4..54d4ca94f84 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -752,6 +752,38 @@ select count(*) from t2 /* must be 2 as restored after rollback caused by the er drop table t1, t2; +# +# Bug #29136 erred multi-delete on trans table does not rollback +# + +# prepare +--disable_warnings +drop table if exists t1, t2; +--enable_warnings +CREATE TABLE t1 (a int, PRIMARY KEY (a)); +CREATE TABLE t2 (a int, PRIMARY KEY (a)) ENGINE=InnoDB; +create trigger trg_del_t2 after delete on t2 for each row + insert into t1 values (1); +insert into t1 values (1); +insert into t2 values (1),(2); + + +# exec cases A, B - see multi_update.test + +# A. send_error() w/o send_eof() branch + +--error ER_DUP_ENTRY +delete t2 from t2; + +# check + +select count(*) from t2 /* must be 2 as restored after rollback caused by the error */; + +# cleanup bug#29136 + +drop table t1, t2; + + # # Testing of IFNULL # diff --git a/mysql-test/t/innodb_bug34053.test b/mysql-test/t/innodb_bug34053.test new file mode 100644 index 00000000000..5fbe09070b8 --- /dev/null +++ b/mysql-test/t/innodb_bug34053.test @@ -0,0 +1,49 @@ +# +# Make sure http://bugs.mysql.com/34053 remains fixed. +# + +-- source include/have_innodb.inc + +SET storage_engine=InnoDB; + +# we do not really care about what gets printed, we are only +# interested in getting success or failure according to our +# expectations +-- disable_query_log +-- disable_result_log + +GRANT USAGE ON *.* TO 'shane'@'localhost' IDENTIFIED BY '12345'; +FLUSH PRIVILEGES; + +-- connect (con1,localhost,shane,12345,) + +-- connection con1 +-- error ER_SPECIFIC_ACCESS_DENIED_ERROR +CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB; +-- error ER_SPECIFIC_ACCESS_DENIED_ERROR +CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB; +CREATE TABLE innodb_monitorx (a INT) ENGINE=INNODB; +DROP TABLE innodb_monitorx; +CREATE TABLE innodb_monito (a INT) ENGINE=INNODB; +DROP TABLE innodb_monito; +CREATE TABLE xinnodb_monitor (a INT) ENGINE=INNODB; +DROP TABLE xinnodb_monitor; +CREATE TABLE nnodb_monitor (a INT) ENGINE=INNODB; +DROP TABLE nnodb_monitor; + +-- connection default +CREATE TABLE innodb_monitor (a INT) ENGINE=INNODB; +CREATE TABLE innodb_mem_validate (a INT) ENGINE=INNODB; + +-- connection con1 +-- error ER_SPECIFIC_ACCESS_DENIED_ERROR +DROP TABLE innodb_monitor; +-- error ER_SPECIFIC_ACCESS_DENIED_ERROR +DROP TABLE innodb_mem_validate; + +-- connection default +DROP TABLE innodb_monitor; +DROP TABLE innodb_mem_validate; +DROP USER 'shane'@'localhost'; + +-- disconnect con1 diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index ea552414d9a..5ed670c32ed 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1035,7 +1035,6 @@ bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv, bool no_grant, bool no_errors, bool schema_db); bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables, uint number, bool no_errors); -bool check_global_access(THD *thd, ulong want_access); #else inline bool check_access(THD *thd, ulong access, const char *db, ulong *save_priv, bool no_grant, bool no_errors, @@ -1048,9 +1047,18 @@ inline bool check_access(THD *thd, ulong access, const char *db, inline bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables, uint number, bool no_errors) { return false; } +#endif /*NO_EMBEDDED_ACCESS_CHECKS*/ + +#endif /* MYSQL_SERVER */ +#if defined MYSQL_SERVER || defined INNODB_COMPATIBILITY_HOOKS +#ifndef NO_EMBEDDED_ACCESS_CHECKS +bool check_global_access(THD *thd, ulong want_access); +#else inline bool check_global_access(THD *thd, ulong want_access) { return false; } #endif /*NO_EMBEDDED_ACCESS_CHECKS*/ +#endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */ +#ifdef MYSQL_SERVER /* Support routine for SQL parser on partitioning syntax diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 5180cafc774..351e5e8aae8 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -682,6 +682,7 @@ void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size) return thd->memdup(str, size); } +extern "C" void thd_get_xid(const MYSQL_THD thd, MYSQL_XID *xid) { *xid = *(MYSQL_XID *) &thd->transaction.xid_state.xid; @@ -2760,6 +2761,17 @@ extern "C" int thd_killed(const MYSQL_THD thd) return(thd->killed); } +/** + Return the thread id of a user thread + @param thd user thread + @return thread id +*/ +extern "C" unsigned long thd_get_thread_id(const MYSQL_THD thd) +{ + return((unsigned long)thd->thread_id); +} + + #ifdef INNODB_COMPATIBILITY_HOOKS extern "C" struct charset_info_st *thd_charset(MYSQL_THD thd) { diff --git a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c index 975d5252a2f..54acdf73db6 100644 --- a/storage/innobase/btr/btr0cur.c +++ b/storage/innobase/btr/btr0cur.c @@ -52,7 +52,7 @@ can be released by page reorganize, then it is reorganized */ #define BTR_CUR_PAGE_REORGANIZE_LIMIT (UNIV_PAGE_SIZE / 32) -/* When estimating number of different kay values in an index sample +/* When estimating number of different key values in an index, sample this many index pages */ #define BTR_KEY_VAL_ESTIMATE_N_PAGES 8 diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e66d5b84d19..f81804c0701 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -129,7 +129,7 @@ static my_bool innobase_locks_unsafe_for_binlog = FALSE; static my_bool innobase_rollback_on_timeout = FALSE; static my_bool innobase_create_status_file = FALSE; static my_bool innobase_stats_on_metadata = TRUE; -static my_bool innobase_use_adaptive_hash_indexes = TRUE; +static my_bool innobase_adaptive_hash_index = TRUE; static char* internal_innobase_data_file_path = NULL; @@ -1627,7 +1627,7 @@ innobase_init( srv_stats_on_metadata = (ibool) innobase_stats_on_metadata; srv_use_adaptive_hash_indexes = - (ibool) innobase_use_adaptive_hash_indexes; + (ibool) innobase_adaptive_hash_index; srv_print_verbose_log = mysqld_embedded ? 0 : 1; @@ -2275,6 +2275,8 @@ ha_innobase::open( dict_table_t* ib_table; char norm_name[1000]; THD* thd; + ulint retries = 0; + char* is_part = NULL; DBUG_ENTER("ha_innobase::open"); @@ -2308,11 +2310,29 @@ ha_innobase::open( DBUG_RETURN(1); } + /* We look for pattern #P# to see if the table is partitioned + MySQL table. The retry logic for partitioned tables is a + workaround for http://bugs.mysql.com/bug.php?id=33349. Look + at support issue https://support.mysql.com/view.php?id=21080 + for more details. */ + is_part = strstr(norm_name, "#P#"); +retry: /* Get pointer to a table object in InnoDB dictionary cache */ - ib_table = dict_table_get(norm_name, TRUE); - + if (NULL == ib_table) { + if (is_part && retries < 10) { + ++retries; + os_thread_sleep(100000); + goto retry; + } + + if (is_part) { + sql_print_error("Failed to open table %s after " + "%lu attemtps.\n", norm_name, + retries); + } + sql_print_error("Cannot find or open table %s from\n" "the internal data dictionary of InnoDB " "though the .frm file for the\n" @@ -4625,6 +4645,12 @@ innodb_check_for_record_too_big_error( } } +/* limit innodb monitor access to users with PROCESS privilege. +See http://bugs.mysql.com/32710 for expl. why we choose PROCESS. */ +#define IS_MAGIC_TABLE_AND_USER_DENIED_ACCESS(table_name, thd) \ + (row_is_magic_monitor_table(table_name) \ + && check_global_access(thd, PROCESS_ACL)) + /********************************************************************* Creates a table definition to an InnoDB database. */ static @@ -4661,6 +4687,12 @@ create_table_def( DBUG_ENTER("create_table_def"); DBUG_PRINT("enter", ("table_name: %s", table_name)); + ut_a(trx->mysql_thd != NULL); + if (IS_MAGIC_TABLE_AND_USER_DENIED_ACCESS(table_name, + (THD*) trx->mysql_thd)) { + DBUG_RETURN(HA_ERR_GENERIC); + } + n_cols = form->s->fields; /* We pass 0 as the space id, and determine at a lower level the space @@ -5201,6 +5233,14 @@ ha_innobase::delete_table( DBUG_ENTER("ha_innobase::delete_table"); + /* Strangely, MySQL passes the table name without the '.frm' + extension, in contrast to ::create */ + normalize_table_name(norm_name, name); + + if (IS_MAGIC_TABLE_AND_USER_DENIED_ACCESS(norm_name, thd)) { + DBUG_RETURN(HA_ERR_GENERIC); + } + /* Get the transaction associated with the current thd, or create one if not yet created */ @@ -5234,11 +5274,6 @@ ha_innobase::delete_table( assert(name_len < 1000); - /* Strangely, MySQL passes the table name without the '.frm' - extension, in contrast to ::create */ - - normalize_table_name(norm_name, name); - /* Drop the table in InnoDB */ error = row_drop_table_for_mysql(norm_name, trx, @@ -7988,9 +8023,10 @@ static MYSQL_SYSVAR_BOOL(stats_on_metadata, innobase_stats_on_metadata, "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)", NULL, NULL, TRUE); -static MYSQL_SYSVAR_BOOL(use_adaptive_hash_indexes, innobase_use_adaptive_hash_indexes, +static MYSQL_SYSVAR_BOOL(adaptive_hash_index, innobase_adaptive_hash_index, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, - "Enable the InnoDB adaptive hash indexes (enabled by default)", + "Enable InnoDB adaptive hash index (enabled by default). " + "Disable with --skip-innodb-adaptive-hash-index.", NULL, NULL, TRUE); static MYSQL_SYSVAR_LONG(additional_mem_pool_size, innobase_additional_mem_pool_size, @@ -8080,10 +8116,11 @@ static MYSQL_SYSVAR_STR(data_file_path, innobase_data_file_path, static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode, PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY, - "The AUTOINC lock modes supported by InnoDB:\n" - " 0 => Old style AUTOINC locking (for backward compatibility)\n" - " 1 => New style AUTOINC locking\n" - " 2 => No AUTOINC locking (unsafe for SBR)", + "The AUTOINC lock modes supported by InnoDB: " + "0 => Old style AUTOINC locking (for backward" + " compatibility) " + "1 => New style AUTOINC locking " + "2 => No AUTOINC locking (unsafe for SBR)", NULL, NULL, AUTOINC_NEW_STYLE_LOCKING, /* Default setting */ AUTOINC_OLD_STYLE_LOCKING, /* Minimum value */ @@ -8121,7 +8158,7 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(open_files), MYSQL_SYSVAR(rollback_on_timeout), MYSQL_SYSVAR(stats_on_metadata), - MYSQL_SYSVAR(use_adaptive_hash_indexes), + MYSQL_SYSVAR(adaptive_hash_index), MYSQL_SYSVAR(status_file), MYSQL_SYSVAR(support_xa), MYSQL_SYSVAR(sync_spin_loops), diff --git a/storage/innobase/include/os0sync.h b/storage/innobase/include/os0sync.h index 0239cc853ed..a39a331c297 100644 --- a/storage/innobase/include/os0sync.h +++ b/storage/innobase/include/os0sync.h @@ -112,9 +112,13 @@ os_event_set( os_event_t event); /* in: event to set */ /************************************************************** Resets an event semaphore to the nonsignaled state. Waiting threads will -stop to wait for the event. */ +stop to wait for the event. +The return value should be passed to os_even_wait_low() if it is desired +that this thread should not wait in case of an intervening call to +os_event_set() between this os_event_reset() and the +os_event_wait_low() call. See comments for os_event_wait_low(). */ -void +ib_longlong os_event_reset( /*===========*/ os_event_t event); /* in: event to reset */ @@ -125,16 +129,38 @@ void os_event_free( /*==========*/ os_event_t event); /* in: event to free */ + /************************************************************** Waits for an event object until it is in the signaled state. If srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS this also exits the waiting thread when the event becomes signaled (or immediately if the -event is already in the signaled state). */ +event is already in the signaled state). + +Typically, if the event has been signalled after the os_event_reset() +we'll return immediately because event->is_set == TRUE. +There are, however, situations (e.g.: sync_array code) where we may +lose this information. For example: + +thread A calls os_event_reset() +thread B calls os_event_set() [event->is_set == TRUE] +thread C calls os_event_reset() [event->is_set == FALSE] +thread A calls os_event_wait() [infinite wait!] +thread C calls os_event_wait() [infinite wait!] + +Where such a scenario is possible, to avoid infinite wait, the +value returned by os_event_reset() should be passed in as +reset_sig_count. */ + +#define os_event_wait(event) os_event_wait_low((event), 0) void -os_event_wait( -/*==========*/ - os_event_t event); /* in: event to wait */ +os_event_wait_low( +/*==============*/ + os_event_t event, /* in: event to wait */ + ib_longlong reset_sig_count);/* in: zero or the value + returned by previous call of + os_event_reset(). */ + /************************************************************** Waits for an event object until it is in the signaled state or a timeout is exceeded. In Unix the timeout is always infinite. */ diff --git a/storage/innobase/include/read0read.h b/storage/innobase/include/read0read.h index 8089a620536..97b6d7e9dd9 100644 --- a/storage/innobase/include/read0read.h +++ b/storage/innobase/include/read0read.h @@ -111,10 +111,6 @@ struct read_view_struct{ dulint undo_no; /* (0, 0) or if type is VIEW_HIGH_GRANULARITY transaction undo_no when this high-granularity consistent read view was created */ - ibool can_be_too_old; /* TRUE if the system has had to purge old - versions which this read view should be able - to access: the read view can bump into the - DB_MISSING_HISTORY error */ dulint low_limit_no; /* The view does not need to see the undo logs for transactions whose transaction number is strictly smaller (<) than this value: they diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index fd7ec8918ee..f486caa874d 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -319,7 +319,7 @@ row_mysql_unfreeze_data_dictionary( /*===============================*/ trx_t* trx); /* in: transaction */ /************************************************************************* -Drops a table for MySQL. If the name of the table ends in +Creates a table for MySQL. If the name of the table ends in one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", "innodb_table_monitor", then this will also start the printing of monitor output by the master thread. If the table name ends in "innodb_mem_validate", @@ -464,6 +464,16 @@ row_check_table_for_mysql( row_prebuilt_t* prebuilt); /* in: prebuilt struct in MySQL handle */ +/************************************************************************* +Determines if a table is a magic monitor table. */ + +ibool +row_is_magic_monitor_table( +/*=======================*/ + /* out: TRUE if monitor table */ + const char* table_name); /* in: name of the table, in the + form database/table_name */ + /* A struct describing a place for an individual column in the MySQL row format which is presented to the table handler in ha_innobase. This template struct is used to speed up row transformations between diff --git a/storage/innobase/include/sync0arr.h b/storage/innobase/include/sync0arr.h index d4407e14dc4..fae26b7a63e 100644 --- a/storage/innobase/include/sync0arr.h +++ b/storage/innobase/include/sync0arr.h @@ -66,26 +66,21 @@ sync_array_wait_event( sync_array_t* arr, /* in: wait array */ ulint index); /* in: index of the reserved cell */ /********************************************************************** -Frees the cell safely by reserving the sync array mutex and decrementing -n_reserved if necessary. Should only be called from mutex_spin_wait. */ +Frees the cell. NOTE! sync_array_wait_event frees the cell +automatically! */ void -sync_array_free_cell_protected( -/*===========================*/ +sync_array_free_cell( +/*=================*/ sync_array_t* arr, /* in: wait array */ ulint index); /* in: index of the cell in array */ /************************************************************************** -Looks for the cells in the wait array which refer -to the wait object specified, -and sets their corresponding events to the signaled state. In this -way releases the threads waiting for the object to contend for the object. -It is possible that no such cell is found, in which case does nothing. */ +Note that one of the wait objects was signalled. */ void -sync_array_signal_object( -/*=====================*/ - sync_array_t* arr, /* in: wait array */ - void* object);/* in: wait object */ +sync_array_object_signalled( +/*========================*/ + sync_array_t* arr); /* in: wait array */ /************************************************************************** If the wakeup algorithm does not work perfectly at semaphore relases, this function will do the waking (see the comment in mutex_exit). This diff --git a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0rw.h index 7d2f63803d0..008df80a2c7 100644 --- a/storage/innobase/include/sync0rw.h +++ b/storage/innobase/include/sync0rw.h @@ -421,6 +421,18 @@ blocked by readers, a writer may queue for the lock by setting the writer field. Then no new readers are allowed in. */ struct rw_lock_struct { + os_event_t event; /* Used by sync0arr.c for thread queueing */ + +#ifdef __WIN__ + os_event_t wait_ex_event; /* This windows specific event is + used by the thread which has set the + lock state to RW_LOCK_WAIT_EX. The + rw_lock design guarantees that this + thread will be the next one to proceed + once the current the event gets + signalled. See LEMMA 2 in sync0sync.c */ +#endif + ulint reader_count; /* Number of readers who have locked this lock in the shared mode */ ulint writer; /* This field is set to RW_LOCK_EX if there diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index b41593d0a96..eea639f26f4 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -381,7 +381,11 @@ rw_lock_s_unlock_func( mutex_exit(mutex); if (UNIV_UNLIKELY(sg)) { - sync_array_signal_object(sync_primary_wait_array, lock); +#ifdef __WIN__ + os_event_set(lock->wait_ex_event); +#endif + os_event_set(lock->event); + sync_array_object_signalled(sync_primary_wait_array); } ut_ad(rw_lock_validate(lock)); @@ -461,7 +465,11 @@ rw_lock_x_unlock_func( mutex_exit(&(lock->mutex)); if (UNIV_UNLIKELY(sg)) { - sync_array_signal_object(sync_primary_wait_array, lock); +#ifdef __WIN__ + os_event_set(lock->wait_ex_event); +#endif + os_event_set(lock->event); + sync_array_object_signalled(sync_primary_wait_array); } ut_ad(rw_lock_validate(lock)); diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 69c0cd9e39b..6a61330f97e 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -470,6 +470,7 @@ Do not use its fields directly! The structure used in the spin lock implementation of a mutual exclusion semaphore. */ struct mutex_struct { + os_event_t event; /* Used by sync0arr.c for the wait queue */ ulint lock_word; /* This ulint is the target of the atomic test-and-set instruction in Win32 */ #if !defined(_WIN32) || !defined(UNIV_CAN_USE_X86_ASSEMBLER) diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic index 9bd5ac2a518..908797f9729 100644 --- a/storage/innobase/include/sync0sync.ic +++ b/storage/innobase/include/sync0sync.ic @@ -211,7 +211,7 @@ mutex_exit( perform the read first, which could leave a waiting thread hanging indefinitely. - Our current solution call every 10 seconds + Our current solution call every second sync_arr_wake_threads_if_sema_free() to wake up possible hanging threads if they are missed in mutex_signal_object. */ diff --git a/storage/innobase/os/os0sync.c b/storage/innobase/os/os0sync.c index 9c6b1134e12..18fd38f3f9b 100644 --- a/storage/innobase/os/os0sync.c +++ b/storage/innobase/os/os0sync.c @@ -21,6 +21,7 @@ Created 9/6/1995 Heikki Tuuri /* Type definition for an operating system mutex struct */ struct os_mutex_struct{ + os_event_t event; /* Used by sync0arr.c for queing threads */ void* handle; /* OS handle to mutex */ ulint count; /* we use this counter to check that the same thread does not @@ -35,6 +36,7 @@ struct os_mutex_struct{ /* Mutex protecting counts and the lists of OS mutexes and events */ os_mutex_t os_sync_mutex; ibool os_sync_mutex_inited = FALSE; +ibool os_sync_free_called = FALSE; /* This is incremented by 1 in os_thread_create and decremented by 1 in os_thread_exit */ @@ -50,6 +52,10 @@ ulint os_event_count = 0; ulint os_mutex_count = 0; ulint os_fast_mutex_count = 0; +/* Because a mutex is embedded inside an event and there is an +event embedded inside a mutex, on free, this generates a recursive call. +This version of the free event function doesn't acquire the global lock */ +static void os_event_free_internal(os_event_t event); /************************************************************* Initializes global event and OS 'slow' mutex lists. */ @@ -76,6 +82,7 @@ os_sync_free(void) os_event_t event; os_mutex_t mutex; + os_sync_free_called = TRUE; event = UT_LIST_GET_FIRST(os_event_list); while (event) { @@ -99,6 +106,7 @@ os_sync_free(void) mutex = UT_LIST_GET_FIRST(os_mutex_list); } + os_sync_free_called = FALSE; } /************************************************************* @@ -144,17 +152,31 @@ os_event_create( ut_a(0 == pthread_cond_init(&(event->cond_var), NULL)); #endif event->is_set = FALSE; - event->signal_count = 0; + + /* We return this value in os_event_reset(), which can then be + be used to pass to the os_event_wait_low(). The value of zero + is reserved in os_event_wait_low() for the case when the + caller does not want to pass any signal_count value. To + distinguish between the two cases we initialize signal_count + to 1 here. */ + event->signal_count = 1; #endif /* __WIN__ */ - /* Put to the list of events */ - os_mutex_enter(os_sync_mutex); + /* The os_sync_mutex can be NULL because during startup an event + can be created [ because it's embedded in the mutex/rwlock ] before + this module has been initialized */ + if (os_sync_mutex != NULL) { + os_mutex_enter(os_sync_mutex); + } + /* Put to the list of events */ UT_LIST_ADD_FIRST(os_event_list, os_event_list, event); os_event_count++; - os_mutex_exit(os_sync_mutex); + if (os_sync_mutex != NULL) { + os_mutex_exit(os_sync_mutex); + } return(event); } @@ -231,13 +253,20 @@ os_event_set( /************************************************************** Resets an event semaphore to the nonsignaled state. Waiting threads will -stop to wait for the event. */ +stop to wait for the event. +The return value should be passed to os_even_wait_low() if it is desired +that this thread should not wait in case of an intervening call to +os_event_set() between this os_event_reset() and the +os_event_wait_low() call. See comments for os_event_wait_low(). */ -void +ib_longlong os_event_reset( /*===========*/ + /* out: current signal_count. */ os_event_t event) /* in: event to reset */ { + ib_longlong ret = 0; + #ifdef __WIN__ ut_a(event); @@ -252,9 +281,40 @@ os_event_reset( } else { event->is_set = FALSE; } + ret = event->signal_count; os_fast_mutex_unlock(&(event->os_mutex)); #endif + return(ret); +} + +/************************************************************** +Frees an event object, without acquiring the global lock. */ +static +void +os_event_free_internal( +/*===================*/ + os_event_t event) /* in: event to free */ +{ +#ifdef __WIN__ + ut_a(event); + + ut_a(CloseHandle(event->handle)); +#else + ut_a(event); + + /* This is to avoid freeing the mutex twice */ + os_fast_mutex_free(&(event->os_mutex)); + + ut_a(0 == pthread_cond_destroy(&(event->cond_var))); +#endif + /* Remove from the list of events */ + + UT_LIST_REMOVE(os_event_list, os_event_list, event); + + os_event_count--; + + ut_free(event); } /************************************************************** @@ -293,18 +353,38 @@ os_event_free( Waits for an event object until it is in the signaled state. If srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS this also exits the waiting thread when the event becomes signaled (or immediately if the -event is already in the signaled state). */ +event is already in the signaled state). + +Typically, if the event has been signalled after the os_event_reset() +we'll return immediately because event->is_set == TRUE. +There are, however, situations (e.g.: sync_array code) where we may +lose this information. For example: + +thread A calls os_event_reset() +thread B calls os_event_set() [event->is_set == TRUE] +thread C calls os_event_reset() [event->is_set == FALSE] +thread A calls os_event_wait() [infinite wait!] +thread C calls os_event_wait() [infinite wait!] + +Where such a scenario is possible, to avoid infinite wait, the +value returned by os_event_reset() should be passed in as +reset_sig_count. */ void -os_event_wait( -/*==========*/ - os_event_t event) /* in: event to wait */ +os_event_wait_low( +/*==============*/ + os_event_t event, /* in: event to wait */ + ib_longlong reset_sig_count)/* in: zero or the value + returned by previous call of + os_event_reset(). */ { #ifdef __WIN__ DWORD err; ut_a(event); + UT_NOT_USED(reset_sig_count); + /* Specify an infinite time limit for waiting */ err = WaitForSingleObject(event->handle, INFINITE); @@ -318,7 +398,11 @@ os_event_wait( os_fast_mutex_lock(&(event->os_mutex)); - old_signal_count = event->signal_count; + if (reset_sig_count) { + old_signal_count = reset_sig_count; + } else { + old_signal_count = event->signal_count; + } for (;;) { if (event->is_set == TRUE @@ -458,6 +542,7 @@ os_mutex_create( mutex_str->handle = mutex; mutex_str->count = 0; + mutex_str->event = os_event_create(NULL); if (os_sync_mutex_inited) { /* When creating os_sync_mutex itself we cannot reserve it */ @@ -534,6 +619,10 @@ os_mutex_free( { ut_a(mutex); + if (!os_sync_free_called) { + os_event_free_internal(mutex->event); + } + if (os_sync_mutex_inited) { os_mutex_enter(os_sync_mutex); } diff --git a/storage/innobase/read/read0read.c b/storage/innobase/read/read0read.c index 10a6e07e96a..4068cf4fa69 100644 --- a/storage/innobase/read/read0read.c +++ b/storage/innobase/read/read0read.c @@ -212,7 +212,6 @@ read_view_oldest_copy_or_open_new( view_copy->low_limit_no = old_view->low_limit_no; view_copy->low_limit_id = old_view->low_limit_id; - view_copy->can_be_too_old = FALSE; if (n > 0) { /* The last active transaction has the smallest id: */ @@ -258,8 +257,6 @@ read_view_open_now( view->low_limit_no = trx_sys->max_trx_id; view->low_limit_id = view->low_limit_no; - view->can_be_too_old = FALSE; - n = 0; trx = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -432,8 +429,6 @@ read_cursor_view_create_for_mysql( view->low_limit_no = trx_sys->max_trx_id; view->low_limit_id = view->low_limit_no; - view->can_be_too_old = FALSE; - n = 0; trx = UT_LIST_GET_FIRST(trx_sys->trx_list); diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 9348cfa7342..d5ef12d0af2 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -57,6 +57,12 @@ static const char S_innodb_tablespace_monitor[] = "innodb_tablespace_monitor"; static const char S_innodb_table_monitor[] = "innodb_table_monitor"; static const char S_innodb_mem_validate[] = "innodb_mem_validate"; +/* Evaluates to true if str1 equals str2_onstack, used for comparing +the above strings. */ +#define STR_EQ(str1, str1_len, str2_onstack) \ + ((str1_len) == sizeof(str2_onstack) \ + && memcmp(str1, str2_onstack, sizeof(str2_onstack)) == 0) + /*********************************************************************** Determine if the given name is a name reserved for MySQL system tables. */ static @@ -1728,7 +1734,7 @@ row_mysql_unlock_data_dictionary( } /************************************************************************* -Drops a table for MySQL. If the name of the table ends in +Creates a table for MySQL. If the name of the table ends in one of "innodb_monitor", "innodb_lock_monitor", "innodb_tablespace_monitor", "innodb_table_monitor", then this will also start the printing of monitor output by the master thread. If the table name ends in "innodb_mem_validate", @@ -1809,9 +1815,7 @@ row_create_table_for_mysql( table_name++; table_name_len = strlen(table_name) + 1; - if (table_name_len == sizeof S_innodb_monitor - && !memcmp(table_name, S_innodb_monitor, - sizeof S_innodb_monitor)) { + if (STR_EQ(table_name, table_name_len, S_innodb_monitor)) { /* Table equals "innodb_monitor": start monitor prints */ @@ -1822,28 +1826,24 @@ row_create_table_for_mysql( of InnoDB monitor prints */ os_event_set(srv_lock_timeout_thread_event); - } else if (table_name_len == sizeof S_innodb_lock_monitor - && !memcmp(table_name, S_innodb_lock_monitor, - sizeof S_innodb_lock_monitor)) { + } else if (STR_EQ(table_name, table_name_len, + S_innodb_lock_monitor)) { srv_print_innodb_monitor = TRUE; srv_print_innodb_lock_monitor = TRUE; os_event_set(srv_lock_timeout_thread_event); - } else if (table_name_len == sizeof S_innodb_tablespace_monitor - && !memcmp(table_name, S_innodb_tablespace_monitor, - sizeof S_innodb_tablespace_monitor)) { + } else if (STR_EQ(table_name, table_name_len, + S_innodb_tablespace_monitor)) { srv_print_innodb_tablespace_monitor = TRUE; os_event_set(srv_lock_timeout_thread_event); - } else if (table_name_len == sizeof S_innodb_table_monitor - && !memcmp(table_name, S_innodb_table_monitor, - sizeof S_innodb_table_monitor)) { + } else if (STR_EQ(table_name, table_name_len, + S_innodb_table_monitor)) { srv_print_innodb_table_monitor = TRUE; os_event_set(srv_lock_timeout_thread_event); - } else if (table_name_len == sizeof S_innodb_mem_validate - && !memcmp(table_name, S_innodb_mem_validate, - sizeof S_innodb_mem_validate)) { + } else if (STR_EQ(table_name, table_name_len, + S_innodb_mem_validate)) { /* We define here a debugging feature intended for developers */ @@ -4130,3 +4130,33 @@ row_check_table_for_mysql( return(ret); } + +/************************************************************************* +Determines if a table is a magic monitor table. */ + +ibool +row_is_magic_monitor_table( +/*=======================*/ + /* out: TRUE if monitor table */ + const char* table_name) /* in: name of the table, in the + form database/table_name */ +{ + const char* name; /* table_name without database/ */ + ulint len; + + name = strchr(table_name, '/'); + ut_a(name != NULL); + name++; + len = strlen(name) + 1; + + if (STR_EQ(name, len, S_innodb_monitor) + || STR_EQ(name, len, S_innodb_lock_monitor) + || STR_EQ(name, len, S_innodb_tablespace_monitor) + || STR_EQ(name, len, S_innodb_table_monitor) + || STR_EQ(name, len, S_innodb_mem_validate)) { + + return(TRUE); + } + + return(FALSE); +} diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 82b55789be2..1b13b19783e 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -1904,12 +1904,6 @@ loop: os_thread_sleep(1000000); - /* In case mutex_exit is not a memory barrier, it is - theoretically possible some threads are left waiting though - the semaphore is already released. Wake up those threads: */ - - sync_arr_wake_threads_if_sema_free(); - current_time = time(NULL); time_elapsed = difftime(current_time, last_monitor_time); @@ -2106,9 +2100,15 @@ loop: srv_refresh_innodb_monitor_stats(); } + /* In case mutex_exit is not a memory barrier, it is + theoretically possible some threads are left waiting though + the semaphore is already released. Wake up those threads: */ + + sync_arr_wake_threads_if_sema_free(); + if (sync_array_print_long_waits()) { fatal_cnt++; - if (fatal_cnt > 5) { + if (fatal_cnt > 10) { fprintf(stderr, "InnoDB: Error: semaphore wait has lasted" @@ -2128,7 +2128,7 @@ loop: fflush(stderr); - os_thread_sleep(2000000); + os_thread_sleep(1000000); if (srv_shutdown_state < SRV_SHUTDOWN_CLEANUP) { diff --git a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c index 82b08a890e0..154593a9035 100644 --- a/storage/innobase/sync/sync0arr.c +++ b/storage/innobase/sync/sync0arr.c @@ -40,24 +40,23 @@ because we can do with a very small number of OS events, say 200. In NT 3.51, allocating events seems to be a quadratic algorithm, because 10 000 events are created fast, but 100 000 events takes a couple of minutes to create. -*/ + +As of 5.0.30 the above mentioned design is changed. Since now +OS can handle millions of wait events efficiently, we no longer +have this concept of each cell of wait array having one event. +Instead, now the event that a thread wants to wait on is embedded +in the wait object (mutex or rw_lock). We still keep the global +wait array for the sake of diagnostics and also to avoid infinite +wait The error_monitor thread scans the global wait array to signal +any waiting threads who have missed the signal. */ /* A cell where an individual thread may wait suspended until a resource is released. The suspending is implemented using an operating system event semaphore. */ struct sync_cell_struct { - /* State of the cell. SC_WAKING_UP means - sync_array_struct->n_reserved has been decremented, but the thread - in this cell has not waken up yet. When it does, it will set the - state to SC_FREE. Note that this is done without the protection of - any mutex. */ - enum { SC_FREE, SC_RESERVED, SC_WAKING_UP } state; - void* wait_object; /* pointer to the object the - thread is waiting for; this is not - reseted to NULL when a cell is - freed. */ - + thread is waiting for; if NULL + the cell is free for use */ mutex_t* old_wait_mutex; /* the latest wait mutex in cell */ rw_lock_t* old_wait_rw_lock;/* the latest wait rw-lock in cell */ ulint request_type; /* lock type requested on the @@ -71,13 +70,23 @@ struct sync_cell_struct { ibool waiting; /* TRUE if the thread has already called sync_array_event_wait on this cell */ - ibool event_set; /* TRUE if the event is set */ - os_event_t event; /* operating system event - semaphore handle */ + ib_longlong signal_count; /* We capture the signal_count + of the wait_object when we + reset the event. This value is + then passed on to os_event_wait + and we wait only if the event + has not been signalled in the + period between the reset and + wait call. */ time_t reservation_time;/* time when the thread reserved the wait cell */ }; +/* NOTE: It is allowed for a thread to wait +for an event allocated for the array without owning the +protecting mutex (depending on the case: OS or database mutex), but +all changes (set or reset) to the state of the event must be made +while owning the mutex. */ struct sync_array_struct { ulint n_reserved; /* number of currently reserved cells in the wait array */ @@ -220,12 +229,9 @@ sync_array_create( for (i = 0; i < n_cells; i++) { cell = sync_array_get_nth_cell(arr, i); - cell->state = SC_FREE; - cell->wait_object = NULL; - - /* Create an operating system event semaphore with no name */ - cell->event = os_event_create(NULL); - cell->event_set = FALSE; /* it is created in reset state */ + cell->wait_object = NULL; + cell->waiting = FALSE; + cell->signal_count = 0; } return(arr); @@ -239,19 +245,12 @@ sync_array_free( /*============*/ sync_array_t* arr) /* in, own: sync wait array */ { - ulint i; - sync_cell_t* cell; ulint protection; ut_a(arr->n_reserved == 0); sync_array_validate(arr); - for (i = 0; i < arr->n_cells; i++) { - cell = sync_array_get_nth_cell(arr, i); - os_event_free(cell->event); - } - protection = arr->protection; /* Release the mutex protecting the wait array complex */ @@ -285,8 +284,7 @@ sync_array_validate( for (i = 0; i < arr->n_cells; i++) { cell = sync_array_get_nth_cell(arr, i); - - if (cell->state == SC_RESERVED) { + if (cell->wait_object != NULL) { count++; } } @@ -296,6 +294,29 @@ sync_array_validate( sync_array_exit(arr); } +/*********************************************************************** +Puts the cell event in reset state. */ +static +ib_longlong +sync_cell_event_reset( +/*==================*/ + /* out: value of signal_count + at the time of reset. */ + ulint type, /* in: lock type mutex/rw_lock */ + void* object) /* in: the rw_lock/mutex object */ +{ + if (type == SYNC_MUTEX) { + return(os_event_reset(((mutex_t *) object)->event)); +#ifdef __WIN__ + } else if (type == RW_LOCK_WAIT_EX) { + return(os_event_reset( + ((rw_lock_t *) object)->wait_ex_event)); +#endif + } else { + return(os_event_reset(((rw_lock_t *) object)->event)); + } +} + /********************************************************************** Reserves a wait array cell for waiting for an object. The event of the cell is reset to nonsignalled state. */ @@ -324,21 +345,9 @@ sync_array_reserve_cell( for (i = 0; i < arr->n_cells; i++) { cell = sync_array_get_nth_cell(arr, i); - if (cell->state == SC_FREE) { - - /* We do not check cell->event_set because it is - set outside the protection of the sync array mutex - and we had a bug regarding it, and since resetting - an event when it is not needed does no harm it is - safer always to do it. */ - - cell->event_set = FALSE; - os_event_reset(cell->event); - - cell->state = SC_RESERVED; - cell->reservation_time = time(NULL); - cell->thread = os_thread_get_curr_id(); + if (cell->wait_object == NULL) { + cell->waiting = FALSE; cell->wait_object = object; if (type == SYNC_MUTEX) { @@ -348,7 +357,6 @@ sync_array_reserve_cell( } cell->request_type = type; - cell->waiting = FALSE; cell->file = file; cell->line = line; @@ -359,6 +367,16 @@ sync_array_reserve_cell( sync_array_exit(arr); + /* Make sure the event is reset and also store + the value of signal_count at which the event + was reset. */ + cell->signal_count = sync_cell_event_reset(type, + object); + + cell->reservation_time = time(NULL); + + cell->thread = os_thread_get_curr_id(); + return; } } @@ -368,68 +386,6 @@ sync_array_reserve_cell( return; } -/********************************************************************** -Frees the cell. Note that we don't have any mutex reserved when calling -this. */ -static -void -sync_array_free_cell( -/*=================*/ - sync_array_t* arr, /* in: wait array */ - ulint index) /* in: index of the cell in array */ -{ - sync_cell_t* cell; - - cell = sync_array_get_nth_cell(arr, index); - - ut_a(cell->state == SC_WAKING_UP); - ut_a(cell->wait_object != NULL); - - cell->state = SC_FREE; -} - -/********************************************************************** -Frees the cell safely by reserving the sync array mutex and decrementing -n_reserved if necessary. Should only be called from mutex_spin_wait. */ - -void -sync_array_free_cell_protected( -/*===========================*/ - sync_array_t* arr, /* in: wait array */ - ulint index) /* in: index of the cell in array */ -{ - sync_cell_t* cell; - - sync_array_enter(arr); - - cell = sync_array_get_nth_cell(arr, index); - - ut_a(cell->state != SC_FREE); - ut_a(cell->wait_object != NULL); - - /* We only need to decrement n_reserved if it has not already been - done by sync_array_signal_object. */ - if (cell->state == SC_RESERVED) { - ut_a(arr->n_reserved > 0); - arr->n_reserved--; - } else if (cell->state == SC_WAKING_UP) { - /* This is tricky; if we don't wait for the event to be - signaled, signal_object can set the state of a cell to - SC_WAKING_UP, mutex_spin_wait can call this and set the - state to SC_FREE, and then signal_object gets around to - calling os_set_event for the cell but since it's already - been freed things break horribly. */ - - sync_array_exit(arr); - os_event_wait(cell->event); - sync_array_enter(arr); - } - - cell->state = SC_FREE; - - sync_array_exit(arr); -} - /********************************************************************** This function should be called when a thread starts to wait on a wait array cell. In the debug version this function checks @@ -447,15 +403,28 @@ sync_array_wait_event( ut_a(arr); + sync_array_enter(arr); + cell = sync_array_get_nth_cell(arr, index); - ut_a((cell->state == SC_RESERVED) || (cell->state == SC_WAKING_UP)); ut_a(cell->wait_object); ut_a(!cell->waiting); ut_ad(os_thread_get_curr_id() == cell->thread); - event = cell->event; - cell->waiting = TRUE; + if (cell->request_type == SYNC_MUTEX) { + event = ((mutex_t*) cell->wait_object)->event; +#ifdef __WIN__ + /* On windows if the thread about to wait is the one which + has set the state of the rw_lock to RW_LOCK_WAIT_EX, then + it waits on a special event i.e.: wait_ex_event. */ + } else if (cell->request_type == RW_LOCK_WAIT_EX) { + event = ((rw_lock_t*) cell->wait_object)->wait_ex_event; +#endif + } else { + event = ((rw_lock_t*) cell->wait_object)->event; + } + + cell->waiting = TRUE; #ifdef UNIV_SYNC_DEBUG @@ -464,7 +433,6 @@ sync_array_wait_event( recursively sync_array routines, leading to trouble. rw_lock_debug_mutex freezes the debug lists. */ - sync_array_enter(arr); rw_lock_debug_mutex_enter(); if (TRUE == sync_array_detect_deadlock(arr, cell, cell, 0)) { @@ -474,16 +442,16 @@ sync_array_wait_event( } rw_lock_debug_mutex_exit(); - sync_array_exit(arr); #endif - os_event_wait(event); + sync_array_exit(arr); + + os_event_wait_low(event, cell->signal_count); sync_array_free_cell(arr, index); } /********************************************************************** -Reports info of a wait array cell. Note: sync_array_print_long_waits() -calls this without mutex protection. */ +Reports info of a wait array cell. */ static void sync_array_cell_print( @@ -503,17 +471,8 @@ sync_array_cell_print( (ulong) os_thread_pf(cell->thread), cell->file, (ulong) cell->line, difftime(time(NULL), cell->reservation_time)); - fprintf(file, "Wait array cell state %lu\n", (ulong)cell->state); - /* If the memory area pointed to by old_wait_mutex / - old_wait_rw_lock has been freed, this can crash. */ - - if (cell->state != SC_RESERVED) { - /* If cell has this state, then even if we are holding the sync - array mutex, the wait object may get freed meanwhile. Do not - print the wait object then. */ - - } else if (type == SYNC_MUTEX) { + if (type == SYNC_MUTEX) { /* We use old_wait_mutex in case the cell has already been freed meanwhile */ mutex = cell->old_wait_mutex; @@ -531,7 +490,11 @@ sync_array_cell_print( #endif /* UNIV_SYNC_DEBUG */ (ulong) mutex->waiters); - } else if (type == RW_LOCK_EX || type == RW_LOCK_SHARED) { + } else if (type == RW_LOCK_EX +#ifdef __WIN__ + || type == RW_LOCK_WAIT_EX +#endif + || type == RW_LOCK_SHARED) { fputs(type == RW_LOCK_EX ? "X-lock on" : "S-lock on", file); @@ -565,8 +528,8 @@ sync_array_cell_print( ut_error; } - if (cell->event_set) { - fputs("wait is ending\n", file); + if (!cell->waiting) { + fputs("wait has ended\n", file); } } @@ -589,7 +552,7 @@ sync_array_find_thread( cell = sync_array_get_nth_cell(arr, i); - if ((cell->state == SC_RESERVED) + if (cell->wait_object != NULL && os_thread_eq(cell->thread, thread)) { return(cell); /* Found */ @@ -679,7 +642,7 @@ sync_array_detect_deadlock( depth++; - if (cell->event_set || !cell->waiting) { + if (!cell->waiting) { return(FALSE); /* No deadlock here */ } @@ -704,10 +667,8 @@ sync_array_detect_deadlock( depth); if (ret) { fprintf(stderr, - "Mutex %p owned by thread %lu" - " file %s line %lu\n", - (void*) mutex, - (ulong) os_thread_pf(mutex->thread_id), + "Mutex %p owned by thread %lu file %s line %lu\n", + mutex, (ulong) os_thread_pf(mutex->thread_id), mutex->file_name, (ulong) mutex->line); sync_array_cell_print(stderr, cell); @@ -717,7 +678,8 @@ sync_array_detect_deadlock( return(FALSE); /* No deadlock */ - } else if (cell->request_type == RW_LOCK_EX) { + } else if (cell->request_type == RW_LOCK_EX + || cell->request_type == RW_LOCK_WAIT_EX) { lock = cell->wait_object; @@ -816,7 +778,8 @@ sync_arr_cell_can_wake_up( return(TRUE); } - } else if (cell->request_type == RW_LOCK_EX) { + } else if (cell->request_type == RW_LOCK_EX + || cell->request_type == RW_LOCK_WAIT_EX) { lock = cell->wait_object; @@ -845,101 +808,47 @@ sync_arr_cell_can_wake_up( return(FALSE); } -/************************************************************************** -Looks for the cells in the wait array which refer to the wait object -specified, and sets their corresponding events to the signaled state. In this -way releases the threads waiting for the object to contend for the object. -It is possible that no such cell is found, in which case does nothing. */ +/********************************************************************** +Frees the cell. NOTE! sync_array_wait_event frees the cell +automatically! */ void -sync_array_signal_object( -/*=====================*/ +sync_array_free_cell( +/*=================*/ sync_array_t* arr, /* in: wait array */ - void* object) /* in: wait object */ + ulint index) /* in: index of the cell in array */ { sync_cell_t* cell; - ulint count; - ulint i; - ulint res_count; - /* We store the addresses of cells we need to signal and signal - them only after we have released the sync array's mutex (for - performance reasons). cell_count is the number of such cells, and - cell_ptr points to the first one. If there are less than - UT_ARR_SIZE(cells) of them, cell_ptr == &cells[0], otherwise - cell_ptr points to malloc'd memory that we must free. */ + sync_array_enter(arr); - sync_cell_t* cells[100]; - sync_cell_t** cell_ptr = &cells[0]; - ulint cell_count = 0; - ulint cell_max_count = UT_ARR_SIZE(cells); + cell = sync_array_get_nth_cell(arr, index); - ut_a(100 == cell_max_count); + ut_a(cell->wait_object != NULL); + cell->waiting = FALSE; + cell->wait_object = NULL; + cell->signal_count = 0; + + ut_a(arr->n_reserved > 0); + arr->n_reserved--; + + sync_array_exit(arr); +} + +/************************************************************************** +Increments the signalled count. */ + +void +sync_array_object_signalled( +/*========================*/ + sync_array_t* arr) /* in: wait array */ +{ sync_array_enter(arr); arr->sg_count++; - i = 0; - count = 0; - - /* We need to store this to a local variable because it is modified - inside the loop */ - res_count = arr->n_reserved; - - while (count < res_count) { - - cell = sync_array_get_nth_cell(arr, i); - - if (cell->state == SC_RESERVED) { - - count++; - if (cell->wait_object == object) { - cell->state = SC_WAKING_UP; - - ut_a(arr->n_reserved > 0); - arr->n_reserved--; - - if (cell_count == cell_max_count) { - sync_cell_t** old_cell_ptr = cell_ptr; - size_t old_size, new_size; - - old_size = cell_max_count - * sizeof(sync_cell_t*); - cell_max_count *= 2; - new_size = cell_max_count - * sizeof(sync_cell_t*); - - cell_ptr = malloc(new_size); - ut_a(cell_ptr); - memcpy(cell_ptr, old_cell_ptr, - old_size); - - if (old_cell_ptr != &cells[0]) { - free(old_cell_ptr); - } - } - - cell_ptr[cell_count] = cell; - cell_count++; - } - } - - i++; - } - sync_array_exit(arr); - - for (i = 0; i < cell_count; i++) { - cell = cell_ptr[i]; - - cell->event_set = TRUE; - os_event_set(cell->event); - } - - if (cell_ptr != &cells[0]) { - free(cell_ptr); - } } /************************************************************************** @@ -959,33 +868,41 @@ sync_arr_wake_threads_if_sema_free(void) sync_cell_t* cell; ulint count; ulint i; - ulint res_count; sync_array_enter(arr); i = 0; count = 0; - /* We need to store this to a local variable because it is modified - inside the loop */ - - res_count = arr->n_reserved; - - while (count < res_count) { + while (count < arr->n_reserved) { cell = sync_array_get_nth_cell(arr, i); - if (cell->state == SC_RESERVED) { + if (cell->wait_object != NULL) { count++; if (sync_arr_cell_can_wake_up(cell)) { - cell->state = SC_WAKING_UP; - cell->event_set = TRUE; - os_event_set(cell->event); - ut_a(arr->n_reserved > 0); - arr->n_reserved--; + if (cell->request_type == SYNC_MUTEX) { + mutex_t* mutex; + + mutex = cell->wait_object; + os_event_set(mutex->event); +#ifdef __WIN__ + } else if (cell->request_type + == RW_LOCK_WAIT_EX) { + rw_lock_t* lock; + + lock = cell->wait_object; + os_event_set(lock->wait_ex_event); +#endif + } else { + rw_lock_t* lock; + + lock = cell->wait_object; + os_event_set(lock->event); + } } } @@ -1015,7 +932,7 @@ sync_array_print_long_waits(void) cell = sync_array_get_nth_cell(sync_primary_wait_array, i); - if ((cell->state != SC_FREE) + if (cell->wait_object != NULL && cell->waiting && difftime(time(NULL), cell->reservation_time) > 240) { fputs("InnoDB: Warning: a long semaphore wait:\n", stderr); @@ -1023,7 +940,7 @@ sync_array_print_long_waits(void) noticed = TRUE; } - if ((cell->state != SC_FREE) + if (cell->wait_object != NULL && cell->waiting && difftime(time(NULL), cell->reservation_time) > fatal_timeout) { fatal = TRUE; @@ -1072,20 +989,25 @@ sync_array_output_info( mutex */ { sync_cell_t* cell; + ulint count; ulint i; fprintf(file, - "OS WAIT ARRAY INFO: reservation count %ld," - " signal count %ld\n", - (long) arr->res_count, - (long) arr->sg_count); - for (i = 0; i < arr->n_cells; i++) { + "OS WAIT ARRAY INFO: reservation count %ld, signal count %ld\n", + (long) arr->res_count, (long) arr->sg_count); + i = 0; + count = 0; + + while (count < arr->n_reserved) { cell = sync_array_get_nth_cell(arr, i); - if (cell->state != SC_FREE) { + if (cell->wait_object != NULL) { + count++; sync_array_cell_print(file, cell); } + + i++; } } diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c index 8dbc69816e9..367f019ce55 100644 --- a/storage/innobase/sync/sync0rw.c +++ b/storage/innobase/sync/sync0rw.c @@ -151,6 +151,11 @@ rw_lock_create_func( lock->last_x_file_name = "not yet reserved"; lock->last_s_line = 0; lock->last_x_line = 0; + lock->event = os_event_create(NULL); + +#ifdef __WIN__ + lock->wait_ex_event = os_event_create(NULL); +#endif mutex_enter(&rw_lock_list_mutex); @@ -184,6 +189,11 @@ rw_lock_free( mutex_free(rw_lock_get_mutex(lock)); mutex_enter(&rw_lock_list_mutex); + os_event_free(lock->event); + +#ifdef __WIN__ + os_event_free(lock->wait_ex_event); +#endif if (UT_LIST_GET_PREV(list, lock)) { ut_a(UT_LIST_GET_PREV(list, lock)->magic_n == RW_LOCK_MAGIC_N); @@ -544,7 +554,15 @@ lock_loop: rw_x_system_call_count++; sync_array_reserve_cell(sync_primary_wait_array, - lock, RW_LOCK_EX, + lock, +#ifdef __WIN__ + /* On windows RW_LOCK_WAIT_EX signifies + that this thread should wait on the + special wait_ex_event. */ + (state == RW_LOCK_WAIT_EX) + ? RW_LOCK_WAIT_EX : +#endif + RW_LOCK_EX, file_name, line, &index); diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c index 39872f72204..944fd2a97fc 100644 --- a/storage/innobase/sync/sync0sync.c +++ b/storage/innobase/sync/sync0sync.c @@ -95,17 +95,47 @@ have happened that the thread which was holding the mutex has just released it and did not see the waiters byte set to 1, a case which would lead the other thread to an infinite wait. -LEMMA 1: After a thread resets the event of the cell it reserves for waiting -======== -for a mutex, some thread will eventually call sync_array_signal_object with -the mutex as an argument. Thus no infinite wait is possible. +LEMMA 1: After a thread resets the event of a mutex (or rw_lock), some +======= +thread will eventually call os_event_set() on that particular event. +Thus no infinite wait is possible in this case. Proof: After making the reservation the thread sets the waiters field in the mutex to 1. Then it checks that the mutex is still reserved by some thread, or it reserves the mutex for itself. In any case, some thread (which may be also some earlier thread, not necessarily the one currently holding the mutex) will set the waiters field to 0 in mutex_exit, and then call -sync_array_signal_object with the mutex as an argument. +os_event_set() with the mutex as an argument. +Q.E.D. + +LEMMA 2: If an os_event_set() call is made after some thread has called +======= +the os_event_reset() and before it starts wait on that event, the call +will not be lost to the second thread. This is true even if there is an +intervening call to os_event_reset() by another thread. +Thus no infinite wait is possible in this case. + +Proof (non-windows platforms): os_event_reset() returns a monotonically +increasing value of signal_count. This value is increased at every +call of os_event_set() If thread A has called os_event_reset() followed +by thread B calling os_event_set() and then some other thread C calling +os_event_reset(), the is_set flag of the event will be set to FALSE; +but now if thread A calls os_event_wait_low() with the signal_count +value returned from the earlier call of os_event_reset(), it will +return immediately without waiting. +Q.E.D. + +Proof (windows): If there is a writer thread which is forced to wait for +the lock, it may be able to set the state of rw_lock to RW_LOCK_WAIT_EX +The design of rw_lock ensures that there is one and only one thread +that is able to change the state to RW_LOCK_WAIT_EX and this thread is +guaranteed to acquire the lock after it is released by the current +holders and before any other waiter gets the lock. +On windows this thread waits on a separate event i.e.: wait_ex_event. +Since only one thread can wait on this event there is no chance +of this event getting reset before the writer starts wait on it. +Therefore, this thread is guaranteed to catch the os_set_event() +signalled unconditionally at the release of the lock. Q.E.D. */ /* The number of system calls made in this module. Intended for performance @@ -217,6 +247,7 @@ mutex_create_func( os_fast_mutex_init(&(mutex->os_fast_mutex)); mutex->lock_word = 0; #endif + mutex->event = os_event_create(NULL); mutex_set_waiters(mutex, 0); #ifdef UNIV_DEBUG mutex->magic_n = MUTEX_MAGIC_N; @@ -300,6 +331,8 @@ mutex_free( mutex_exit(&mutex_list_mutex); } + os_event_free(mutex->event); + #if !defined(_WIN32) || !defined(UNIV_CAN_USE_X86_ASSEMBLER) os_fast_mutex_free(&(mutex->os_fast_mutex)); #endif @@ -509,8 +542,7 @@ spin_loop: if (mutex_test_and_set(mutex) == 0) { /* Succeeded! Free the reserved wait cell */ - sync_array_free_cell_protected(sync_primary_wait_array, - index); + sync_array_free_cell(sync_primary_wait_array, index); ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG @@ -591,8 +623,8 @@ mutex_signal_object( /* The memory order of resetting the waiters field and signaling the object is important. See LEMMA 1 above. */ - - sync_array_signal_object(sync_primary_wait_array, mutex); + os_event_set(mutex->event); + sync_array_object_signalled(sync_primary_wait_array); } #ifdef UNIV_SYNC_DEBUG @@ -1130,6 +1162,7 @@ sync_thread_add_level( break; case SYNC_TREE_NODE: ut_a(sync_thread_levels_contain(array, SYNC_INDEX_TREE) + || sync_thread_levels_contain(array, SYNC_DICT_OPERATION) || sync_thread_levels_g(array, SYNC_TREE_NODE - 1)); break; case SYNC_TREE_NODE_NEW: From 205d448b01b93e3aa10507e933337b51e885f9dd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 18:45:11 +0100 Subject: [PATCH 259/527] fixes for build failures due to my yesterday's changeset forbidding bool in C. client/get_password.c: fix for build failure include/thr_alarm.h: fix for build failure libmysql/dll.c: fix for build failure libmysql/get_password.c: fix for build failure mysys/thr_alarm.c: fix for build failure --- client/get_password.c | 2 +- include/thr_alarm.h | 2 +- libmysql/dll.c | 2 +- libmysql/get_password.c | 2 +- mysys/thr_alarm.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/get_password.c b/client/get_password.c index 37761d5bb5d..ea024f76fb6 100644 --- a/client/get_password.c +++ b/client/get_password.c @@ -107,7 +107,7 @@ char *get_tty_password(const char *opt_message) * to will not include the eol characters. */ -static void get_password(char *to,uint length,int fd,bool echo) +static void get_password(char *to,uint length,int fd, my_bool echo) { char *pos=to,*end=to+length; diff --git a/include/thr_alarm.h b/include/thr_alarm.h index a2694ba105b..fb906039269 100644 --- a/include/thr_alarm.h +++ b/include/thr_alarm.h @@ -98,7 +98,7 @@ void thr_end_alarm(thr_alarm_t *alarmed); void end_thr_alarm(my_bool free_structures); sig_handler process_alarm(int); #ifndef thr_got_alarm -bool thr_got_alarm(thr_alarm_t *alrm); +my_bool thr_got_alarm(thr_alarm_t *alrm); #endif diff --git a/libmysql/dll.c b/libmysql/dll.c index f5db0bb4669..7aa3b5bf96f 100644 --- a/libmysql/dll.c +++ b/libmysql/dll.c @@ -25,7 +25,7 @@ #include #include -static bool libmysql_inited=0; +static my_bool libmysql_inited=0; void libmysql_init(void) { diff --git a/libmysql/get_password.c b/libmysql/get_password.c index 4c251677a66..cbe5fce6949 100644 --- a/libmysql/get_password.c +++ b/libmysql/get_password.c @@ -118,7 +118,7 @@ char *get_tty_password(const char *opt_message) to will not include the eol characters. */ -static void get_password(char *to,uint length,int fd,bool echo) +static void get_password(char *to,uint length,int fd, my_bool echo) { char *pos=to,*end=to+length; diff --git a/mysys/thr_alarm.c b/mysys/thr_alarm.c index afa5aadece7..b710a7eee39 100644 --- a/mysys/thr_alarm.c +++ b/mysys/thr_alarm.c @@ -632,7 +632,7 @@ my_bool thr_alarm(thr_alarm_t *alrm, uint sec, ALARM *alarm) } -bool thr_got_alarm(thr_alarm_t *alrm_ptr) +my_bool thr_got_alarm(thr_alarm_t *alrm_ptr) { thr_alarm_t alrm= *alrm_ptr; MSG msg; From 5d1e8e12c3a2c606eb5072bc7c85fc719fbf30fb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 19:59:48 +0100 Subject: [PATCH 260/527] Removing deliberately generated errors for rpl_bug33931 test and moving test to replication suite. mysql-test/suite/rpl/t/rpl_bug33931-slave.opt: Rename: mysql-test/t/rpl_bug33931-slave.opt -> mysql-test/suite/rpl/t/rpl_bug33931-slave.opt mysql-test/suite/rpl/t/rpl_bug33931.test: Rename: mysql-test/t/rpl_bug33931.test -> mysql-test/suite/rpl/t/rpl_bug33931.test mysql-test/suite/rpl/r/rpl_bug33931.result: Rename: mysql-test/r/rpl_bug33931.result -> mysql-test/suite/rpl/r/rpl_bug33931.result mysql-test/lib/mtr_report.pl: Removing deliberately generated errors for rpl_bug33931 test. --- mysql-test/lib/mtr_report.pl | 5 +++++ mysql-test/{ => suite/rpl}/r/rpl_bug33931.result | 0 mysql-test/{ => suite/rpl}/t/rpl_bug33931-slave.opt | 0 mysql-test/{ => suite/rpl}/t/rpl_bug33931.test | 0 4 files changed, 5 insertions(+) rename mysql-test/{ => suite/rpl}/r/rpl_bug33931.result (100%) rename mysql-test/{ => suite/rpl}/t/rpl_bug33931-slave.opt (100%) rename mysql-test/{ => suite/rpl}/t/rpl_bug33931.test (100%) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index ecfdc00eaf9..2aeda9933f0 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -383,6 +383,11 @@ sub mtr_report_stats ($) { (/Failed to write to mysql\.\w+_log/ )) or + # rpl_bug33931 has deliberate failures + ($testname eq 'rpl.rpl_bug33931' and + (/Failed during slave.*thread initialization/ + )) or + # rpl_temporary has an error on slave that can be ignored ($testname eq 'rpl.rpl_temporary' and (/Slave: Can\'t find record in \'user\' Error_code: 1032/ diff --git a/mysql-test/r/rpl_bug33931.result b/mysql-test/suite/rpl/r/rpl_bug33931.result similarity index 100% rename from mysql-test/r/rpl_bug33931.result rename to mysql-test/suite/rpl/r/rpl_bug33931.result diff --git a/mysql-test/t/rpl_bug33931-slave.opt b/mysql-test/suite/rpl/t/rpl_bug33931-slave.opt similarity index 100% rename from mysql-test/t/rpl_bug33931-slave.opt rename to mysql-test/suite/rpl/t/rpl_bug33931-slave.opt diff --git a/mysql-test/t/rpl_bug33931.test b/mysql-test/suite/rpl/t/rpl_bug33931.test similarity index 100% rename from mysql-test/t/rpl_bug33931.test rename to mysql-test/suite/rpl/t/rpl_bug33931.test From 533d4354635163a5430d77d85a131909d991731c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 23:47:15 +0300 Subject: [PATCH 261/527] Fix a compilation failure of the community tree. --- sql/sql_profile.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_profile.cc b/sql/sql_profile.cc index 1922fa3bc2b..c62cf6401ba 100644 --- a/sql/sql_profile.cc +++ b/sql/sql_profile.cc @@ -456,7 +456,7 @@ bool PROFILING::show_profiles() if (protocol->write()) DBUG_RETURN(TRUE); } - send_eof(thd); + my_eof(thd); DBUG_RETURN(FALSE); } From 61c31af45d075e1aa1135b502209c04ca890425f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 00:33:43 +0300 Subject: [PATCH 262/527] Fix for bug #31236: Inconsistent division by zero behavior for floating point numbers Some math functions did not check if the result is a valid number (i.e. neither of +-inf or nan). Fixed by validating the result where necessary and returning NULL in case of invalid result. BitKeeper/deleted/.del-matherr.c: Rename: sql/matherr.c -> BitKeeper/deleted/.del-matherr.c configure.in: Removed DONT_USE_FINITE, it is not used anywhere. include/my_global.h: isfinite() is a C99 macro which absoletes finite(). First try to use it, then fall back to finite() if the target platform has it, otherwise use our own implementation. mysql-test/r/func_math.result: Added a test case for bug #31236. mysql-test/r/strict.result: Fixed a test case which relied on old behavior. mysql-test/t/func_math.test: Added a test case for bug #31236. mysql-test/t/strict.test: Fixed a test case which relied on old behavior. sql/field.cc: No need to check if the finite() or its equivalent is available. sql/item_func.cc: Use fix_result() wherever the result can be one of +-inf or nan, assuming the function arguments are valid numbers. Removed fix_result() from functions that are defined for all possible input numbers. sql/item_func.h: Moved fix_result() from Item_dec_func to Item_func which is a common ancestor for Item_dec_func and Item_num_op. sql/unireg.h: Removed POSTFIX_ERROR because no code returns it. --- configure.in | 4 ++-- include/my_global.h | 13 ++++++----- mysql-test/r/func_math.result | 19 ++++++++++++++++ mysql-test/r/strict.result | 5 ++--- mysql-test/t/func_math.test | 14 +++++++++++- mysql-test/t/strict.test | 1 - sql/field.cc | 4 +--- sql/item_func.cc | 22 +++++++++--------- sql/item_func.h | 19 ++++++---------- sql/matherr.c | 42 ----------------------------------- sql/unireg.h | 1 - 11 files changed, 62 insertions(+), 82 deletions(-) delete mode 100644 sql/matherr.c diff --git a/configure.in b/configure.in index 1ad79c398fb..2212e3924dc 100644 --- a/configure.in +++ b/configure.in @@ -991,8 +991,8 @@ case $SYSTEM_TYPE in ;; *hpux11.*) AC_MSG_WARN([Enabling workarounds for hpux 11]) - CFLAGS="$CFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" - CXXFLAGS="$CXXFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" + CFLAGS="$CFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" + CXXFLAGS="$CXXFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT" if test "$with_named_thread" = "no" then AC_MSG_WARN([Using --with-named-thread=-lpthread]) diff --git a/include/my_global.h b/include/my_global.h index 4b0786aa826..26412d4102e 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -486,9 +486,6 @@ C_MODE_END #include /* HPUX 10.20 defines ulong here. UGLY !!! */ #define HAVE_ULONG #endif -#ifdef DONT_USE_FINITE /* HPUX 11.x has is_finite() */ -#undef HAVE_FINITE -#endif #if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD) /* Fix bug in setrlimit */ #undef setrlimit @@ -858,9 +855,13 @@ typedef SOCKET_SIZE_TYPE size_socket; #define SIZE_T_MAX ~((size_t) 0) #endif -#ifndef HAVE_FINITE +#ifndef isfinite +#ifdef HAVE_FINITE +#define isfinite(x) finite(x) +#else #define finite(x) (1.0 / fabs(x) > 0.0) -#endif +#endif /* HAVE_FINITE */ +#endif /* isfinite */ #ifndef HAVE_ISNAN #define isnan(x) ((x) != (x)) @@ -870,7 +871,7 @@ typedef SOCKET_SIZE_TYPE size_socket; /* isinf() can be used in both C and C++ code */ #define my_isinf(X) isinf(X) #else -#define my_isinf(X) (!finite(X) && !isnan(X)) +#define my_isinf(X) (!isfinite(X) && !isnan(X)) #endif /* Define missing math constants. */ diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index 6a476d12896..b4a07f18521 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -408,3 +408,22 @@ a DIV 2 0 DROP TABLE t1; End of 5.0 tests +SELECT 1e308 + 1e308; +1e308 + 1e308 +NULL +SELECT -1e308 - 1e308; +-1e308 - 1e308 +NULL +SELECT 1e300 * 1e300; +1e300 * 1e300 +NULL +SELECT 1e300 / 1e-300; +1e300 / 1e-300 +NULL +SELECT EXP(750); +EXP(750) +NULL +SELECT POW(10, 309); +POW(10, 309) +NULL +End of 5.1 tests diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index cc1a2535896..a257d0a8648 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -895,7 +895,6 @@ ERROR 22003: Out of range value for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES ('-1.2E-3'); ERROR 22003: Out of range value for column 'col2' at row 1 UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; -ERROR 22003: Out of range value for column 'col1' at row 3 UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; ERROR 22012: Division by 0 UPDATE t1 SET col2= MOD(col2,0) WHERE col2 > 0; @@ -923,10 +922,10 @@ SELECT * FROM t1; col1 col2 -2.2e-307 0 1e-303 0 -1.7e+308 1.7e+308 +NULL 1.7e+308 -2.2e-307 0 -2e-307 0 -1.7e+308 1.7e+308 +NULL 1.7e+308 0 NULL 2 NULL NULL NULL diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test index 274a953a314..87b172a6436 100644 --- a/mysql-test/t/func_math.test +++ b/mysql-test/t/func_math.test @@ -248,5 +248,17 @@ INSERT INTO t1 VALUES ('a'); SELECT a DIV 2 FROM t1 UNION SELECT a DIV 2 FROM t1; DROP TABLE t1; - --echo End of 5.0 tests + +# +# Bug #31236: Inconsistent division by zero behavior for floating point numbers +# + +SELECT 1e308 + 1e308; +SELECT -1e308 - 1e308; +SELECT 1e300 * 1e300; +SELECT 1e300 / 1e-300; +SELECT EXP(750); +SELECT POW(10, 309); + +--echo End of 5.1 tests diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 2b71bf1093c..486f7ce7897 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -822,7 +822,6 @@ INSERT INTO t1 (col2) VALUES (-1.1E-3); INSERT INTO t1 (col1) VALUES ('+1.8E+309'); --error 1264 INSERT INTO t1 (col2) VALUES ('-1.2E-3'); ---error 1264 UPDATE t1 SET col1 =col1 * 5000 WHERE col1 > 0; --error 1365 UPDATE t1 SET col2 =col2 / 0 WHERE col2 > 0; diff --git a/sql/field.cc b/sql/field.cc index 668ced4a229..19eb43862d5 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -2263,13 +2263,11 @@ int Field_decimal::store(double nr) return 1; } -#ifdef HAVE_FINITE - if (!finite(nr)) // Handle infinity as special case + if (!isfinite(nr)) // Handle infinity as special case { overflow(nr < 0.0); return 1; } -#endif reg4 uint i; size_t length; diff --git a/sql/item_func.cc b/sql/item_func.cc index 8fd6f0966ad..3d6ed590f81 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1104,7 +1104,7 @@ double Item_func_plus::real_op() double value= args[0]->val_real() + args[1]->val_real(); if ((null_value=args[0]->null_value || args[1]->null_value)) return 0.0; - return value; + return fix_result(value); } @@ -1186,7 +1186,7 @@ double Item_func_minus::real_op() double value= args[0]->val_real() - args[1]->val_real(); if ((null_value=args[0]->null_value || args[1]->null_value)) return 0.0; - return value; + return fix_result(value); } @@ -1224,7 +1224,7 @@ double Item_func_mul::real_op() double value= args[0]->val_real() * args[1]->val_real(); if ((null_value=args[0]->null_value || args[1]->null_value)) return 0.0; - return value; + return fix_result(value); } @@ -1282,7 +1282,7 @@ double Item_func_div::real_op() signal_divide_by_null(); return 0.0; } - return value/val2; + return fix_result(value/val2); } @@ -1655,7 +1655,7 @@ double Item_func_exp::val_real() double value= args[0]->val_real(); if ((null_value=args[0]->null_value)) return 0.0; /* purecov: inspected */ - return exp(value); + return fix_result(exp(value)); } double Item_func_sqrt::val_real() @@ -1674,7 +1674,7 @@ double Item_func_pow::val_real() double val2= args[1]->val_real(); if ((null_value=(args[0]->null_value || args[1]->null_value))) return 0.0; /* purecov: inspected */ - return pow(value,val2); + return fix_result(pow(value,val2)); } // Trigonometric functions @@ -1686,7 +1686,7 @@ double Item_func_acos::val_real() volatile double value= args[0]->val_real(); if ((null_value=(args[0]->null_value || (value < -1.0 || value > 1.0)))) return 0.0; - return fix_result(acos(value)); + return acos(value); } double Item_func_asin::val_real() @@ -1696,7 +1696,7 @@ double Item_func_asin::val_real() volatile double value= args[0]->val_real(); if ((null_value=(args[0]->null_value || (value < -1.0 || value > 1.0)))) return 0.0; - return fix_result(asin(value)); + return asin(value); } double Item_func_atan::val_real() @@ -1712,7 +1712,7 @@ double Item_func_atan::val_real() return 0.0; return fix_result(atan2(value,val2)); } - return fix_result(atan(value)); + return atan(value); } double Item_func_cos::val_real() @@ -1721,7 +1721,7 @@ double Item_func_cos::val_real() double value= args[0]->val_real(); if ((null_value=args[0]->null_value)) return 0.0; - return fix_result(cos(value)); + return cos(value); } double Item_func_sin::val_real() @@ -1730,7 +1730,7 @@ double Item_func_sin::val_real() double value= args[0]->val_real(); if ((null_value=args[0]->null_value)) return 0.0; - return fix_result(sin(value)); + return sin(value); } double Item_func_tan::val_real() diff --git a/sql/item_func.h b/sql/item_func.h index e09b584de95..cdcbbdab150 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -192,6 +192,13 @@ public: void * arg, traverse_order order); bool is_expensive_processor(uchar *arg); virtual bool is_expensive() { return 0; } + inline double fix_result(double value) + { + if (isfinite(value)) + return value; + null_value=1; + return 0.0; + } }; @@ -499,18 +506,6 @@ class Item_dec_func :public Item_real_func decimals=NOT_FIXED_DEC; max_length=float_length(decimals); maybe_null=1; } - inline double fix_result(double value) - { -#ifndef HAVE_FINITE - return value; -#else - /* The following should be safe, even if we compare doubles */ - if (finite(value) && value != POSTFIX_ERROR) - return value; - null_value=1; - return 0.0; -#endif - } }; class Item_func_exp :public Item_dec_func diff --git a/sql/matherr.c b/sql/matherr.c deleted file mode 100644 index 4998d8b4961..00000000000 --- a/sql/matherr.c +++ /dev/null @@ -1,42 +0,0 @@ -/* 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 */ - -/* Fix that we got POSTFIX_ERROR when doing unreasonable math (not core) */ - -#include -#include - - /* Fix that we gets POSTFIX_ERROR when error in math */ - -#if defined(HAVE_MATHERR) -int matherr(struct exception *x) -{ - if (x->type != PLOSS) - x->retval=POSTFIX_ERROR; - switch (x->type) { - case DOMAIN: - case SING: - my_errno=EDOM; - break; - case OVERFLOW: - case UNDERFLOW: - my_errno=ERANGE; - break; - default: - break; - } - return(1); /* Take no other action */ -} -#endif diff --git a/sql/unireg.h b/sql/unireg.h index f0b4a88c7f8..a18d42baeaa 100644 --- a/sql/unireg.h +++ b/sql/unireg.h @@ -108,7 +108,6 @@ #define READ_RECORD_BUFFER (uint) (IO_SIZE*8) /* Pointer_buffer_size */ #define DISK_BUFFER_SIZE (uint) (IO_SIZE*16) /* Size of diskbuffer */ -#define POSTFIX_ERROR DBL_MAX #define ME_INFO (ME_HOLDTANG+ME_OLDWIN+ME_NOREFRESH) #define ME_ERROR (ME_BELL+ME_OLDWIN+ME_NOREFRESH) From 40089da1db09fc58aa1c696809e91cf471d30948 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Feb 2008 13:46:54 -0800 Subject: [PATCH 263/527] backport valgrind cleanups from 6.0-engines mysql-test/valgrind.supp: silence valgrind warning of memory leak in dlopen strings/strmake.c: silence valgrind warning cause by strlen examining unset bytes. --- mysql-test/valgrind.supp | 13 +++++++++++++ strings/strmake.c | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mysql-test/valgrind.supp b/mysql-test/valgrind.supp index a4fb488a3d6..cb1b07c83b0 100644 --- a/mysql-test/valgrind.supp +++ b/mysql-test/valgrind.supp @@ -495,3 +495,16 @@ fun:_db_enter_ fun:kill_server } + +# +# Warning caused by small memory leak in threaded dlopen +# + +{ + dlopen threaded memory leak + Memcheck:Leak + fun:calloc + obj:*/libdl-*.so + fun:dlopen* +} + diff --git a/strings/strmake.c b/strings/strmake.c index df8d78e8476..2d5fa5e36aa 100644 --- a/strings/strmake.c +++ b/strings/strmake.c @@ -41,9 +41,9 @@ char *strmake(register char *dst, register const char *src, size_t length) write a character rather than '\0' as this makes spotting these problems in the results easier. */ - uint n= strlen(src) + 1; - if (n <= length) - memset(dst + n, (int) 'Z', length - n + 1); + uint n= 0; + while (n < length && src[n++]); + memset(dst + n, (int) 'Z', length - n + 1); #endif while (length--) From 9dfc925db0db97f20a561d976bd9c2c40917600a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 12:52:04 +0100 Subject: [PATCH 264/527] Upon the sql command flush logs, we need to ensure that all outstanding ndb data to be logged has made it to the binary log to get a deterministic behavior on the rotation of the log. --- sql/ha_ndbcluster_binlog.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 841dce2d832..af185e97360 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -683,6 +683,18 @@ static void ndbcluster_reset_slave(THD *thd) /* Initialize the binlog part of the ndb handlerton */ + +/** + Upon the sql command flush logs, we need to ensure that all outstanding + ndb data to be logged has made it to the binary log to get a deterministic + behavior on the rotation of the log. + */ +static bool ndbcluster_flush_logs(handlerton *hton) +{ + ndbcluster_binlog_wait(current_thd); + return FALSE; +} + static int ndbcluster_binlog_func(handlerton *hton, THD *thd, enum_binlog_func fn, void *arg) @@ -711,6 +723,7 @@ static int ndbcluster_binlog_func(handlerton *hton, THD *thd, void ndbcluster_binlog_init_handlerton() { handlerton *h= ndbcluster_hton; + h->flush_logs= ndbcluster_flush_logs; h->binlog_func= ndbcluster_binlog_func; h->binlog_log_query= ndbcluster_binlog_log_query; } From f8ff8c01e4fcc440efa7c9b0f2c7bed1b07c6582 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 14:40:46 +0100 Subject: [PATCH 265/527] Patch for bug#32664: event.test has timeout randomly. File is split into event_1.test and event_2.test. BitKeeper/deleted/.del-events.test: Delete: mysql-test/t/events.test BitKeeper/deleted/.del-events.result: Delete: mysql-test/r/events.result BitKeeper/etc/ignore: Added mysql-test/reg.log to the ignore list --- .bzrignore | 1 + .../r/{events.result => events_1.result} | 319 +------------- mysql-test/r/events_2.result | 321 ++++++++++++++ mysql-test/t/disabled.def | 1 - mysql-test/t/{events.test => events_1.test} | 393 +---------------- mysql-test/t/events_2.test | 409 ++++++++++++++++++ 6 files changed, 734 insertions(+), 710 deletions(-) rename mysql-test/r/{events.result => events_1.result} (62%) create mode 100644 mysql-test/r/events_2.result rename mysql-test/t/{events.test => events_1.test} (54%) create mode 100644 mysql-test/t/events_2.test diff --git a/.bzrignore b/.bzrignore index 756f66e1e8c..507f04363f9 100644 --- a/.bzrignore +++ b/.bzrignore @@ -3019,3 +3019,4 @@ mysql-test/.DS_Store .DS_Store libmysqld/sql_profile.cc mysql-test/suite/funcs_1.tar.zip +mysql-test/reg.log diff --git a/mysql-test/r/events.result b/mysql-test/r/events_1.result similarity index 62% rename from mysql-test/r/events.result rename to mysql-test/r/events_1.result index 7b68914e219..e7b645f5556 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events_1.result @@ -309,7 +309,7 @@ ERROR HY000: Unknown event 'intact_check' DROP EVENT no_such_event; ERROR HY000: Unknown event 'no_such_event' CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; -ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +ERROR HY000: Failed to store event name. Error code 2 from storage engine. ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; ERROR HY000: Unknown event 'intact_check_1' ALTER EVENT intact_check_1 RENAME TO intact_check_2; @@ -425,321 +425,4 @@ CREATE TABLE mysql.event like event_like; DROP TABLE event_like; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; -select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; -db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion -events_test e_26 set @a = 5 root@localhost 2017-01-01 00:00:00 DROP -drop event e_26; -create event e_26 on schedule at NULL disable do set @a = 5; -ERROR HY000: Incorrect AT value: 'NULL' -create event e_26 on schedule at 'definitely not a datetime' disable do set @a = 5; -ERROR HY000: Incorrect AT value: 'definitely not a datetime' -set names utf8; -create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; -drop event задачка; -set event_scheduler=off; -ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL -set global event_scheduler=3; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '3' -set global event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' -"DISABLE the scheduler. Testing that it does not work when the variable is 0" -set global event_scheduler=off; -select definer, name, db from mysql.event; -definer name db -select get_lock("test_lock1", 20); -get_lock("test_lock1", 20) -1 -create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20); -"Should return 1 row" -select definer, name, db from mysql.event; -definer name db -root@localhost закачка events_test -"Should be only 0 process" -select /*1*/ user, host, db, command, state, info -from information_schema.processlist -where (user='event_scheduler') -order by info; -user host db command state info -select release_lock("test_lock1"); -release_lock("test_lock1") -1 -drop event закачка; -"Should have 0 events" -select count(*) from mysql.event; -count(*) -0 -"ENABLE the scheduler and get a lock" -set global event_scheduler=on; -select get_lock("test_lock2", 20); -get_lock("test_lock2", 20) -1 -"Create an event which tries to acquire a mutex. The event locks on the mutex" -create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20); -"Should have only 2 processes: the scheduler and the locked event" -select /*2*/ user, host, db, command, state, info -from information_schema.processlist -where (info like "select get_lock%" OR user='event_scheduler') -order by info; -user host db command state info -event_scheduler localhost NULL Daemon Waiting for next activation NULL -root localhost events_test Connect User lock select get_lock("test_lock2", 20) -"Release the mutex, the event worker should finish." -select release_lock("test_lock2"); -release_lock("test_lock2") -1 -drop event закачка; -set global event_scheduler=1; -select get_lock("test_lock2_1", 20); -get_lock("test_lock2_1", 20) -1 -create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); -"Should have only 2 processes: the scheduler and the locked event" -select /*3*/ user, host, db, command, state, info -from information_schema.processlist -where (info like "select get_lock%" OR user='event_scheduler') -order by info; -user host db command state info -event_scheduler localhost NULL Daemon Waiting for next activation NULL -root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) -set global event_scheduler=off; -"Should have only our process now:" -select /*4*/ user, host, db, command, state, info -from information_schema.processlist -where (info like "select get_lock%" OR user='event_scheduler') -order by info; -user host db command state info -root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) -select release_lock("test_lock2_1"); -release_lock("test_lock2_1") -1 -drop event закачка21; -create table t_16 (s1 int); -create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; -ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present -drop table t_16; -create event white_space -on schedule every 10 hour -disable -do -select 1; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -event_schema event_name definer event_definition -events_test white_space root@localhost select 1 -drop event white_space; -create event white_space on schedule every 10 hour disable do -select 2; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -event_schema event_name definer event_definition -events_test white_space root@localhost select 2 -drop event white_space; -create event white_space on schedule every 10 hour disable do select 3; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -event_schema event_name definer event_definition -events_test white_space root@localhost select 3 -drop event white_space; -create event e1 on schedule every 1 year do set @a = 5; -create table t1 (s1 int); -create trigger t1_ai after insert on t1 for each row show create event e1; -ERROR 0A000: Not allowed to return a result set from a trigger -drop table t1; -drop event e1; -SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; -ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' -SHOW EVENTS FROM ``; -ERROR 42000: Incorrect database name '' -SHOW EVENTS FROM `events\\test`; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation - -LOCK TABLES mode. - -create table t1 (a int); -create event e1 on schedule every 10 hour do select 1; -lock table t1 read; -show create event e1; -Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci -select event_name from information_schema.events; -event_name -e1 -create event e2 on schedule every 10 hour do select 1; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -alter event e2 disable; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -alter event e2 rename to e3; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -drop event e2; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -drop event e1; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -unlock tables; -lock table t1 write; -show create event e1; -Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci -select event_name from information_schema.events; -event_name -e1 -create event e2 on schedule every 10 hour do select 1; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -alter event e2 disable; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -alter event e2 rename to e3; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -drop event e2; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -drop event e1; -ERROR HY000: Table 'event' was not locked with LOCK TABLES -unlock tables; -lock table t1 read, mysql.event read; -show create event e1; -Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci -select event_name from information_schema.events; -event_name -e1 -create event e2 on schedule every 10 hour do select 1; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -alter event e2 disable; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -alter event e2 rename to e3; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -drop event e2; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -drop event e1; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -unlock tables; -lock table t1 write, mysql.event read; -show create event e1; -Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci -select event_name from information_schema.events; -event_name -e1 -create event e2 on schedule every 10 hour do select 1; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -alter event e2 disable; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -alter event e2 rename to e3; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -drop event e2; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -drop event e1; -ERROR HY000: Table 'event' was locked with a READ lock and can't be updated -unlock tables; -lock table t1 read, mysql.event write; -ERROR HY000: You can't combine write-locking of system tables with other tables or lock types -lock table t1 write, mysql.event write; -ERROR HY000: You can't combine write-locking of system tables with other tables or lock types -lock table mysql.event write; -show create event e1; -Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation -e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci -select event_name from information_schema.events; -event_name -e1 -create event e2 on schedule every 10 hour do select 1; -alter event e2 disable; -alter event e2 rename to e3; -drop event e3; -drop event e1; -unlock tables; -Make sure we have left no events -select event_name from information_schema.events; -event_name - -Events in sub-statements, events and prelocking - - -create event e1 on schedule every 10 hour do select 1; -create function f1() returns int -begin -show create event e1; -return 1; -end| -ERROR 0A000: Not allowed to return a result set from a function -create trigger trg before insert on t1 for each row -begin -show create event e1; -end| -ERROR 0A000: Not allowed to return a result set from a trigger -create function f1() returns int -begin -select event_name from information_schema.events; -return 1; -end| -ERROR 0A000: Not allowed to return a result set from a function -create trigger trg before insert on t1 for each row -begin -select event_name from information_schema.events; -end| -ERROR 0A000: Not allowed to return a result set from a trigger -create function f1() returns int -begin -create event e2 on schedule every 10 hour do select 1; -return 1; -end| -ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present -create function f1() returns int -begin -alter event e1 rename to e2; -return 1; -end| -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -create function f1() returns int -begin -drop event e2; -return 1; -end| -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. ----------------------------------------------------------------------- -create trigger trg before insert on t1 for each row -begin -set new.a= f1(); -end| -create function f1() returns int -begin -call p1(); -return 0; -end| -create procedure p1() -begin -select event_name from information_schema.events; -end| -insert into t1 (a) values (1)| -ERROR 0A000: Not allowed to return a result set from a trigger -drop procedure p1| -create procedure p1() -begin -show create event e1; -end| -insert into t1 (a) values (1)| -ERROR 0A000: Not allowed to return a result set from a trigger -drop procedure p1| -create procedure p1() -begin -create temporary table tmp select event_name from information_schema.events; -end| -expected to work, since we redirect the output into a tmp table -insert into t1 (a) values (1)| -select * from tmp| -event_name -e1 -drop temporary table tmp| -drop procedure p1| -create procedure p1() -begin -alter event e1 rename to e2; -end| -insert into t1 (a) values (1)| -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -drop procedure p1| -create procedure p1() -begin -drop event e1; -end| -insert into t1 (a) values (1)| -ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. -drop table t1| -drop event e1| drop database events_test; diff --git a/mysql-test/r/events_2.result b/mysql-test/r/events_2.result new file mode 100644 index 00000000000..9da8c37edae --- /dev/null +++ b/mysql-test/r/events_2.result @@ -0,0 +1,321 @@ +drop database if exists events_test; +create database events_test; +use events_test; +create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; +db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion +events_test e_26 set @a = 5 root@localhost 2017-01-01 00:00:00 DROP +drop event e_26; +create event e_26 on schedule at NULL disable do set @a = 5; +ERROR HY000: Incorrect AT value: 'NULL' +create event e_26 on schedule at 'definitely not a datetime' disable do set @a = 5; +ERROR HY000: Incorrect AT value: 'definitely not a datetime' +set names utf8; +create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; +drop event задачка; +set event_scheduler=off; +ERROR HY000: Variable 'event_scheduler' is a GLOBAL variable and should be set with SET GLOBAL +set global event_scheduler=3; +ERROR 42000: Variable 'event_scheduler' can't be set to the value of '3' +set global event_scheduler=disabled; +ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' +"DISABLE the scheduler. Testing that it does not work when the variable is 0" +set global event_scheduler=off; +select definer, name, db from mysql.event; +definer name db +select get_lock("test_lock1", 20); +get_lock("test_lock1", 20) +1 +create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20); +"Should return 1 row" +select definer, name, db from mysql.event; +definer name db +root@localhost закачка events_test +"Should be only 0 process" +select /*1*/ user, host, db, command, state, info +from information_schema.processlist +where (user='event_scheduler') +order by info; +user host db command state info +select release_lock("test_lock1"); +release_lock("test_lock1") +1 +drop event закачка; +"Should have 0 events" +select count(*) from mysql.event; +count(*) +0 +"ENABLE the scheduler and get a lock" +set global event_scheduler=on; +select get_lock("test_lock2", 20); +get_lock("test_lock2", 20) +1 +"Create an event which tries to acquire a mutex. The event locks on the mutex" +create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20); +"Should have only 2 processes: the scheduler and the locked event" +select /*2*/ user, host, db, command, state, info +from information_schema.processlist +where (info like "select get_lock%" OR user='event_scheduler') +order by info; +user host db command state info +event_scheduler localhost NULL Daemon Waiting for next activation NULL +root localhost events_test Connect User lock select get_lock("test_lock2", 20) +"Release the mutex, the event worker should finish." +select release_lock("test_lock2"); +release_lock("test_lock2") +1 +drop event закачка; +set global event_scheduler=1; +select get_lock("test_lock2_1", 20); +get_lock("test_lock2_1", 20) +1 +create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); +"Should have only 2 processes: the scheduler and the locked event" +select /*3*/ user, host, db, command, state, info +from information_schema.processlist +where (info like "select get_lock%" OR user='event_scheduler') +order by info; +user host db command state info +event_scheduler localhost NULL Daemon Waiting for next activation NULL +root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) +set global event_scheduler=off; +"Should have only our process now:" +select /*4*/ user, host, db, command, state, info +from information_schema.processlist +where (info like "select get_lock%" OR user='event_scheduler') +order by info; +user host db command state info +root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) +select release_lock("test_lock2_1"); +release_lock("test_lock2_1") +1 +drop event закачка21; +create table t_16 (s1 int); +create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present +drop table t_16; +create event white_space +on schedule every 10 hour +disable +do +select 1; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +event_schema event_name definer event_definition +events_test white_space root@localhost select 1 +drop event white_space; +create event white_space on schedule every 10 hour disable do +select 2; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +event_schema event_name definer event_definition +events_test white_space root@localhost select 2 +drop event white_space; +create event white_space on schedule every 10 hour disable do select 3; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +event_schema event_name definer event_definition +events_test white_space root@localhost select 3 +drop event white_space; +create event e1 on schedule every 1 year do set @a = 5; +create table t1 (s1 int); +create trigger t1_ai after insert on t1 for each row show create event e1; +ERROR 0A000: Not allowed to return a result set from a trigger +drop table t1; +drop event e1; +SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; +ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +SHOW EVENTS FROM ``; +ERROR 42000: Incorrect database name '' +SHOW EVENTS FROM `events\\test`; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation + +LOCK TABLES mode. + +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +lock table t1 read; +show create event e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 write; +show create event e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 read, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 write, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 read, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table t1 write, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table mysql.event write; +show create event e1; +Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +Make sure we have left no events +select event_name from information_schema.events; +event_name + +Events in sub-statements, events and prelocking + + +create event e1 on schedule every 10 hour do select 1; +create function f1() returns int +begin +show create event e1; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +show create event e1; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +select event_name from information_schema.events; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +select event_name from information_schema.events; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +create event e2 on schedule every 10 hour do select 1; +return 1; +end| +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present +create function f1() returns int +begin +alter event e1 rename to e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function f1() returns int +begin +drop event e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin +set new.a= f1(); +end| +create function f1() returns int +begin +call p1(); +return 0; +end| +create procedure p1() +begin +select event_name from information_schema.events; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +show create event e1; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +create temporary table tmp select event_name from information_schema.events; +end| +expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +event_name +e1 +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin +alter event e1 rename to e2; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure p1| +create procedure p1() +begin +drop event e1; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop table t1| +drop event e1| +drop database events_test; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 4dbb6a00555..ac8fc5041de 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -15,7 +15,6 @@ concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Double Whopper federated_transactions : Bug#29523 Transactions do not work -events : Bug#32664 events.test fails randomly lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log kill : Bug#29149: Test "kill" fails on Windows innodb_mysql : Bug#32724: innodb_mysql.test fails randomly diff --git a/mysql-test/t/events.test b/mysql-test/t/events_1.test similarity index 54% rename from mysql-test/t/events.test rename to mysql-test/t/events_1.test index a4c7eaebc30..2e0680909d6 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events_1.test @@ -302,7 +302,8 @@ SELECT event_name FROM INFORMATION_SCHEMA.events; SHOW CREATE EVENT intact_check; --error ER_EVENT_DOES_NOT_EXIST DROP EVENT no_such_event; ---error ER_CANNOT_LOAD_FROM_TABLE +#--error ER_CANNOT_LOAD_FROM_TABLE peplaced by: +--error ER_EVENT_STORE_FAILED CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; --error ER_EVENT_DOES_NOT_EXIST ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; @@ -399,396 +400,6 @@ CREATE TABLE mysql.event like event_like; DROP TABLE event_like; --replace_column 8 # 9 # SHOW EVENTS; -# -# mysql.event intact checking end -# - -create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; -select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; -drop event e_26; ---error ER_WRONG_VALUE -create event e_26 on schedule at NULL disable do set @a = 5; ---error ER_WRONG_VALUE -create event e_26 on schedule at 'definitely not a datetime' disable do set @a = 5; - -set names utf8; -create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; -drop event задачка; - -# event_scheduler is a global var ---error ER_GLOBAL_VARIABLE -set event_scheduler=off; -# event_scheduler could be only either 1 or 2 ---error ER_WRONG_VALUE_FOR_VAR -set global event_scheduler=3; ---error ER_WRONG_VALUE_FOR_VAR -set global event_scheduler=disabled; - ---echo "DISABLE the scheduler. Testing that it does not work when the variable is 0" -set global event_scheduler=off; -select definer, name, db from mysql.event; -select get_lock("test_lock1", 20); -create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20); ---echo "Should return 1 row" -select definer, name, db from mysql.event; - ---echo "Should be only 0 process" -select /*1*/ user, host, db, command, state, info - from information_schema.processlist - where (user='event_scheduler') - order by info; -select release_lock("test_lock1"); -drop event закачка; ---echo "Should have 0 events" -select count(*) from mysql.event; - -# -# -# ---echo "ENABLE the scheduler and get a lock" -set global event_scheduler=on; -select get_lock("test_lock2", 20); ---echo "Create an event which tries to acquire a mutex. The event locks on the mutex" -create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20); - ---echo "Should have only 2 processes: the scheduler and the locked event" -let $wait_condition= select count(*) = 2 from information_schema.processlist - where ( (state like 'User lock%' AND info like 'select get_lock%') - OR (command='Daemon' AND user='event_scheduler' AND - state = 'Waiting for next activation')); ---source include/wait_condition.inc - -select /*2*/ user, host, db, command, state, info - from information_schema.processlist - where (info like "select get_lock%" OR user='event_scheduler') - order by info; ---echo "Release the mutex, the event worker should finish." -select release_lock("test_lock2"); -drop event закачка; - -# Wait for release_lock("test_lock2") to complete, -# to avoid polluting the next test information_schema.processlist -let $wait_condition= select count(*) = 0 from information_schema.processlist - where (state like 'User lock%' AND info like 'select get_lock%'); ---source include/wait_condition.inc - - -## -## 1. get a lock -## 2. create an event -## 3. sleep so it has time to start -## 4. should appear in processlist -## 5. kill the scheduler, it will wait for the child to stop -## 6. both processes should be there on show processlist -## 7. release the lock and sleep, both scheduler and child should end -set global event_scheduler=1; -select get_lock("test_lock2_1", 20); -create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); - ---echo "Should have only 2 processes: the scheduler and the locked event" -let $wait_condition= select count(*) = 2 from information_schema.processlist - where ( (state like 'User lock%' AND info like 'select get_lock%') - OR (command='Daemon' AND user='event_scheduler' AND - state = 'Waiting for next activation')); ---source include/wait_condition.inc - -select /*3*/ user, host, db, command, state, info - from information_schema.processlist - where (info like "select get_lock%" OR user='event_scheduler') - order by info; - -set global event_scheduler=off; - -let $wait_condition= select count(*) =1 from information_schema.processlist - where (info like "select get_lock%" OR user='event_scheduler'); ---source include/wait_condition.inc - ---echo "Should have only our process now:" -select /*4*/ user, host, db, command, state, info - from information_schema.processlist - where (info like "select get_lock%" OR user='event_scheduler') - order by info; -select release_lock("test_lock2_1"); -drop event закачка21; -let $wait_condition= - select count(*) = 0 from information_schema.processlist - where db='events_test' and command = 'Connect' and user=current_user(); ---source include/wait_condition.inc - -#### -# Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement -# -create table t_16 (s1 int); ---error ER_EVENT_RECURSION_FORBIDDEN -create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; -drop table t_16; -# -# end of test case -#### - -# -# START: BUG #17453: Creating Event crash the server -# -create event white_space -on schedule every 10 hour -disable -do -select 1; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -drop event white_space; -create event white_space on schedule every 10 hour disable do - -select 2; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -drop event white_space; -create event white_space on schedule every 10 hour disable do select 3; -select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; -drop event white_space; -# -# END: BUG #17453: Creating Event crash the server -# - -# -# Bug#17403 "Events: packets out of order with show create event" -# -create event e1 on schedule every 1 year do set @a = 5; -create table t1 (s1 int); ---error ER_SP_NO_RETSET -create trigger t1_ai after insert on t1 for each row show create event e1; -drop table t1; -drop event e1; - -##set global event_scheduler=1; -##select get_lock("test_lock3", 20); -##create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20); -##select sleep(2); -##select /*5*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; -##drop event закачка; -##select release_lock("test_lock3"); - -# -# test with very often occuring event -# (disabled for now, locks) -##select get_lock("test_lock4", 20); -##create event закачка4 on schedule every 1 second do select get_lock("test_lock4", 20); -##select sleep(3); -##select /*6*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; -##drop event закачка4; -##select release_lock("test_lock4"); - -##set global event_scheduler=off; -##select sleep(2); -##--replace_column 1 # 6 # -##show processlist; -##select count(*) from mysql.event; - -# -# Test wrong syntax -# - ---error 1102 -SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ---error 1102 -SHOW EVENTS FROM ``; - -SHOW EVENTS FROM `events\\test`; -# -# A check for events SQL under LOCK TABLES and in pre-locked mode. -# ---echo ---echo LOCK TABLES mode. ---echo -# -# SHOW CREATE EVENT and INFORMATION_SCHEMA.events are available and -# cause an implicit lock/unlock of mysql.event table, regardless of the -# currently locked tables. -# -create table t1 (a int); -create event e1 on schedule every 10 hour do select 1; -# -lock table t1 read; -# ---replace_regex /STARTS '[^']+'/STARTS '#'/ -show create event e1; -select event_name from information_schema.events; ---error ER_TABLE_NOT_LOCKED -create event e2 on schedule every 10 hour do select 1; ---error ER_TABLE_NOT_LOCKED -alter event e2 disable; ---error ER_TABLE_NOT_LOCKED -alter event e2 rename to e3; ---error ER_TABLE_NOT_LOCKED -drop event e2; ---error ER_TABLE_NOT_LOCKED -drop event e1; -unlock tables; -# -lock table t1 write; -# ---replace_regex /STARTS '[^']+'/STARTS '#'/ -show create event e1; -select event_name from information_schema.events; ---error ER_TABLE_NOT_LOCKED -create event e2 on schedule every 10 hour do select 1; ---error ER_TABLE_NOT_LOCKED -alter event e2 disable; ---error ER_TABLE_NOT_LOCKED -alter event e2 rename to e3; ---error ER_TABLE_NOT_LOCKED -drop event e2; ---error ER_TABLE_NOT_LOCKED -drop event e1; -unlock tables; -# -lock table t1 read, mysql.event read; -# ---replace_regex /STARTS '[^']+'/STARTS '#'/ -show create event e1; -select event_name from information_schema.events; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -create event e2 on schedule every 10 hour do select 1; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -alter event e2 disable; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -alter event e2 rename to e3; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -drop event e2; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -drop event e1; -unlock tables; -# -lock table t1 write, mysql.event read; -# ---replace_regex /STARTS '[^']+'/STARTS '#'/ -show create event e1; -select event_name from information_schema.events; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -create event e2 on schedule every 10 hour do select 1; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -alter event e2 disable; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -alter event e2 rename to e3; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -drop event e2; ---error ER_TABLE_NOT_LOCKED_FOR_WRITE -drop event e1; -unlock tables; -# ---error ER_WRONG_LOCK_OF_SYSTEM_TABLE -lock table t1 read, mysql.event write; -# ---error ER_WRONG_LOCK_OF_SYSTEM_TABLE -lock table t1 write, mysql.event write; -# -lock table mysql.event write; ---replace_regex /STARTS '[^']+'/STARTS '#'/ -show create event e1; -select event_name from information_schema.events; -create event e2 on schedule every 10 hour do select 1; -alter event e2 disable; -alter event e2 rename to e3; -drop event e3; -drop event e1; -unlock tables; ---echo Make sure we have left no events -select event_name from information_schema.events; ---echo ---echo Events in sub-statements, events and prelocking ---echo ---echo -create event e1 on schedule every 10 hour do select 1; -delimiter |; ---error ER_SP_NO_RETSET -create function f1() returns int -begin - show create event e1; - return 1; -end| ---error ER_SP_NO_RETSET -create trigger trg before insert on t1 for each row -begin - show create event e1; -end| ---error ER_SP_NO_RETSET -create function f1() returns int -begin - select event_name from information_schema.events; - return 1; -end| ---error ER_SP_NO_RETSET -create trigger trg before insert on t1 for each row -begin - select event_name from information_schema.events; -end| ---error ER_EVENT_RECURSION_FORBIDDEN -create function f1() returns int -begin - create event e2 on schedule every 10 hour do select 1; - return 1; -end| ---error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG -create function f1() returns int -begin - alter event e1 rename to e2; - return 1; -end| ---error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG -create function f1() returns int -begin - drop event e2; - return 1; -end| ---echo ---------------------------------------------------------------------- -create trigger trg before insert on t1 for each row -begin - set new.a= f1(); -end| -create function f1() returns int -begin - call p1(); - return 0; -end| -create procedure p1() -begin - select event_name from information_schema.events; -end| ---error ER_SP_NO_RETSET -insert into t1 (a) values (1)| -drop procedure p1| -create procedure p1() -begin - show create event e1; -end| ---error ER_SP_NO_RETSET -insert into t1 (a) values (1)| -drop procedure p1| -create procedure p1() -begin - create temporary table tmp select event_name from information_schema.events; -end| ---echo expected to work, since we redirect the output into a tmp table -insert into t1 (a) values (1)| -select * from tmp| -drop temporary table tmp| -drop procedure p1| -create procedure p1() -begin - alter event e1 rename to e2; -end| ---error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG -insert into t1 (a) values (1)| -drop procedure p1| -create procedure p1() -begin - drop event e1; -end| ---error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG -insert into t1 (a) values (1)| -drop table t1| -drop event e1| -delimiter ;| - - # # End of tests # diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test new file mode 100644 index 00000000000..cb84a6a4ac4 --- /dev/null +++ b/mysql-test/t/events_2.test @@ -0,0 +1,409 @@ +# Can't test with embedded server that doesn't support grants +-- source include/not_embedded.inc + +--disable_warnings +drop database if exists events_test; +--enable_warnings +create database events_test; +use events_test; + +# +# mysql.event intact checking end +# + +create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; +select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; +drop event e_26; +--error ER_WRONG_VALUE +create event e_26 on schedule at NULL disable do set @a = 5; +--error ER_WRONG_VALUE +create event e_26 on schedule at 'definitely not a datetime' disable do set @a = 5; + +set names utf8; +create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; +drop event задачка; + +# event_scheduler is a global var +--error ER_GLOBAL_VARIABLE +set event_scheduler=off; +# event_scheduler could be only either 1 or 2 +--error ER_WRONG_VALUE_FOR_VAR +set global event_scheduler=3; +--error ER_WRONG_VALUE_FOR_VAR +set global event_scheduler=disabled; + +--echo "DISABLE the scheduler. Testing that it does not work when the variable is 0" +set global event_scheduler=off; +select definer, name, db from mysql.event; +select get_lock("test_lock1", 20); +create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20); +--echo "Should return 1 row" +select definer, name, db from mysql.event; + +--echo "Should be only 0 process" +select /*1*/ user, host, db, command, state, info + from information_schema.processlist + where (user='event_scheduler') + order by info; +select release_lock("test_lock1"); +drop event закачка; +--echo "Should have 0 events" +select count(*) from mysql.event; + +# +# +# +--echo "ENABLE the scheduler and get a lock" +set global event_scheduler=on; +select get_lock("test_lock2", 20); +--echo "Create an event which tries to acquire a mutex. The event locks on the mutex" +create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20); + +--echo "Should have only 2 processes: the scheduler and the locked event" +let $wait_condition= select count(*) = 2 from information_schema.processlist + where ( (state like 'User lock%' AND info like 'select get_lock%') + OR (command='Daemon' AND user='event_scheduler' AND + state = 'Waiting for next activation')); +--source include/wait_condition.inc + +select /*2*/ user, host, db, command, state, info + from information_schema.processlist + where (info like "select get_lock%" OR user='event_scheduler') + order by info; +--echo "Release the mutex, the event worker should finish." +select release_lock("test_lock2"); +drop event закачка; + +# Wait for release_lock("test_lock2") to complete, +# to avoid polluting the next test information_schema.processlist +let $wait_condition= select count(*) = 0 from information_schema.processlist + where (state like 'User lock%' AND info like 'select get_lock%'); +--source include/wait_condition.inc + + +## +## 1. get a lock +## 2. create an event +## 3. sleep so it has time to start +## 4. should appear in processlist +## 5. kill the scheduler, it will wait for the child to stop +## 6. both processes should be there on show processlist +## 7. release the lock and sleep, both scheduler and child should end +set global event_scheduler=1; +select get_lock("test_lock2_1", 20); +create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); + +--echo "Should have only 2 processes: the scheduler and the locked event" +let $wait_condition= select count(*) = 2 from information_schema.processlist + where ( (state like 'User lock%' AND info like 'select get_lock%') + OR (command='Daemon' AND user='event_scheduler' AND + state = 'Waiting for next activation')); +--source include/wait_condition.inc + +select /*3*/ user, host, db, command, state, info + from information_schema.processlist + where (info like "select get_lock%" OR user='event_scheduler') + order by info; + +set global event_scheduler=off; + +let $wait_condition= select count(*) =1 from information_schema.processlist + where (info like "select get_lock%" OR user='event_scheduler'); +--source include/wait_condition.inc + +--echo "Should have only our process now:" +select /*4*/ user, host, db, command, state, info + from information_schema.processlist + where (info like "select get_lock%" OR user='event_scheduler') + order by info; +select release_lock("test_lock2_1"); +drop event закачка21; +let $wait_condition= + select count(*) = 0 from information_schema.processlist + where db='events_test' and command = 'Connect' and user=current_user(); +--source include/wait_condition.inc + +#### +# Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement +# +create table t_16 (s1 int); +--error ER_EVENT_RECURSION_FORBIDDEN +create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; +drop table t_16; +# +# end of test case +#### + +# +# START: BUG #17453: Creating Event crash the server +# +create event white_space +on schedule every 10 hour +disable +do +select 1; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +drop event white_space; +create event white_space on schedule every 10 hour disable do + +select 2; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +drop event white_space; +create event white_space on schedule every 10 hour disable do select 3; +select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; +drop event white_space; +# +# END: BUG #17453: Creating Event crash the server +# + +# +# Bug#17403 "Events: packets out of order with show create event" +# +create event e1 on schedule every 1 year do set @a = 5; +create table t1 (s1 int); +--error ER_SP_NO_RETSET +create trigger t1_ai after insert on t1 for each row show create event e1; +drop table t1; +drop event e1; + +##set global event_scheduler=1; +##select get_lock("test_lock3", 20); +##create event закачка on schedule every 10 hour do select get_lock("test_lock3", 20); +##select sleep(2); +##select /*5*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +##drop event закачка; +##select release_lock("test_lock3"); + +# +# test with very often occuring event +# (disabled for now, locks) +##select get_lock("test_lock4", 20); +##create event закачка4 on schedule every 1 second do select get_lock("test_lock4", 20); +##select sleep(3); +##select /*6*/ user, host, db, command, state, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +##drop event закачка4; +##select release_lock("test_lock4"); + +##set global event_scheduler=off; +##select sleep(2); +##--replace_column 1 # 6 # +##show processlist; +##select count(*) from mysql.event; + +# +# Test wrong syntax +# + +--error 1102 +SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; +--error 1102 +SHOW EVENTS FROM ``; + +SHOW EVENTS FROM `events\\test`; +# +# A check for events SQL under LOCK TABLES and in pre-locked mode. +# +--echo +--echo LOCK TABLES mode. +--echo +# +# SHOW CREATE EVENT and INFORMATION_SCHEMA.events are available and +# cause an implicit lock/unlock of mysql.event table, regardless of the +# currently locked tables. +# +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +# +lock table t1 read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 write; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 read, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +lock table t1 write, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 read, mysql.event write; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 write, mysql.event write; +# +lock table mysql.event write; +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +--echo Make sure we have left no events +select event_name from information_schema.events; +--echo +--echo Events in sub-statements, events and prelocking +--echo +--echo +create event e1 on schedule every 10 hour do select 1; +delimiter |; +--error ER_SP_NO_RETSET +create function f1() returns int +begin + show create event e1; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +create function f1() returns int +begin + select event_name from information_schema.events; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + select event_name from information_schema.events; +end| +--error ER_EVENT_RECURSION_FORBIDDEN +create function f1() returns int +begin + create event e2 on schedule every 10 hour do select 1; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + alter event e1 rename to e2; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + drop event e2; + return 1; +end| +--echo ---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin + set new.a= f1(); +end| +create function f1() returns int +begin + call p1(); + return 0; +end| +create procedure p1() +begin + select event_name from information_schema.events; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + create temporary table tmp select event_name from information_schema.events; +end| +--echo expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin + alter event e1 rename to e2; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + drop event e1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop table t1| +drop event e1| +delimiter ;| + + +# +# End of tests +# + +let $wait_condition= + select count(*) = 0 from information_schema.processlist + where db='events_test' and command = 'Connect' and user=current_user(); +--source include/wait_condition.inc + +drop database events_test; From 6988f45e6b9fc6546133cfe1e48607bf787bf0de Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 14:52:21 +0100 Subject: [PATCH 266/527] WL#4078: Document binary format of binlog entries Minor update with corrections and notes on the binlog format. This only affects comments, not code. sql/log_event.h: Fixes in documentation of binlog format. --- sql/log_event.h | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) diff --git a/sql/log_event.h b/sql/log_event.h index 4e151d6cde9..c46827253a3 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -670,18 +670,18 @@ typedef struct st_print_event_info Any @c Log_event saved on disk consists of the following three components. - * Common-Header - * Post-Header - * Body + - Common-Header + - Post-Header + - Body The Common-Header, documented in the table @ref Table_common_header "below", always has the same form and length within one version of - MySQL. Each event type specifies a form and length of the - Post-Header common to all events of the type. The Body may be of - different form and length even for different events of the same - type. The binary formats of Post-Header and Body are documented - separately in each subclass. The binary format of Common-Header is - as follows. + MySQL. Each event type specifies a format and length of the + Post-Header. The length of the Common-Header is the same for all + events of the same type. The Body may be of different format and + length even for different events of the same type. The binary + formats of Post-Header and Body are documented separately in each + subclass. The binary format of Common-Header is as follows.
@@ -750,8 +750,8 @@ typedef struct st_print_event_info - Some events use a special format for efficient representation of unsigned integers, called Packed Integer. A Packed Integer has the capacity of storing up to 8-byte integers, while small integers - still can use 1, 3, or 4 bytes. The first byte indicates how many - bytes are used by the integer, according to the following table: + still can use 1, 3, or 4 bytes. The value of the first byte + determines how to read the number, according to the following table:
Common-Header
@@ -763,7 +763,7 @@ typedef struct st_print_event_info - @@ -1174,6 +1174,10 @@ protected: @section Query_log_event_binary_format Binary format + See @ref Log_event_binary_format "Binary format for log events" for + a general discussion and introduction to the binary format of binlog + events. + The Post-Header has five components:
Format of Packed Integer
0-250The first byte is the number (in range 0-250), and no more + The first byte is the number (in the range 0-250), and no more bytes are used.
@@ -1407,7 +1411,7 @@ protected: query "SELECT id, character_set_name, collation_name FROM COLLATIONS". - Cf. Q_CHARSET_DATABASE_NUMBER below. + Cf. Q_CHARSET_DATABASE_CODE below. This field is always written. @@ -1442,7 +1446,7 @@ protected: - + @@ -1480,7 +1484,7 @@ protected: Q_CATALOG_CODE will never be written by a new master, but can still be understood by a new slave. - * See Q_CHARSET_DATABASE_NUMBER in the table above. + * See Q_CHARSET_DATABASE_CODE in the table above. */ class Query_log_event: public Log_event @@ -1919,6 +1923,8 @@ private: @subsection Load_log_event_notes_on_previous_versions Notes on Previous Versions + This event type is understood by current versions, but only + generated by MySQL 3.23 and earlier. */ class Load_log_event: public Log_event { From 46db2da52fa4b6305006ebc42a291b48deea2a10 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 15:22:14 +0100 Subject: [PATCH 267/527] Removed the unused function int THD::binlog_flush_transaction_cache() --- sql/log.cc | 29 ----------------------------- sql/sql_class.h | 1 - 2 files changed, 30 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 9b5b2ae5a6c..f12cedfbf05 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3403,35 +3403,6 @@ void THD::binlog_set_stmt_begin() { trx_data->before_stmt_pos= pos; } -int THD::binlog_flush_transaction_cache() -{ - DBUG_ENTER("binlog_flush_transaction_cache"); - binlog_trx_data *trx_data= (binlog_trx_data*) - thd_get_ha_data(this, binlog_hton); - DBUG_PRINT("enter", ("trx_data=0x%lu", (ulong) trx_data)); - if (trx_data) - DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%lu", - (ulong) trx_data->before_stmt_pos)); - - /* - Write the transaction cache to the binary log. We don't flush and - sync the log file since we don't know if more will be written to - it. If the caller want the log file sync:ed, the caller has to do - it. - - The transaction data is only reset upon a successful write of the - cache to the binary log. - */ - - if (trx_data && likely(mysql_bin_log.is_open())) { - if (int error= mysql_bin_log.write_cache(&trx_data->trans_log, true, true)) - DBUG_RETURN(error); - trx_data->reset(); - } - - DBUG_RETURN(0); -} - /* Write a table map to the binary log. diff --git a/sql/sql_class.h b/sql/sql_class.h index 5f2b50f48b8..b660c615920 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1243,7 +1243,6 @@ public: Public interface to write RBR events to the binlog */ void binlog_start_trans_and_stmt(); - int binlog_flush_transaction_cache(); void binlog_set_stmt_begin(); int binlog_write_table_map(TABLE *table, bool is_transactional); int binlog_write_row(TABLE* table, bool is_transactional, From daffceb4e275cb520c7c3277aae420e11c94ca0e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 17:41:39 +0300 Subject: [PATCH 268/527] Bug#33266: Incorrect test case for the bug#31048 failing on some platforms. The test case for the bug#31048 checks that there is no crash on stack overrun. But due to different stack sizes on different platforms it failed on some of them. The new test case check that a query with at least 4 level subquery nesting works without the stack overrun nesting and other levels of nesting doesn't cause a crash. mysql-test/t/subselect.test: Corrected test case for the bug#31048. mysql-test/r/subselect.result: Corrected test case for the bug#31048. --- mysql-test/r/subselect.result | 128 ++++++++-------------------------- mysql-test/t/subselect.test | 124 ++++++++++---------------------- 2 files changed, 69 insertions(+), 183 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 527c45671f4..2de2589fc92 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4147,103 +4147,37 @@ DROP TABLE t1,t2; create table t1(a int,b int,key(a),key(b)); insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), (6,7),(7,4),(5,3); -select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 -)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -sum(a) a -select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -ERROR HY000: Thread stack overrun detected -explain select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 -)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index a a 5 NULL 9 Using where; Using index -2 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -3 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -4 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -5 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -6 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -7 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -8 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -9 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -10 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -11 SUBQUERY t1 range a a 5 NULL 9 Using where; Using temporary; Using filesort -12 SUBQUERY t1 range a a 5 NULL 1 Using where; Using temporary; Using filesort -13 SUBQUERY t1 index NULL a 5 NULL 9 Using index -explain select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -ERROR HY000: Thread stack overrun detected +5 +4 +3 +2 +1 +26 +25 +24 +23 +22 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 drop table t1; CREATE TABLE t1 (a1 INT, a2 INT); CREATE TABLE t2 (b1 INT, b2 INT); diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 326d80f84c1..c5edd5414e3 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3006,92 +3006,44 @@ DROP TABLE t1,t2; create table t1(a int,b int,key(a),key(b)); insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), (6,7),(7,4),(5,3); -# test for the stack overflow bug -select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 - )group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; ---replace_regex /overrun.*$/overrun detected/ ---error 1436 -select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -# test for the memory consumption & subquery slowness bug -explain select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 - )group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; ---replace_regex /overrun.*$/overrun detected/ ---error 1436 -explain select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; + +let $nesting= 26; +let $should_work_nesting= 5; +let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ; +let $end= )group by a ; +let $start_app= where a> ( select sum(a) from t1 ; +let $end_pre= )group by b limit 1 ; + +--disable_result_log +--disable_query_log +# At least 4 level nesting should work without errors +while ($should_work_nesting) +{ +--echo $should_work_nesting + eval $start $end; + eval explain $start $end; + let $start= $start + $start_app; + let $end= $end_pre + $end; + dec $should_work_nesting; +} +# Other may fail with the 'stack overrun error' +while ($nesting) +{ +--echo $nesting +--error 0,1436 + eval $start $end; +--error 0,1436 + eval explain $start $end; + let $start= $start + $start_app; + let $end= $end_pre + $end; + dec $nesting; +} +--enable_result_log +--enable_query_log drop table t1; # From 27498bbaba9f40f875d62fe0bb676c8218ee2880 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 16:59:03 +0200 Subject: [PATCH 269/527] Fixed a test. mysql-test/r/change_user.result: Replaced value in result file, it was dependend on architecture. mysql-test/t/change_user.test: Replaced an architecture dependend value in test sql/mysqld.cc: Can be made shorter and without ifdefs. --- mysql-test/r/change_user.result | 4 ++-- mysql-test/t/change_user.test | 5 +++++ sql/mysqld.cc | 6 +----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result index 28b55dfd5e5..b4e4e07f30a 100644 --- a/mysql-test/r/change_user.result +++ b/mysql-test/r/change_user.result @@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects; 1 SELECT @@global.max_join_size; @@global.max_join_size -18446744073709551615 +MAX_JOIN_SIZE change_user SELECT @@session.sql_big_selects; @@session.sql_big_selects 1 SELECT @@global.max_join_size; @@global.max_join_size -18446744073709551615 +MAX_JOIN_SIZE SET @@global.max_join_size = 10000; SET @@session.max_join_size = default; change_user diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test index d0cdfc8a741..fa7cecdb5ee 100644 --- a/mysql-test/t/change_user.test +++ b/mysql-test/t/change_user.test @@ -4,17 +4,22 @@ --echo Bug#20023 SELECT @@session.sql_big_selects; +--replace_result 18446744073709551615 MAX_JOIN_SIZE 4294967295 MAX_JOIN_SIZE SELECT @@global.max_join_size; --echo change_user --change_user SELECT @@session.sql_big_selects; +--replace_result 18446744073709551615 MAX_JOIN_SIZE 4294967295 MAX_JOIN_SIZE SELECT @@global.max_join_size; SET @@global.max_join_size = 10000; SET @@session.max_join_size = default; --echo change_user --change_user SELECT @@session.sql_big_selects; +# On some machines the following will result into a warning +--disable_warnings SET @@global.max_join_size = -1; +--enable_warnings SET @@session.max_join_size = default; --echo change_user --change_user diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9ca2ab5db0e..455698d4ff4 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -308,11 +308,7 @@ TYPELIB thread_handling_typelib= const char *first_keyword= "first", *binary_keyword= "BINARY"; const char *my_localhost= "localhost", *delayed_user= "DELAYED"; -#if SIZEOF_OFF_T > 4 && defined(BIG_TABLES) -#define GET_HA_ROWS GET_ULL -#else -#define GET_HA_ROWS GET_ULONG -#endif +#define GET_HA_ROWS (~ (ha_rows) 0) bool opt_large_files= sizeof(my_off_t) > 4; From 985e9523479fb1143ac60e1644613d34e126ef58 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 22:23:39 +0300 Subject: [PATCH 270/527] Fix for Bug#34337: Server crash when Altering a view using a table name. The problem was that fill_defined_view_parts() did not return an error if a table is going to be altered. That happened if the table was already in the table cache. In that case, open_table() returned non-NULL value (valid TABLE-instance from the cache). The fix is to ensure that an error is thrown even if the table is in the cache. mysql-test/r/view.result: Fix result file. mysql-test/t/view.test: Add a test case for Bug#34337: Server crash when Altering a view using a table name. sql/sql_view.cc: Report an error if we're going to work with a table. --- mysql-test/r/view.result | 15 +++++++++++++++ mysql-test/t/view.test | 28 ++++++++++++++++++++++++++++ sql/sql_view.cc | 29 ++++++++++++++++++++++++++--- 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 3f8ed1b4e56..e5c20a2c26f 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3720,6 +3720,21 @@ DROP VIEW v1; # -- End of test case for Bug#32538. +# ----------------------------------------------------------------- +# -- Bug#34337: Server crash when Altering a view using a table name. +# ----------------------------------------------------------------- + +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1(c1 INT); + +ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); +ERROR HY000: 'test.t1' is not VIEW + +DROP TABLE t1; + +# -- End of test case for Bug#34337. + # ----------------------------------------------------------------- # -- End of 5.1 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 3f10bc62289..d350dd102d7 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3603,6 +3603,34 @@ DROP VIEW v1; ########################################################################### +--echo # ----------------------------------------------------------------- +--echo # -- Bug#34337: Server crash when Altering a view using a table name. +--echo # ----------------------------------------------------------------- +--echo + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo + +CREATE TABLE t1(c1 INT); + +--echo + +--error ER_WRONG_OBJECT +ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); + +--echo + +DROP TABLE t1; + +--echo +--echo # -- End of test case for Bug#34337. +--echo + +########################################################################### + --echo # ----------------------------------------------------------------- --echo # -- End of 5.1 tests. --echo # ----------------------------------------------------------------- diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 0b0763afb84..0642a2d2e17 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -182,10 +182,33 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view) TABLE_LIST decoy; memcpy (&decoy, view, sizeof (TABLE_LIST)); - if (!open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE) && - !decoy.view) + + /* + Let's reset decoy.view before calling open_table(): when we start + supporting ALTER VIEW in PS/SP that may save us from a crash. + */ + + decoy.view= NULL; + + /* + open_table() will return NULL if 'decoy' is idenitifying a view *and* + there is no TABLE object for that view in the table cache. However, + decoy.view will be set to 1. + + If there is a TABLE-instance for the oject identified by 'decoy', + open_table() will return that instance no matter if it is a table or + a view. + + Thus, there is no need to check for the return value of open_table(), + since the return value itself does not mean anything. + */ + + open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE); + + if (!decoy.view) { - /* It's a table */ + /* It's a table. */ + my_error(ER_WRONG_OBJECT, MYF(0), view->db, view->table_name, "VIEW"); return TRUE; } From a399fefd565b333078301f4d7406a2bf632bfb19 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 16:45:24 -0300 Subject: [PATCH 271/527] Bug#32265 Server returns different metadata if prepared statement is used Executing a prepared statement associated with a materialized cursor yields to the client a metadata packet with wrong table and database names. The problem was occurring because the server was sending the the name of the temporary table used by the cursor instead of the table name of the original table. The same problem occurs when selecting from views, in which case the table name was being sent and not the name of the view. The solution is to fill the list item from the temporary table but preserving the table and database names of the original fields. This is achieved by tweaking the Select_materialize to accept a pointer to the Materialized_cursor class which contains the item list to be filled. sql/sql_cursor.cc: Fill the item list in the send_fields method and preserve the table and database name of the fields. tests/mysql_client_test.c: Add test case for Bug#32265 --- sql/sql_cursor.cc | 98 ++++++++++++++++++++++++++++++--------- tests/mysql_client_test.c | 82 ++++++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 22 deletions(-) diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 2e98da42be1..c2345f1f2cd 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -88,6 +88,7 @@ class Materialized_cursor: public Server_side_cursor public: Materialized_cursor(select_result *result, TABLE *table); + int fill_item_list(THD *thd, List &send_fields); virtual bool is_open() const { return table != 0; } virtual int open(JOIN *join __attribute__((unused))); virtual void fetch(ulong num_rows); @@ -109,6 +110,7 @@ class Select_materialize: public select_union { select_result *result; /* the result object of the caller (PS or SP) */ public: + Materialized_cursor *materialized_cursor; Select_materialize(select_result *result_arg) :result(result_arg) {} virtual bool send_fields(List &list, uint flags); }; @@ -152,7 +154,7 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, if (! (sensitive_cursor= new (thd->mem_root) Sensitive_cursor(thd, result))) { - delete result; + delete result_materialize; return 1; } @@ -174,13 +176,13 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, /* Possible options here: - a sensitive cursor is open. In this case rc is 0 and - result_materialize->table is NULL, or + result_materialize->materialized_cursor is NULL, or - a materialized cursor is open. In this case rc is 0 and - result_materialize->table is not NULL - - an error occured during materializaton. - result_materialize->table is not NULL, but rc != 0 + result_materialize->materialized is not NULL + - an error occurred during materialization. + result_materialize->materialized_cursor is not NULL, but rc != 0 - successful completion of mysql_execute_command without - a cursor: rc is 0, result_materialize->table is NULL, + a cursor: rc is 0, result_materialize->materialized_cursor is NULL, sensitive_cursor is not open. This is possible if some command writes directly to the network, bypassing select_result mechanism. An example of @@ -191,7 +193,7 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, if (sensitive_cursor->is_open()) { - DBUG_ASSERT(!result_materialize->table); + DBUG_ASSERT(!result_materialize->materialized_cursor); /* It's safer if we grab THD state after mysql_execute_command is finished and not in Sensitive_cursor::open(), because @@ -202,18 +204,10 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, *pcursor= sensitive_cursor; goto end; } - else if (result_materialize->table) + else if (result_materialize->materialized_cursor) { - Materialized_cursor *materialized_cursor; - TABLE *table= result_materialize->table; - MEM_ROOT *mem_root= &table->mem_root; - - if (!(materialized_cursor= new (mem_root) - Materialized_cursor(result, table))) - { - rc= 1; - goto err_open; - } + Materialized_cursor *materialized_cursor= + result_materialize->materialized_cursor; if ((rc= materialized_cursor->open(0))) { @@ -229,8 +223,6 @@ int mysql_open_cursor(THD *thd, uint flags, select_result *result, err_open: DBUG_ASSERT(! (sensitive_cursor && sensitive_cursor->is_open())); delete sensitive_cursor; - if (result_materialize->table) - free_tmp_table(thd, result_materialize->table); end: delete result_materialize; return rc; @@ -544,6 +536,51 @@ Materialized_cursor::Materialized_cursor(select_result *result_arg, } +/** + Preserve the original metadata that would be sent to the client. + + @param thd Thread identifier. + @param send_fields List of fields that would be sent. +*/ + +int Materialized_cursor::fill_item_list(THD *thd, List &send_fields) +{ + Query_arena backup_arena; + int rc; + List_iterator_fast it_org(send_fields); + List_iterator_fast it_dst(item_list); + Item *item_org; + Item *item_dst; + + thd->set_n_backup_active_arena(this, &backup_arena); + + if ((rc= table->fill_item_list(&item_list))) + goto end; + + DBUG_ASSERT(send_fields.elements == item_list.elements); + + /* + Unless we preserve the original metadata, it will be lost, + since new fields describe columns of the temporary table. + Allocate a copy of the name for safety only. Currently + items with original names are always kept in memory, + but in case this changes a memory leak may be hard to notice. + */ + while ((item_dst= it_dst++, item_org= it_org++)) + { + Send_field send_field; + Item_ident *ident= static_cast(item_dst); + item_org->make_field(&send_field); + + ident->db_name= thd->strdup(send_field.db_name); + ident->table_name= thd->strdup(send_field.table_name); + } +end: + thd->restore_active_arena(this, &backup_arena); + /* Check for thd->is_error() in case of OOM */ + return rc || thd->net.report_error; +} + int Materialized_cursor::open(JOIN *join __attribute__((unused))) { THD *thd= fake_unit.thd; @@ -552,8 +589,7 @@ int Materialized_cursor::open(JOIN *join __attribute__((unused))) thd->set_n_backup_active_arena(this, &backup_arena); /* Create a list of fields and start sequential scan */ - rc= (table->fill_item_list(&item_list) || - result->prepare(item_list, &fake_unit) || + rc= (result->prepare(item_list, &fake_unit) || table->file->ha_rnd_init(TRUE)); thd->restore_active_arena(this, &backup_arena); if (rc == 0) @@ -664,6 +700,24 @@ bool Select_materialize::send_fields(List &list, uint flags) if (create_result_table(unit->thd, unit->get_unit_column_types(), FALSE, thd->options | TMP_TABLE_ALL_COLUMNS, "")) return TRUE; + + materialized_cursor= new (&table->mem_root) + Materialized_cursor(result, table); + + if (! materialized_cursor) + { + free_tmp_table(table->in_use, table); + table= 0; + return TRUE; + } + if (materialized_cursor->fill_item_list(unit->thd, list)) + { + delete materialized_cursor; + table= 0; + materialized_cursor= 0; + return TRUE; + } + return FALSE; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 9cc2af25529..bb264ba8a53 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16152,6 +16152,87 @@ static void test_bug31669() DBUG_VOID_RETURN; } + +/** + Bug#32265 Server returns different metadata if prepared statement is used +*/ + +static void test_bug32265() +{ + int rc, i; + MYSQL_STMT *stmt; + MYSQL_FIELD *field; + + DBUG_ENTER("test_bug32265"); + myheader("test_bug32265"); + + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); + myquery(rc); + rc= mysql_query(mysql, "CREATE TABLE t1 (a INTEGER)"); + myquery(rc); + rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)"); + myquery(rc); + rc= mysql_query(mysql, "CREATE VIEW v1 AS SELECT * FROM t1"); + myquery(rc); + + stmt= open_cursor("SELECT * FROM t1"); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + field= stmt->mysql->fields; + DIE_UNLESS(strcmp(field->table, "t1") == 0); + DIE_UNLESS(strcmp(field->org_table, "t1") == 0); + DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_stmt_close(stmt); + + stmt= open_cursor("SELECT a '' FROM t1 ``"); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + field= stmt->mysql->fields; + DIE_UNLESS(strcmp(field->table, "") == 0); + DIE_UNLESS(strcmp(field->org_table, "t1") == 0); + DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_stmt_close(stmt); + + stmt= open_cursor("SELECT a '' FROM t1 ``"); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + field= stmt->mysql->fields; + DIE_UNLESS(strcmp(field->table, "") == 0); + DIE_UNLESS(strcmp(field->org_table, "t1") == 0); + DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_stmt_close(stmt); + + stmt= open_cursor("SELECT * FROM v1"); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + field= stmt->mysql->fields; + DIE_UNLESS(strcmp(field->table, "v1") == 0); + DIE_UNLESS(strcmp(field->org_table, "t1") == 0); + DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_stmt_close(stmt); + + stmt= open_cursor("SELECT * FROM v1 /* SIC */ GROUP BY 1"); + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + field= stmt->mysql->fields; + DIE_UNLESS(strcmp(field->table, "v1") == 0); + DIE_UNLESS(strcmp(field->org_table, "t1") == 0); + DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_stmt_close(stmt); + + rc= mysql_query(mysql, "DROP VIEW v1"); + myquery(rc); + rc= mysql_query(mysql, "DROP TABLE t1"); + myquery(rc); + + DBUG_VOID_RETURN; +} + /* Read and parse arguments and MySQL options from my.cnf */ @@ -16446,6 +16527,7 @@ static struct my_tests_st my_tests[]= { { "test_bug29948", test_bug29948 }, { "test_bug29306", test_bug29306 }, { "test_bug31669", test_bug31669 }, + { "test_bug32265", test_bug32265 }, { 0, 0 } }; From 7114fbb943514e030c7554273b266adb923b035a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 17:26:50 -0300 Subject: [PATCH 272/527] Bug#34587 Creating a view inside a stored procedure leads to a server crash The problem is that when a stored procedure is being parsed for the first execution, the body is copied to a temporary buffer which is disregarded sometime after the statement is parsed. And during this parsing phase, the rule for CREATE VIEW was holding a reference to the string being parsed for use during the execution of the CREATE VIEW statement, leading to invalid memory access later. The solution is to allocate and copy the SELECT of a CREATE VIEW statement using the thread memory root, which is set to the permanent arena of the stored procedure. mysql-test/r/view.result: Add test case result for Bug#34587 mysql-test/t/view.test: Add test case for Bug#34587 sql/sql_lex.h: Remove start and end position variables. The SELECT of a CREATE VIEW is now allocated at parse time. sql/sql_view.cc: Remove assertion that is not true when the statement is being re-executed. Use string that was trimmed of leading and trailing whitespace at parse time. sql/sql_yacc.yy: Allocate the SELECT of a CREATE VIEW using the current thread memory root and remove any leading and trailing whitespace. --- mysql-test/r/view.result | 10 ++++++++++ mysql-test/t/view.test | 20 ++++++++++++++++++++ sql/sql_lex.h | 6 ++---- sql/sql_view.cc | 8 ++------ sql/sql_yacc.yy | 8 ++++++-- 5 files changed, 40 insertions(+), 12 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 3f8ed1b4e56..c5557114e0c 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3720,6 +3720,16 @@ DROP VIEW v1; # -- End of test case for Bug#32538. +drop view if exists a; +drop procedure if exists p; +create procedure p() +begin +declare continue handler for sqlexception begin end; +create view a as select 1; +end| +call p(); +call p(); +drop procedure p; # ----------------------------------------------------------------- # -- End of 5.1 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 3f10bc62289..2dd0b86592d 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3601,6 +3601,26 @@ DROP VIEW v1; --echo # -- End of test case for Bug#32538. --echo +# +# Bug#34587 Creating a view inside a stored procedure leads to a server crash +# + +--disable_warnings +drop view if exists a; +drop procedure if exists p; +--enable_warnings + +delimiter |; +create procedure p() +begin + declare continue handler for sqlexception begin end; + create view a as select 1; +end| +delimiter ;| +call p(); +call p(); +drop procedure p; + ########################################################################### --echo # ----------------------------------------------------------------- diff --git a/sql/sql_lex.h b/sql/sql_lex.h index ef0a9bb11ef..744019c8ae9 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1513,10 +1513,8 @@ typedef struct st_lex : public Query_tables_list /* store original leaf_tables for INSERT SELECT and PS/SP */ TABLE_LIST *leaf_tables_insert; - /** Start of SELECT of CREATE VIEW statement */ - const char* create_view_select_start; - /** End of SELECT of CREATE VIEW statement */ - const char* create_view_select_end; + /** SELECT of CREATE VIEW statement */ + LEX_STRING create_view_select; /** Start of 'ON table', in trigger statements. */ const char* raw_trg_on_table_name_begin; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 1a4d7d515a8..2230b3de8ad 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -237,7 +237,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, /* This is ensured in the parser. */ DBUG_ASSERT(!lex->proc_list.first && !lex->result && - !lex->param_list.elements && !lex->derived_tables); + !lex->param_list.elements); if (mode != VIEW_CREATE_NEW) { @@ -718,11 +718,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, /* fill structure */ view->select_stmt.str= view_query.c_ptr_safe(); view->select_stmt.length= view_query.length(); - - view->source.str= (char*) thd->lex->create_view_select_start; - view->source.length= (thd->lex->create_view_select_end - - thd->lex->create_view_select_start); - trim_whitespace(thd->charset(), & view->source); + view->source= thd->lex->create_view_select; view->file_version= 1; view->calc_md5(md5); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 764e593a1ed..f1689b28719 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -12056,18 +12056,22 @@ view_select: lex->parsing_options.allows_select_into= FALSE; lex->parsing_options.allows_select_procedure= FALSE; lex->parsing_options.allows_derived= FALSE; - lex->create_view_select_start= lip->get_cpp_ptr(); + lex->create_view_select.str= (char *) lip->get_cpp_ptr(); } view_select_aux view_check_option { THD *thd= YYTHD; LEX *lex= Lex; Lex_input_stream *lip= thd->m_lip; + uint len= lip->get_cpp_ptr() - lex->create_view_select.str; + void *create_view_select= thd->memdup(lex->create_view_select.str, len); + lex->create_view_select.length= len; + lex->create_view_select.str= (char *) create_view_select; + trim_whitespace(thd->charset(), &lex->create_view_select); lex->parsing_options.allows_variable= TRUE; lex->parsing_options.allows_select_into= TRUE; lex->parsing_options.allows_select_procedure= TRUE; lex->parsing_options.allows_derived= TRUE; - lex->create_view_select_end= lip->get_cpp_ptr(); } ; From e19c8e2ebfdb5c2a50e71d4192681b8b4bd4efad Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 23:18:01 +0200 Subject: [PATCH 273/527] Bug #31316 Report server id clashes in SHOW SLAVE STATUS "Server_IO_State" field Critical error messages from get_master_version_and_clock() were written only to the slave errorlog while Show slave status did not display any incident happened. Although the artifact was reported for a particular --replicate-same-server-id related issue the fix refines all critical error reporting with deploying rli->report(). The test for the bug covers only --replicate-same-server-id error reporting. mysql-test/suite/rpl/r/rpl_server_id1.result: new results reflecting changes mysql-test/suite/rpl/t/rpl_server_id1.test: Preserving the idea of the test unnecessary queries and the sleep are eliminated. In the end the slave must stop with the error displayable via $$$. sql/slave.cc: improving get_master_version_and_clock() code to report a critical incident via rli->report() that takes care of bothe the error log and the slave's status info placeholders. A critical error that force the IO slave thread to terminate is handled immediately (goto err). --- mysql-test/suite/rpl/r/rpl_server_id1.result | 23 ++++------ mysql-test/suite/rpl/t/rpl_server_id1.test | 19 ++++---- sql/slave.cc | 47 +++++++++++++++----- 3 files changed, 54 insertions(+), 35 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_server_id1.result b/mysql-test/suite/rpl/r/rpl_server_id1.result index 9894910aaf6..6a5c86d84bd 100644 --- a/mysql-test/suite/rpl/r/rpl_server_id1.result +++ b/mysql-test/suite/rpl/r/rpl_server_id1.result @@ -4,10 +4,11 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -create table t1 (n int); reset master; stop slave; change master to master_port=SLAVE_PORT; +start slave; +*** must be having the replicate-same-server-id IO thread error *** show slave status; Slave_IO_State Master_Host 127.0.0.1 @@ -20,15 +21,15 @@ Relay_Log_File slave-relay-bin.000001 Relay_Log_Pos 4 Relay_Master_Log_File Slave_IO_Running No -Slave_SQL_Running No +Slave_SQL_Running # Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table # -Last_Errno 0 -Last_Error +Last_Errno # +Last_Error # Skip_Counter 0 Exec_Master_Log_Pos 0 Relay_Log_Space 106 @@ -43,13 +44,7 @@ Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master NULL Master_SSL_Verify_Server_Cert No -Last_IO_Errno # -Last_IO_Error # -Last_SQL_Errno 0 -Last_SQL_Error -start slave; -insert into t1 values (1); -show status like "slave_running"; -Variable_name Value -Slave_running OFF -drop table t1; +Last_IO_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). +Last_SQL_Errno # +Last_SQL_Error # diff --git a/mysql-test/suite/rpl/t/rpl_server_id1.test b/mysql-test/suite/rpl/t/rpl_server_id1.test index 2db1f6e364d..b412f303b7e 100644 --- a/mysql-test/suite/rpl/t/rpl_server_id1.test +++ b/mysql-test/suite/rpl/t/rpl_server_id1.test @@ -6,21 +6,20 @@ source include/master-slave.inc; connection slave; -create table t1 (n int); reset master; + # replicate ourselves stop slave; --replace_result $SLAVE_MYPORT SLAVE_PORT eval change master to master_port=$SLAVE_MYPORT; ---replace_result $SLAVE_MYPORT SLAVE_PORT ---replace_column 16 # 18 # 35 # 36 # -query_vertical show slave status; start slave; -insert into t1 values (1); -# can't MASTER_POS_WAIT(), it does not work in this weird setup -# (when slave is its own master without --replicate-same-server-id) -sleep 2; # enough time for the event to be replicated (it should not) -show status like "slave_running"; -drop table t1; + +--echo *** must be having the replicate-same-server-id IO thread error *** + +source include/wait_for_slave_io_to_stop.inc; + +--replace_result $SLAVE_MYPORT SLAVE_PORT +--replace_column 12 # 16 # 19 # 20 # 18 # 37 # 38 # +query_vertical show slave status; # End of 4.1 tests diff --git a/sql/slave.cc b/sql/slave.cc index ea0dde942da..1880dcf0d43 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -747,7 +747,11 @@ int init_intvar_from_file(int* var, IO_CACHE* f, int default_val) static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) { + char err_buff[MAX_SLAVE_ERRMSG]; const char* errmsg= 0; + int err_code= 0; + MYSQL_RES *master_res= 0; + MYSQL_ROW master_row; DBUG_ENTER("get_master_version_and_clock"); /* @@ -758,7 +762,11 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) mi->rli.relay_log.description_event_for_queue= 0; if (!my_isdigit(&my_charset_bin,*mysql->server_version)) + { errmsg = "Master reported unrecognized MySQL version"; + err_code= ER_SLAVE_FATAL_ERROR; + sprintf(err_buff, ER(err_code), errmsg); + } else { /* @@ -770,6 +778,8 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) case '1': case '2': errmsg = "Master reported unrecognized MySQL version"; + err_code= ER_SLAVE_FATAL_ERROR; + sprintf(err_buff, ER(err_code), errmsg); break; case '3': mi->rli.relay_log.description_event_for_queue= new @@ -802,26 +812,21 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) */ if (errmsg) - { - sql_print_error(errmsg); - DBUG_RETURN(1); - } + goto err; /* as we are here, we tried to allocate the event */ if (!mi->rli.relay_log.description_event_for_queue) { - mi->report(ERROR_LEVEL, ER_SLAVE_CREATE_EVENT_FAILURE, - ER(ER_SLAVE_CREATE_EVENT_FAILURE), - "default Format_description_log_event"); - DBUG_RETURN(1); + errmsg= "default Format_description_log_event"; + err_code= ER_SLAVE_CREATE_EVENT_FAILURE; + sprintf(err_buff, ER(err_code), errmsg); + goto err; } /* Compare the master and slave's clock. Do not die if master's clock is unavailable (very old master not supporting UNIX_TIMESTAMP()?). */ - MYSQL_RES *master_res= 0; - MYSQL_ROW master_row; if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT UNIX_TIMESTAMP()")) && (master_res= mysql_store_result(mysql)) && @@ -858,11 +863,17 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) if ((master_row= mysql_fetch_row(master_res)) && (::server_id == strtoul(master_row[1], 0, 10)) && !mi->rli.replicate_same_server_id) + { errmsg= "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)."; + err_code= ER_SLAVE_FATAL_ERROR; + sprintf(err_buff, ER(err_code), errmsg); + } mysql_free_result(master_res); + if (errmsg) + goto err; } /* @@ -893,10 +904,16 @@ not always make sense; please check the manual before using it)."; { if ((master_row= mysql_fetch_row(master_res)) && strcmp(master_row[0], global_system_variables.collation_server->name)) + { errmsg= "The slave I/O thread stops because master and slave have \ different values for the COLLATION_SERVER global variable. The values must \ be equal for replication to work"; + err_code= ER_SLAVE_FATAL_ERROR; + sprintf(err_buff, ER(err_code), errmsg); + } mysql_free_result(master_res); + if (errmsg) + goto err; } /* @@ -921,16 +938,24 @@ be equal for replication to work"; if ((master_row= mysql_fetch_row(master_res)) && strcmp(master_row[0], global_system_variables.time_zone->get_name()->ptr())) + { errmsg= "The slave I/O thread stops because master and slave have \ different values for the TIME_ZONE global variable. The values must \ be equal for replication to work"; + err_code= ER_SLAVE_FATAL_ERROR; + sprintf(err_buff, ER(err_code), errmsg); + } mysql_free_result(master_res); + + if (errmsg) + goto err; } err: if (errmsg) { - sql_print_error(errmsg); + DBUG_ASSERT(err_code != 0); + mi->report(ERROR_LEVEL, err_code, err_buff); DBUG_RETURN(1); } From d34f8384b3ac5e6d03da17b70877d77a07493e82 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 22:11:06 -0300 Subject: [PATCH 274/527] Post-merge fix to silence a compilation warning introduced by patch for bug 32265 . tests/mysql_client_test.c: Removed unused variable. --- tests/mysql_client_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index bb264ba8a53..25522a88445 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16159,7 +16159,7 @@ static void test_bug31669() static void test_bug32265() { - int rc, i; + int rc; MYSQL_STMT *stmt; MYSQL_FIELD *field; From 88421ee5038ebe83d448110c3386086c2bc71a1f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 20 Feb 2008 23:30:29 -0200 Subject: [PATCH 275/527] Post-merge fixes for bugs 34587 and 32265. mysql-test/r/view.result: Drop created view. mysql-test/t/view.test: Update test result. sql/sql_cursor.cc: Fix compilation failure. tests/mysql_client_test.c: Manual merge. --- mysql-test/r/view.result | 1 + mysql-test/t/view.test | 1 + sql/sql_cursor.cc | 2 +- tests/mysql_client_test.c | 3 +-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index e94b127b895..c42a47422b2 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3729,6 +3729,7 @@ create view a as select 1; end| call p(); call p(); +drop view a; drop procedure p; # ----------------------------------------------------------------- # -- Bug#34337: Server crash when Altering a view using a table name. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 347ae41b1f0..5c600f05f12 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3619,6 +3619,7 @@ end| delimiter ;| call p(); call p(); +drop view a; drop procedure p; ########################################################################### diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 138116c9283..5c4e93d4c74 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -588,7 +588,7 @@ int Materialized_cursor::fill_item_list(THD *thd, List &send_fields) end: thd->restore_active_arena(this, &backup_arena); /* Check for thd->is_error() in case of OOM */ - return rc || thd->net.report_error; + return rc || thd->is_error(); } int Materialized_cursor::open(JOIN *join __attribute__((unused))) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 82a9b964fcc..6f3abfaa0b0 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16109,8 +16109,6 @@ static void test_bug24179() } -/* - /** Bug#32265 Server returns different metadata if prepared statement is used */ @@ -16191,6 +16189,7 @@ static void test_bug32265() DBUG_VOID_RETURN; } +/* Bug#28075 "COM_DEBUG crashes mysqld" */ From 760282f4082a144a2169cb1a621084ab71d9dc70 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 06:29:35 +0100 Subject: [PATCH 276/527] Fixing result after merge. mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result: Result change. --- .../binlog/r/binlog_row_ctype_cp932.result | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result index 655100203b5..a288923b03c 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result @@ -11399,6 +11399,23 @@ cp932_japanese_ci 6109 cp932_japanese_ci 61 cp932_japanese_ci 6120 drop table t1; +CREATE TABLE t1 AS +SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; +ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); +INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); +INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); +INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); +INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); +SELECT hex(concat(repeat(0xF1F2, 10), '%')); +hex(concat(repeat(0xF1F2, 10), '%')) +F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 +3 rows expected +SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); +a hex(b) c +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +DROP TABLE t1; SET collation_connection='cp932_bin'; create table t1 select repeat('a',4000) a; delete from t1; @@ -11409,6 +11426,23 @@ cp932_bin 6109 cp932_bin 61 cp932_bin 6120 drop table t1; +CREATE TABLE t1 AS +SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; +ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); +INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5)); +INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10)); +INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11)); +INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12)); +SELECT hex(concat(repeat(0xF1F2, 10), '%')); +hex(concat(repeat(0xF1F2, 10), '%')) +F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225 +3 rows expected +SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%'); +a hex(b) c +2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 +DROP TABLE t1; create table t2 (a char(1)); insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7'); insert into t2 values ('8'),('9'),('A'),('B'),('C'),('D'),('E'),('F'); From fa08b280857fde69a70c68bd07797624a52ef262 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 12:17:32 +0300 Subject: [PATCH 277/527] Fix for Bug#34337: Server crash when Altering a view using a table name. The problem was that fill_defined_view_parts() did not return an error if a table is going to be altered. That happened if the table was already in the table cache. In that case, open_table() returned non-NULL value (valid TABLE-instance from the cache). The fix is to ensure that an error is thrown even if the table is in the cache. (This is a backport of the original patch for 5.1) mysql-test/r/view.result: Fix result file. mysql-test/r/view_grant.result: Fix result file. mysql-test/t/view.test: Add a test case for Bug#34337: Server crash when Altering a view using a table name. mysql-test/t/view_grant.test: Fix order-dependency. sql/sql_view.cc: Report an error if we're going to work with a table. --- mysql-test/r/view.result | 21 +++++++++++++++++++- mysql-test/r/view_grant.result | 1 + mysql-test/t/view.test | 36 +++++++++++++++++++++++++++++++++- mysql-test/t/view_grant.test | 1 + sql/sql_view.cc | 29 ++++++++++++++++++++++++--- 5 files changed, 83 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index fb36304e562..633278a9781 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3618,4 +3618,23 @@ ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default val set @@sql_mode=@old_mode; drop view v1; drop table t1; -End of 5.0 tests. +# ----------------------------------------------------------------- +# -- Bug#34337: Server crash when Altering a view using a table name. +# ----------------------------------------------------------------- + +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1(c1 INT); + +SELECT * FROM t1; +c1 +ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); +ERROR HY000: 'test.t1' is not VIEW + +DROP TABLE t1; + +# -- End of test case for Bug#34337. + +# ----------------------------------------------------------------- +# -- End of 5.0 tests. +# ----------------------------------------------------------------- diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index eef61c65fb8..53ad8642ba4 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -467,6 +467,7 @@ use test; REVOKE ALL PRIVILEGES, GRANT OPTION FROM mysqltest_1@localhost; drop database mysqltest; drop view if exists v1; +drop table if exists t1; create table t1 as select * from mysql.user where user=''; delete from mysql.user where user=''; flush privileges; diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 340a34db5a1..5a87128f69e 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3470,5 +3470,39 @@ insert into v1 values(1); set @@sql_mode=@old_mode; drop view v1; drop table t1; ---echo End of 5.0 tests. +########################################################################### + +--echo # ----------------------------------------------------------------- +--echo # -- Bug#34337: Server crash when Altering a view using a table name. +--echo # ----------------------------------------------------------------- +--echo + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo + +CREATE TABLE t1(c1 INT); + +--echo + +SELECT * FROM t1; + +--error ER_WRONG_OBJECT +ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); + +--echo + +DROP TABLE t1; + +--echo +--echo # -- End of test case for Bug#34337. +--echo + +########################################################################### + +--echo # ----------------------------------------------------------------- +--echo # -- End of 5.0 tests. +--echo # ----------------------------------------------------------------- diff --git a/mysql-test/t/view_grant.test b/mysql-test/t/view_grant.test index 7f9eb4e1cff..be9daacec4f 100644 --- a/mysql-test/t/view_grant.test +++ b/mysql-test/t/view_grant.test @@ -608,6 +608,7 @@ drop database mysqltest; # --disable_warnings drop view if exists v1; +drop table if exists t1; --enable_warnings # Backup anonymous users and remove them. (They get in the way of diff --git a/sql/sql_view.cc b/sql/sql_view.cc index dd0b92a06f8..48ab5b3af9e 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -182,10 +182,33 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view) TABLE_LIST decoy; memcpy (&decoy, view, sizeof (TABLE_LIST)); - if (!open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE) && - !decoy.view) + + /* + Let's reset decoy.view before calling open_table(): when we start + supporting ALTER VIEW in PS/SP that may save us from a crash. + */ + + decoy.view= NULL; + + /* + open_table() will return NULL if 'decoy' is idenitifying a view *and* + there is no TABLE object for that view in the table cache. However, + decoy.view will be set to 1. + + If there is a TABLE-instance for the oject identified by 'decoy', + open_table() will return that instance no matter if it is a table or + a view. + + Thus, there is no need to check for the return value of open_table(), + since the return value itself does not mean anything. + */ + + open_table(thd, &decoy, thd->mem_root, ¬_used, OPEN_VIEW_NO_PARSE); + + if (!decoy.view) { - /* It's a table */ + /* It's a table. */ + my_error(ER_WRONG_OBJECT, MYF(0), view->db, view->table_name, "VIEW"); return TRUE; } From ffd88cb2bd1bb31a85036a422145b325a36d629e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 12:48:55 +0300 Subject: [PATCH 278/527] Fix merge (fix result file) --- mysql-test/r/view.result | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index c42a47422b2..0e89210cb60 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3613,6 +3613,23 @@ ERROR HY000: Field of view 'test.v1' underlying table doesn't have a default val set @@sql_mode=@old_mode; drop view v1; drop table t1; +# ----------------------------------------------------------------- +# -- Bug#34337: Server crash when Altering a view using a table name. +# ----------------------------------------------------------------- + +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1(c1 INT); + +SELECT * FROM t1; +c1 +ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); +ERROR HY000: 'test.t1' is not VIEW + +DROP TABLE t1; + +# -- End of test case for Bug#34337. + # ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- @@ -3731,21 +3748,6 @@ call p(); call p(); drop view a; drop procedure p; -# ----------------------------------------------------------------- -# -- Bug#34337: Server crash when Altering a view using a table name. -# ----------------------------------------------------------------- - -DROP TABLE IF EXISTS t1; - -CREATE TABLE t1(c1 INT); - -ALTER ALGORITHM=TEMPTABLE SQL SECURITY INVOKER VIEW t1 (c2) AS SELECT (1); -ERROR HY000: 'test.t1' is not VIEW - -DROP TABLE t1; - -# -- End of test case for Bug#34337. - # ----------------------------------------------------------------- # -- End of 5.1 tests. # ----------------------------------------------------------------- From d8c8fd5b4feff08ab3d0480d9b2df78c43b8bf3a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 14:49:27 +0300 Subject: [PATCH 279/527] Fix for Bug#33065: Mysql not writing general query logs after sending SIGHUP. There were two problems: - after some recent fix, the server started to crash after receiving SIGHUP. That happened because LEX of new THD-object was not properly initialized. - user-specified log options were ignored when logs were reopened. The fix is to 1) initialize LEX and 2) take user-specified options into account. There is no test case in this CS, because our test suite does not support sending SIGHUP to the server. sql/mysqld.cc: Use proper logging after SIGHUP. sql/sql_parse.cc: Initialize LEX of new THD -- it is required to avoid crash in SIGHUP handling. --- sql/mysqld.cc | 14 ++++++++++++-- sql/sql_parse.cc | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 9c4e6f9e2a2..a982a8f4809 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -2573,8 +2573,18 @@ pthread_handler_t signal_hand(void *arg __attribute__((unused))) (TABLE_LIST*) 0, ¬_used); // Flush logs } /* reenable logs after the options were reloaded */ - logger.set_handlers(LOG_FILE, opt_slow_log ? LOG_TABLE:LOG_NONE, - opt_log ? LOG_TABLE:LOG_NONE); + if (log_output_options & LOG_NONE) + { + logger.set_handlers(LOG_FILE, + opt_slow_log ? LOG_TABLE : LOG_NONE, + opt_log ? LOG_TABLE : LOG_NONE); + } + else + { + logger.set_handlers(LOG_FILE, + opt_slow_log ? log_output_options : LOG_NONE, + opt_log ? log_output_options : LOG_NONE); + } break; #ifdef USE_ONE_SIGNAL_HAND case THR_SERVER_ALARM: diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a78ac978a4a..ccc8b80ffc8 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6448,6 +6448,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, { thd->thread_stack= (char*) &tmp_thd; thd->store_globals(); + lex_start(thd); } if (thd) { From fa7707addfc0bca017992b804e0c77715356e263 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 13:23:58 +0100 Subject: [PATCH 280/527] Bug#32025 ndb_waiter does too many roundtrips to ndb_mgmd - fix test failures that was already there but now are more consistent when the 1 second sleep has been removed from ndb_waiter mysql-test/t/ndb_autodiscover.test: Wait until mysqld has reconnected to ndbd after ndbd has been restarted mysql-test/t/ndb_autodiscover3.test: Wait until mysqld has reconnected to ndbd after ndbd has been restarted mysql-test/include/ndb_wait_connected.inc: Wait until mysqld has reconnected to ndbd after ndbd has been restarted --- mysql-test/include/ndb_wait_connected.inc | 26 +++++++++++++++++++++++ mysql-test/t/ndb_autodiscover.test | 1 + mysql-test/t/ndb_autodiscover3.test | 9 ++++++++ 3 files changed, 36 insertions(+) create mode 100644 mysql-test/include/ndb_wait_connected.inc diff --git a/mysql-test/include/ndb_wait_connected.inc b/mysql-test/include/ndb_wait_connected.inc new file mode 100644 index 00000000000..cfea94db1f1 --- /dev/null +++ b/mysql-test/include/ndb_wait_connected.inc @@ -0,0 +1,26 @@ +# Check that mysqld has reconnected to ndbd after +# restart of ndbd +# +--disable_query_log +--disable_result_log +let $mysql_errno= 1; +let $counter= 600; +while ($mysql_errno) +{ + --error 0,157 + CREATE TABLE ndb_wait_connected (a int primary key); + if ($mysql_errno) + { + if (!$counter) + { + die Failed waiting for mysqld to reconnect to ndbd; + } + dec $counter; + --sleep 0.1 + } +} +DROP TABLE ndb_wait_connected; +--enable_query_log +--enable_result_log + + diff --git a/mysql-test/t/ndb_autodiscover.test b/mysql-test/t/ndb_autodiscover.test index 6eb039c2df2..049dcd9755e 100644 --- a/mysql-test/t/ndb_autodiscover.test +++ b/mysql-test/t/ndb_autodiscover.test @@ -491,6 +491,7 @@ select * from t1; 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; diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test index 259da6e3501..4a20e7dd430 100644 --- a/mysql-test/t/ndb_autodiscover3.test +++ b/mysql-test/t/ndb_autodiscover3.test @@ -25,6 +25,13 @@ 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 +# Create separate connection and use that for detecting +# when mysqld has reconnected to ndbd +connect (ndb_wait_con,127.0.0.1,root,,test,$MASTER_MYPORT,); +--source include/ndb_wait_connected.inc +disconnect ndb_wait_con; +connection server1; + --error 1297 insert into t1 values (2); --error 1296 @@ -44,6 +51,7 @@ select * from t2 order by a limit 3; --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT --connection server2 +--source include/ndb_wait_connected.inc 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; @@ -58,6 +66,7 @@ select * from t2 order by a limit 3; --exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT --connection server1 +--source include/ndb_wait_connected.inc show tables; create table t2 (a int key) engine=ndbcluster; insert into t2 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); From 315665cf67dd4e56922955b051eff2c384f2298e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 14:58:29 -0300 Subject: [PATCH 281/527] Bug#32890 Crash after repeated create and drop of tables and views The problem is that CREATE VIEW statements inside prepared statements weren't being expanded during the prepare phase, which leads to objects not being allocated in the appropriate memory arenas. The solution is to perform the validation of CREATE VIEW statements during the prepare phase of a prepared statement. The validation during the prepare phase assures that transformations of the parsed tree will use the permanent arena of the prepared statement. mysql-test/r/ps.result: Add test case result for Bug#32890 mysql-test/t/ps.test: Add test case for Bug#32890 sql/item.h: Restore original field name if name is auto generated. sql/sql_prepare.cc: Validate and prepare a CREATE VIEW statement for execution. sql/sql_view.cc: Move privileges check to it's own function. sql/sql_view.h: Export function which check privileges of a CREATE VIEW statement. --- mysql-test/r/ps.result | 152 ++++++++++++++++++++++++++ mysql-test/t/ps.test | 123 +++++++++++++++++++++ sql/item.h | 43 ++++---- sql/sql_prepare.cc | 40 +++++++ sql/sql_view.cc | 243 ++++++++++++++++++++++++----------------- sql/sql_view.h | 3 + 6 files changed, 482 insertions(+), 122 deletions(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 8845f011971..32f48a688e2 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1709,4 +1709,156 @@ a b 9999999999999999 14632475938453979136 deallocate prepare stmt; drop table t1; +drop view if exists v1; +drop table if exists t1; +create table t1 (a int, b int); +insert into t1 values (1,1), (2,2), (3,3); +insert into t1 values (3,1), (1,2), (2,3); +prepare stmt from "create view v1 as select * from t1"; +execute stmt; +drop table t1; +create table t1 (a int, b int); +drop view v1; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` +drop view v1; +prepare stmt from "create view v1 (c,d) as select a,b from t1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` +select * from v1; +c d +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` +select * from v1; +c d +drop view v1; +prepare stmt from "create view v1 (c) as select b+1 from t1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` +select * from v1; +c +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` +select * from v1; +c +drop view v1; +prepare stmt from "create view v1 (c,d,e,f) as select a,b,a in (select a+2 from t1), a = all (select a from t1) from t1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` +select * from v1; +c d e f +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` +select * from v1; +c d e f +drop view v1; +prepare stmt from "create or replace view v1 as select 1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +select * from v1; +1 +1 +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +select * from v1; +1 +1 +drop view v1; +prepare stmt from "create view v1 as select 1, 1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` +select * from v1; +1 My_exp_1 +1 1 +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` +select * from v1; +1 My_exp_1 +1 1 +drop view v1; +prepare stmt from "create view v1 (x) as select a from t1 where a > 1"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) +select * from v1; +x +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) +select * from v1; +x +drop view v1; +prepare stmt from "create view v1 as select * from `t1` `b`"; +execute stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` +select * from v1; +a b +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` +select * from v1; +a b +drop view v1; +prepare stmt from "create view v1 (a,b,c) as select * from t1"; +execute stmt; +ERROR HY000: View's SELECT and view's field list have different column counts +execute stmt; +ERROR HY000: View's SELECT and view's field list have different column counts +deallocate prepare stmt; +drop table t1; +create temporary table t1 (a int, b int); +prepare stmt from "create view v1 as select * from t1"; +execute stmt; +ERROR HY000: View's SELECT refers to a temporary table 't1' +execute stmt; +ERROR HY000: View's SELECT refers to a temporary table 't1' +deallocate prepare stmt; +drop table t1; +prepare stmt from "create view v1 as select * from t1"; +ERROR 42S02: Table 'test.t1' doesn't exist +prepare stmt from "create view v1 as select * from `t1` `b`"; +ERROR 42S02: Table 'test.t1' doesn't exist End of 5.0 tests. diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 3f4b37f13f4..58ba901d82b 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1824,4 +1824,127 @@ select * from t1 where a = @a and b = @b; deallocate prepare stmt; drop table t1; +# +# Bug#32890 Crash after repeated create and drop of tables and views +# + +--disable_warnings +drop view if exists v1; +drop table if exists t1; +--enable_warnings + +create table t1 (a int, b int); +insert into t1 values (1,1), (2,2), (3,3); +insert into t1 values (3,1), (1,2), (2,3); + +prepare stmt from "create view v1 as select * from t1"; +execute stmt; +drop table t1; +create table t1 (a int, b int); +drop view v1; +execute stmt; +show create view v1; +drop view v1; + +prepare stmt from "create view v1 (c,d) as select a,b from t1"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 (c) as select b+1 from t1"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 (c,d,e,f) as select a,b,a in (select a+2 from t1), a = all (select a from t1) from t1"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create or replace view v1 as select 1"; +execute stmt; +show create view v1; +select * from v1; +execute stmt; +show create view v1; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 as select 1, 1"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 (x) as select a from t1 where a > 1"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 as select * from `t1` `b`"; +execute stmt; +show create view v1; +select * from v1; +drop view v1; +execute stmt; +deallocate prepare stmt; +show create view v1; +select * from v1; +drop view v1; + +prepare stmt from "create view v1 (a,b,c) as select * from t1"; +--error ER_VIEW_WRONG_LIST +execute stmt; +--error ER_VIEW_WRONG_LIST +execute stmt; +deallocate prepare stmt; + +drop table t1; +create temporary table t1 (a int, b int); + +prepare stmt from "create view v1 as select * from t1"; +--error ER_VIEW_SELECT_TMPTABLE +execute stmt; +--error ER_VIEW_SELECT_TMPTABLE +execute stmt; +deallocate prepare stmt; + +drop table t1; + +--error ER_NO_SUCH_TABLE +prepare stmt from "create view v1 as select * from t1"; +--error ER_NO_SUCH_TABLE +prepare stmt from "create view v1 as select * from `t1` `b`"; + --echo End of 5.0 tests. diff --git a/sql/item.h b/sql/item.h index 5f511557f47..ae3e240778a 100644 --- a/sql/item.h +++ b/sql/item.h @@ -879,6 +879,23 @@ public: class sp_head; +class Item_basic_constant :public Item +{ +public: + /* to prevent drop fixed flag (no need parent cleanup call) */ + void cleanup() + { + /* + Restore the original field name as it might not have been allocated + in the statement memory. If the name is auto generated, it must be + done again between subsequent executions of a prepared statement. + */ + if (orig_name) + name= orig_name; + } +}; + + /***************************************************************************** The class is a base class for representation of stored routine variables in the Item-hierarchy. There are the following kinds of SP-vars: @@ -1161,7 +1178,7 @@ bool agg_item_charsets(DTCollation &c, const char *name, Item **items, uint nitems, uint flags, int item_sep); -class Item_num: public Item +class Item_num: public Item_basic_constant { public: Item_num() {} /* Remove gcc warning */ @@ -1352,7 +1369,7 @@ public: friend class st_select_lex_unit; }; -class Item_null :public Item +class Item_null :public Item_basic_constant { public: Item_null(char *name_par=0) @@ -1374,8 +1391,6 @@ public: bool send(Protocol *protocol, String *str); enum Item_result result_type () const { return STRING_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_NULL; } - /* to prevent drop fixed flag (no need parent cleanup call) */ - void cleanup() {} bool basic_const_item() const { return 1; } Item *clone_item() { return new Item_null(name); } bool is_null() { return 1; } @@ -1567,8 +1582,6 @@ public: int save_in_field(Field *field, bool no_conversions); bool basic_const_item() const { return 1; } Item *clone_item() { return new Item_int(name,value,max_length); } - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} void print(String *str); Item_num *neg() { value= -value; return this; } uint decimal_precision() const @@ -1621,8 +1634,6 @@ public: { return new Item_decimal(name, &decimal_value, decimals, max_length); } - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} void print(String *str); Item_num *neg() { @@ -1673,8 +1684,6 @@ public: String *val_str(String*); my_decimal *val_decimal(my_decimal *); bool basic_const_item() const { return 1; } - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} Item *clone_item() { return new Item_float(name, value, decimals, max_length); } Item_num *neg() { value= -value; return this; } @@ -1696,7 +1705,7 @@ public: }; -class Item_string :public Item +class Item_string :public Item_basic_constant { public: Item_string(const char *str,uint length, @@ -1780,8 +1789,6 @@ public: max_length= str_value.numchars() * collation.collation->mbmaxlen; } void print(String *str); - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} }; @@ -1839,10 +1846,10 @@ public: }; -class Item_hex_string: public Item +class Item_hex_string: public Item_basic_constant { public: - Item_hex_string(): Item() {} + Item_hex_string() {} Item_hex_string(const char *str,uint str_length); enum Type type() const { return VARBIN_ITEM; } double val_real() @@ -1858,8 +1865,6 @@ public: enum Item_result result_type () const { return STRING_RESULT; } enum Item_result cast_to_int_type() const { return INT_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} void print(String *str); bool eq(const Item *item, bool binary_cmp) const; virtual Item *safe_charset_converter(CHARSET_INFO *tocs); @@ -2449,7 +2454,7 @@ private: }; -class Item_cache: public Item +class Item_cache: public Item_basic_constant { protected: Item *example; @@ -2486,8 +2491,6 @@ public: static Item_cache* get_cache(const Item *item); table_map used_tables() const { return used_table_map; } virtual void keep_array() {} - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} void print(String *str); bool eq_def(Field *field) { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 74cbd2c5505..4972b259693 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1512,6 +1512,45 @@ static bool mysql_test_create_table(Prepared_statement *stmt) } +/** + @brief Validate and prepare for execution CREATE VIEW statement + + @param stmt prepared statement + + @note This function handles create view commands. + + @retval FALSE Operation was a success. + @retval TRUE An error occured. +*/ + +static bool mysql_test_create_view(Prepared_statement *stmt) +{ + DBUG_ENTER("mysql_test_create_view"); + THD *thd= stmt->thd; + LEX *lex= stmt->lex; + SELECT_LEX *select_lex= &lex->select_lex; + bool res= TRUE; + /* Skip first table, which is the view we are creating */ + bool link_to_local; + TABLE_LIST *view= lex->unlink_first_table(&link_to_local); + TABLE_LIST *tables= lex->query_tables; + + if (create_view_precheck(thd, tables, view, lex->create_view_mode)) + goto err; + + if (open_normal_and_derived_tables(thd, tables, 0)) + goto err; + + lex->view_prepare_mode= 1; + res= select_like_stmt_test(stmt, 0, 0); + +err: + /* put view back for PS rexecuting */ + lex->link_first_table_back(view, link_to_local); + DBUG_RETURN(res); +} + + /* Validate and prepare for execution a multi update statement. @@ -1730,6 +1769,7 @@ static bool check_prepared_statement(Prepared_statement *stmt, my_message(ER_UNSUPPORTED_PS, ER(ER_UNSUPPORTED_PS), MYF(0)); goto error; } + res= mysql_test_create_view(stmt); break; case SQLCOM_DO: res= mysql_test_do_fields(stmt, tables, lex->insert_list); diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 48ab5b3af9e..4c8e6e80c41 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -227,6 +227,143 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view) return FALSE; } +#ifndef NO_EMBEDDED_ACCESS_CHECKS + +/** + @brief CREATE VIEW privileges pre-check. + + @param thd thread handler + @param tables tables used in the view + @param views views to create + @param mode VIEW_CREATE_NEW, VIEW_ALTER, VIEW_CREATE_OR_REPLACE + + @retval FALSE Operation was a success. + @retval TRUE An error occured. +*/ + +bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, + enum_view_create_mode mode) +{ + LEX *lex= thd->lex; + /* first table in list is target VIEW name => cut off it */ + TABLE_LIST *tbl; + SELECT_LEX *select_lex= &lex->select_lex; + SELECT_LEX *sl; + bool res= TRUE; + DBUG_ENTER("create_view_precheck"); + + /* + Privilege check for view creation: + - user has CREATE VIEW privilege on view table + - user has DROP privilege in case of ALTER VIEW or CREATE OR REPLACE + VIEW + - user has some (SELECT/UPDATE/INSERT/DELETE) privileges on columns of + underlying tables used on top of SELECT list (because it can be + (theoretically) updated, so it is enough to have UPDATE privilege on + them, for example) + - user has SELECT privilege on columns used in expressions of VIEW select + - for columns of underly tables used on top of SELECT list also will be + checked that we have not more privileges on correspondent column of view + table (i.e. user will not get some privileges by view creation) + */ + if ((check_access(thd, CREATE_VIEW_ACL, view->db, &view->grant.privilege, + 0, 0, is_schema_db(view->db)) || + grant_option && check_grant(thd, CREATE_VIEW_ACL, view, 0, 1, 0)) || + (mode != VIEW_CREATE_NEW && + (check_access(thd, DROP_ACL, view->db, &view->grant.privilege, + 0, 0, is_schema_db(view->db)) || + grant_option && check_grant(thd, DROP_ACL, view, 0, 1, 0)))) + goto err; + + for (sl= select_lex; sl; sl= sl->next_select()) + { + for (tbl= sl->get_table_list(); tbl; tbl= tbl->next_local) + { + /* + Ensure that we have some privileges on this table, more strict check + will be done on column level after preparation, + */ + if (check_some_access(thd, VIEW_ANY_ACL, tbl)) + { + my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), + "ANY", thd->security_ctx->priv_user, + thd->security_ctx->priv_host, tbl->table_name); + goto err; + } + /* + Mark this table as a table which will be checked after the prepare + phase + */ + tbl->table_in_first_from_clause= 1; + + /* + We need to check only SELECT_ACL for all normal fields, fields for + which we need "any" (SELECT/UPDATE/INSERT/DELETE) privilege will be + checked later + */ + tbl->grant.want_privilege= SELECT_ACL; + /* + Make sure that all rights are loaded to the TABLE::grant field. + + tbl->table_name will be correct name of table because VIEWs are + not opened yet. + */ + fill_effective_table_privileges(thd, &tbl->grant, tbl->db, + tbl->table_name); + } + } + + if (&lex->select_lex != lex->all_selects_list) + { + /* check tables of subqueries */ + for (tbl= tables; tbl; tbl= tbl->next_global) + { + if (!tbl->table_in_first_from_clause) + { + if (check_access(thd, SELECT_ACL, tbl->db, + &tbl->grant.privilege, 0, 0, test(tbl->schema_table)) || + grant_option && check_grant(thd, SELECT_ACL, tbl, 0, 1, 0)) + goto err; + } + } + } + /* + Mark fields for special privilege check ("any" privilege) + */ + for (sl= select_lex; sl; sl= sl->next_select()) + { + List_iterator_fast it(sl->item_list); + Item *item; + while ((item= it++)) + { + Item_field *field; + if ((field= item->filed_for_view_update())) + { + /* + any_privileges may be reset later by the Item_field::set_field + method in case of a system temporary table. + */ + field->any_privileges= 1; + } + } + } + + res= FALSE; + +err: + DBUG_RETURN(res || thd->net.report_error); +} + +#else + +bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, + enum_view_create_mode mode) +{ + return FALSE; +} + +#endif + /** @brief Creating/altering VIEW procedure @@ -241,7 +378,7 @@ fill_defined_view_parts (THD *thd, TABLE_LIST *view) @retval TRUE An error occured. */ -bool mysql_create_view(THD *thd, TABLE_LIST *views, +bool mysql_create_view(THD *thd, TABLE_LIST *views, enum_view_create_mode mode) { LEX *lex= thd->lex; @@ -325,109 +462,11 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, } } } - /* - Privilege check for view creation: - - user has CREATE VIEW privilege on view table - - user has DROP privilege in case of ALTER VIEW or CREATE OR REPLACE - VIEW - - user has some (SELECT/UPDATE/INSERT/DELETE) privileges on columns of - underlying tables used on top of SELECT list (because it can be - (theoretically) updated, so it is enough to have UPDATE privilege on - them, for example) - - user has SELECT privilege on columns used in expressions of VIEW select - - for columns of underly tables used on top of SELECT list also will be - checked that we have not more privileges on correspondent column of view - table (i.e. user will not get some privileges by view creation) - */ - if ((check_access(thd, CREATE_VIEW_ACL, view->db, &view->grant.privilege, - 0, 0, is_schema_db(view->db)) || - grant_option && check_grant(thd, CREATE_VIEW_ACL, view, 0, 1, 0)) || - (mode != VIEW_CREATE_NEW && - (check_access(thd, DROP_ACL, view->db, &view->grant.privilege, - 0, 0, is_schema_db(view->db)) || - grant_option && check_grant(thd, DROP_ACL, view, 0, 1, 0)))) - { - res= TRUE; - goto err; - } - for (sl= select_lex; sl; sl= sl->next_select()) - { - for (tbl= sl->get_table_list(); tbl; tbl= tbl->next_local) - { - /* - Ensure that we have some privileges on this table, more strict check - will be done on column level after preparation, - */ - if (check_some_access(thd, VIEW_ANY_ACL, tbl)) - { - my_error(ER_TABLEACCESS_DENIED_ERROR, MYF(0), - "ANY", thd->security_ctx->priv_user, - thd->security_ctx->priv_host, tbl->table_name); - res= TRUE; - goto err; - } - /* - Mark this table as a table which will be checked after the prepare - phase - */ - tbl->table_in_first_from_clause= 1; - - /* - We need to check only SELECT_ACL for all normal fields, fields for - which we need "any" (SELECT/UPDATE/INSERT/DELETE) privilege will be - checked later - */ - tbl->grant.want_privilege= SELECT_ACL; - /* - Make sure that all rights are loaded to the TABLE::grant field. - - tbl->table_name will be correct name of table because VIEWs are - not opened yet. - */ - fill_effective_table_privileges(thd, &tbl->grant, tbl->db, - tbl->table_name); - } - } - - if (&lex->select_lex != lex->all_selects_list) - { - /* check tables of subqueries */ - for (tbl= tables; tbl; tbl= tbl->next_global) - { - if (!tbl->table_in_first_from_clause) - { - if (check_access(thd, SELECT_ACL, tbl->db, - &tbl->grant.privilege, 0, 0, test(tbl->schema_table)) || - grant_option && check_grant(thd, SELECT_ACL, tbl, 0, 1, 0)) - { - res= TRUE; - goto err; - } - } - } - } - /* - Mark fields for special privilege check ("any" privilege) - */ - for (sl= select_lex; sl; sl= sl->next_select()) - { - List_iterator_fast it(sl->item_list); - Item *item; - while ((item= it++)) - { - Item_field *field; - if ((field= item->filed_for_view_update())) - { - /* - any_privileges may be reset later by the Item_field::set_field - method in case of a system temporary table. - */ - field->any_privileges= 1; - } - } - } #endif + if ((res= create_view_precheck(thd, tables, view, mode))) + goto err; + if (open_and_lock_tables(thd, tables)) { res= TRUE; diff --git a/sql/sql_view.h b/sql/sql_view.h index ab0920e0bf2..1d45283352b 100644 --- a/sql/sql_view.h +++ b/sql/sql_view.h @@ -15,6 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, + enum_view_create_mode mode); + bool mysql_create_view(THD *thd, TABLE_LIST *view, enum_view_create_mode mode); From 9f245df8530a560844aca138d103dd2f78301005 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 19:28:25 -0200 Subject: [PATCH 282/527] Post-merge fix to silence compiler warning. sql/sql_prepare.cc: Removed unused variable. --- sql/sql_prepare.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 4972b259693..18cfd8d7dfc 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1528,7 +1528,6 @@ static bool mysql_test_create_view(Prepared_statement *stmt) DBUG_ENTER("mysql_test_create_view"); THD *thd= stmt->thd; LEX *lex= stmt->lex; - SELECT_LEX *select_lex= &lex->select_lex; bool res= TRUE; /* Skip first table, which is the view we are creating */ bool link_to_local; From 3676f5188e93a824956dc43c9122904498522ffa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 21 Feb 2008 23:58:45 -0200 Subject: [PATCH 283/527] Post-merge fixes for bug 32890 mysql-test/r/ps.result: Update test case results sql/item.h: Manual merge sql/sql_view.cc: Manual merge --- mysql-test/r/ps.result | 64 +++++++++++++++++++++--------------------- sql/item.h | 2 -- sql/sql_view.cc | 4 +-- 3 files changed, 34 insertions(+), 36 deletions(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 73ca22e9d7e..f2c1d5da3b5 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1745,73 +1745,73 @@ create table t1 (a int, b int); drop view v1; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1` latin1 latin1_swedish_ci drop view v1; prepare stmt from "create view v1 (c,d) as select a,b from t1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` latin1 latin1_swedish_ci select * from v1; c d drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d` from `t1` latin1 latin1_swedish_ci select * from v1; c d drop view v1; prepare stmt from "create view v1 (c) as select b+1 from t1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci select * from v1; c drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci select * from v1; c drop view v1; prepare stmt from "create view v1 (c,d,e,f) as select a,b,a in (select a+2 from t1), a = all (select a from t1) from t1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` latin1 latin1_swedish_ci select * from v1; c d e f drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `c`,`t1`.`b` AS `d`,`t1`.`a` in (select (`t1`.`a` + 2) AS `a+2` from `t1`) AS `e`,`t1`.`a` = all (select `t1`.`a` AS `a` from `t1`) AS `f` from `t1` latin1 latin1_swedish_ci select * from v1; c d e f drop view v1; prepare stmt from "create or replace view v1 as select 1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci select * from v1; 1 1 execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci select * from v1; 1 1 @@ -1819,8 +1819,8 @@ drop view v1; prepare stmt from "create view v1 as select 1, 1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` latin1 latin1_swedish_ci select * from v1; 1 My_exp_1 1 1 @@ -1828,8 +1828,8 @@ drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1`,1 AS `My_exp_1` latin1 latin1_swedish_ci select * from v1; 1 My_exp_1 1 1 @@ -1837,32 +1837,32 @@ drop view v1; prepare stmt from "create view v1 (x) as select a from t1 where a > 1"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) latin1 latin1_swedish_ci select * from v1; x drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `x` from `t1` where (`t1`.`a` > 1) latin1 latin1_swedish_ci select * from v1; x drop view v1; prepare stmt from "create view v1 as select * from `t1` `b`"; execute stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` latin1 latin1_swedish_ci select * from v1; a b drop view v1; execute stmt; deallocate prepare stmt; show create view v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `b`.`a` AS `a`,`b`.`b` AS `b` from `t1` `b` latin1 latin1_swedish_ci select * from v1; a b drop view v1; diff --git a/sql/item.h b/sql/item.h index f7a4ead9a50..f9a944cc582 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1975,8 +1975,6 @@ public: private: bool m_cs_specified; - // to prevent drop fixed flag (no need parent cleanup call) - void cleanup() {} }; diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 92cf3529d2f..608c7a9eaa8 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -351,7 +351,7 @@ bool create_view_precheck(THD *thd, TABLE_LIST *tables, TABLE_LIST *view, res= FALSE; err: - DBUG_RETURN(res || thd->net.report_error); + DBUG_RETURN(res || thd->is_error()); } #else @@ -397,7 +397,7 @@ bool mysql_create_view(THD *thd, TABLE_LIST *views, /* This is ensured in the parser. */ DBUG_ASSERT(!lex->proc_list.first && !lex->result && - !lex->param_list.elements && !lex->derived_tables); + !lex->param_list.elements); if (mode != VIEW_CREATE_NEW) { From 1a8be8bccb198959c35794bc9055da093b0a4fc9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 12:30:17 +0400 Subject: [PATCH 284/527] Bug#23588 SHOW COLUMNS on a temporary table causes locking issues skip lock_type update for temporary tables mysql-test/r/tablelock.result: test result mysql-test/t/tablelock.test: test case sql/sql_base.cc: skip lock_type update for temporary tables --- mysql-test/r/tablelock.result | 9 +++++++++ mysql-test/t/tablelock.test | 13 +++++++++++++ sql/sql_base.cc | 8 ++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/tablelock.result b/mysql-test/r/tablelock.result index 2ffd8f928a9..6923ad40916 100644 --- a/mysql-test/r/tablelock.result +++ b/mysql-test/r/tablelock.result @@ -46,3 +46,12 @@ CREATE TABLE t2 (a int); lock tables t1 write,t1 as b write, t2 write, t2 as c read; drop table t2,t1; unlock tables; +create temporary table t1(f1 int); +lock tables t1 write; +insert into t1 values (1); +show columns from t1; +Field Type Null Key Default Extra +f1 int(11) YES NULL +insert into t1 values(2); +drop table t1; +unlock tables; diff --git a/mysql-test/t/tablelock.test b/mysql-test/t/tablelock.test index 95533903b45..5ac93f09ac1 100644 --- a/mysql-test/t/tablelock.test +++ b/mysql-test/t/tablelock.test @@ -49,3 +49,16 @@ drop table t2,t1; unlock tables; # End of 4.1 tests + +# +# Bug#23588 SHOW COLUMNS on a temporary table causes locking issues +# +create temporary table t1(f1 int); +lock tables t1 write; +insert into t1 values (1); +show columns from t1; +insert into t1 values(2); +drop table t1; +unlock tables; + +# End of 5.0 tests diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8190b3eeacd..c9f20b3d71b 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -2852,8 +2852,12 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags) } if (tables->lock_type != TL_UNLOCK && ! thd->locked_tables) - tables->table->reginfo.lock_type= tables->lock_type == TL_WRITE_DEFAULT ? - thd->update_lock_default : tables->lock_type; + { + if (tables->lock_type == TL_WRITE_DEFAULT) + tables->table->reginfo.lock_type= thd->update_lock_default; + else if (tables->table->s->tmp_table == NO_TMP_TABLE) + tables->table->reginfo.lock_type= tables->lock_type; + } tables->table->grant= tables->grant; process_view_routines: From 012aab7d8bf7ae9c30751a6d5f666c7731ecfdf3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 11:34:18 +0300 Subject: [PATCH 285/527] Fix for bug #33049: Assert while running test-as3ap test(mysql-bench suite) Under some circumstances a combination of aggregate functions and GROUP BY in a SELECT query over a VIEW could lead to incorrect calculation of the result type of the aggregate function. This in turn could result in incorrect results, or assertion failures on debug builds. Fixed by changing the logic in Item_sum_hybrid::fix_fields() so that the argument's item is dereferenced before calling its type() method. mysql-test/r/view.result: Added a test case for bug #33049. mysql-test/t/view.test: Added a test case for bug #33049. sql/item_sum.cc: When calculating the result type of an aggregate function, dereference the argument's item before calling its type() method. --- mysql-test/r/view.result | 8 ++++++++ mysql-test/t/view.test | 13 +++++++++++++ sql/item_sum.cc | 1 + 3 files changed, 22 insertions(+) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index f7f6debee6e..4ba46079b27 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3634,4 +3634,12 @@ a 1 drop view v1, v2; drop table t1, t2; +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT p.a AS a FROM t1 p, t1 q; +INSERT INTO t1 VALUES (1), (1); +SELECT MAX(a), COUNT(DISTINCT a) FROM v1 GROUP BY a; +MAX(a) COUNT(DISTINCT a) +1 1 +DROP VIEW v1; +DROP TABLE t1; End of 5.0 tests. diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index b321f8604f7..d7461504b20 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3492,5 +3492,18 @@ execute stmt; drop view v1, v2; drop table t1, t2; +# +# Bug #33049: Assert while running test-as3ap test(mysql-bench suite) +# + +CREATE TABLE t1 (a INT); +CREATE VIEW v1 AS SELECT p.a AS a FROM t1 p, t1 q; + +INSERT INTO t1 VALUES (1), (1); +SELECT MAX(a), COUNT(DISTINCT a) FROM v1 GROUP BY a; + +DROP VIEW v1; +DROP TABLE t1; + --echo End of 5.0 tests. diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 3d261dc2c36..47a7073c2e7 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -597,6 +597,7 @@ Item_sum_hybrid::fix_fields(THD *thd, Item **ref) result_field=0; null_value=1; fix_length_and_dec(); + item= item->real_item(); if (item->type() == Item::FIELD_ITEM) hybrid_field_type= ((Item_field*) item)->field->type(); else From a3e83048a36b20481155315d1026c6d91da8ecef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 13:30:33 +0300 Subject: [PATCH 286/527] Fix for Bug#30217: Views: changes in metadata behaviour between 5.0 and 5.1. The problem was that in the patch for Bug#11986 it was decided to store original query in UTF8 encoding for the INFORMATION_SCHEMA. This approach however turned out to be quite difficult to implement properly. The main problem is to preserve the same IS-output after dump/restore. So, the fix is to rollback to the previous functionality, but also to fix it to support multi-character-set-queries properly. The idea is to generate INFORMATION_SCHEMA-query from the item-tree after parsing view declaration. The IS-query should: - be completely in UTF8; - not contain character set introducers. For more information, see WL4052. mysql-test/include/ddl_i18n.check_views.inc: Add a test case for Bug#30217. mysql-test/r/ddl_i18n_koi8r.result: Update result file. mysql-test/r/ddl_i18n_utf8.result: Update result file. mysql-test/r/information_schema.result: Update result file. mysql-test/r/information_schema_db.result: Update result file. mysql-test/r/mysqldump.result: Update result file. mysql-test/r/show_check.result: Update result file. mysql-test/t/ddl_i18n_koi8r.test: Add a test case for Bug#30217. mysql-test/t/ddl_i18n_utf8.test: Add a test case for Bug#30217. mysql-test/t/mysqldump.test: Add a test case for Bug#30217. sql/ha_ndbcluster.cc: Add a parameter to print(). sql/item.cc: 1. Add a parameter to print(). 2. Item_string::print(): - Do not append character set introducer to the text literal if we're building a query for INFORMATION_SCHEMA; - Convert text literal to UTF8 if we're building a query for INFORMATION_SCHEMA. sql/item.h: Add a parameter to print(). sql/item_cmpfunc.cc: Add a parameter to print(). sql/item_cmpfunc.h: Add a parameter to print(). sql/item_func.cc: Add a parameter to print(). sql/item_func.h: Add a parameter to print(). sql/item_geofunc.h: Add a parameter to print(). sql/item_row.cc: Add a parameter to print(). sql/item_row.h: Add a parameter to print(). sql/item_strfunc.cc: Add a parameter to print(). sql/item_strfunc.h: Add a parameter to print(). sql/item_subselect.cc: Add a parameter to print(). sql/item_subselect.h: Add a parameter to print(). sql/item_sum.cc: Add a parameter to print(). sql/item_sum.h: Add a parameter to print(). sql/item_timefunc.cc: Add a parameter to print(). sql/item_timefunc.h: Add a parameter to print(). sql/mysql_priv.h: Add a parameter to print(). sql/sp_head.cc: Add a parameter to print(). sql/sql_lex.cc: Add a parameter to print(). sql/sql_lex.h: Add a parameter to print(). sql/sql_parse.cc: Add a parameter to print(). sql/sql_select.cc: Add a parameter to print(). sql/sql_show.cc: Add a parameter to print(). sql/sql_test.cc: Add a parameter to print(). sql/sql_view.cc: Build INFORMATION_SCHEMA query from Item-tree. sql/sql_yacc.yy: Build INFORMATION_SCHEMA query from Item-tree. sql/table.h: Add a parameter to print(). --- mysql-test/include/ddl_i18n.check_views.inc | 12 +++ mysql-test/r/ddl_i18n_koi8r.result | 52 +++++++++-- mysql-test/r/ddl_i18n_utf8.result | 52 +++++++++-- mysql-test/r/information_schema.result | 25 +++--- mysql-test/r/information_schema_db.result | 2 +- mysql-test/r/mysqldump.result | 34 +++++++ mysql-test/r/show_check.result | 4 +- mysql-test/t/ddl_i18n_koi8r.test | 8 +- mysql-test/t/ddl_i18n_utf8.test | 8 +- mysql-test/t/mysqldump.test | 55 ++++++++++++ sql/ha_ndbcluster.cc | 2 +- sql/item.cc | 98 +++++++++++++-------- sql/item.h | 88 ++++++++++-------- sql/item_cmpfunc.cc | 56 ++++++------ sql/item_cmpfunc.h | 51 ++++++++--- sql/item_func.cc | 65 +++++++------- sql/item_func.h | 54 ++++++++---- sql/item_geofunc.h | 9 +- sql/item_row.cc | 4 +- sql/item_row.h | 2 +- sql/item_strfunc.cc | 32 +++---- sql/item_strfunc.h | 12 +-- sql/item_subselect.cc | 49 ++++++----- sql/item_subselect.h | 20 ++--- sql/item_sum.cc | 14 +-- sql/item_sum.h | 6 +- sql/item_timefunc.cc | 32 +++---- sql/item_timefunc.h | 14 +-- sql/mysql_priv.h | 15 +++- sql/sp_head.cc | 12 +-- sql/sql_lex.cc | 27 +++--- sql/sql_lex.h | 12 +-- sql/sql_parse.cc | 2 +- sql/sql_select.cc | 81 ++++++++++------- sql/sql_show.cc | 2 +- sql/sql_test.cc | 6 +- sql/sql_view.cc | 48 +++++++++- sql/sql_yacc.yy | 22 +---- sql/table.h | 2 +- 39 files changed, 709 insertions(+), 380 deletions(-) diff --git a/mysql-test/include/ddl_i18n.check_views.inc b/mysql-test/include/ddl_i18n.check_views.inc index 727f3506e4a..db3ad02f459 100644 --- a/mysql-test/include/ddl_i18n.check_views.inc +++ b/mysql-test/include/ddl_i18n.check_views.inc @@ -9,6 +9,10 @@ SHOW CREATE VIEW v1| SHOW CREATE VIEW v2| +--echo + +SHOW CREATE VIEW v3| + # - Check INFORMATION_SCHEMA; --echo @@ -20,6 +24,10 @@ SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| +--echo + +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| + # - Execute the views; --echo @@ -30,3 +38,7 @@ SELECT COLLATION(c1), COLLATION(c2) FROM v1| --echo SELECT COLLATION(c1) FROM v2| + +--echo + +SELECT * FROM v3| diff --git a/mysql-test/r/ddl_i18n_koi8r.result b/mysql-test/r/ddl_i18n_koi8r.result index dfdc8fd463e..34cea2a5a7d 100644 --- a/mysql-test/r/ddl_i18n_koi8r.result +++ b/mysql-test/r/ddl_i18n_koi8r.result @@ -16,6 +16,8 @@ FROM t1| CREATE VIEW v2 AS SELECT _utf8'теÑÑ‚' as c1| +CREATE VIEW v3 AS SELECT _utf8'теÑÑ‚'| + SHOW CREATE VIEW v1| @@ -26,15 +28,22 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _utf8'теÑÑ‚' AS `c1` koi8r koi8r_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _utf8'теÑÑ‚' AS `ÔÅÓÔ` koi8r koi8r_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 -FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci +NULL mysqltest1 v1 select 'ÔÅÓÔ' AS `c1`,`mysqltest1`.`t1`.`ËÏÌ` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER koi8r koi8r_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v2 SELECT 'ÔÅÓÔ' as c1 NONE NO root@localhost DEFINER koi8r koi8r_general_ci +NULL mysqltest1 v2 select 'ÔÅÓÔ' AS `c1` NONE NO root@localhost DEFINER koi8r koi8r_general_ci + +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'ÔÅÓÔ' AS `ÔÅÓÔ` NONE NO root@localhost DEFINER koi8r koi8r_general_ci SELECT COLLATION(c1), COLLATION(c2) FROM v1| @@ -45,6 +54,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) utf8_general_ci +SELECT * FROM v3| +ÔÅÓÔ +ÔÅÓÔ + ALTER DATABASE mysqltest1 COLLATE cp866_general_ci| @@ -54,6 +67,7 @@ SET @@character_set_results= cp1251| SET @@collation_connection= cp1251_general_ci| SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| use mysqltest1| set names koi8r| @@ -66,15 +80,22 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _utf8'теÑÑ‚' AS `c1` koi8r koi8r_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _utf8'теÑÑ‚' AS `ÔÅÓÔ` koi8r koi8r_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 SELECT 'ÔÅÓÔ' AS c1, ËÏÌ AS c2 -FROM t1 NONE YES root@localhost DEFINER koi8r koi8r_general_ci +NULL mysqltest1 v1 select 'ÔÅÓÔ' AS `c1`,`mysqltest1`.`t1`.`ËÏÌ` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER koi8r koi8r_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v2 SELECT 'ÔÅÓÔ' as c1 NONE NO root@localhost DEFINER koi8r koi8r_general_ci +NULL mysqltest1 v2 select 'ÔÅÓÔ' AS `c1` NONE NO root@localhost DEFINER koi8r koi8r_general_ci + +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'ÔÅÓÔ' AS `ÔÅÓÔ` NONE NO root@localhost DEFINER koi8r koi8r_general_ci SELECT COLLATION(c1), COLLATION(c2) FROM v1| @@ -85,6 +106,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) utf8_general_ci +SELECT * FROM v3| +ÔÅÓÔ +ÔÅÓÔ + ---> Dumping mysqltest1 to ddl_i18n_koi8r.views.mysqltest1.sql @@ -99,6 +124,7 @@ SET @@character_set_results= cp1251| SET @@collation_connection= cp1251_general_ci| SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| use mysqltest1| set names koi8r| @@ -111,15 +137,23 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _utf8'теÑÑ‚' AS `c1` koi8r koi8r_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _utf8'теÑÑ‚' AS `ÔÅÓÔ` koi8r koi8r_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 select 'ÔÅÓÔ' AS `c1`,`t1`.`ËÏÌ` AS `c2` from `t1` NONE YES root@localhost DEFINER koi8r koi8r_general_ci +NULL mysqltest1 v1 select 'ÔÅÓÔ' AS `c1`,`mysqltest1`.`t1`.`ËÏÌ` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER koi8r koi8r_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION NULL mysqltest1 v2 select 'ÔÅÓÔ' AS `c1` NONE NO root@localhost DEFINER koi8r koi8r_general_ci +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'ÔÅÓÔ' AS `ÔÅÓÔ` NONE NO root@localhost DEFINER koi8r koi8r_general_ci + SELECT COLLATION(c1), COLLATION(c2) FROM v1| COLLATION(c1) COLLATION(c2) @@ -129,6 +163,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) utf8_general_ci +SELECT * FROM v3| +ÔÅÓÔ +ÔÅÓÔ + ---> connection: default use test| DROP DATABASE mysqltest1| diff --git a/mysql-test/r/ddl_i18n_utf8.result b/mysql-test/r/ddl_i18n_utf8.result index c009265d384..cf5dac3dc7c 100644 --- a/mysql-test/r/ddl_i18n_utf8.result +++ b/mysql-test/r/ddl_i18n_utf8.result @@ -16,6 +16,8 @@ FROM t1| CREATE VIEW v2 AS SELECT _koi8r'ÔÅÓÔ' as c1| +CREATE VIEW v3 AS SELECT _koi8r'ÔÅÓÔ'| + SHOW CREATE VIEW v1| @@ -26,15 +28,22 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _koi8r'ÔÅÓÔ' AS `теÑÑ‚` utf8 utf8_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2 -FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci +NULL mysqltest1 v1 select 'теÑÑ‚' AS `c1`,`mysqltest1`.`t1`.`кол` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER utf8 utf8_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v2 SELECT 'теÑÑ‚' as c1 NONE NO root@localhost DEFINER utf8 utf8_general_ci +NULL mysqltest1 v2 select 'теÑÑ‚' AS `c1` NONE NO root@localhost DEFINER utf8 utf8_general_ci + +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'теÑÑ‚' AS `теÑÑ‚` NONE NO root@localhost DEFINER utf8 utf8_general_ci SELECT COLLATION(c1), COLLATION(c2) FROM v1| @@ -45,6 +54,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) koi8r_general_ci +SELECT * FROM v3| +теÑÑ‚ +теÑÑ‚ + ALTER DATABASE mysqltest1 COLLATE cp866_general_ci| @@ -54,6 +67,7 @@ SET @@character_set_results= cp1251| SET @@collation_connection= cp1251_general_ci| SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| use mysqltest1| set names utf8| @@ -66,15 +80,22 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _koi8r'ÔÅÓÔ' AS `теÑÑ‚` utf8 utf8_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 SELECT 'теÑÑ‚' AS c1, кол AS c2 -FROM t1 NONE YES root@localhost DEFINER utf8 utf8_general_ci +NULL mysqltest1 v1 select 'теÑÑ‚' AS `c1`,`mysqltest1`.`t1`.`кол` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER utf8 utf8_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v2 SELECT 'теÑÑ‚' as c1 NONE NO root@localhost DEFINER utf8 utf8_general_ci +NULL mysqltest1 v2 select 'теÑÑ‚' AS `c1` NONE NO root@localhost DEFINER utf8 utf8_general_ci + +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'теÑÑ‚' AS `теÑÑ‚` NONE NO root@localhost DEFINER utf8 utf8_general_ci SELECT COLLATION(c1), COLLATION(c2) FROM v1| @@ -85,6 +106,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) koi8r_general_ci +SELECT * FROM v3| +теÑÑ‚ +теÑÑ‚ + ---> Dumping mysqltest1 to ddl_i18n_utf8views.mysqltest1.sql @@ -99,6 +124,7 @@ SET @@character_set_results= cp1251| SET @@collation_connection= cp1251_general_ci| SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| use mysqltest1| set names utf8| @@ -111,15 +137,23 @@ SHOW CREATE VIEW v2| View Create View character_set_client collation_connection v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select _koi8r'ÔÅÓÔ' AS `c1` utf8 utf8_general_ci +SHOW CREATE VIEW v3| +View Create View character_set_client collation_connection +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select _koi8r'ÔÅÓÔ' AS `теÑÑ‚` utf8 utf8_general_ci + SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v1'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL mysqltest1 v1 select 'теÑÑ‚' AS `c1`,`t1`.`кол` AS `c2` from `t1` NONE YES root@localhost DEFINER utf8 utf8_general_ci +NULL mysqltest1 v1 select 'теÑÑ‚' AS `c1`,`mysqltest1`.`t1`.`кол` AS `c2` from `mysqltest1`.`t1` NONE YES root@localhost DEFINER utf8 utf8_general_ci SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v2'| TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION NULL mysqltest1 v2 select 'теÑÑ‚' AS `c1` NONE NO root@localhost DEFINER utf8 utf8_general_ci +SELECT * FROM INFORMATION_SCHEMA.VIEWS WHERE table_name = 'v3'| +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION +NULL mysqltest1 v3 select 'теÑÑ‚' AS `теÑÑ‚` NONE NO root@localhost DEFINER utf8 utf8_general_ci + SELECT COLLATION(c1), COLLATION(c2) FROM v1| COLLATION(c1) COLLATION(c2) @@ -129,6 +163,10 @@ SELECT COLLATION(c1) FROM v2| COLLATION(c1) koi8r_general_ci +SELECT * FROM v3| +теÑÑ‚ +теÑÑ‚ + ---> connection: default use test| DROP DATABASE mysqltest1| diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 708d8ab027d..7f4efa32dc2 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -387,15 +387,11 @@ show keys from v4; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment select * from information_schema.views where TABLE_NAME like "v%"; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL test v0 select schema_name from information_schema.schemata NONE NO root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v1 select table_name from information_schema.tables -where table_name="v1" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v2 select column_name from information_schema.columns -where table_name="v2" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v3 select CHARACTER_SET_NAME from information_schema.character_sets -where CHARACTER_SET_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v4 select COLLATION_NAME from information_schema.collations -where COLLATION_NAME like "latin1%" NONE NO root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v0 select `schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v1 select `tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`tables`.`TABLE_NAME` = 'v1') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v2 select `columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`columns`.`TABLE_NAME` = 'v2') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v3 select `character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`character_sets`.`CHARACTER_SET_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v4 select `collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`collations`.`COLLATION_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci drop view v0, v1, v2, v3, v4; create table t1 (a int); grant select,update,insert on t1 to mysqltest_1@localhost; @@ -488,9 +484,9 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION; create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; select * from information_schema.views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL test v1 select a from t1 with check option CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v2 select a from t1 WITH LOCAL CHECK OPTION LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v3 select a from t1 WITH CASCADED CHECK OPTION CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci +NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci grant select (a) on test.t1 to joe@localhost with grant option; select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE @@ -1175,7 +1171,7 @@ select * from information_schema.views where table_name='v1' or table_name='v2'; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION NULL test v1 NONE YES root@localhost DEFINER latin1 latin1_swedish_ci -NULL test v2 select 1 NONE NO mysqltest_1@localhost DEFINER latin1 latin1_swedish_ci +NULL test v2 select 1 AS `1` NONE NO mysqltest_1@localhost DEFINER latin1 latin1_swedish_ci drop view v1, v2; drop table t1; drop user mysqltest_1@localhost; @@ -1559,8 +1555,7 @@ AS SELECT * FROM INFORMATION_SCHEMA.TABLES; SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1'; VIEW_DEFINITION -SELECT * -FROM INFORMATION_SCHEMA.TABLES +select `TABLES`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`TABLES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`TABLES`.`TABLE_NAME` AS `TABLE_NAME`,`TABLES`.`TABLE_TYPE` AS `TABLE_TYPE`,`TABLES`.`ENGINE` AS `ENGINE`,`TABLES`.`VERSION` AS `VERSION`,`TABLES`.`ROW_FORMAT` AS `ROW_FORMAT`,`TABLES`.`TABLE_ROWS` AS `TABLE_ROWS`,`TABLES`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`TABLES`.`DATA_LENGTH` AS `DATA_LENGTH`,`TABLES`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`TABLES`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`TABLES`.`DATA_FREE` AS `DATA_FREE`,`TABLES`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`TABLES`.`CREATE_TIME` AS `CREATE_TIME`,`TABLES`.`UPDATE_TIME` AS `UPDATE_TIME`,`TABLES`.`CHECK_TIME` AS `CHECK_TIME`,`TABLES`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`TABLES`.`CHECKSUM` AS `CHECKSUM`,`TABLES`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`TABLES`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `INFORMATION_SCHEMA`.`TABLES` DROP VIEW v1; SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index cb56fb3d5cc..3044a11fb39 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -210,7 +210,7 @@ v2 select view_definition from information_schema.views a where a.table_name = 'v2'; view_definition -select f1 from testdb_1.v1 +select `v1`.`f1` AS `f1` from `testdb_1`.`v1` select view_definition from information_schema.views a where a.table_name = 'testdb_1.v1'; view_definition diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index d0bfab6237a..a1b8eaa52f8 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -4230,6 +4230,40 @@ LOCK TABLES `test` WRITE; UNLOCK TABLES; drop database `test-database`; use test; + +# ----------------------------------------------------------------- +# -- Bug#30217: Views: changes in metadata behaviour between 5.0 and 5.1. +# ----------------------------------------------------------------- + +DROP DATABASE IF EXISTS mysqldump_test_db; +CREATE DATABASE mysqldump_test_db; +use mysqldump_test_db; + +CREATE VIEW v1(x, y) AS SELECT 'a', 'a'; + +SELECT view_definition +FROM INFORMATION_SCHEMA.VIEWS +WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1'; +view_definition +select 'a' AS `x`,'a' AS `y` + +---> Dumping mysqldump_test_db to bug30217.sql + +DROP DATABASE mysqldump_test_db; +use test; + +---> Restoring mysqldump_test_db... + +SELECT view_definition +FROM INFORMATION_SCHEMA.VIEWS +WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1'; +view_definition +select 'a' AS `x`,'a' AS `y` + +DROP DATABASE mysqldump_test_db; + +# -- End of test case for Bug#32538. + # # End of 5.1 tests # diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 320550c0ccd..103b3c9a289 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -1075,7 +1075,7 @@ Catalog Database Table Table_alias Column Column_alias Type Length Max length Is def VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33 def VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33 def VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33 -def VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 8 N 17 0 33 +def VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 15 N 17 0 33 def VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33 def VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33 def VIEWS DEFINER DEFINER 253 231 14 N 1 0 33 @@ -1083,7 +1083,7 @@ def VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33 def VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 96 6 N 1 0 33 def VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 96 6 N 1 0 33 TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION -NULL test v1 SELECT 1 NONE NO root@localhost DEFINER binary binary +NULL test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary ---------------------------------------------------------------- SHOW CREATE PROCEDURE p1; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr diff --git a/mysql-test/t/ddl_i18n_koi8r.test b/mysql-test/t/ddl_i18n_koi8r.test index 1d16adbad55..e3bed098126 100644 --- a/mysql-test/t/ddl_i18n_koi8r.test +++ b/mysql-test/t/ddl_i18n_koi8r.test @@ -85,6 +85,10 @@ CREATE VIEW v2 AS SELECT _utf8'теÑÑ‚' as c1| --echo +CREATE VIEW v3 AS SELECT _utf8'теÑÑ‚'| + +--echo + # # First-round checks. # @@ -120,6 +124,7 @@ SET @@collation_connection= cp1251_general_ci| --disable_result_log SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| --enable_result_log use mysqltest1| @@ -168,7 +173,7 @@ DROP DATABASE mysqltest1| --echo --echo ---> connection: con3 -# - Switch environment variables and trigger loading stored procedures; +# - Switch environment variables and trigger loading views; SET @@character_set_client= cp1251| SET @@character_set_results= cp1251| @@ -177,6 +182,7 @@ SET @@collation_connection= cp1251_general_ci| --disable_result_log SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| --enable_result_log use mysqltest1| diff --git a/mysql-test/t/ddl_i18n_utf8.test b/mysql-test/t/ddl_i18n_utf8.test index c80137a58b5..d76debcba5b 100644 --- a/mysql-test/t/ddl_i18n_utf8.test +++ b/mysql-test/t/ddl_i18n_utf8.test @@ -85,6 +85,10 @@ CREATE VIEW v2 AS SELECT _koi8r' --echo +CREATE VIEW v3 AS SELECT _koi8r'ÔÅÓÔ'| + +--echo + # # First-round checks. # @@ -120,6 +124,7 @@ SET @@collation_connection= cp1251_general_ci| --disable_result_log SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| --enable_result_log use mysqltest1| @@ -168,7 +173,7 @@ DROP DATABASE mysqltest1| --echo --echo ---> connection: con3 -# - Switch environment variables and trigger loading stored procedures; +# - Switch environment variables and trigger loading views; SET @@character_set_client= cp1251| SET @@character_set_results= cp1251| @@ -177,6 +182,7 @@ SET @@collation_connection= cp1251_general_ci| --disable_result_log SELECT * FROM mysqltest1.v1| SELECT * FROM mysqltest1.v2| +SELECT * FROM mysqltest1.v3| --enable_result_log use mysqltest1| diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 0e4e9989ffa..6cbe345bc8a 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1799,6 +1799,61 @@ create table test (a int); drop database `test-database`; use test; +########################################################################### + +--echo +--echo # ----------------------------------------------------------------- +--echo # -- Bug#30217: Views: changes in metadata behaviour between 5.0 and 5.1. +--echo # ----------------------------------------------------------------- +--echo + +--disable_warnings +DROP DATABASE IF EXISTS mysqldump_test_db; +--enable_warnings + +CREATE DATABASE mysqldump_test_db; +use mysqldump_test_db; + +--echo + +CREATE VIEW v1(x, y) AS SELECT 'a', 'a'; + +--echo + +SELECT view_definition +FROM INFORMATION_SCHEMA.VIEWS +WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1'; + +--echo + +--echo ---> Dumping mysqldump_test_db to bug30217.sql +--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --databases mysqldump_test_db > $MYSQLTEST_VARDIR/tmp/bug30217.sql + +--echo + +DROP DATABASE mysqldump_test_db; +use test; + +--echo + +--echo ---> Restoring mysqldump_test_db... +--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug30217.sql + +--echo + +SELECT view_definition +FROM INFORMATION_SCHEMA.VIEWS +WHERE table_schema = 'mysqldump_test_db' AND table_name = 'v1'; + +--echo + +DROP DATABASE mysqldump_test_db; + +--echo +--echo # -- End of test case for Bug#32538. +--echo + +########################################################################### --echo # --echo # End of 5.1 tests diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 441da21bf1c..26292a0c57e 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -9446,7 +9446,7 @@ ha_ndbcluster::cond_push(const COND *cond) my_errno= HA_ERR_OUT_OF_MEM; DBUG_RETURN(NULL); } - DBUG_EXECUTE("where",print_where((COND *)cond, m_tabname);); + DBUG_EXECUTE("where",print_where((COND *)cond, m_tabname, QT_ORDINARY);); DBUG_RETURN(m_cond->cond_push(cond, table, (NDBTAB *)m_table)); } diff --git a/sql/item.cc b/sql/item.cc index 10c1c58aea8..f997518ac07 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -442,9 +442,10 @@ uint Item::decimal_precision() const } -void Item::print_item_w_name(String *str) +void Item::print_item_w_name(String *str, enum_query_type query_type) { - print(str); + print(str, query_type); + if (name) { THD *thd= current_thd; @@ -1128,7 +1129,7 @@ Item_splocal::this_item_addr(THD *thd, Item **) } -void Item_splocal::print(String *str) +void Item_splocal::print(String *str, enum_query_type) { str->reserve(m_name.length+8); str->append(m_name.str, m_name.length); @@ -1182,7 +1183,7 @@ Item_case_expr::this_item_addr(THD *thd, Item **) } -void Item_case_expr::print(String *str) +void Item_case_expr::print(String *str, enum_query_type) { if (str->reserve(MAX_INT_WIDTH + sizeof("case_expr@"))) return; /* purecov: inspected */ @@ -1276,12 +1277,12 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref) } -void Item_name_const::print(String *str) +void Item_name_const::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("NAME_CONST(")); - name_item->print(str); + name_item->print(str, query_type); str->append(','); - value_item->print(str); + value_item->print(str, query_type); str->append(')'); } @@ -1298,12 +1299,12 @@ public: const char *table_name_arg, const char *field_name_arg) :Item_ref(context_arg, item, table_name_arg, field_name_arg) {} - void print (String *str) + virtual inline void print (String *str, enum_query_type query_type) { if (ref) - (*ref)->print(str); + (*ref)->print(str, query_type); else - Item_ident::print(str); + Item_ident::print(str, query_type); } }; @@ -1455,7 +1456,9 @@ bool DTCollation::aggregate(DTCollation &dt, uint flags) set(dt); } else - ; // Do nothing + { + // Do nothing + } } else if ((flags & MY_COLL_ALLOW_SUPERSET_CONV) && left_is_superset(this, &dt)) @@ -1872,7 +1875,7 @@ const char *Item_ident::full_name() const return tmp; } -void Item_ident::print(String *str) +void Item_ident::print(String *str, enum_query_type query_type) { THD *thd= current_thd; char d_name_buff[MAX_ALIAS_NAME], t_name_buff[MAX_ALIAS_NAME]; @@ -2134,7 +2137,7 @@ String *Item_int::val_str(String *str) return str; } -void Item_int::print(String *str) +void Item_int::print(String *str, enum_query_type query_type) { // my_charset_bin is good enough for numbers str_value.set(value, &my_charset_bin); @@ -2165,7 +2168,7 @@ String *Item_uint::val_str(String *str) } -void Item_uint::print(String *str) +void Item_uint::print(String *str, enum_query_type query_type) { // latin1 is good enough for numbers str_value.set((ulonglong) value, default_charset()); @@ -2257,7 +2260,7 @@ String *Item_decimal::val_str(String *result) return result; } -void Item_decimal::print(String *str) +void Item_decimal::print(String *str, enum_query_type query_type) { my_decimal2string(E_DEC_FATAL_ERROR, &decimal_value, 0, 0, 0, &str_value); str->append(str_value); @@ -2310,16 +2313,39 @@ my_decimal *Item_float::val_decimal(my_decimal *decimal_value) } -void Item_string::print(String *str) +void Item_string::print(String *str, enum_query_type query_type) { - if (is_cs_specified()) + if (query_type == QT_ORDINARY && is_cs_specified()) { str->append('_'); str->append(collation.collation->csname); } str->append('\''); - str_value.print(str); + + if (query_type == QT_ORDINARY || + my_charset_same(str_value.charset(), system_charset_info)) + { + str_value.print(str); + } + else + { + THD *thd= current_thd; + LEX_STRING utf8_lex_str; + + thd->convert_string(&utf8_lex_str, + system_charset_info, + str_value.c_ptr_safe(), + str_value.length(), + str_value.charset()); + + String utf8_str(utf8_lex_str.str, + utf8_lex_str.length, + system_charset_info); + + utf8_str.print(str); + } + str->append('\''); } @@ -3086,7 +3112,7 @@ Item_param::eq(const Item *arg, bool binary_cmp) const /* End of Item_param related */ -void Item_param::print(String *str) +void Item_param::print(String *str, enum_query_type query_type) { if (state == NO_VALUE) { @@ -4799,7 +4825,7 @@ int Item_float::save_in_field(Field *field, bool no_conversions) } -void Item_float::print(String *str) +void Item_float::print(String *str, enum_query_type query_type) { if (presentation) { @@ -4917,7 +4943,7 @@ warn: } -void Item_hex_string::print(String *str) +void Item_hex_string::print(String *str, enum_query_type query_type) { char *end= (char*) str_value.ptr() + str_value.length(), *ptr= end - min(str_value.length(), sizeof(longlong)); @@ -5179,7 +5205,7 @@ Item *Item_field::update_value_transformer(uchar *select_arg) } -void Item_field::print(String *str) +void Item_field::print(String *str, enum_query_type query_type) { if (field && field->table->const_table) { @@ -5191,7 +5217,7 @@ void Item_field::print(String *str) str->append('\''); return; } - Item_ident::print(str); + Item_ident::print(str, query_type); } @@ -5531,7 +5557,7 @@ void Item_ref::cleanup() } -void Item_ref::print(String *str) +void Item_ref::print(String *str, enum_query_type query_type) { if (ref) { @@ -5542,10 +5568,10 @@ void Item_ref::print(String *str) append_identifier(thd, str, name, (uint) strlen(name)); } else - (*ref)->print(str); + (*ref)->print(str, query_type); } else - Item_ident::print(str); + Item_ident::print(str, query_type); } @@ -5735,11 +5761,11 @@ Item *Item_ref::get_tmp_table_item(THD *thd) } -void Item_ref_null_helper::print(String *str) +void Item_ref_null_helper::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(")); if (ref) - (*ref)->print(str); + (*ref)->print(str, query_type); else str->append('?'); str->append(')'); @@ -5931,7 +5957,7 @@ error: } -void Item_default_value::print(String *str) +void Item_default_value::print(String *str, enum_query_type query_type) { if (!arg) { @@ -5939,7 +5965,7 @@ void Item_default_value::print(String *str) return; } str->append(STRING_WITH_LEN("default(")); - arg->print(str); + arg->print(str, query_type); str->append(')'); } @@ -6075,10 +6101,10 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items) return FALSE; } -void Item_insert_value::print(String *str) +void Item_insert_value::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("values(")); - arg->print(str); + arg->print(str, query_type); str->append(')'); } @@ -6199,7 +6225,7 @@ bool Item_trigger_field::fix_fields(THD *thd, Item **items) } -void Item_trigger_field::print(String *str) +void Item_trigger_field::print(String *str, enum_query_type query_type) { str->append((row_version == NEW_ROW) ? "NEW" : "OLD", 3); str->append('.'); @@ -6389,13 +6415,13 @@ Item_cache* Item_cache::get_cache(const Item *item) } -void Item_cache::print(String *str) +void Item_cache::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(")); if (example) - example->print(str); + example->print(str, query_type); else - Item::print(str); + Item::print(str, query_type); str->append(')'); } diff --git a/sql/item.h b/sql/item.h index b3cf9aa6e4c..e1c380a2a55 100644 --- a/sql/item.h +++ b/sql/item.h @@ -113,7 +113,6 @@ public: } }; - /*************************************************************************/ /* A framework to easily handle different return types for hybrid items @@ -769,20 +768,24 @@ public: */ virtual bool const_during_execution() const { return (used_tables() & ~PARAM_TABLE_BIT) == 0; } - /* - This is an essential method for correct functioning of VIEWS. - To save a view in an .frm file we need its unequivocal - definition in SQL that takes into account sql_mode and - environmental settings. Currently such definition is restored - by traversing through the parsed tree of a view and - print()'ing SQL syntax of every node to a String buffer. This - method is used to print the SQL definition of an item. The - second use of this method is for EXPLAIN EXTENDED, to print - the SQL of a query after all optimizations of the parsed tree - have been done. + + /** + This method is used for to: + - to generate a view definition query (SELECT-statement); + - to generate a SQL-query for EXPLAIN EXTENDED; + - to generate a SQL-query to be shown in INFORMATION_SCHEMA; + - debug. + + For more information about view definition query, INFORMATION_SCHEMA + query and why they should be generated from the Item-tree, @see + mysql_register_view(). */ - virtual void print(String *str_arg) { str_arg->append(full_name()); } - void print_item_w_name(String *); + virtual inline void print(String *str, enum_query_type query_type) + { + str->append(full_name()); + } + + void print_item_w_name(String *, enum_query_type query_type); virtual void update_used_tables() {} virtual void split_sum_func(THD *thd, Item **ref_pointer_array, List &fields) {} @@ -1134,7 +1137,7 @@ public: const Item *this_item() const; Item **this_item_addr(THD *thd, Item **); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); public: inline const LEX_STRING *my_name() const; @@ -1203,7 +1206,7 @@ public: Item_case_expr can not occur in views, so here it is only for debug purposes. */ - void print(String *str); + virtual void print(String *str, enum_query_type query_type); private: uint m_case_expr_id; @@ -1261,7 +1264,7 @@ public: String *val_str(String *sp); my_decimal *val_decimal(my_decimal *); bool is_null(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item_result result_type() const { @@ -1343,7 +1346,7 @@ public: const char *full_name() const; void cleanup(); bool remove_dependence_processor(uchar * arg); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); virtual bool change_context_processor(uchar *cntx) { context= (Name_resolution_context *)cntx; return FALSE; } friend bool insert_fields(THD *thd, Name_resolution_context *context, @@ -1473,7 +1476,7 @@ public: Item *safe_charset_converter(CHARSET_INFO *tocs); int fix_outer_field(THD *thd, Field **field, Item **reference); virtual Item *update_value_transformer(uchar *select_arg); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Field::geometry_type get_geometry_type() const { DBUG_ASSERT(field_type() == MYSQL_TYPE_GEOMETRY); @@ -1511,7 +1514,12 @@ public: bool basic_const_item() const { return 1; } Item *clone_item() { return new Item_null(name); } bool is_null() { return 1; } - void print(String *str) { str->append(STRING_WITH_LEN("NULL")); } + + virtual inline void print(String *str, enum_query_type query_type) + { + str->append(STRING_WITH_LEN("NULL")); + } + Item *safe_charset_converter(CHARSET_INFO *tocs); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -1645,7 +1653,7 @@ public: */ virtual table_map used_tables() const { return state != NO_VALUE ? (table_map)0 : PARAM_TABLE_BIT; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool is_null() { DBUG_ASSERT(state != NO_VALUE); return state == NULL_VALUE; } bool basic_const_item() const; @@ -1703,7 +1711,7 @@ public: Item *clone_item() { return new Item_int(name,value,max_length); } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item_num *neg() { value= -value; return this; } uint decimal_precision() const { return (uint)(max_length - test(value < 0)); } @@ -1723,7 +1731,7 @@ public: String *val_str(String*); Item *clone_item() { return new Item_uint(name, value, max_length); } int save_in_field(Field *field, bool no_conversions); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item_num *neg (); uint decimal_precision() const { return max_length; } bool check_partition_func_processor(uchar *bool_arg) { return FALSE;} @@ -1759,7 +1767,7 @@ public: } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item_num *neg() { my_decimal_neg(&decimal_value); @@ -1818,7 +1826,7 @@ public: Item *clone_item() { return new Item_float(name, value, decimals, max_length); } Item_num *neg() { value= -value; return this; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool eq(const Item *, bool binary_cmp) const; }; @@ -1831,7 +1839,12 @@ public: uint length) :Item_float(NullS, val_arg, decimal_par, length), func_name(str) {} - void print(String *str) { str->append(func_name); } + + virtual inline void print(String *str, enum_query_type query_type) + { + str->append(func_name); + } + Item *safe_charset_converter(CHARSET_INFO *tocs); }; @@ -1922,7 +1935,7 @@ public: str_value.append(str, length); max_length= str_value.numchars() * collation.collation->mbmaxlen; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} bool check_partition_func_processor(uchar *int_arg) {return FALSE;} @@ -1981,7 +1994,12 @@ public: :Item_string(NullS, str, length, cs, dv), func_name(name_par) {} Item *safe_charset_converter(CHARSET_INFO *tocs); - void print(String *str) { str->append(func_name); } + + virtual inline void print(String *str, enum_query_type query_type) + { + str->append(func_name); + } + bool check_partition_func_processor(uchar *int_arg) {return TRUE;} }; @@ -2071,7 +2089,7 @@ public: enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool eq(const Item *item, bool binary_cmp) const; virtual Item *safe_charset_converter(CHARSET_INFO *tocs); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} @@ -2192,7 +2210,7 @@ public: } bool walk(Item_processor processor, bool walk_subquery, uchar *arg) { return (*ref)->walk(processor, walk_subquery, arg); } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool result_as_longlong() { return (*ref)->result_as_longlong(); @@ -2339,7 +2357,7 @@ public: my_decimal *val_decimal(my_decimal *); bool val_bool(); bool get_date(MYSQL_TIME *ltime, uint fuzzydate); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); /* we add RAND_TABLE_BIT to prevent moving this item from HAVING to WHERE */ @@ -2514,7 +2532,7 @@ public: enum Type type() const { return DEFAULT_VALUE_ITEM; } bool eq(const Item *item, bool binary_cmp) const; bool fix_fields(THD *, Item **); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); int save_in_field(Field *field_arg, bool no_conversions); table_map used_tables() const { return (table_map)0L; } @@ -2547,7 +2565,7 @@ public: arg(a) {} bool eq(const Item *item, bool binary_cmp) const; bool fix_fields(THD *, Item **); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); int save_in_field(Field *field_arg, bool no_conversions) { return Item_field::save_in_field(field_arg, no_conversions); @@ -2618,7 +2636,7 @@ public: enum Type type() const { return TRIGGER_FIELD_ITEM; } bool eq(const Item *item, bool binary_cmp) const; bool fix_fields(THD *, Item **); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); table_map used_tables() const { return (table_map)0L; } Field *get_tmp_table_field() { return 0; } Item *copy_or_same(THD *thd) { return this; } @@ -2711,7 +2729,7 @@ public: virtual void keep_array() {} // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool eq_def(Field *field) { return cached_field ? cached_field->eq_def (field) : FALSE; diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index dc868376796..ae7ea95707c 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -286,10 +286,10 @@ longlong Item_func_not::val_int() higher than the precedence of NOT. */ -void Item_func_not::print(String *str) +void Item_func_not::print(String *str, enum_query_type query_type) { str->append('('); - Item_func::print(str); + Item_func::print(str, query_type); str->append(')'); } @@ -321,12 +321,12 @@ bool Item_func_not_all::empty_underlying_subquery() (test_sub_item && !test_sub_item->any_value())); } -void Item_func_not_all::print(String *str) +void Item_func_not_all::print(String *str, enum_query_type query_type) { if (show) - Item_func::print(str); + Item_func::print(str, query_type); else - args[0]->print(str); + args[0]->print(str, query_type); } @@ -1422,10 +1422,10 @@ void Item_func_truth::fix_length_and_dec() } -void Item_func_truth::print(String *str) +void Item_func_truth::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" is ")); if (! affirmative) str->append(STRING_WITH_LEN("not ")); @@ -2109,16 +2109,16 @@ longlong Item_func_between::val_int() } -void Item_func_between::print(String *str) +void Item_func_between::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); if (negated) str->append(STRING_WITH_LEN(" not")); str->append(STRING_WITH_LEN(" between ")); - args[1]->print(str); + args[1]->print(str, query_type); str->append(STRING_WITH_LEN(" and ")); - args[2]->print(str); + args[2]->print(str, query_type); str->append(')'); } @@ -2763,26 +2763,26 @@ uint Item_func_case::decimal_precision() const Fix this so that it prints the whole CASE expression */ -void Item_func_case::print(String *str) +void Item_func_case::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(case ")); if (first_expr_num != -1) { - args[first_expr_num]->print(str); + args[first_expr_num]->print(str, query_type); str->append(' '); } for (uint i=0 ; i < ncases ; i+=2) { str->append(STRING_WITH_LEN("when ")); - args[i]->print(str); + args[i]->print(str, query_type); str->append(STRING_WITH_LEN(" then ")); - args[i+1]->print(str); + args[i+1]->print(str, query_type); str->append(' '); } if (else_expr_num != -1) { str->append(STRING_WITH_LEN("else ")); - args[else_expr_num]->print(str); + args[else_expr_num]->print(str, query_type); str->append(' '); } str->append(STRING_WITH_LEN("end)")); @@ -3706,14 +3706,14 @@ void Item_func_in::fix_length_and_dec() } -void Item_func_in::print(String *str) +void Item_func_in::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); if (negated) str->append(STRING_WITH_LEN(" not")); str->append(STRING_WITH_LEN(" in (")); - print_args(str, 1); + print_args(str, 1, query_type); str->append(STRING_WITH_LEN("))")); } @@ -4084,19 +4084,19 @@ void Item_cond::update_used_tables() } -void Item_cond::print(String *str) +void Item_cond::print(String *str, enum_query_type query_type) { str->append('('); List_iterator_fast li(list); Item *item; if ((item=li++)) - item->print(str); + item->print(str, query_type); while ((item=li++)) { str->append(' '); str->append(func_name()); str->append(' '); - item->print(str); + item->print(str, query_type); } str->append(')'); } @@ -4279,10 +4279,10 @@ longlong Item_func_isnotnull::val_int() } -void Item_func_isnotnull::print(String *str) +void Item_func_isnotnull::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" is not null)")); } @@ -5276,24 +5276,24 @@ Item *Item_equal::transform(Item_transformer transformer, uchar *arg) return Item_func::transform(transformer, arg); } -void Item_equal::print(String *str) +void Item_equal::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); List_iterator_fast it(fields); Item *item; if (const_item) - const_item->print(str); + const_item->print(str, query_type); else { item= it++; - item->print(str); + item->print(str, query_type); } while ((item= it++)) { str->append(','); str->append(' '); - item->print(str); + item->print(str, query_type); } str->append(')'); } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 188d87a69ca..0166a18029d 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -123,7 +123,7 @@ public: virtual bool val_bool(); virtual longlong val_int(); virtual void fix_length_and_dec(); - virtual void print(String *str); + virtual void print(String *str, enum_query_type query_type); protected: Item_func_truth(Item *a, bool a_value, bool a_affirmative) @@ -338,7 +338,12 @@ public: optimize_type select_optimize() const { return OPTIMIZE_OP; } virtual enum Functype rev_functype() const { return UNKNOWN_FUNC; } bool have_rev_func() const { return rev_functype() != UNKNOWN_FUNC; } - void print(String *str) { Item_func::print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + Item_func::print_op(str, query_type); + } + bool is_null() { return test(args[0]->is_null() || args[1]->is_null()); } bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp.cmp_collation.collation; } @@ -368,7 +373,7 @@ public: enum Functype functype() const { return NOT_FUNC; } const char *func_name() const { return "not"; } Item *neg_transformer(THD *thd); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; class Item_maxmin_subselect; @@ -433,7 +438,7 @@ public: longlong val_int(); enum Functype functype() const { return NOT_ALL_FUNC; } const char *func_name() const { return ""; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); void set_sum_test(Item_sum_hybrid *item) { test_sum_item= item; }; void set_sub_test(Item_maxmin_subselect *item) { test_sub_item= item; }; bool empty_underlying_subquery(); @@ -594,7 +599,7 @@ public: const char *func_name() const { return "between"; } bool fix_fields(THD *, Item **); void fix_length_and_dec(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool is_bool_func() { return 1; } CHARSET_INFO *compare_collation() { return cmp_collation.collation; } uint decimal_precision() const { return 1; } @@ -608,7 +613,11 @@ public: longlong val_int(); optimize_type select_optimize() const { return OPTIMIZE_NONE; } const char *func_name() const { return "strcmp"; } - void print(String *str) { Item_func::print(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + Item_func::print(str, query_type); + } }; @@ -711,7 +720,12 @@ public: void fix_length_and_dec(); uint decimal_precision() const { return args[0]->decimal_precision(); } const char *func_name() const { return "nullif"; } - void print(String *str) { Item_func::print(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + Item_func::print(str, query_type); + } + table_map not_null_tables() const { return 0; } bool is_null(); }; @@ -1141,7 +1155,7 @@ public: enum Item_result result_type () const { return cached_result_type; } enum_field_types field_type() const { return cached_field_type; } const char *func_name() const { return "case"; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item *find_item(String *str); CHARSET_INFO *compare_collation() { return cmp_collation.collation; } void cleanup(); @@ -1208,7 +1222,7 @@ public: } optimize_type select_optimize() const { return OPTIMIZE_KEY; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); enum Functype functype() const { return IN_FUNC; } const char *func_name() const { return " IN "; } bool nulls_in_row(); @@ -1330,7 +1344,7 @@ public: table_map not_null_tables() const { return abort_on_null ? not_null_tables_cache : 0; } Item *neg_transformer(THD *thd); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); CHARSET_INFO *compare_collation() { return args[0]->collation.collation; } void top_level_item() { abort_on_null=1; } }; @@ -1395,7 +1409,12 @@ public: longlong val_int(); bool fix_fields(THD *thd, Item **ref); const char *func_name() const { return "regexp"; } - void print(String *str) { print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + print_op(str, query_type); + } + CHARSET_INFO *compare_collation() { return cmp_collation.collation; } }; @@ -1407,7 +1426,11 @@ public: Item_func_regex(Item *a,Item *b) :Item_bool_func(a,b) {} longlong val_int() { return 0;} const char *func_name() const { return "regex"; } - void print(String *str) { print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + print_op(str, query_type); + } }; #endif /* USE_REGEX */ @@ -1444,7 +1467,7 @@ public: List* argument_list() { return &list; } table_map used_tables() const; void update_used_tables(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); void split_sum_func(THD *thd, Item **ref_pointer_array, List &fields); friend int setup_conds(THD *thd, TABLE_LIST *tables, TABLE_LIST *leaves, COND **conds); @@ -1568,7 +1591,7 @@ public: void update_used_tables(); bool walk(Item_processor processor, bool walk_subquery, uchar *arg); Item *transform(Item_transformer transformer, uchar *arg); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); CHARSET_INFO *compare_collation() { return fields.head()->collation.collation; } }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 6e9371de9dc..a7b562d3407 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -374,37 +374,37 @@ table_map Item_func::not_null_tables() const } -void Item_func::print(String *str) +void Item_func::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); - print_args(str, 0); + print_args(str, 0, query_type); str->append(')'); } -void Item_func::print_args(String *str, uint from) +void Item_func::print_args(String *str, uint from, enum_query_type query_type) { for (uint i=from ; i < arg_count ; i++) { if (i != from) str->append(','); - args[i]->print(str); + args[i]->print(str, query_type); } } -void Item_func::print_op(String *str) +void Item_func::print_op(String *str, enum_query_type query_type) { str->append('('); for (uint i=0 ; i < arg_count-1 ; i++) { - args[i]->print(str); + args[i]->print(str, query_type); str->append(' '); str->append(func_name()); str->append(' '); } - args[arg_count-1]->print(str); + args[arg_count-1]->print(str, query_type); str->append(')'); } @@ -884,10 +884,10 @@ my_decimal *Item_func_numhybrid::val_decimal(my_decimal *decimal_value) } -void Item_func_signed::print(String *str) +void Item_func_signed::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as signed)")); } @@ -955,10 +955,10 @@ longlong Item_func_signed::val_int() } -void Item_func_unsigned::print(String *str) +void Item_func_unsigned::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as unsigned)")); } @@ -1064,7 +1064,7 @@ err: } -void Item_decimal_typecast::print(String *str) +void Item_decimal_typecast::print(String *str, enum_query_type query_type) { char len_buf[20*3 + 1]; char *end; @@ -1072,7 +1072,7 @@ void Item_decimal_typecast::print(String *str) uint precision= my_decimal_length_to_precision(max_length, decimals, unsigned_flag); str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as decimal(")); end=int10_to_str(precision, len_buf,10); @@ -2537,16 +2537,16 @@ longlong Item_func_locate::val_int() } -void Item_func_locate::print(String *str) +void Item_func_locate::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("locate(")); - args[1]->print(str); + args[1]->print(str, query_type); str->append(','); - args[0]->print(str); + args[0]->print(str, query_type); if (arg_count == 3) { str->append(','); - args[2]->print(str); + args[2]->print(str, query_type); } str->append(')'); } @@ -3095,7 +3095,7 @@ void Item_udf_func::cleanup() } -void Item_udf_func::print(String *str) +void Item_udf_func::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); @@ -3103,7 +3103,7 @@ void Item_udf_func::print(String *str) { if (i != 0) str->append(','); - args[i]->print_item_w_name(str); + args[i]->print_item_w_name(str, query_type); } str->append(')'); } @@ -3683,12 +3683,12 @@ longlong Item_func_benchmark::val_int() } -void Item_func_benchmark::print(String *str) +void Item_func_benchmark::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("benchmark(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(','); - args[1]->print(str); + args[1]->print(str, query_type); str->append(')'); } @@ -4264,22 +4264,23 @@ my_decimal *Item_func_set_user_var::val_decimal_result(my_decimal *val) } -void Item_func_set_user_var::print(String *str) +void Item_func_set_user_var::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(@")); str->append(name.str, name.length); str->append(STRING_WITH_LEN(":=")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(')'); } -void Item_func_set_user_var::print_as_stmt(String *str) +void Item_func_set_user_var::print_as_stmt(String *str, + enum_query_type query_type) { str->append(STRING_WITH_LEN("set @")); str->append(name.str, name.length); str->append(STRING_WITH_LEN(":=")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(')'); } @@ -4652,7 +4653,7 @@ enum Item_result Item_func_get_user_var::result_type() const } -void Item_func_get_user_var::print(String *str) +void Item_func_get_user_var::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(@")); str->append(name.str,name.length); @@ -4750,7 +4751,7 @@ my_decimal* Item_user_var_as_out_param::val_decimal(my_decimal *decimal_buffer) } -void Item_user_var_as_out_param::print(String *str) +void Item_user_var_as_out_param::print(String *str, enum_query_type query_type) { str->append('@'); str->append(name.str,name.length); @@ -5089,12 +5090,12 @@ double Item_func_match::val_real() table->record[0], 0)); } -void Item_func_match::print(String *str) +void Item_func_match::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("(match ")); - print_args(str, 1); + print_args(str, 1, query_type); str->append(STRING_WITH_LEN(" against (")); - args[0]->print(str); + args[0]->print(str, query_type); if (flags & FT_BOOL) str->append(STRING_WITH_LEN(" in boolean mode")); else if (flags & FT_EXPAND) @@ -5505,7 +5506,7 @@ Item_result Item_func_sp::result_type() const { DBUG_ENTER("Item_func_sp::result_type"); - DBUG_PRINT("info", ("m_sp = %p", m_sp)); + DBUG_PRINT("info", ("m_sp = %p", (void *) m_sp)); DBUG_ASSERT(sp_result_field); DBUG_RETURN(sp_result_field->result_type()); } diff --git a/sql/item_func.h b/sql/item_func.h index e09b584de95..f8eb7ff6200 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -140,9 +140,9 @@ public: inline uint argument_count() const { return arg_count; } inline void remove_arguments() { arg_count=0; } void split_sum_func(THD *thd, Item **ref_pointer_array, List &fields); - void print(String *str); - void print_op(String *str); - void print_args(String *str, uint from); + virtual void print(String *str, enum_query_type query_type); + void print_op(String *str, enum_query_type query_type); + void print_args(String *str, uint from, enum_query_type query_type); virtual void fix_num_length_and_dec(); void count_only_length(); void count_real_length(); @@ -293,7 +293,12 @@ class Item_num_op :public Item_func_numhybrid public: Item_num_op(Item *a,Item *b) :Item_func_numhybrid(a, b) {} virtual void result_precision()= 0; - void print(String *str) { print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + print_op(str, query_type); + } + void find_num_type(); String *str_op(String *str) { DBUG_ASSERT(0); return 0; } bool check_partition_func_processor(uchar *int_arg) {return FALSE;} @@ -339,7 +344,7 @@ public: longlong val_int_from_str(int *error); void fix_length_and_dec() { max_length=args[0]->max_length; unsigned_flag=0; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); uint decimal_precision() const { return args[0]->decimal_precision(); } }; @@ -352,7 +357,7 @@ public: void fix_length_and_dec() { max_length=args[0]->max_length; unsigned_flag=1; } longlong val_int(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -373,7 +378,7 @@ public: enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; } void fix_length_and_dec() {}; const char *func_name() const { return "decimal_typecast"; } - void print(String *); + virtual void print(String *str, enum_query_type query_type); }; @@ -441,7 +446,12 @@ public: longlong val_int(); const char *func_name() const { return "DIV"; } void fix_length_and_dec(); - void print(String *str) { print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + print_op(str, query_type); + } + bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -843,7 +853,7 @@ public: const char *func_name() const { return "locate"; } longlong val_int(); void fix_length_and_dec(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -900,7 +910,11 @@ public: Item_func_bit(Item *a, Item *b) :Item_int_func(a, b) {} Item_func_bit(Item *a) :Item_int_func(a) {} void fix_length_and_dec() { unsigned_flag= 1; } - void print(String *str) { print_op(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + print_op(str, query_type); + } }; class Item_func_bit_or :public Item_func_bit @@ -950,7 +964,11 @@ public: Item_func_bit_neg(Item *a) :Item_func_bit(a) {} longlong val_int(); const char *func_name() const { return "~"; } - void print(String *str) { Item_func::print(str); } + + virtual inline void print(String *str, enum_query_type query_type) + { + Item_func::print(str, query_type); + } }; @@ -979,7 +997,7 @@ public: longlong val_int(); const char *func_name() const { return "benchmark"; } void fix_length_and_dec() { max_length=1; maybe_null=0; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -1076,7 +1094,7 @@ public: Item_result result_type () const { return udf.result_type(); } table_map not_null_tables() const { return 0; } bool is_expensive() { return 1; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -1313,8 +1331,8 @@ public: enum Item_result result_type () const { return cached_result_type; } bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec(); - void print(String *str); - void print_as_stmt(String *str); + virtual void print(String *str, enum_query_type query_type); + void print_as_stmt(String *str, enum_query_type query_type); const char *func_name() const { return "set_user_var"; } int save_in_field(Field *field, bool no_conversions, bool can_use_result_field); @@ -1344,7 +1362,7 @@ public: my_decimal *val_decimal(my_decimal*); String *val_str(String* str); void fix_length_and_dec(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); enum Item_result result_type() const; /* We must always return variables as strings to guard against selects of type @@ -1389,7 +1407,7 @@ public: my_decimal *val_decimal(my_decimal *decimal_buffer); /* fix_fields() binds variable name with its entry structure */ bool fix_fields(THD *thd, Item **ref); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); void set_null_value(CHARSET_INFO* cs); void set_value(const char *str, uint length, CHARSET_INFO* cs); }; @@ -1467,7 +1485,7 @@ public: /* The following should be safe, even if we compare doubles */ longlong val_int() { DBUG_ASSERT(fixed == 1); return val_real() != 0.0; } double val_real(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool fix_index(); void init_search(bool no_order); diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 62be78eee9e..edbe104e307 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -224,8 +224,13 @@ public: DBUG_ASSERT(0); // Should never happened return "sp_unknown"; } - } - void print(String *str) { Item_func::print(str); } + } + + virtual inline void print(String *str, enum_query_type query_type) + { + Item_func::print(str, query_type); + } + void fix_length_and_dec() { maybe_null= 1; } bool is_null() { (void) val_int(); return null_value; } }; diff --git a/sql/item_row.cc b/sql/item_row.cc index 369aa04930e..28de03bf049 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -134,14 +134,14 @@ bool Item_row::check_cols(uint c) return 0; } -void Item_row::print(String *str) +void Item_row::print(String *str, enum_query_type query_type) { str->append('('); for (uint i= 0; i < arg_count; i++) { if (i) str->append(','); - items[i]->print(str); + items[i]->print(str, query_type); } str->append(')'); } diff --git a/sql/item_row.h b/sql/item_row.h index dd7436888f0..67441f49603 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -65,7 +65,7 @@ public: bool const_item() const { return const_item_cache; }; enum Item_result result_type() const { return ROW_RESULT; } void update_used_tables(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool walk(Item_processor processor, bool walk_subquery, uchar *arg); Item *transform(Item_transformer transformer, uchar *arg); diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 42314872997..fe805d7672a 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -1594,20 +1594,20 @@ void Item_func_trim::fix_length_and_dec() } } -void Item_func_trim::print(String *str) +void Item_func_trim::print(String *str, enum_query_type query_type) { if (arg_count == 1) { - Item_func::print(str); + Item_func::print(str, query_type); return; } str->append(Item_func_trim::func_name()); str->append('('); str->append(mode_name()); str->append(' '); - args[1]->print(str); + args[1]->print(str, query_type); str->append(STRING_WITH_LEN(" from ")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(')'); } @@ -2116,12 +2116,12 @@ String *Item_func_format::val_str(String *str) } -void Item_func_format::print(String *str) +void Item_func_format::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("format(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(','); - args[1]->print(str); + args[1]->print(str, query_type); str->append(')'); } @@ -2292,14 +2292,14 @@ Item *Item_func_make_set::transform(Item_transformer transformer, uchar *arg) } -void Item_func_make_set::print(String *str) +void Item_func_make_set::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("make_set(")); - item->print(str); + item->print(str, query_type); if (arg_count) { str->append(','); - print_args(str, 0); + print_args(str, 0, query_type); } str->append(')'); } @@ -2710,10 +2710,10 @@ void Item_func_conv_charset::fix_length_and_dec() max_length = args[0]->max_length*conv_charset->mbmaxlen; } -void Item_func_conv_charset::print(String *str) +void Item_func_conv_charset::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("convert(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" using ")); str->append(conv_charset->csname); str->append(')'); @@ -2781,10 +2781,10 @@ bool Item_func_set_collation::eq(const Item *item, bool binary_cmp) const } -void Item_func_set_collation::print(String *str) +void Item_func_set_collation::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" collate ")); DBUG_ASSERT(args[1]->basic_const_item() && args[1]->type() == Item::STRING_ITEM); @@ -2903,10 +2903,10 @@ String *Item_func_unhex::val_str(String *str) } -void Item_func_binary::print(String *str) +void Item_func_binary::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as binary)")); } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 0d7cd66acff..81baf9a4c5f 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -225,7 +225,7 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "trim"; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); virtual const char *mode_name() const { return "both"; } }; @@ -482,7 +482,7 @@ public: Item_str_func::walk(processor, walk_subquery, arg); } Item *transform(Item_transformer transformer, uchar *arg); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -494,7 +494,7 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "format"; } - void print(String *); + virtual void print(String *str, enum_query_type query_type); }; @@ -617,7 +617,7 @@ public: collation.set(&my_charset_bin); max_length=args[0]->max_length; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); const char *func_name() const { return "cast_as_binary"; } }; @@ -719,7 +719,7 @@ public: String *val_str(String *); void fix_length_and_dec(); const char *func_name() const { return "convert"; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; class Item_func_set_collation :public Item_str_func @@ -731,7 +731,7 @@ public: bool eq(const Item *item, bool binary_cmp) const; const char *func_name() const { return "collate"; } enum Functype functype() const { return COLLATE_FUNC; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); Item_field *filed_for_view_update() { /* this function is transparent for view updating */ diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 46b8d2e46cc..7b68d258d29 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -306,10 +306,10 @@ void Item_subselect::update_used_tables() } -void Item_subselect::print(String *str) +void Item_subselect::print(String *str, enum_query_type query_type) { str->append('('); - engine->print(str); + engine->print(str, query_type); str->append(')'); } @@ -391,10 +391,10 @@ void Item_maxmin_subselect::cleanup() } -void Item_maxmin_subselect::print(String *str) +void Item_maxmin_subselect::print(String *str, enum_query_type query_type) { str->append(max?"":"", 5); - Item_singlerow_subselect::print(str); + Item_singlerow_subselect::print(str, query_type); } @@ -630,10 +630,10 @@ Item_exists_subselect::Item_exists_subselect(st_select_lex *select_lex): } -void Item_exists_subselect::print(String *str) +void Item_exists_subselect::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("exists")); - Item_subselect::print(str); + Item_subselect::print(str, query_type); } @@ -1553,16 +1553,16 @@ err: } -void Item_in_subselect::print(String *str) +void Item_in_subselect::print(String *str, enum_query_type query_type) { if (transformed) str->append(STRING_WITH_LEN("")); else { - left_expr->print(str); + left_expr->print(str, query_type); str->append(STRING_WITH_LEN(" in ")); } - Item_subselect::print(str); + Item_subselect::print(str, query_type); } @@ -1587,18 +1587,18 @@ Item_allany_subselect::select_transformer(JOIN *join) } -void Item_allany_subselect::print(String *str) +void Item_allany_subselect::print(String *str, enum_query_type query_type) { if (transformed) str->append(STRING_WITH_LEN("")); else { - left_expr->print(str); + left_expr->print(str, query_type); str->append(' '); str->append(func->symbol(all)); str->append(all ? " all " : " any ", 5); } - Item_subselect::print(str); + Item_subselect::print(str, query_type); } @@ -2384,22 +2384,24 @@ table_map subselect_union_engine::upper_select_const_tables() } -void subselect_single_select_engine::print(String *str) +void subselect_single_select_engine::print(String *str, + enum_query_type query_type) { - select_lex->print(thd, str); + select_lex->print(thd, str, query_type); } -void subselect_union_engine::print(String *str) +void subselect_union_engine::print(String *str, enum_query_type query_type) { - unit->print(str); + unit->print(str, query_type); } -void subselect_uniquesubquery_engine::print(String *str) +void subselect_uniquesubquery_engine::print(String *str, + enum_query_type query_type) { str->append(STRING_WITH_LEN("(")); - tab->ref.items[0]->print(str); + tab->ref.items[0]->print(str, query_type); str->append(STRING_WITH_LEN(" in ")); str->append(tab->table->s->table_name.str, tab->table->s->table_name.length); KEY *key_info= tab->table->key_info+ tab->ref.key; @@ -2408,16 +2410,17 @@ void subselect_uniquesubquery_engine::print(String *str) if (cond) { str->append(STRING_WITH_LEN(" where ")); - cond->print(str); + cond->print(str, query_type); } str->append(')'); } -void subselect_indexsubquery_engine::print(String *str) +void subselect_indexsubquery_engine::print(String *str, + enum_query_type query_type) { str->append(STRING_WITH_LEN("(")); - tab->ref.items[0]->print(str); + tab->ref.items[0]->print(str, query_type); str->append(STRING_WITH_LEN(" in ")); str->append(tab->table->s->table_name.str, tab->table->s->table_name.length); KEY *key_info= tab->table->key_info+ tab->ref.key; @@ -2428,12 +2431,12 @@ void subselect_indexsubquery_engine::print(String *str) if (cond) { str->append(STRING_WITH_LEN(" where ")); - cond->print(str); + cond->print(str, query_type); } if (having) { str->append(STRING_WITH_LEN(" having ")); - having->print(str); + having->print(str, query_type); } str->append(')'); } diff --git a/sql/item_subselect.h b/sql/item_subselect.h index de4b1cbdc06..d4aa621c083 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -103,7 +103,7 @@ public: inline bool get_const_item_cache() { return const_item_cache; } Item *get_tmp_table_item(THD *thd); void update_used_tables(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); virtual bool have_guarded_conds() { return FALSE; } bool change_engine(subselect_engine *eng) { @@ -203,7 +203,7 @@ protected: public: Item_maxmin_subselect(THD *thd, Item_subselect *parent, st_select_lex *select_lex, bool max); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); void cleanup(); bool any_value() { return was_values; } void register_value() { was_values= TRUE; } @@ -234,7 +234,7 @@ public: my_decimal *val_decimal(my_decimal *); bool val_bool(); void fix_length_and_dec(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); friend class select_exists_subselect; friend class subselect_uniquesubquery_engine; @@ -312,7 +312,7 @@ public: void top_level_item() { abort_on_null=1; } inline bool is_top_level_item() { return abort_on_null; } bool test_limit(st_select_lex_unit *unit); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool fix_fields(THD *thd, Item **ref); friend class Item_ref_null_helper; @@ -335,7 +335,7 @@ public: // only ALL subquery has upper not subs_type substype() { return all?ALL_SUBS:ANY_SUBS; } trans_res select_transformer(JOIN *join); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -399,7 +399,7 @@ public: virtual bool may_be_null() { return maybe_null; }; virtual table_map upper_select_const_tables()= 0; static table_map calc_const_tables(TABLE_LIST *); - virtual void print(String *str)= 0; + virtual void print(String *str, enum_query_type query_type)= 0; virtual bool change_result(Item_subselect *si, select_subselect *result)= 0; virtual bool no_tables()= 0; virtual bool is_executed() const { return FALSE; } @@ -430,7 +430,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - void print (String *str); + virtual void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_subselect *result); bool no_tables(); bool may_be_null(); @@ -454,7 +454,7 @@ public: uint8 uncacheable(); void exclude(); table_map upper_select_const_tables(); - void print (String *str); + virtual void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_subselect *result); bool no_tables(); bool is_executed() const; @@ -511,7 +511,7 @@ public: uint8 uncacheable() { return UNCACHEABLE_DEPENDENT; } void exclude(); table_map upper_select_const_tables() { return 0; } - void print (String *str); + virtual void print (String *str, enum_query_type query_type); bool change_result(Item_subselect *si, select_subselect *result); bool no_tables(); int scan_table(); @@ -565,7 +565,7 @@ public: having(having_arg) {} int exec(); - void print (String *str); + virtual void print (String *str, enum_query_type query_type); }; diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 27b964a9e15..f5a3956c1e4 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -359,14 +359,14 @@ void Item_sum::make_field(Send_field *tmp_field) } -void Item_sum::print(String *str) +void Item_sum::print(String *str, enum_query_type query_type) { str->append(func_name()); for (uint i=0 ; i < arg_count ; i++) { if (i) str->append(','); - args[i]->print(str); + args[i]->print(str, query_type); } str->append(')'); } @@ -2716,7 +2716,7 @@ void Item_udf_sum::cleanup() } -void Item_udf_sum::print(String *str) +void Item_udf_sum::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); @@ -2724,7 +2724,7 @@ void Item_udf_sum::print(String *str) { if (i) str->append(','); - args[i]->print(str); + args[i]->print(str, query_type); } str->append(')'); } @@ -3460,7 +3460,7 @@ String* Item_func_group_concat::val_str(String* str) } -void Item_func_group_concat::print(String *str) +void Item_func_group_concat::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("group_concat(")); if (distinct) @@ -3469,7 +3469,7 @@ void Item_func_group_concat::print(String *str) { if (i) str->append(','); - args[i]->print(str); + args[i]->print(str, query_type); } if (arg_count_order) { @@ -3478,7 +3478,7 @@ void Item_func_group_concat::print(String *str) { if (i) str->append(','); - (*order[i]->item)->print(str); + (*order[i]->item)->print(str, query_type); if (order[i]->asc) str->append(STRING_WITH_LEN(" ASC")); else diff --git a/sql/item_sum.h b/sql/item_sum.h index a3582967736..d1e6a74e85e 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -343,7 +343,7 @@ public: } virtual bool const_item() const { return forced_const; } void make_field(Send_field *field); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); void fix_num_length_and_dec(); /* @@ -984,7 +984,7 @@ public: void reset_field() {}; void update_field() {}; void cleanup(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -1257,7 +1257,7 @@ public: String* val_str(String* str); Item *copy_or_same(THD* thd); void no_rows_in_result() {} - void print(String *str); + virtual void print(String *str, enum_query_type query_type); virtual bool change_context_processor(uchar *cntx) { context= (Name_resolution_context *)cntx; return FALSE; } }; diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index a0beadcd481..390f94945aa 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2217,23 +2217,23 @@ static const char *interval_names[]= "second_microsecond" }; -void Item_date_add_interval::print(String *str) +void Item_date_add_interval::print(String *str, enum_query_type query_type) { str->append('('); - args[0]->print(str); + args[0]->print(str, query_type); str->append(date_sub_interval?" - interval ":" + interval "); - args[1]->print(str); + args[1]->print(str, query_type); str->append(' '); str->append(interval_names[int_type]); str->append(')'); } -void Item_extract::print(String *str) +void Item_extract::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("extract(")); str->append(interval_names[int_type]); str->append(STRING_WITH_LEN(" from ")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(')'); } @@ -2374,20 +2374,20 @@ bool Item_char_typecast::eq(const Item *item, bool binary_cmp) const return 1; } -void Item_typecast::print(String *str) +void Item_typecast::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as ")); str->append(cast_type()); str->append(')'); } -void Item_char_typecast::print(String *str) +void Item_char_typecast::print(String *str, enum_query_type query_type) { str->append(STRING_WITH_LEN("cast(")); - args[0]->print(str); + args[0]->print(str, query_type); str->append(STRING_WITH_LEN(" as char")); if (cast_length >= 0) { @@ -2822,7 +2822,7 @@ null_date: } -void Item_func_add_time::print(String *str) +void Item_func_add_time::print(String *str, enum_query_type query_type) { if (is_date) { @@ -2836,9 +2836,9 @@ void Item_func_add_time::print(String *str) else str->append(STRING_WITH_LEN("subtime(")); } - args[0]->print(str); + args[0]->print(str, query_type); str->append(','); - args[1]->print(str); + args[1]->print(str, query_type); str->append(')'); } @@ -3083,7 +3083,7 @@ null_date: } -void Item_func_timestamp_diff::print(String *str) +void Item_func_timestamp_diff::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); @@ -3123,7 +3123,7 @@ void Item_func_timestamp_diff::print(String *str) for (uint i=0 ; i < 2 ; i++) { str->append(','); - args[i]->print(str); + args[i]->print(str, query_type); } str->append(')'); } @@ -3163,7 +3163,7 @@ String *Item_func_get_format::val_str(String *str) } -void Item_func_get_format::print(String *str) +void Item_func_get_format::print(String *str, enum_query_type query_type) { str->append(func_name()); str->append('('); @@ -3181,7 +3181,7 @@ void Item_func_get_format::print(String *str) default: DBUG_ASSERT(0); } - args[0]->print(str); + args[0]->print(str, query_type); str->append(')'); } diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 9be7e97db49..cfcf5fab080 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -694,7 +694,7 @@ public: longlong val_int(); bool get_date(MYSQL_TIME *res, uint fuzzy_date); bool eq(const Item *item, bool binary_cmp) const; - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -711,7 +711,7 @@ class Item_extract :public Item_int_func const char *func_name() const { return "extract"; } void fix_length_and_dec(); bool eq(const Item *item, bool binary_cmp) const; - void print(String *str); + virtual void print(String *str, enum_query_type query_type); bool check_partition_func_processor(uchar *int_arg) {return FALSE;} }; @@ -735,7 +735,7 @@ public: max_length=args[0]->max_length; } virtual const char* cast_type() const= 0; - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -767,7 +767,7 @@ public: const char* cast_type() const { return "char"; }; String *val_str(String *a); void fix_length_and_dec(); - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -901,7 +901,7 @@ public: { return tmp_table_field_from_field_type(table, 0); } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); const char *func_name() const { return "add_time"; } double val_real() { return val_real_from_decimal(); } my_decimal *val_decimal(my_decimal *decimal_value) @@ -977,7 +977,7 @@ public: decimals=0; maybe_null=1; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; @@ -1001,7 +1001,7 @@ public: decimals=0; max_length=17*MY_CHARSET_BIN_MB_MAXLEN; } - void print(String *str); + virtual void print(String *str, enum_query_type query_type); }; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index ea552414d9a..6c0234a9b0b 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -44,6 +44,19 @@ #include "sql_plugin.h" #include "scheduler.h" +/** + Query type constants. + + QT_ORDINARY -- ordinary SQL query. + QT_IS -- SQL query to be shown in INFORMATION_SCHEMA (in utf8 and without + character set introducers). +*/ +enum enum_query_type +{ + QT_ORDINARY, + QT_IS +}; + /* TODO convert all these three maps to Bitmap classes */ typedef ulonglong table_map; /* Used for table bits in join */ #if MAX_INDEXES <= 64 @@ -1708,7 +1721,7 @@ bool mysql_manager_submit(void (*action)()); /* sql_test.cc */ #ifndef DBUG_OFF -void print_where(COND *cond,const char *info); +void print_where(COND *cond,const char *info, enum_query_type query_type); void print_cached_tables(void); void TEST_filesort(SORT_FIELD *sortorder,uint s_length); void print_plan(JOIN* join,uint idx, double record_count, double read_time, diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f42a5dde8ed..8bd10e00f15 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2933,7 +2933,7 @@ sp_instr_set::print(String *str) } str->qs_append(m_offset); str->qs_append(' '); - m_value->print(str); + m_value->print(str, QT_ORDINARY); } @@ -2961,9 +2961,9 @@ void sp_instr_set_trigger_field::print(String *str) { str->append(STRING_WITH_LEN("set_trigger_field ")); - trigger_field->print(str); + trigger_field->print(str, QT_ORDINARY); str->append(STRING_WITH_LEN(":=")); - value->print(str); + value->print(str, QT_ORDINARY); } /* @@ -3089,7 +3089,7 @@ sp_instr_jump_if_not::print(String *str) str->qs_append('('); str->qs_append(m_cont_dest); str->qs_append(STRING_WITH_LEN(") ")); - m_expr->print(str); + m_expr->print(str, QT_ORDINARY); } @@ -3177,7 +3177,7 @@ sp_instr_freturn::print(String *str) str->qs_append(STRING_WITH_LEN("freturn ")); str->qs_append((uint)m_type); str->qs_append(' '); - m_value->print(str); + m_value->print(str, QT_ORDINARY); } /* @@ -3665,7 +3665,7 @@ sp_instr_set_case_expr::print(String *str) str->qs_append(STRING_WITH_LEN(") ")); str->qs_append(m_case_expr_id); str->qs_append(' '); - m_case_expr->print(str); + m_case_expr->print(str, QT_ORDINARY); } uint diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 5352f8efbbb..b07efc62a00 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1947,7 +1947,7 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) } -void st_select_lex_unit::print(String *str) +void st_select_lex_unit::print(String *str, enum_query_type query_type) { bool union_all= !union_distinct; for (SELECT_LEX *sl= first_select(); sl; sl= sl->next_select()) @@ -1962,7 +1962,7 @@ void st_select_lex_unit::print(String *str) } if (sl->braces) str->append('('); - sl->print(thd, str); + sl->print(thd, str, query_type); if (sl->braces) str->append(')'); } @@ -1971,16 +1971,19 @@ void st_select_lex_unit::print(String *str) if (fake_select_lex->order_list.elements) { str->append(STRING_WITH_LEN(" order by ")); - fake_select_lex->print_order(str, - (ORDER *) fake_select_lex-> - order_list.first); + fake_select_lex->print_order( + str, + (ORDER *) fake_select_lex->order_list.first, + query_type); } - fake_select_lex->print_limit(thd, str); + fake_select_lex->print_limit(thd, str, query_type); } } -void st_select_lex::print_order(String *str, ORDER *order) +void st_select_lex::print_order(String *str, + ORDER *order, + enum_query_type query_type) { for (; order; order= order->next) { @@ -1991,7 +1994,7 @@ void st_select_lex::print_order(String *str, ORDER *order) str->append(buffer, length); } else - (*order->item)->print(str); + (*order->item)->print(str, query_type); if (!order->asc) str->append(STRING_WITH_LEN(" desc")); if (order->next) @@ -2000,7 +2003,9 @@ void st_select_lex::print_order(String *str, ORDER *order) } -void st_select_lex::print_limit(THD *thd, String *str) +void st_select_lex::print_limit(THD *thd, + String *str, + enum_query_type query_type) { SELECT_LEX_UNIT *unit= master_unit(); Item_subselect *item= unit->item; @@ -2019,10 +2024,10 @@ void st_select_lex::print_limit(THD *thd, String *str) str->append(STRING_WITH_LEN(" limit ")); if (offset_limit) { - offset_limit->print(str); + offset_limit->print(str, query_type); str->append(','); } - select_limit->print(str); + select_limit->print(str, query_type); } } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 744019c8ae9..b1a0d506382 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -543,7 +543,7 @@ public: inline void unclean() { cleaned= 0; } void reinit_exec_mechanism(); - void print(String *str); + void print(String *str, enum_query_type query_type); bool add_fake_select_lex(THD *thd); void init_prepare_fake_select_lex(THD *thd); @@ -762,9 +762,11 @@ public: init_select(); } bool setup_ref_array(THD *thd, uint order_group_num); - void print(THD *thd, String *str); - static void print_order(String *str, ORDER *order); - void print_limit(THD *thd, String *str); + void print(THD *thd, String *str, enum_query_type query_type); + static void print_order(String *str, + ORDER *order, + enum_query_type query_type); + void print_limit(THD *thd, String *str, enum_query_type query_type); void fix_prepare_information(THD *thd, Item **conds, Item **having_conds); /* Destroy the used execution plan (JOIN) of this subtree (this @@ -1708,8 +1710,6 @@ typedef struct st_lex : public Query_tables_list */ bool use_only_table_context; - LEX_STRING view_body_utf8; - /* Reference to a struct that contains information in various commands to add/create/drop/change table spaces. diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a78ac978a4a..e1ee2bd595b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4729,7 +4729,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) char buff[1024]; String str(buff,(uint32) sizeof(buff), system_charset_info); str.length(0); - thd->lex->unit.print(&str); + thd->lex->unit.print(&str, QT_ORDINARY); str.append('\0'); push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_YES, str.ptr()); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index d7e7be87d23..a520f9c57cf 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -945,7 +945,8 @@ JOIN::optimize() make_cond_for_table(conds, PSEUDO_TABLE_BITS, 0); DBUG_EXECUTE("where", print_where(table_independent_conds, - "where after opt_sum_query()");); + "where after opt_sum_query()", + QT_ORDINARY);); conds= table_independent_conds; } } @@ -1025,7 +1026,10 @@ JOIN::optimize() { conds= substitute_for_best_equal_field(conds, cond_equal, map2table); conds->update_used_tables(); - DBUG_EXECUTE("where", print_where(conds, "after substitute_best_equal");); + DBUG_EXECUTE("where", + print_where(conds, + "after substitute_best_equal", + QT_ORDINARY);); } /* @@ -2088,12 +2092,14 @@ JOIN::exec() curr_table->select_cond= curr_table->select->cond; curr_table->select_cond->top_level_item(); DBUG_EXECUTE("where",print_where(curr_table->select->cond, - "select and having");); + "select and having", + QT_ORDINARY);); curr_join->tmp_having= make_cond_for_table(curr_join->tmp_having, ~ (table_map) 0, ~used_tables); DBUG_EXECUTE("where",print_where(curr_join->tmp_having, - "having after sort");); + "having after sort", + QT_ORDINARY);); } } { @@ -5837,7 +5843,8 @@ static void add_not_null_conds(JOIN *join) if (notnull->fix_fields(join->thd, ¬null)) DBUG_VOID_RETURN; DBUG_EXECUTE("where",print_where(notnull, - referred_tab->table->alias);); + referred_tab->table->alias, + QT_ORDINARY);); add_cond_and_fix(&referred_tab->select_cond, notnull); } } @@ -5995,7 +6002,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) make_cond_for_table(cond, join->const_table_map, (table_map) 0); - DBUG_EXECUTE("where",print_where(const_cond,"constants");); + DBUG_EXECUTE("where",print_where(const_cond,"constants", QT_ORDINARY);); for (JOIN_TAB *tab= join->join_tab+join->const_tables; tab < join->join_tab+join->tables ; tab++) { @@ -6096,7 +6103,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) } if (tmp || !cond) { - DBUG_EXECUTE("where",print_where(tmp,tab->table->alias);); + DBUG_EXECUTE("where",print_where(tmp,tab->table->alias, QT_ORDINARY);); SQL_SELECT *sel= tab->select= ((SQL_SELECT*) thd->memdup((uchar*) select, sizeof(*select))); @@ -6136,7 +6143,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) tab->select_cond= sel->cond= NULL; sel->head=tab->table; - DBUG_EXECUTE("where",print_where(tmp,tab->table->alias);); + DBUG_EXECUTE("where",print_where(tmp,tab->table->alias, QT_ORDINARY);); if (tab->quick) { /* Use quick key read if it's a constant and it's not used @@ -6248,7 +6255,7 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond) current_map, current_map))) { - DBUG_EXECUTE("where",print_where(tmp,"cache");); + DBUG_EXECUTE("where",print_where(tmp,"cache", QT_ORDINARY);); tab->cache.select=(SQL_SELECT*) thd->memdup((uchar*) sel, sizeof(SQL_SELECT)); tab->cache.select->cond=tmp; @@ -8872,10 +8879,10 @@ optimize_cond(JOIN *join, COND *conds, List *join_list, predicate. Substitute a constant instead of this field if the multiple equality contains a constant. */ - DBUG_EXECUTE("where", print_where(conds, "original");); + DBUG_EXECUTE("where", print_where(conds, "original", QT_ORDINARY);); conds= build_equal_items(join->thd, conds, NULL, join_list, &join->cond_equal); - DBUG_EXECUTE("where",print_where(conds,"after equal_items");); + DBUG_EXECUTE("where",print_where(conds,"after equal_items", QT_ORDINARY);); /* change field = field to field = const for each found field = const */ propagate_cond_constants(thd, (I_List *) 0, conds, conds); @@ -8883,9 +8890,9 @@ optimize_cond(JOIN *join, COND *conds, List *join_list, Remove all instances of item == item Remove all and-levels where CONST item != CONST item */ - DBUG_EXECUTE("where",print_where(conds,"after const change");); + DBUG_EXECUTE("where",print_where(conds,"after const change", QT_ORDINARY);); conds= remove_eq_conds(thd, conds, cond_value) ; - DBUG_EXECUTE("info",print_where(conds,"after remove");); + DBUG_EXECUTE("info",print_where(conds,"after remove", QT_ORDINARY);); } DBUG_RETURN(conds); } @@ -13357,7 +13364,7 @@ static bool fix_having(JOIN *join, Item **having) JOIN_TAB *table=&join->join_tab[join->const_tables]; table_map used_tables= join->const_table_map | table->table->map; - DBUG_EXECUTE("where",print_where(*having,"having");); + DBUG_EXECUTE("where",print_where(*having,"having", QT_ORDINARY);); Item* sort_table_cond=make_cond_for_table(*having,used_tables,used_tables); if (sort_table_cond) { @@ -13374,9 +13381,11 @@ static bool fix_having(JOIN *join, Item **having) table->select_cond=table->select->cond; table->select_cond->top_level_item(); DBUG_EXECUTE("where",print_where(table->select_cond, - "select and having");); + "select and having", + QT_ORDINARY);); *having=make_cond_for_table(*having,~ (table_map) 0,~used_tables); - DBUG_EXECUTE("where",print_where(*having,"having after make_cond");); + DBUG_EXECUTE("where", + print_where(*having,"having after make_cond", QT_ORDINARY);); } return 0; } @@ -15043,7 +15052,7 @@ change_to_use_tmp_fields(THD *thd, Item **ref_pointer_array, char buff[256]; String str(buff,sizeof(buff),&my_charset_bin); str.length(0); - item->print(&str); + item->print(&str, QT_ORDINARY); item_field->name= sql_strmake(str.ptr(),str.length()); } #endif @@ -16084,7 +16093,7 @@ static void select_describe(JOIN *join, bool need_tmp_table, bool need_order, if (thd->lex->describe & DESCRIBE_EXTENDED) { extra.append(STRING_WITH_LEN(": ")); - ((COND *)pushed_cond)->print(&extra); + ((COND *)pushed_cond)->print(&extra, QT_ORDINARY); } } else @@ -16233,9 +16242,13 @@ bool mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result) @param thd thread handler @param str string where table should be printed @param tables list of tables in join + @query_type type of the query is being generated */ -static void print_join(THD *thd, String *str, List *tables) +static void print_join(THD *thd, + String *str, + List *tables, + enum_query_type query_type) { /* List is reversed => we should reverse it before using */ List_iterator_fast ti(*tables); @@ -16248,7 +16261,7 @@ static void print_join(THD *thd, String *str, List *tables) *t= ti++; DBUG_ASSERT(tables->elements >= 1); - (*table)->print(thd, str); + (*table)->print(thd, str, query_type); TABLE_LIST **end= table + tables->elements; for (TABLE_LIST **tbl= table + 1; tbl < end; tbl++) @@ -16263,11 +16276,11 @@ static void print_join(THD *thd, String *str, List *tables) str->append(STRING_WITH_LEN(" straight_join ")); else str->append(STRING_WITH_LEN(" join ")); - curr->print(thd, str); + curr->print(thd, str, query_type); if (curr->on_expr) { str->append(STRING_WITH_LEN(" on(")); - curr->on_expr->print(str); + curr->on_expr->print(str, query_type); str->append(')'); } } @@ -16314,15 +16327,15 @@ Index_hint::print(THD *thd, String *str) /** Print table as it should be in join list. - @param str string where table should bbe printed + @param str string where table should be printed */ -void TABLE_LIST::print(THD *thd, String *str) +void TABLE_LIST::print(THD *thd, String *str, enum_query_type query_type) { if (nested_join) { str->append('('); - print_join(thd, str, &nested_join->join_list); + print_join(thd, str, &nested_join->join_list, query_type); str->append(')'); } else @@ -16345,7 +16358,7 @@ void TABLE_LIST::print(THD *thd, String *str) { // A derived table str->append('('); - derived->print(str); + derived->print(str, query_type); str->append(')'); cmp_name= ""; // Force printing of alias } @@ -16405,7 +16418,7 @@ void TABLE_LIST::print(THD *thd, String *str) } -void st_select_lex::print(THD *thd, String *str) +void st_select_lex::print(THD *thd, String *str, enum_query_type query_type) { /* QQ: thd may not be set for sub queries, but this should be fixed */ if (!thd) @@ -16453,7 +16466,7 @@ void st_select_lex::print(THD *thd, String *str) first= 0; else str->append(','); - item->print_item_w_name(str); + item->print_item_w_name(str, query_type); } /* @@ -16464,7 +16477,7 @@ void st_select_lex::print(THD *thd, String *str) { str->append(STRING_WITH_LEN(" from ")); /* go through join tree */ - print_join(thd, str, &top_join_list); + print_join(thd, str, &top_join_list, query_type); } // Where @@ -16475,7 +16488,7 @@ void st_select_lex::print(THD *thd, String *str) { str->append(STRING_WITH_LEN(" where ")); if (cur_where) - cur_where->print(str); + cur_where->print(str, query_type); else str->append(cond_value != Item::COND_FALSE ? "1" : "0"); } @@ -16484,7 +16497,7 @@ void st_select_lex::print(THD *thd, String *str) if (group_list.elements) { str->append(STRING_WITH_LEN(" group by ")); - print_order(str, (ORDER *) group_list.first); + print_order(str, (ORDER *) group_list.first, query_type); switch (olap) { case CUBE_TYPE: @@ -16507,7 +16520,7 @@ void st_select_lex::print(THD *thd, String *str) { str->append(STRING_WITH_LEN(" having ")); if (cur_having) - cur_having->print(str); + cur_having->print(str, query_type); else str->append(having_value != Item::COND_FALSE ? "1" : "0"); } @@ -16515,11 +16528,11 @@ void st_select_lex::print(THD *thd, String *str) if (order_list.elements) { str->append(STRING_WITH_LEN(" order by ")); - print_order(str, (ORDER *) order_list.first); + print_order(str, (ORDER *) order_list.first, query_type); } // limit - print_limit(thd, str); + print_limit(thd, str, query_type); // PROCEDURE unsupported here } diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 9f56933a114..2c4251f0fde 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1582,7 +1582,7 @@ view_store_create_info(THD *thd, TABLE_LIST *table, String *buff) We can't just use table->query, because our SQL_MODE may trigger a different syntax, like when ANSI_QUOTES is defined. */ - table->view->unit.print(buff); + table->view->unit.print(buff, QT_ORDINARY); if (table->with_check != VIEW_CHECK_NONE) { diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 0fe299d4505..0bce4eb4a82 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -49,14 +49,14 @@ static const char *lock_descriptions[] = #ifndef DBUG_OFF void -print_where(COND *cond,const char *info) +print_where(COND *cond,const char *info, enum_query_type query_type) { if (cond) { char buff[256]; String str(buff,(uint32) sizeof(buff), system_charset_info); str.length(0); - cond->print(&str); + cond->print(&str, query_type); str.append('\0'); DBUG_LOCK_FILE; (void) fprintf(DBUG_FILE,"\nWHERE:(%s) ",info); @@ -143,7 +143,7 @@ void TEST_filesort(SORT_FIELD *sortorder,uint s_length) else { str.length(0); - sortorder->item->print(&str); + sortorder->item->print(&str, QT_ORDINARY); out.append(str); } } diff --git a/sql/sql_view.cc b/sql/sql_view.cc index f1eb0004577..68cc8e1839a 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -720,7 +720,42 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, { LEX *lex= thd->lex; char buff[4096]; - String view_query(buff, sizeof (buff), thd->charset()); + + /* + View definition query -- a SELECT statement that fully defines view. It + is generated from the Item-tree built from the original (specified by + the user) query. The idea is that generated query should eliminates all + ambiguities and fix view structure at CREATE-time (once for all). + Item::print() virtual operation is used to generate view definition + query. + + INFORMATION_SCHEMA query (IS query) -- a SQL statement describing a + view that is shown in INFORMATION_SCHEMA. Basically, it is 'view + definition query' with text literals converted to UTF8 and without + character set introducers. + + For example: + Let's suppose we have: + CREATE TABLE t1(a INT, b INT); + User specified query: + CREATE VIEW v1(x, y) AS SELECT * FROM t1; + Generated query: + SELECT a AS x, b AS y FROM t1; + IS query: + SELECT a AS x, b AS y FROM t1; + + View definition query is stored in the client character set. + */ + char view_query_buff[4096]; + String view_query(view_query_buff, + sizeof (view_query_buff), + thd->charset()); + + char is_query_buff[4096]; + String is_query(is_query_buff, + sizeof (is_query_buff), + system_charset_info); + char md5[MD5_BUFF_LENGTH]; bool can_be_merged; char dir_buff[FN_REFLEN], path_buff[FN_REFLEN]; @@ -728,12 +763,16 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, int error= 0; DBUG_ENTER("mysql_register_view"); - /* print query */ + /* Generate view definition and IS queries. */ view_query.length(0); + is_query.length(0); { ulong sql_mode= thd->variables.sql_mode & MODE_ANSI_QUOTES; thd->variables.sql_mode&= ~MODE_ANSI_QUOTES; - lex->unit.print(&view_query); + + lex->unit.print(&view_query, QT_ORDINARY); + lex->unit.print(&is_query, QT_IS); + thd->variables.sql_mode|= sql_mode; } DBUG_PRINT("info", ("View: %s", view_query.ptr())); @@ -872,7 +911,8 @@ loop_out: lex_string_set(&view->view_connection_cl_name, view->view_creation_ctx->get_connection_cl()->name); - view->view_body_utf8= lex->view_body_utf8; + view->view_body_utf8.str= is_query.c_ptr_safe(); + view->view_body_utf8.length= is_query.length(); /* Check that table of main select do not used in subqueries. diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index f1689b28719..7c669851db4 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -12005,27 +12005,7 @@ view_tail: if (!lex->select_lex.add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING)) MYSQL_YYABORT; } - view_list_opt AS - { - THD *thd= YYTHD; - Lex_input_stream *lip= thd->m_lip; - - lip->body_utf8_start(thd, lip->get_cpp_ptr()); - } - view_select - { - THD *thd= YYTHD; - LEX *lex= thd->lex; - Lex_input_stream *lip= thd->m_lip; - - lip->body_utf8_append(lip->get_cpp_ptr()); - - lex->view_body_utf8.str= thd->strmake(lip->get_body_utf8_str(), - lip->get_body_utf8_length()); - lex->view_body_utf8.length= lip->get_body_utf8_length(); - - trim_whitespace(&my_charset_utf8_general_ci, &lex->view_body_utf8); - } + view_list_opt AS view_select ; view_list_opt: diff --git a/sql/table.h b/sql/table.h index 284885658e0..941964ee24e 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1148,7 +1148,7 @@ struct TABLE_LIST return derived || view || schema_table || create && !table->db_stat || !table; } - void print(THD *thd, String *str); + void print(THD *thd, String *str, enum_query_type query_type); bool check_single_table(TABLE_LIST **table, table_map map, TABLE_LIST *view); bool set_insert_values(MEM_ROOT *mem_root); From c3801d9627e9909bbc29a59bd4cb5b3dd3577fa6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 10:35:08 -0200 Subject: [PATCH 287/527] Fix lock_multi test case failure related to concurrent inserts. mysql-test/t/lock_multi.test: Wait for the concurrent insert to finish. --- mysql-test/t/lock_multi.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 06488abb1ae..54c2e4e76ee 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -396,6 +396,9 @@ unlock tables; connection insert; --reap connection default; +let $wait_condition= + select count(*) = 1 from t1; +--source include/wait_condition.inc select * from t1; drop table t1; disconnect flush; From 5bb60f8a6a85f5922ab6e9e072dcf6bf684da456 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 13:54:49 +0100 Subject: [PATCH 288/527] Replaced all --sleep by wait_condition (bug#32664). --- mysql-test/t/events_1.test | 12 +++++++++--- mysql-test/t/events_2.test | 2 ++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/events_1.test b/mysql-test/t/events_1.test index 2e0680909d6..b1bef57314e 100644 --- a/mysql-test/t/events_1.test +++ b/mysql-test/t/events_1.test @@ -1,3 +1,6 @@ +# changes 2008-02-20 hhunger splitted events.test into events_1 and events_2 +# changes 2008-02-22 hhunger replaced all sleep by wait_condition +# # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc @@ -24,7 +27,8 @@ CREATE EVENT e_x2 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE x_table; connection default; SHOW DATABASES LIKE 'db_x'; SET GLOBAL event_scheduler=1; ---sleep 1.2 +let $wait_condition= SELECT count(*)= 1 FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME LIKE 'db_x'; +--source include/wait_condition.inc SHOW DATABASES LIKE 'db_x'; SHOW TABLES FROM db_x; SET GLOBAL event_scheduler=off; @@ -90,7 +94,8 @@ begin end| delimiter ;| set global event_scheduler = on; ---sleep 3 +let $wait_condition= SELECT count(*)>0 from mysql.event where name='e_43' and interval_value= 5; +--source include/wait_condition.inc select db, name, body, status, interval_field, interval_value from mysql.event; drop event e_43; drop table test_nested; @@ -98,7 +103,8 @@ drop table test_nested; --echo "Let's check whether we can use non-qualified names" create table non_qualif(a int); create event non_qualif_ev on schedule every 10 minute do insert into non_qualif values (800219); ---sleep 1.1 +let $wait_condition=SELECT count(*)= 1 from non_qualif where a=800219; +--source include/wait_condition.inc select * from non_qualif; drop event non_qualif_ev; drop table non_qualif; diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test index cb84a6a4ac4..4986b55822b 100644 --- a/mysql-test/t/events_2.test +++ b/mysql-test/t/events_2.test @@ -1,3 +1,5 @@ +# changes 2008-02-20 hhunger splitted events.test into events_1 and events_2 +# # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc From c9be87d0811a78c2ba5a533386c6a7443868e73e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 12:26:08 -0200 Subject: [PATCH 289/527] Disable concurrent inserts for the kill.test mysql-test/r/kill.result: Update test case result. mysql-test/t/disabled.def: Re-enable kill test, bug was closed. mysql-test/t/kill.test: Disable concurrent inserts for the kill test. --- mysql-test/r/kill.result | 1 + mysql-test/t/disabled.def | 1 - mysql-test/t/kill.test | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index 3ea5bbd20bc..a522d18f36b 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -1,3 +1,4 @@ +set @@global.concurrent_insert= 0; drop table if exists t1, t2, t3; create table t1 (kill_id int); insert into t1 values(connection_id()); diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 2cbfb3cf658..670a9c6a755 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -17,7 +17,6 @@ ctype_big5 : BUG#26711 2007-06-21 Lars Test has never worked on Do federated_transactions : Bug#29523 Transactions do not work events : Bug#32664 events.test fails randomly lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log -kill : Bug#29149: Test "kill" fails on Windows innodb_mysql : Bug#32724: innodb_mysql.test fails randomly wait_timeout : Bug#32801 wait_timeout.test fails randomly ctype_create : Bug#32965 main.ctype_create fails diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index 3da4232502d..b7e1e82fe5d 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -6,6 +6,10 @@ # -- source include/not_embedded.inc +# Disable concurrent inserts to avoid test failures when reading the +# connection id which was inserted into a table by another thread. +set @@global.concurrent_insert= 0; + connect (con1, localhost, root,,); connect (con2, localhost, root,,); From 8262d10eb7482845317e1f0555e84034d328c227 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 16:27:02 +0200 Subject: [PATCH 290/527] merged bug 30604 to 5.1-opt --- mysql-test/r/ctype_cp932_binlog_stm.result | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result index cbdafc95b2a..946c06f1e07 100644 --- a/mysql-test/r/ctype_cp932_binlog_stm.result +++ b/mysql-test/r/ctype_cp932_binlog_stm.result @@ -40,9 +40,9 @@ IN ind DECIMAL(10,2)) BEGIN INSERT INTO t4 VALUES (ins1, ins2, ind); END -master-bin.000001 783 Query 1 999 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) -master-bin.000001 999 Query 1 1088 use `test`; DROP PROCEDURE bug18293 -master-bin.000001 1088 Query 1 1167 use `test`; DROP TABLE t4 +master-bin.000001 783 Query 1 991 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93)) +master-bin.000001 991 Query 1 1080 use `test`; DROP PROCEDURE bug18293 +master-bin.000001 1080 Query 1 1159 use `test`; DROP TABLE t4 End of 5.0 tests SHOW BINLOG EVENTS FROM 364; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error From 5d26f63c9543cbb41e1fd6c7d1ac8b5fa4a315cc Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 17:45:09 +0300 Subject: [PATCH 291/527] An unused variable (compile-time warning). sql/sql_view.cc: An unused variable. --- sql/sql_view.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_view.cc b/sql/sql_view.cc index bbcb1bcb143..1cf1a22bb90 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -758,7 +758,6 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, enum_view_create_mode mode) { LEX *lex= thd->lex; - char buff[4096]; /* View definition query -- a SELECT statement that fully defines view. It From 5990242fff96761cd44a4b003657714b4f88a786 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 17:51:57 +0300 Subject: [PATCH 292/527] Update new tests after merge. --- mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index f627d596595..50849e0887b 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -251,6 +251,7 @@ master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; insert into ti values(1) +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 # Query # # use `test`; insert t1 values (1) master-bin.000001 # Query # # use `test`; create table t0 (n int) @@ -357,6 +358,7 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (8,8) master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (9,9) master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; INSERT INTO t1 values (10,10) master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t2 values (100,100) From fea2a5d83dea81e231bb14bc5535b60261c7b30d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 19:07:07 +0400 Subject: [PATCH 293/527] BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if log-slave-updates and circul repl Slave SQL thread may execute one extra event when there are events skipped by slave I/O thread (e.g. originated by the same server). Whereas it was requested not to do so by the UNTIL condition. This happens because we compare with the end position of previously executed event. This is fine when there are no skipped by slave I/O thread events, as end position of previous event equals to start position of to be executed event. Otherwise this position equals to start position of skipped event. This is fixed by: - reading the event to be executed before checking if the until condition is satisfied. - comparing the start position of the event to be executed. Since we do not have the start position available, we compute it by subtracting event length from end position (which is available). - if there are no events on the event queue at the slave sql starting time, that meet until condition, we stop immediately, as in this case we do not want to wait for next event. mysql-test/r/rpl_dual_pos_advance.result: A test case for BUG#13861. mysql-test/t/rpl_dual_pos_advance.test: A test case for BUG#13861. sql/log_event.cc: Store length of event. This is needed for further calculation of the beginning of event. sql/slave.cc: Slave SQL thread may execute one extra event when there are events skipped by slave I/O thread (e.g. originated by the same server). Whereas it was requested not to do so by the UNTIL condition. This happens because we compare with the end position of previously executed event. This is fine when there are no skipped by slave I/O thread events, as end position of previous event equals to start position of to be executed event. Otherwise this position equals to start position of skipped event. This is fixed by: - reading the event to be executed before checking if the until condition is satisfied. - comparing the start position of the event to be executed. Since we do not have the start position available, we compute it by subtracting event length from end position (which is available). - if there are no events on the event queue at the slave sql starting time, that meet until condition, we stop immediately, as in this case we do not want to wait for next event. sql/slave.h: Added master_log_pos parametr to is_until_satisfied(). mysql-test/t/rpl_dual_pos_advance-slave.opt: New BitKeeper file ``mysql-test/t/rpl_dual_pos_advance-slave.opt'' --- mysql-test/r/rpl_dual_pos_advance.result | 43 ++++++++++++- mysql-test/t/rpl_dual_pos_advance-slave.opt | 1 + mysql-test/t/rpl_dual_pos_advance.test | 56 +++++++++++------ sql/log_event.cc | 3 +- sql/slave.cc | 68 +++++++++++++-------- sql/slave.h | 2 +- 6 files changed, 128 insertions(+), 45 deletions(-) create mode 100644 mysql-test/t/rpl_dual_pos_advance-slave.opt diff --git a/mysql-test/r/rpl_dual_pos_advance.result b/mysql-test/r/rpl_dual_pos_advance.result index 257baa81b74..97ca8101c33 100644 --- a/mysql-test/r/rpl_dual_pos_advance.result +++ b/mysql-test/r/rpl_dual_pos_advance.result @@ -8,15 +8,56 @@ reset master; change master to master_host="127.0.0.1",master_port=SLAVE_PORT,master_user="root"; start slave; create table t1 (n int); +stop slave; +create table t2 (n int); +show tables; +Tables_in_test +t1 +t2 +create table t3 (n int) engine=innodb; +set @a=1; +insert into t3 values(@a); +begin; +insert into t3 values(2); +insert into t3 values(3); +commit; +insert into t3 values(4); +start slave until master_log_file="slave-bin.000001",master_log_pos=195; +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 +select master_pos_wait("slave-bin.000001",137); +master_pos_wait("slave-bin.000001",137) +0 +show tables; +Tables_in_test +t1 +t2 +start slave until master_log_file="slave-bin.000001",master_log_pos=438; +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 +select * from t3; +n +1 +start slave until master_log_file="slave-bin.000001",master_log_pos=663; +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 +select * from t3; +n +1 +2 +3 +start slave; create table t4 (n int); create table t5 (n int); create table t6 (n int); show tables; Tables_in_test t1 +t2 +t3 t4 t5 t6 stop slave; reset slave; -drop table t1,t4,t5,t6; +drop table t1,t2,t3,t4,t5,t6; diff --git a/mysql-test/t/rpl_dual_pos_advance-slave.opt b/mysql-test/t/rpl_dual_pos_advance-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/rpl_dual_pos_advance-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test index 518fa9df885..5e08284a2f2 100644 --- a/mysql-test/t/rpl_dual_pos_advance.test +++ b/mysql-test/t/rpl_dual_pos_advance.test @@ -7,6 +7,7 @@ # It also will test BUG#13861. source include/master-slave.inc; +source include/have_innodb.inc; # set up "dual head" @@ -30,45 +31,64 @@ save_master_pos; connection master; sync_with_master; -# Now test BUG#13861. This will be enabled when Guilhem fixes this -# bug. +# +# BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if +# log-slave-updates and circul repl +# +stop slave; -# stop slave +create table t2 (n int); # create one ignored event -# create table t2 (n int); # create one ignored event +save_master_pos; +connection slave; +sync_with_master; -# save_master_pos; -# connection slave; -# sync_with_master; +connection slave; -# connection slave; +show tables; -# show tables; +save_master_pos; -# save_master_pos; +create table t3 (n int) engine=innodb; +set @a=1; +insert into t3 values(@a); +begin; +insert into t3 values(2); +insert into t3 values(3); +commit; +insert into t3 values(4); -# create table t3 (n int); -# connection master; +connection master; # bug is that START SLAVE UNTIL may stop too late, we test that by # asking it to stop before creation of t3. -# start slave until master_log_file="slave-bin.000001",master_log_pos=195; +start slave until master_log_file="slave-bin.000001",master_log_pos=195; # wait until it's started (the position below is the start of "CREATE # TABLE t2") (otherwise wait_for_slave_to_stop may return at once) -# select master_pos_wait("slave-bin.000001",137); +select master_pos_wait("slave-bin.000001",137); -# wait_for_slave_to_stop; +wait_for_slave_to_stop; # then BUG#13861 causes t3 to show up below (because stopped too # late). -# show tables; +show tables; -# start slave; +# ensure that we do not break set @a=1; insert into t3 values(@a); +start slave until master_log_file="slave-bin.000001",master_log_pos=438; +wait_for_slave_to_stop; +select * from t3; + +# ensure that we do not break transaction +start slave until master_log_file="slave-bin.000001",master_log_pos=663; +wait_for_slave_to_stop; +select * from t3; + +start slave; # BUG#13023 is that Exec_master_log_pos may stay too low "forever": @@ -99,7 +119,7 @@ show tables; stop slave; reset slave; -drop table t1,t4,t5,t6; # add t2 and t3 later +drop table t1,t2,t3,t4,t5,t6; save_master_pos; connection slave; diff --git a/sql/log_event.cc b/sql/log_event.cc index a950094a018..8e14a873fc6 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -373,6 +373,7 @@ Log_event::Log_event(const char* buf, #endif when = uint4korr(buf); server_id = uint4korr(buf + SERVER_ID_OFFSET); + data_written= uint4korr(buf + EVENT_LEN_OFFSET); if (description_event->binlog_version==1) { log_pos= 0; @@ -405,7 +406,7 @@ Log_event::Log_event(const char* buf, binlog, so which will cause problems if the user uses this value in CHANGE MASTER). */ - log_pos+= uint4korr(buf + EVENT_LEN_OFFSET); + log_pos+= data_written; } DBUG_PRINT("info", ("log_pos: %lu", (ulong) log_pos)); diff --git a/sql/slave.cc b/sql/slave.cc index 8a3620080f2..500683e080d 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3115,6 +3115,11 @@ int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int expected_error) Check if condition stated in UNTIL clause of START SLAVE is reached. SYNOPSYS st_relay_log_info::is_until_satisfied() + master_beg_pos position of the beginning of to be executed event + (not log_pos member of the event that points to the + beginning of the following event) + + DESCRIPTION Checks if UNTIL condition is reached. Uses caching result of last comparison of current log file name and target log file name. So cached @@ -3139,7 +3144,7 @@ int check_expected_error(THD* thd, RELAY_LOG_INFO* rli, int expected_error) false - condition not met */ -bool st_relay_log_info::is_until_satisfied() +bool st_relay_log_info::is_until_satisfied(my_off_t master_beg_pos) { const char *log_name; ulonglong log_pos; @@ -3149,7 +3154,7 @@ bool st_relay_log_info::is_until_satisfied() if (until_condition == UNTIL_MASTER_POS) { log_name= group_master_log_name; - log_pos= group_master_log_pos; + log_pos= master_beg_pos; } else { /* until_condition == UNTIL_RELAY_POS */ @@ -3228,28 +3233,6 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) wait for something for example inside of next_event(). */ pthread_mutex_lock(&rli->data_lock); - /* - This tests if the position of the end of the last previous executed event - hits the UNTIL barrier. - We would prefer to test if the position of the start (or possibly) end of - the to-be-read event hits the UNTIL barrier, this is different if there - was an event ignored by the I/O thread just before (BUG#13861 to be - fixed). - */ - if (rli->until_condition!=RELAY_LOG_INFO::UNTIL_NONE && - rli->is_until_satisfied()) - { - char buf[22]; - sql_print_information("Slave SQL thread stopped because it reached its" - " UNTIL position %s", llstr(rli->until_pos(), buf)); - /* - Setting abort_slave flag because we do not want additional message about - error in query execution to be printed. - */ - rli->abort_slave= 1; - pthread_mutex_unlock(&rli->data_lock); - return 1; - } Log_event * ev = next_event(rli); @@ -3266,6 +3249,27 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) int type_code = ev->get_type_code(); int exec_res; + /* + This tests if the position of the beginning of the current event + hits the UNTIL barrier. + */ + if (rli->until_condition != RELAY_LOG_INFO::UNTIL_NONE && + rli->is_until_satisfied((thd->options & OPTION_BEGIN || !ev->log_pos) ? + rli->group_master_log_pos : + ev->log_pos - ev->data_written)) + { + char buf[22]; + sql_print_information("Slave SQL thread stopped because it reached its" + " UNTIL position %s", llstr(rli->until_pos(), buf)); + /* + Setting abort_slave flag because we do not want additional message about + error in query execution to be printed. + */ + rli->abort_slave= 1; + pthread_mutex_unlock(&rli->data_lock); + delete ev; + return 1; + } /* Queries originating from this server must be skipped. Low-level events (Format_desc, Rotate, Stop) from this server @@ -3977,6 +3981,22 @@ Slave SQL thread aborted. Can't execute init_slave query"); } } + /* + First check until condition - probably there is nothing to execute. We + do not want to wait for next event in this case. + */ + pthread_mutex_lock(&rli->data_lock); + if (rli->until_condition != RELAY_LOG_INFO::UNTIL_NONE && + rli->is_until_satisfied(rli->group_master_log_pos)) + { + char buf[22]; + sql_print_information("Slave SQL thread stopped because it reached its" + " UNTIL position %s", llstr(rli->until_pos(), buf)); + pthread_mutex_unlock(&rli->data_lock); + goto err; + } + pthread_mutex_unlock(&rli->data_lock); + /* Read queries from the IO/THREAD until this thread is killed */ while (!sql_slave_killed(thd,rli)) diff --git a/sql/slave.h b/sql/slave.h index c61787cdf3b..da548e145d3 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -348,7 +348,7 @@ typedef struct st_relay_log_info void close_temporary_tables(); /* Check if UNTIL condition is satisfied. See slave.cc for more. */ - bool is_until_satisfied(); + bool is_until_satisfied(my_off_t master_beg_pos); inline ulonglong until_pos() { return ((until_condition == UNTIL_MASTER_POS) ? group_master_log_pos : From 5d6ca9c2a33cf3e1496e83a746f07e81f02b5a86 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 16:18:31 +0100 Subject: [PATCH 294/527] Fix for bug#22738 Events: After stop and start disabled events could reside in the queue Disabled events weren't removed from the memory queue after the scheduler has been re-enabled. After recalculation of next execution time of an event, it might get disabled. sql/event_queue.cc: Sort the event queue in a way that the disabled events will always be at the end. We will use this for cleaning it, starting from the end. After recalculating times in the queue, after the scheduler has been enabled after disabled state, the queue should be cleaned from DISABLED events. The queue is sorted in a way such that the disabled events are at the end. Thus, we can start from the end of the queue and remove all DISABLED till we find the first with different state. sql/events.cc: Add a comment about possible problem with replication of events, disabled events and server restarts. --- sql/event_queue.cc | 38 ++++++++++++++++++++++++++++++++++++-- sql/events.cc | 7 ++++++- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 898fc206c34..719a837cbfb 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -60,8 +60,16 @@ extern "C" int event_queue_element_compare_q(void *, uchar *, uchar *); int event_queue_element_compare_q(void *vptr, uchar* a, uchar *b) { - my_time_t lhs = ((Event_queue_element *)a)->execute_at; - my_time_t rhs = ((Event_queue_element *)b)->execute_at; + Event_queue_element *left = (Event_queue_element *)a; + Event_queue_element *right = (Event_queue_element *)b; + my_time_t lhs = left->execute_at; + my_time_t rhs = right->execute_at; + + if (left->status == Event_queue_element::DISABLED) + return right->status != Event_queue_element::DISABLED; + + if (right->status == Event_queue_element::DISABLED) + return 1; return (lhs < rhs ? -1 : (lhs > rhs ? 1 : 0)); } @@ -434,8 +442,34 @@ Event_queue::recalculate_activation_times(THD *thd) ((Event_queue_element*)queue_element(&queue, i))->update_timing_fields(thd); } queue_fix(&queue); + /* + The disabled elements are moved to the end during the `fix`. + Start from the end and remove all of the elements which are + disabled. When we find the first non-disabled one we break, as we + have removed all. The queue has been ordered in a way the disabled + events are at the end. + */ + for (i= queue.elements; i > 0; i--) + { + Event_queue_element *element = (Event_queue_element*)queue_element(&queue, i - 1); + if (element->status != Event_queue_element::DISABLED) + break; + /* + This won't cause queue re-order, because we remove + always the last element. + */ + queue_remove(&queue, i - 1); + delete element; + } UNLOCK_QUEUE_DATA(); + /* + XXX: The events are dropped only from memory and not from disk + even if `drop_list[j]->dropped` is TRUE. There will be still on the + disk till next server restart. + Please add code here to do it. + */ + DBUG_VOID_RETURN; } diff --git a/sql/events.cc b/sql/events.cc index 87385082a82..700663db7d1 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1185,7 +1185,12 @@ Events::load_events_from_db(THD *thd) { /* If not created, a stale event - drop if immediately if - ON COMPLETION NOT PRESERVE + ON COMPLETION NOT PRESERVE. + XXX: This won't be replicated, thus the drop won't appear in + in the slave. When the slave is restarted it will drop events. + However, as the slave will be "out of sync", it might happen that + an event created on the master, after master restart, won't be + replicated to the slave correctly, as the create will fail there. */ int rc= table->file->ha_delete_row(table->record[0]); if (rc) From 89dbf954496c0bc7931d9cc42d206c547322e718 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 17:40:14 +0100 Subject: [PATCH 295/527] Bug#34761 Mysql-test-run.pl script hangs on Windows mysql-test/mysql-test-run.pl: Disable extra team trees --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index eeef9b22506..c06c25e85fb 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -417,7 +417,7 @@ sub main () { # use default and add any extra_suites as defined $opt_suites= $opt_suites_default; my $ccc= dirname($glob_mysql_test_dir); - my $found= 0; + my $found= 1; # BUG#34761 - disable this feature while (!$found and !($ccc eq "/") and !($ccc eq "")) { my $ddd= basename($ccc); From 233143fd31cdab65c31db780b8c0c4a1618e16b3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 18:45:45 +0100 Subject: [PATCH 296/527] Fix for Bug#29605 --local-infile=0 checks can be bypassed by sending a FETCH LOCAL FILE response Add a check for CLIENT_LOCAL_FILES before sending a local file. Beware, that all binary distributions enable sending of local files and it's up to the programs which use libmysql to disable it, if they don't use this functionality. Otherwise they are not safe. client/mysqltest.c: Enable LOAD DATA LOCAL INFILE for the test suite, like some rpl and ndb test. sql-common/client.c: Check if the client has LOAD DATA LOCAL INFILE disabled and don't serve such requests from the server. This is not 100% proof, as if the client has this enabled, in all binary builds for BC, the check won't work and the client can be tricked into sending a local file. tests/mysql_client_test.c: Switch on LOCAL INFILE in client test. If one day there is a test which uses it, then it will work out of the box. --- client/mysqltest.c | 2 ++ sql-common/client.c | 10 +++++++++- tests/mysql_client_test.c | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index fdbd31fab36..a21a7113557 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -6333,6 +6333,8 @@ int util_query(MYSQL* org_mysql, const char* query){ if (!(mysql= mysql_init(mysql))) die("Failed in mysql_init()"); + /* enable local infile, in non-binary builds often disabled by default */ + mysql_options(mysql, MYSQL_OPT_LOCAL_INFILE, 0); safe_connect(mysql, "util", org_mysql->host, org_mysql->user, org_mysql->passwd, org_mysql->db, org_mysql->port, org_mysql->unix_socket); diff --git a/sql-common/client.c b/sql-common/client.c index a26207038cf..f4d587d4df3 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2736,7 +2736,15 @@ get_info: #ifdef MYSQL_CLIENT if (field_count == NULL_LENGTH) /* LOAD DATA LOCAL INFILE */ { - int error=handle_local_infile(mysql,(char*) pos); + int error; + + if (!(mysql->options.client_flag & CLIENT_LOCAL_FILES)) + { + set_mysql_error(mysql, CR_MALFORMED_PACKET, unknown_sqlstate); + DBUG_RETURN(1); + } + + error= handle_local_infile(mysql,(char*) pos); if ((length= cli_safe_read(mysql)) == packet_error || error) DBUG_RETURN(1); goto get_info; /* Get info packet */ diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 6f3abfaa0b0..d85a40f7393 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -289,6 +289,8 @@ static void client_connect(ulong flag) myerror("mysql_init() failed"); exit(1); } + /* enable local infile, in non-binary builds often disabled by default */ + mysql_options(mysql, MYSQL_OPT_LOCAL_INFILE, 0); if (!(mysql_real_connect(mysql, opt_host, opt_user, opt_password, opt_db ? opt_db:"test", opt_port, From d41af7ad4adfdd83e23c317aebf36bdccf606878 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 19:15:31 +0100 Subject: [PATCH 297/527] mysql-test/mysql-test-run.pl Disable extra team trees. Temporary fix for entry 34761 in the bugs DB. (Patch by Magnus Svensson, 2008-02-22 17:40:14+01:00, msvensson@pilot.mysql.com +1 -0) mysql-test/mysql-test-run.pl: Disable extra team trees. Temporary fix for entry 34761 in the bugs DB. (Patch by Magnus Svensson, 2008-02-22 17:40:14+01:00, msvensson@pilot.mysql.com +1 -0) --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 53b02da448f..373aecf77aa 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -417,7 +417,7 @@ sub main () { # use default and add any extra_suites as defined $opt_suites= $opt_suites_default; my $ccc= dirname($glob_mysql_test_dir); - my $found= 0; + my $found= 1; # BUG#34761 - disable this feature while (!$found and !($ccc eq "/") and !($ccc eq "")) { my $ddd= basename($ccc); From d6989496e82a3fddfee28696a52e24ed348a8032 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 21:49:16 +0300 Subject: [PATCH 298/527] Update new test results after merge (Bug#12713) --- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index ea7010aac2a..fa979dd7ac1 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -391,6 +391,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 # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ From ca508c8f84a153ce6eaff7299d5dea5b5264b726 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 21:28:59 +0100 Subject: [PATCH 299/527] Inserted changes from the review of bug#32664. --- mysql-test/t/events_1.test | 3 ++- mysql-test/t/events_2.test | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/events_1.test b/mysql-test/t/events_1.test index b1bef57314e..ccdeb70d291 100644 --- a/mysql-test/t/events_1.test +++ b/mysql-test/t/events_1.test @@ -124,6 +124,8 @@ drop event existant; create table t_event3 (a int, b float); drop event if exists event3; create event event3 on schedule every 50 + 10 minute starts date_add("20100101", interval 5 minute) ends date_add("20151010", interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); +let $wait_condition=SELECT count(*)=0 from t_event3; +--source include/wait_condition.inc select count(*) from t_event3; drop event event3; drop table t_event3; @@ -308,7 +310,6 @@ SELECT event_name FROM INFORMATION_SCHEMA.events; SHOW CREATE EVENT intact_check; --error ER_EVENT_DOES_NOT_EXIST DROP EVENT no_such_event; -#--error ER_CANNOT_LOAD_FROM_TABLE peplaced by: --error ER_EVENT_STORE_FAILED CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; --error ER_EVENT_DOES_NOT_EXIST diff --git a/mysql-test/t/events_2.test b/mysql-test/t/events_2.test index 4986b55822b..c52d9cf06c6 100644 --- a/mysql-test/t/events_2.test +++ b/mysql-test/t/events_2.test @@ -196,9 +196,9 @@ drop event e1; # Test wrong syntax # ---error 1102 +--error ER_WRONG_DB_NAME SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ---error 1102 +--error ER_WRONG_DB_NAME SHOW EVENTS FROM ``; SHOW EVENTS FROM `events\\test`; From 482d60082fb5356511d020704ecc992d9cb0e375 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Feb 2008 16:56:34 -0700 Subject: [PATCH 300/527] Bug #34053: normal users can enable innodb_monitor logging The check_global_access() function was made available to InnoDB, but was not defined in the embedded server library. InnoDB, as a plugin, is not recompiled when the embedded server is built. This caused a link failure when compiling applications which use the embedded server. The fix here is to always define check_global_access() externally; in the embedded server case, it is defined to just return OK. Also, don't run the test case for this bug in embedded server. mysql-test/t/innodb_bug34053.test: Disable this test on embedded server - it tests privilege checks which are not in place there. sql/mysql_priv.h: Since check_global_access() may be used from some storage engine plugins (InnoDB, currently), and the plugins are not recompiled for the embedded server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS. sql/sql_parse.cc: Since check_global_access() may be used from some storage engine plugins (InnoDB, currently), and the plugins are not recompiled for the embedded server, it must be defined externally even for NO_EMBEDDED_ACCESS_CHECKS. --- mysql-test/t/innodb_bug34053.test | 1 + sql/mysql_priv.h | 5 --- sql/sql_parse.cc | 62 ++++++++++++++++--------------- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/mysql-test/t/innodb_bug34053.test b/mysql-test/t/innodb_bug34053.test index 5fbe09070b8..b935e45c06d 100644 --- a/mysql-test/t/innodb_bug34053.test +++ b/mysql-test/t/innodb_bug34053.test @@ -2,6 +2,7 @@ # Make sure http://bugs.mysql.com/34053 remains fixed. # +-- source include/not_embedded.inc -- source include/have_innodb.inc SET storage_engine=InnoDB; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 5ed670c32ed..2c43959815e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1051,12 +1051,7 @@ inline bool check_table_access(THD *thd, ulong want_access, TABLE_LIST *tables, #endif /* MYSQL_SERVER */ #if defined MYSQL_SERVER || defined INNODB_COMPATIBILITY_HOOKS -#ifndef NO_EMBEDDED_ACCESS_CHECKS bool check_global_access(THD *thd, ulong want_access); -#else -inline bool check_global_access(THD *thd, ulong want_access) -{ return false; } -#endif /*NO_EMBEDDED_ACCESS_CHECKS*/ #endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */ #ifdef MYSQL_SERVER diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 55ae30d37ad..4dd600835ce 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4989,35 +4989,6 @@ check_access(THD *thd, ulong want_access, const char *db, ulong *save_priv, } -/** - check for global access and give descriptive error message if it fails. - - @param thd Thread handler - @param want_access Use should have any of these global rights - - @warning - One gets access right if one has ANY of the rights in want_access. - This is useful as one in most cases only need one global right, - but in some case we want to check if the user has SUPER or - REPL_CLIENT_ACL rights. - - @retval - 0 ok - @retval - 1 Access denied. In this case an error is sent to the client -*/ - -bool check_global_access(THD *thd, ulong want_access) -{ - char command[128]; - if ((thd->security_ctx->master_access & want_access)) - return 0; - get_privilege_desc(command, sizeof(command), want_access); - my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); - return 1; -} - - static bool check_show_access(THD *thd, TABLE_LIST *table) { switch (get_schema_table_idx(table->schema_table)) { @@ -5260,6 +5231,39 @@ bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table) #endif /*NO_EMBEDDED_ACCESS_CHECKS*/ + +/** + check for global access and give descriptive error message if it fails. + + @param thd Thread handler + @param want_access Use should have any of these global rights + + @warning + One gets access right if one has ANY of the rights in want_access. + This is useful as one in most cases only need one global right, + but in some case we want to check if the user has SUPER or + REPL_CLIENT_ACL rights. + + @retval + 0 ok + @retval + 1 Access denied. In this case an error is sent to the client +*/ + +bool check_global_access(THD *thd, ulong want_access) +{ +#ifndef NO_EMBEDDED_ACCESS_CHECKS + char command[128]; + if ((thd->security_ctx->master_access & want_access)) + return 0; + get_privilege_desc(command, sizeof(command), want_access); + my_error(ER_SPECIFIC_ACCESS_DENIED_ERROR, MYF(0), command); + return 1; +#else + return 0; +#endif +} + /**************************************************************************** Check stack size; Send error if there isn't enough stack to continue ****************************************************************************/ From 7b8717ace88805a6a243a2800fc7d3fc70d2fddc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Feb 2008 01:31:54 +0100 Subject: [PATCH 301/527] Bug#20752: BENCHMARK with many iterations returns too quickly In BENCHMARK(count, expr), count could overflow/wrap-around. Patch changes to a sufficiently large data-type. Adds a warning for negative count values. mysql-test/r/func_str.result: show that a negative 'count' for BENCHMARK(count, expr) throws a warning and returns NULL. mysql-test/t/func_str.test: show that a negative 'count' for BENCHMARK(count, expr) throws a warning and returns NULL. sql/item_func.cc: use ulonglong rather than ulong in BENCHMARK(count, expr) throw warning on negative 'count'; return SQL-NULL. --- mysql-test/r/func_str.result | 5 +++++ mysql-test/t/func_str.test | 7 +++++++ sql/item_func.cc | 18 ++++++++++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 6f6edd5112b..8bb764ad608 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1431,6 +1431,11 @@ benchmark(100, NULL) select benchmark(NULL, 1+1); benchmark(NULL, 1+1) NULL +select benchmark(-1, 1); +benchmark(-1, 1) +NULL +Warnings: +Error 1411 Incorrect count value: '-1' for function benchmark set @password="password"; set @my_data="clear text to encode"; select md5(encode(@my_data, "password")); diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index b6da14211ae..5a5f4024bc4 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -874,6 +874,13 @@ select benchmark(0, NULL); select benchmark(100, NULL); select benchmark(NULL, 1+1); +# +# Bug #20752: BENCHMARK with many iterations returns too quickly +# + +# not a string, but belongs with the above Bug#22684 +select benchmark(-1, 1); + # # Please note: # 1) The collation of the password is irrelevant, the encryption uses diff --git a/sql/item_func.cc b/sql/item_func.cc index cd936412241..f6f67b148bd 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3651,18 +3651,28 @@ longlong Item_func_benchmark::val_int() String tmp(buff,sizeof(buff), &my_charset_bin); my_decimal tmp_decimal; THD *thd=current_thd; - ulong loop_count; + ulonglong loop_count; - loop_count= (ulong) args[0]->val_int(); + loop_count= (ulonglong) args[0]->val_int(); - if (args[0]->null_value) + if (args[0]->null_value || + (!args[0]->unsigned_flag && (((longlong) loop_count) < 0))) { + if (!args[0]->null_value) + { + char buff[22]; + llstr(((longlong) loop_count), buff); + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_WRONG_VALUE_FOR_TYPE, ER(ER_WRONG_VALUE_FOR_TYPE), + "count", buff, "benchmark"); + } + null_value= 1; return 0; } null_value=0; - for (ulong loop=0 ; loop < loop_count && !thd->killed; loop++) + for (ulonglong loop=0 ; loop < loop_count && !thd->killed; loop++) { switch (args[1]->result_type()) { case REAL_RESULT: From a22c3d21096f827d4eb7dfc1b3546cb758123756 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Feb 2008 13:58:07 +0100 Subject: [PATCH 302/527] Bug#32753: PAD_CHAR_TO_FULL_LENGTH is not documented and interferes with grant tables SQL-mode PAD_CHAR_TO_FULL_LENGTH affected mysqld's user-table too. If enabled, user-name and host were space-padded and no longer matched the login-data of incoming connexions. Patch disregards pad-flag while loading privileges so ability to log in does not depend on SQL-mode. mysql-test/r/sql_mode.result: show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect loading of privileges (and by extension, ability to log in). mysql-test/t/sql_mode.test: show that SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' does not affect loading of privileges (and by extension, ability to log in). sql/sql_acl.cc: temporarily disable SQL-mode 'PAD_CHAR_TO_FULL_LENGTH' while reloading privileges --- mysql-test/r/sql_mode.result | 10 ++++++++++ mysql-test/t/sql_mode.test | 29 +++++++++++++++++++++++++++++ sql/sql_acl.cc | 15 ++++++++++++--- 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 2b34ff8c021..401340f204c 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -496,3 +496,13 @@ xb x xcx drop table t1; SET @@SQL_MODE=@OLD_SQL_MODE; +create user mysqltest_32753@localhost; +set @OLD_SQL_MODE=@@SESSION.SQL_MODE; +set session sql_mode='PAD_CHAR_TO_FULL_LENGTH'; +flush privileges; +select current_user(); +current_user() +mysqltest_32753@localhost +set session sql_mode=@OLD_SQL_MODE; +flush privileges; +drop user mysqltest_32753@localhost; diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index 7a9036c8621..acc9cc7979e 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -279,3 +279,32 @@ select concat('x',b,'x') from t1; drop table t1; SET @@SQL_MODE=@OLD_SQL_MODE; + + +# +# Bug #32753: PAD_CHAR_TO_FULL_LENGTH is not documented and interferes +# with grant tables +# + +create user mysqltest_32753@localhost; + +# try to make the user-table space-padded +--connection default +set @OLD_SQL_MODE=@@SESSION.SQL_MODE; +set session sql_mode='PAD_CHAR_TO_FULL_LENGTH'; +flush privileges; + +# if user-table is affected by PAD_CHAR_TO_FULL_LENGTH, our connect will fail +# --error 1045 +connect (user_32753,localhost,mysqltest_32753,,test,$MASTER_MYPORT,$MASTER_MYSOCK); +select current_user(); + +# clean up +--connection default +set session sql_mode=@OLD_SQL_MODE; +flush privileges; + +--disconnect user_32753 + +--connection default +drop user mysqltest_32753@localhost; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 064aa6dc044..abeacd49c1f 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -192,7 +192,7 @@ static void update_hostname(acl_host_and_ip *host, const char *hostname); static bool compare_hostname(const acl_host_and_ip *host,const char *hostname, const char *ip); static my_bool acl_load(THD *thd, TABLE_LIST *tables); -static my_bool grant_load(TABLE_LIST *tables); +static my_bool grant_load(THD *thd, TABLE_LIST *tables); /* Convert scrambled password to binary form, according to scramble type, @@ -314,8 +314,11 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; char tmp_name[NAME_LEN+1]; int password_length; + ulong old_sql_mode= thd->variables.sql_mode; DBUG_ENTER("acl_load"); + thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; + grant_version++; /* Privileges updated */ acl_cache->clear(1); // Clear locked hostname cache @@ -622,6 +625,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables) return_val=0; end: + thd->variables.sql_mode= old_sql_mode; DBUG_RETURN(return_val); } @@ -3613,7 +3617,7 @@ end_unlock: @retval TRUE Error */ -static my_bool grant_load(TABLE_LIST *tables) +static my_bool grant_load(THD *thd, TABLE_LIST *tables) { MEM_ROOT *memex_ptr; my_bool return_val= 1; @@ -3621,7 +3625,11 @@ static my_bool grant_load(TABLE_LIST *tables) bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE; MEM_ROOT **save_mem_root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC); + ulong old_sql_mode= thd->variables.sql_mode; DBUG_ENTER("grant_load"); + + thd->variables.sql_mode&= ~MODE_PAD_CHAR_TO_FULL_LENGTH; + (void) hash_init(&column_priv_hash,system_charset_info, 0,0,0, (hash_get_key) get_grant_table, (hash_free_key) free_grant_table,0); @@ -3673,6 +3681,7 @@ static my_bool grant_load(TABLE_LIST *tables) return_val=0; // Return ok end_unlock: + thd->variables.sql_mode= old_sql_mode; t_table->file->ha_index_end(); my_pthread_setspecific_ptr(THR_MALLOC, save_mem_root_ptr); DBUG_RETURN(return_val); @@ -3786,7 +3795,7 @@ my_bool grant_reload(THD *thd) old_mem= memex; init_sql_alloc(&memex, ACL_ALLOC_BLOCK_SIZE, 0); - if ((return_val= grant_load(tables))) + if ((return_val= grant_load(thd, tables))) { // Error. Revert to old hash DBUG_PRINT("error",("Reverting to old privileges")); grant_free(); /* purecov: deadcode */ From 9bd3b8545a44188502a1a142e6f2171ac5b600e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Feb 2008 14:12:17 +0100 Subject: [PATCH 303/527] Bug#32757: hang with sql_mode set when setting some global variables If setting a system-variable provided by a plug-in failed, no OK or error was sent in some cases, hanging the client. We now send an error in the case from the ticket (integer-argument out of range in STRICT mode). We also provide a semi-generic fallback message for possible future cases like this where an error is signalled, but no message is sent to the client. The error/warning handling is unified so it's the same again for variables provided by plugins and those in the server proper. mysql-test/r/plugin.result: show that on out-of-range values, plugin interface throws errors in STRICT mode and warnings otherwise. mysql-test/t/plugin.test: show that on out-of-range values, plugin interface throws errors in STRICT mode and warnings otherwise. sql/set_var.cc: - handle signedness of values used in warnings - in STRICT mode, throw errors rather than warnings sql/sql_parse.cc: If sql_set_variables() returns with an error but no message was sent to the client, send a semi-generic one so the session won't hang and we won't fail silently. sql/sql_plugin.cc: throw a warning if more than just block-size was corrected (or an error in STRICT mode). use functions from set_var for uniform behaviour of server- and plug-in variables. storage/example/ha_example.cc: Add a ULONG system variable to example plugin so we can test integers in the plugin-interface without having to depend on the presence of innobase. --- mysql-test/r/plugin.result | 27 +++++++++++++++++++++++ mysql-test/t/plugin.test | 35 ++++++++++++++++++++++++++++++ sql/set_var.cc | 41 +++++++++++++++++++++++++---------- sql/sql_parse.cc | 12 ++++++++++ sql/sql_plugin.cc | 39 +++++++-------------------------- storage/example/ha_example.cc | 14 ++++++++++++ 6 files changed, 125 insertions(+), 43 deletions(-) diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index e4af1535775..782d2a5a9a4 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -27,3 +27,30 @@ SET GLOBAL example_enum_var= e2; SET GLOBAL example_enum_var= impossible; ERROR 42000: Variable 'enum_var' can't be set to the value of 'impossible' UNINSTALL PLUGIN example; +INSTALL PLUGIN example SONAME 'ha_example.so'; +select @@session.sql_mode into @old_sql_mode; +set session sql_mode=''; +set global example_ulong_var=500; +select @@global.example_ulong_var; +@@global.example_ulong_var +500 +set global example_ulong_var=1111; +Warnings: +Warning 1292 Truncated incorrect ulong_var value: '1111' +select @@global.example_ulong_var; +@@global.example_ulong_var +1000 +set session sql_mode='STRICT_ALL_TABLES'; +set global example_ulong_var=500; +select @@global.example_ulong_var; +@@global.example_ulong_var +500 +set global example_ulong_var=1111; +ERROR 42000: Variable 'ulong_var' can't be set to the value of '1111' +select @@global.example_ulong_var; +@@global.example_ulong_var +500 +set session sql_mode=@old_sql_mode; +set session old=bla; +ERROR HY000: Variable 'old' is a read only variable +UNINSTALL PLUGIN example; diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test index d8d6d069676..0635a58a4a6 100644 --- a/mysql-test/t/plugin.test +++ b/mysql-test/t/plugin.test @@ -39,3 +39,38 @@ SET GLOBAL example_enum_var= e2; SET GLOBAL example_enum_var= impossible; UNINSTALL PLUGIN example; + + + +# +# Bug #32757 hang with sql_mode set when setting some global variables +# +INSTALL PLUGIN example SONAME 'ha_example.so'; + +select @@session.sql_mode into @old_sql_mode; + +# first, try normal sql_mode (no error, send OK) +set session sql_mode=''; +set global example_ulong_var=500; +select @@global.example_ulong_var; +# overflow -- correct value, but throw warning +set global example_ulong_var=1111; +select @@global.example_ulong_var; + +# now, try STRICT (error occurrs, no message is sent, so send default) +set session sql_mode='STRICT_ALL_TABLES'; +set global example_ulong_var=500; +select @@global.example_ulong_var; +# overflow -- throw warning, do NOT change value +--error ER_WRONG_VALUE_FOR_VAR +set global example_ulong_var=1111; +select @@global.example_ulong_var; + +set session sql_mode=@old_sql_mode; + +# finally, show that conditions that already raised an error are not +# adversely affected (error was already sent, do nothing) +--error ER_INCORRECT_GLOBAL_LOCAL_VAR +set session old=bla; + +UNINSTALL PLUGIN example; diff --git a/sql/set_var.cc b/sql/set_var.cc index a01a0b49dbc..a25bbee3350 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -123,7 +123,8 @@ static void fix_server_id(THD *thd, enum_var_type type); static ulonglong fix_unsigned(THD *thd, ulonglong num, const struct my_option *option_limits); static bool get_unsigned(THD *thd, set_var *var); -static void throw_bounds_warning(THD *thd, const char *name, ulonglong num); +bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd, + const char *name, longlong val); static KEY_CACHE *create_key_cache(const char *name, uint length); void fix_sql_mode_var(THD *thd, enum_var_type type); static uchar *get_error_count(THD *thd); @@ -1106,13 +1107,29 @@ static void fix_server_id(THD *thd, enum_var_type type) } -static void throw_bounds_warning(THD *thd, const char *name, ulonglong num) +bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd, + const char *name, longlong val) { - char buf[22]; - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_TRUNCATED_WRONG_VALUE, - ER(ER_TRUNCATED_WRONG_VALUE), name, - ullstr(num, buf)); + if (fixed) + { + char buf[22]; + + if (unsignd) + ullstr((ulonglong) val, buf); + else + llstr(val, buf); + + if (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) + { + my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, buf); + return TRUE; + } + + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_TRUNCATED_WRONG_VALUE, + ER(ER_TRUNCATED_WRONG_VALUE), name, buf); + } + return FALSE; } static ulonglong fix_unsigned(THD *thd, ulonglong num, @@ -1121,8 +1138,7 @@ static ulonglong fix_unsigned(THD *thd, ulonglong num, bool fixed= FALSE; ulonglong out= getopt_ull_limit_value(num, option_limits, &fixed); - if (fixed) - throw_bounds_warning(thd, option_limits->name, num); + throw_bounds_warning(thd, fixed, TRUE, option_limits->name, (longlong) num); return out; } @@ -1165,7 +1181,8 @@ bool sys_var_long_ptr_global::update(THD *thd, set_var *var) if (tmp > ULONG_MAX) { tmp= ULONG_MAX; - throw_bounds_warning(thd, name, var->save_result.ulonglong_value); + throw_bounds_warning(thd, TRUE, TRUE, name, + (longlong) var->save_result.ulonglong_value); } #endif *value= (ulong) tmp; @@ -1250,7 +1267,7 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var) /* Don't use bigger value than given with --maximum-variable-name=.. */ if ((ulong) tmp > max_system_variables.*offset) { - throw_bounds_warning(thd, name, tmp); + throw_bounds_warning(thd, TRUE, TRUE, name, (longlong) tmp); tmp= max_system_variables.*offset; } @@ -1260,7 +1277,7 @@ bool sys_var_thd_ulong::update(THD *thd, set_var *var) else if (tmp > ULONG_MAX) { tmp= ULONG_MAX; - throw_bounds_warning(thd, name, var->save_result.ulonglong_value); + throw_bounds_warning(thd, TRUE, TRUE, name, (longlong) var->save_result.ulonglong_value); } #endif diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b60a72e4c53..a74c4a01699 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3185,6 +3185,18 @@ end_with_restore_list: thd->one_shot_set|= lex->one_shot_set; send_ok(thd); } + else + { + /* + We encountered some sort of error, but no message was sent. + Send something semi-generic here since we don't know which + assignment in the list caused the error. + */ + if (!thd->is_error()) + my_error(ER_WRONG_ARGUMENTS,MYF(0),"SET"); + goto error; + } + break; } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 2a86844c8c6..5fafa751379 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -210,6 +210,8 @@ static void reap_plugins(void); /* declared in set_var.cc */ extern sys_var *intern_find_sys_var(const char *str, uint length, bool no_error); +extern bool throw_bounds_warning(THD *thd, bool fixed, bool unsignd, + const char *name, longlong val); #ifdef EMBEDDED_LIBRARY /* declared in sql_base.cc */ @@ -1888,16 +1890,8 @@ static int check_func_int(THD *thd, struct st_mysql_sys_var *var, else *(int *)save= (int) getopt_ll_limit_value(tmp, &options, &fixed); - if (fixed) - { - char buf[22]; - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_TRUNCATED_WRONG_VALUE, - ER(ER_TRUNCATED_WRONG_VALUE), var->name, - ullstr(tmp, buf)); - } - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && - (*(int *)save != (int) tmp); + return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED, + var->name, (longlong) tmp); } @@ -1916,16 +1910,8 @@ static int check_func_long(THD *thd, struct st_mysql_sys_var *var, else *(long *)save= (long) getopt_ll_limit_value(tmp, &options, &fixed); - if (fixed) - { - char buf[22]; - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_TRUNCATED_WRONG_VALUE, - ER(ER_TRUNCATED_WRONG_VALUE), var->name, - ullstr(tmp, buf)); - } - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && - (*(long *)save != (long) tmp); + return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED, + var->name, (longlong) tmp); } @@ -1937,7 +1923,6 @@ static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var, struct my_option options; value->val_int(value, &tmp); plugin_opt_set_limits(&options, var); - *(ulonglong *)save= getopt_ull_limit_value(tmp, &options, &fixed); if (var->flags & PLUGIN_VAR_UNSIGNED) *(ulonglong *)save= getopt_ull_limit_value((ulonglong) tmp, &options, @@ -1945,16 +1930,8 @@ static int check_func_longlong(THD *thd, struct st_mysql_sys_var *var, else *(longlong *)save= getopt_ll_limit_value(tmp, &options, &fixed); - if (fixed) - { - char buf[22]; - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - ER_TRUNCATED_WRONG_VALUE, - ER(ER_TRUNCATED_WRONG_VALUE), var->name, - ullstr(tmp, buf)); - } - return (thd->variables.sql_mode & MODE_STRICT_ALL_TABLES) && - (*(long long *)save != tmp); + return throw_bounds_warning(thd, fixed, var->flags & PLUGIN_VAR_UNSIGNED, + var->name, (longlong) tmp); } static int check_func_str(THD *thd, struct st_mysql_sys_var *var, diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc index 6d9f4841e06..604722c3c8c 100644 --- a/storage/example/ha_example.cc +++ b/storage/example/ha_example.cc @@ -849,6 +849,7 @@ struct st_mysql_storage_engine example_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; static ulong srv_enum_var= 0; +static ulong srv_ulong_var= 0; const char *enum_var_names[]= { @@ -871,8 +872,21 @@ static MYSQL_SYSVAR_ENUM( 0, // def &enum_var_typelib); // typelib +static MYSQL_SYSVAR_ULONG( + ulong_var, + srv_ulong_var, + PLUGIN_VAR_RQCMDARG, + "0..1000", + NULL, + NULL, + 8, + 0, + 1000, + 0); + static struct st_mysql_sys_var* example_system_variables[]= { MYSQL_SYSVAR(enum_var), + MYSQL_SYSVAR(ulong_var), NULL }; From c37fdbcdfdc065498cfc837ac6dcb6bc78fb206b Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Feb 2008 19:13:18 +0100 Subject: [PATCH 304/527] Pre push fixes Test file fixes for bugs 20129, 31931 and 34225 mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Manual merge, new test case to be modified for Bug#20129 mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Manual merge, new test case to be modified for Bug#20129 mysql-test/suite/parts/r/partition_engine_innodb.result: Manual merge, fix for bug#31931 mysql-test/suite/parts/r/partition_engine_myisam.result: Manual merge, fix for bug#31931 mysql-test/suite/parts/t/disabled.def: These should work now since Bug#34225 is fixed sql/ha_partition.cc: Bug#20129: partition maintenance command not working with crashed tables Fix for compiler warnings. --- .../r/partition_basic_symlink_innodb.result | 474 +++++++++--------- .../r/partition_basic_symlink_myisam.result | 376 +++++++------- .../parts/r/partition_engine_innodb.result | 10 + .../parts/r/partition_engine_myisam.result | 10 + mysql-test/suite/parts/t/disabled.def | 7 - sql/ha_partition.cc | 6 +- 6 files changed, 449 insertions(+), 434 deletions(-) diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result index b9097e33ce0..03c6e1915bf 100644 --- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result @@ -469,16 +469,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -914,16 +914,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -1359,16 +1359,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -1802,16 +1802,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -2247,16 +2247,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -2690,16 +2690,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -3135,16 +3135,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -3580,16 +3580,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -4026,16 +4026,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -4471,16 +4471,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -4916,16 +4916,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -5359,16 +5359,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -5804,16 +5804,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -6247,16 +6247,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -6692,16 +6692,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -7137,16 +7137,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -7583,16 +7583,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -8028,16 +8028,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -8473,16 +8473,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -8916,16 +8916,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -9361,16 +9361,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -9804,16 +9804,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -10249,16 +10249,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -10705,16 +10705,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -11153,16 +11153,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -11609,16 +11609,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -12061,16 +12061,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -12511,16 +12511,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -12965,16 +12965,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -13421,16 +13421,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -13873,16 +13873,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -14355,16 +14355,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -14837,16 +14837,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -15319,16 +15319,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -15799,16 +15799,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -16281,16 +16281,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -16761,16 +16761,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -17243,16 +17243,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -17725,16 +17725,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -18208,16 +18208,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -18690,16 +18690,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -19172,16 +19172,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -19652,16 +19652,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -20134,16 +20134,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -20614,16 +20614,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -21096,16 +21096,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -21578,16 +21578,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -22077,16 +22077,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -22575,16 +22575,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -23073,16 +23073,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -23569,16 +23569,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -24067,16 +24067,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -24563,16 +24563,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -25061,16 +25061,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -25559,16 +25559,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -26056,16 +26056,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -26541,16 +26541,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -27034,16 +27034,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -27523,16 +27523,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -28010,16 +28010,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -28501,16 +28501,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -28994,16 +28994,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -29483,16 +29483,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -29969,16 +29969,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -30454,16 +30454,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -30947,16 +30947,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -31436,16 +31436,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -31923,16 +31923,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -32414,16 +32414,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -32907,16 +32907,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -33396,16 +33396,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -33898,16 +33898,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -34399,16 +34399,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -34908,16 +34908,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -35413,16 +35413,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -35916,16 +35916,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -36423,16 +36423,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -36932,16 +36932,16 @@ 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 status OK +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 status OK +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 status OK +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 @@ -37437,16 +37437,16 @@ 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 status OK +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 status OK +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 status OK +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 diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result index 7e0d5bcd62a..52c3b92912e 100644 --- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result +++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result @@ -479,20 +479,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -934,20 +934,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -1395,20 +1395,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -1850,20 +1850,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -2311,20 +2311,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -2770,20 +2770,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -3231,20 +3231,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -3694,20 +3694,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -4148,16 +4148,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -4167,7 +4167,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master- # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -4631,16 +4631,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -4650,7 +4650,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master- # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -5126,16 +5126,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -5145,7 +5145,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/mast # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -5611,16 +5611,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -5630,7 +5630,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/mast # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -6106,16 +6106,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -6125,7 +6125,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -6599,16 +6599,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -6618,7 +6618,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTES # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -7094,16 +7094,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -7113,7 +7113,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VAR # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -7593,16 +7593,16 @@ 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 status OK +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 status OK +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 status OK +test.t1 optimize note The storage engine for the table doesn't support optimize state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -7612,7 +7612,7 @@ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text -test.t1 repair status OK +test.t1 repair note The storage engine for the table doesn't support repair state new Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par @@ -8061,20 +8061,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -8516,20 +8516,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -8977,20 +8977,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -9432,20 +9432,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -9893,20 +9893,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -10352,20 +10352,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -10813,20 +10813,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -11273,20 +11273,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -11737,20 +11737,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -12215,20 +12215,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -12685,20 +12685,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -13157,20 +13157,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -13633,20 +13633,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -14111,20 +14111,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -14587,20 +14587,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -15095,20 +15095,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -15603,20 +15603,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -16117,20 +16117,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -16625,20 +16625,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -17139,20 +17139,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -17651,20 +17651,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -18165,20 +18165,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -18681,20 +18681,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -19198,20 +19198,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -19715,20 +19715,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -20246,20 +20246,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -20769,20 +20769,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -21294,20 +21294,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -21823,20 +21823,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -22354,20 +22354,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; @@ -22883,20 +22883,20 @@ 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 status OK +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 status OK +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 status OK +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 status OK +test.t1 repair note The storage engine for the table doesn't support repair # check layout success: 1 TRUNCATE t1; diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result index f9c4db296a3..fef4186d5b9 100644 --- a/mysql-test/suite/parts/r/partition_engine_innodb.result +++ b/mysql-test/suite/parts/r/partition_engine_innodb.result @@ -1416,6 +1416,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 STORAGE ENGINE = 'InnoDB', 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, @@ -1427,6 +1428,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 , PARTITION part2 STORAGE ENGINE = 'InnoDB' ); +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, @@ -1443,6 +1445,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should fail with ER_MIX_HANDLER_ERROR +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1918,6 +1923,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1934,6 +1942,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'InnoDB' (SUBPARTITION subpart21, SUBPARTITION subpart22) ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 5 Precedence of storage engine assignments (if there is any) #------------------------------------------------------------------------ @@ -2862,6 +2871,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 6 Session default engine differs from engine used within create table #------------------------------------------------------------------------ diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result index 66a4b4cc2a7..6c228b05113 100644 --- a/mysql-test/suite/parts/r/partition_engine_myisam.result +++ b/mysql-test/suite/parts/r/partition_engine_myisam.result @@ -1450,6 +1450,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 STORAGE ENGINE = 'MyISAM', 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, @@ -1461,6 +1462,7 @@ PARTITION BY HASH(f_int1) ( PARTITION part1 , PARTITION part2 STORAGE ENGINE = 'MyISAM' ); +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, @@ -1477,6 +1479,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should fail with ER_MIX_HANDLER_ERROR +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1966,6 +1971,9 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +# this should work +# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1982,6 +1990,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'MyISAM' (SUBPARTITION subpart21, SUBPARTITION subpart22) ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 5 Precedence of storage engine assignments (if there is any) #------------------------------------------------------------------------ @@ -2934,6 +2943,7 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL #------------------------------------------------------------------------ # 6 Session default engine differs from engine used within create table #------------------------------------------------------------------------ diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 0307975ff06..408a624e707 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -7,17 +7,10 @@ part_supported_sql_func_ndb : cannot create t1 partition_alter1_ndb : timeout. Needs too much time. partition_alter2_ndb : cannot create t1 partition_basic_ndb : cannot create t1 -partition_bit_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures partition_bit_ndb : cannot create t1 -partition_char_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures -partition_datetime_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures -partition_decimal_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures partition_engine_ndb : cannot create t1 -partition_float_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures -partition_int_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures partition_int_ndb : cannot create t1 partition_sessions : needs system_3_init.inc -partition_special_myisam : BUG#34225 2008-02-02 mats test suit parts uses /tmp-dir instead of mysql-test dir, which causes failures partition_syntax_ndb : cannot create t1 partition_value_innodb : Bug#30581 partition_value tests use disallowed CAST() function partition_value_myisam : Bug#30581 partition_value tests use disallowed CAST() function diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d97af771a00..64bee07aa1c 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1028,6 +1028,7 @@ int ha_partition::repair_partitions(THD *thd) 0 Success */ +#ifdef WL4176_IS_DONE static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, handler *file, uint flag) { @@ -1041,7 +1042,6 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, */ DBUG_RETURN(HA_ADMIN_NOT_IMPLEMENTED); -#ifdef WL4176_IS_DONE if (flag == OPTIMIZE_PARTS) error= file->ha_optimize(thd, check_opt); else if (flag == ANALYZE_PARTS) @@ -1058,8 +1058,8 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, if (error == HA_ADMIN_ALREADY_DONE) error= 0; DBUG_RETURN(error); -#endif } +#endif /* @@ -1080,11 +1080,13 @@ static int handle_opt_part(THD *thd, HA_CHECK_OPT *check_opt, int ha_partition::handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flag, bool all_parts) { +#ifdef WL4176_IS_DONE List_iterator part_it(m_part_info->partitions); uint no_parts= m_part_info->no_parts; uint no_subparts= m_part_info->no_subparts; uint i= 0; int error; +#endif DBUG_ENTER("ha_partition::handle_opt_partitions"); DBUG_PRINT("enter", ("all_parts %u, flag= %u", all_parts, flag)); From 1eb99d3fd4e57580b8fd87f630f69370d5766b07 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 07:50:55 +0100 Subject: [PATCH 305/527] Bug#29645: Link failure when using the embedded server mysql_config --cflags gave a flag that forced the HP/UX C++ compiler into C-mode; as a result, C++ sources could not be compiled correctly. We now filter out the offending flag (like we do for Sun) so that --cflags will work for both C and C++. scripts/mysql_config.sh: Add -AC99 (for HP/UX) to the list of flags we need to remove from "mysql_config --cflags" so they work for C and C++ both. --- scripts/mysql_config.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index ae58655ed0f..a0c3b43d690 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -113,10 +113,12 @@ include="-I$pkgincludedir" # Remove some options that a client doesn't have to care about # FIXME until we have a --cxxflags, we need to remove -Xa # and -xstrconst to make --cflags usable for Sun Forte C++ +# FIXME until we have a --cxxflags, we need to remove -AC99 +# to make --cflags usable for HP C++ (aCC) for remove in DDBUG_OFF DSAFEMALLOC USAFEMALLOC DSAFE_MUTEX \ DPEDANTIC_SAFEMALLOC DUNIV_MUST_NOT_INLINE DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ - Xa xstrconst "xc99=none" \ + Xa xstrconst "xc99=none" AC99 \ unroll2 ip mp restrict do # The first option we might strip will always have a space before it because From 4f3eab58046a42f66abd68d547ad97a9d58ecb04 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 13:25:57 +0300 Subject: [PATCH 306/527] Fix for bug #33834: FRAC_SECOND: Applicability not clear in documentation While the manual mentions FRAC_SECOND only for the TIMESTAMPADD() function, it was also possible to use FRAC_SECOND with DATE_ADD(), DATE_SUB() and +/- INTERVAL. Fixed the parser to match the manual, i.e. using FRAC_SECOND for anything other than TIMESTAMPADD()/TIMESTAMPDIFF() now produces a syntax error. Additionally, the patch allows MICROSECOND to be used in TIMESTAMPADD/ TIMESTAMPDIFF and marks FRAC_SECOND as deprecated. mysql-test/r/func_time.result: Added a test case for bug #33834. mysql-test/t/func_time.test: Added a test case for bug #33834. sql/sql_yacc.yy: Reject FRAC_SECOND for anything other than TIMESTAMPADD() or TIMESTAMPDIFF(). Allow MICROSECOND to be used with TIMESTAMPADD()/TIMESTAMPDIFF(). Warn about FRAC_SECOND being a deprecated unit. --- mysql-test/r/func_time.result | 23 +++++++++++++++++++++++ mysql-test/t/func_time.test | 19 +++++++++++++++++++ sql/sql_yacc.yy | 33 +++++++++++++++++++++++++++------ 3 files changed, 69 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index f25f9ed9e0a..d397947d7ca 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -666,6 +666,8 @@ timestampadd(SQL_TSI_SECOND, 1, date) select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; timestampadd(SQL_TSI_FRAC_SECOND, 1, date) 2003-01-02 00:00:00.000001 +Warnings: +Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; a 3 @@ -699,6 +701,8 @@ a select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a; a 7689538999999 +Warnings: +Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, @@ -1069,6 +1073,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12: id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: +Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead Note 1003 select timestampdiff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2` select last_day('2005-00-00'); last_day('2005-00-00') @@ -1285,4 +1290,22 @@ DATE_ADD(20071108, INTERVAL 1 DAY) select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND 2007-12-30 23:59:59 +SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); +TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18') +2008-02-18 00:00:00.000001 +Warnings: +Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); +TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18') +86400000000 +Warnings: +Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1 +SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1 +SELECT '2008-02-18' + INTERVAL 1 FRAC_SECOND; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND' at line 1 +SELECT '2008-02-18' - INTERVAL 1 FRAC_SECOND; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND' at line 1 End of 5.0 tests diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index b0f47e0ad56..613a2fc7ca0 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -804,4 +804,23 @@ select DATE_ADD(20071108, INTERVAL 1 DAY); select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; +# +# Bug#33834: FRAC_SECOND: Applicability not clear in documentation +# +# Show that he use of FRAC_SECOND, for anything other than +# TIMESTAMPADD / TIMESTAMPDIFF, is a server error. + +SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); +SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); + +--error ER_PARSE_ERROR +SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); +--error ER_PARSE_ERROR +SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); + +--error ER_PARSE_ERROR +SELECT '2008-02-18' + INTERVAL 1 FRAC_SECOND; +--error ER_PARSE_ERROR +SELECT '2008-02-18' - INTERVAL 1 FRAC_SECOND; + --echo End of 5.0 tests diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index af57fbdb108..cb447c1187a 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -458,10 +458,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %pure_parser /* We have threads */ /* - Currently there are 245 shift/reduce conflicts. + Currently there are 240 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 245 +%expect 240 %token END_OF_INPUT @@ -1111,6 +1111,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %type interval_time_st +%type interval_time_stamp + %type storage_engines %type row_types @@ -5027,9 +5029,9 @@ simple_expr: { $$= new Item_datetime_typecast($3); } | TIMESTAMP '(' expr ',' expr ')' { $$= new Item_func_add_time($3, $5, 1, 0); } - | TIMESTAMP_ADD '(' interval_time_st ',' expr ',' expr ')' + | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' { $$= new Item_date_add_interval($7,$5,$3,0); } - | TIMESTAMP_DIFF '(' interval_time_st ',' expr ',' expr ')' + | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' { $$= new Item_func_timestamp_diff($5,$7,$3); } | TRIM '(' expr ')' { $$= new Item_func_trim($3); } @@ -6005,21 +6007,40 @@ interval: | HOUR_MICROSECOND_SYM { $$=INTERVAL_HOUR_MICROSECOND; } | HOUR_MINUTE_SYM { $$=INTERVAL_HOUR_MINUTE; } | HOUR_SECOND_SYM { $$=INTERVAL_HOUR_SECOND; } - | MICROSECOND_SYM { $$=INTERVAL_MICROSECOND; } | MINUTE_MICROSECOND_SYM { $$=INTERVAL_MINUTE_MICROSECOND; } | MINUTE_SECOND_SYM { $$=INTERVAL_MINUTE_SECOND; } | SECOND_MICROSECOND_SYM { $$=INTERVAL_SECOND_MICROSECOND; } | YEAR_MONTH_SYM { $$=INTERVAL_YEAR_MONTH; }; +interval_time_stamp: + interval_time_st {} + | FRAC_SECOND_SYM { + $$=INTERVAL_MICROSECOND; + /* + FRAC_SECOND was mistakenly implemented with + a wrong resolution. According to the ODBC + standard it should be nanoseconds, not + microseconds. Changing it to nanoseconds + in MySQL would mean making TIMESTAMPDIFF + and TIMESTAMPADD to return DECIMAL, since + the return value would be too big for BIGINT + Hence we just deprecate the incorrect + implementation without changing its + resolution. + */ + WARN_DEPRECATED("FRAC_SECOND", "MICROSECOND"); // Will be removed in 6.2 + } + ; + interval_time_st: DAY_SYM { $$=INTERVAL_DAY; } | WEEK_SYM { $$=INTERVAL_WEEK; } | HOUR_SYM { $$=INTERVAL_HOUR; } - | FRAC_SECOND_SYM { $$=INTERVAL_MICROSECOND; } | MINUTE_SYM { $$=INTERVAL_MINUTE; } | MONTH_SYM { $$=INTERVAL_MONTH; } | QUARTER_SYM { $$=INTERVAL_QUARTER; } | SECOND_SYM { $$=INTERVAL_SECOND; } + | MICROSECOND_SYM { $$=INTERVAL_MICROSECOND; } | YEAR_SYM { $$=INTERVAL_YEAR; } ; From b2e879cbe83f0157f36e2d44aa4290572ee63886 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 07:48:02 -0300 Subject: [PATCH 307/527] Bug#28386 the general log is incomplete The problem is that the commands COM_STMT_CLOSE, COM_STMT_RESET, COM_STMT_SEND_LONG_DATA weren't being logged to the general log. The solution is to log the general log the aforementioned commands. mysql-test/t/mysql_client_test-master.opt: Also log to table. sql/sql_prepare.cc: Log COM_STMT_CLOSE, COM_STMT_RESET and COM_STMT_SEND_LONG_DATA. tests/mysql_client_test.c: Add test case for Bug#28386 --- mysql-test/t/mysql_client_test-master.opt | 2 +- sql/sql_prepare.cc | 6 +++ tests/mysql_client_test.c | 60 +++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/mysql_client_test-master.opt b/mysql-test/t/mysql_client_test-master.opt index 2dfcc4a2fb9..4c683f7f0a2 100644 --- a/mysql-test/t/mysql_client_test-master.opt +++ b/mysql-test/t/mysql_client_test-master.opt @@ -1 +1 @@ ---log=$MYSQLTEST_VARDIR/log/master.log --log-output=FILE +--log=$MYSQLTEST_VARDIR/log/master.log --log-output=FILE,TABLE diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index c06c68df8d3..a027ffe9daa 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2533,6 +2533,8 @@ void mysql_stmt_reset(THD *thd, char *packet) stmt->state= Query_arena::PREPARED; + general_log_print(thd, thd->command, NullS); + my_ok(thd); DBUG_VOID_RETURN; @@ -2562,6 +2564,7 @@ void mysql_stmt_close(THD *thd, char *packet) */ DBUG_ASSERT(! (stmt->flags & (uint) Prepared_statement::IS_IN_USE)); (void) stmt->deallocate(); + general_log_print(thd, thd->command, NullS); thd->main_da.disable_status(); @@ -2669,6 +2672,9 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length) stmt->last_errno= ER_OUTOFMEMORY; sprintf(stmt->last_error, ER(ER_OUTOFMEMORY), 0); } + + general_log_print(thd, thd->command, NullS); + DBUG_VOID_RETURN; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index d85a40f7393..01177ffed3c 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -17313,6 +17313,65 @@ static void test_bug31669() DBUG_VOID_RETURN; } + +/** + Bug#28386 the general log is incomplete +*/ + +static void test_bug28386() +{ + int rc; + MYSQL_STMT *stmt; + MYSQL_RES *result; + MYSQL_BIND bind; + const char hello[]= "hello world!"; + + DBUG_ENTER("test_bug28386"); + myheader("test_bug28386"); + + rc= mysql_query(mysql, "truncate mysql.general_log"); + myquery(rc); + + stmt= mysql_simple_prepare(mysql, "SELECT ?"); + check_stmt(stmt); + + memset(&bind, 0, sizeof(bind)); + + bind.buffer_type= MYSQL_TYPE_STRING; + bind.buffer= (void *) hello; + bind.buffer_length= sizeof(hello); + + mysql_stmt_bind_param(stmt, &bind); + mysql_stmt_send_long_data(stmt, 0, hello, sizeof(hello)); + + rc= mysql_stmt_execute(stmt); + check_execute(stmt, rc); + + rc= my_process_stmt_result(stmt); + DIE_UNLESS(rc == 1); + + rc= mysql_stmt_reset(stmt); + check_execute(stmt, rc); + + rc= mysql_stmt_close(stmt); + DIE_UNLESS(!rc); + + rc= mysql_query(mysql, "select * from mysql.general_log where " + "command_type='Close stmt' or " + "command_type='Reset stmt' or " + "command_type='Long Data'"); + myquery(rc); + + result= mysql_store_result(mysql); + mytest(result); + + DIE_UNLESS(mysql_num_rows(result) == 3); + + mysql_free_result(result); + + DBUG_VOID_RETURN; +} + /* Read and parse arguments and MySQL options from my.cnf */ @@ -17618,6 +17677,7 @@ static struct my_tests_st my_tests[]= { { "test_bug20023", test_bug20023 }, { "test_bug31418", test_bug31418 }, { "test_bug31669", test_bug31669 }, + { "test_bug28386", test_bug28386 }, { 0, 0 } }; From 561827e2389ef8124b5d3810ce92a5e32f96913b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 16:03:28 +0300 Subject: [PATCH 308/527] Post-merge fixes for bug #33834. --- mysql-test/r/func_time.result | 10 +++++----- sql/sql_yacc.yy | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result index dd33a7aba5f..c3bba3f84ad 100644 --- a/mysql-test/r/func_time.result +++ b/mysql-test/r/func_time.result @@ -667,7 +667,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; timestampadd(SQL_TSI_FRAC_SECOND, 1, date) 2003-01-02 00:00:00.000001 Warnings: -Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a; a 3 @@ -702,7 +702,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05 a 7689538999999 Warnings: -Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3, @@ -1073,7 +1073,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12: id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used Warnings: -Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead Note 1003 select timestampdiff(WEEK,_latin1'2001-02-01',_latin1'2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,_latin1'2001-02-01 12:59:59.120000',_latin1'2001-05-01 12:58:58.119999') AS `a2` select time_format('100:00:00', '%H %k %h %I %l'); time_format('100:00:00', '%H %k %h %I %l') @@ -1270,12 +1270,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18') 2008-02-18 00:00:00.000001 Warnings: -Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18') 86400000000 Warnings: -Warning 1287 'FRAC_SECOND' is deprecated; use 'MICROSECOND' instead +Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1 SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 732dd4fe8dd..174249cf7d4 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -508,10 +508,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %pure_parser /* We have threads */ /* - Currently there are 172 shift/reduce conflicts. + Currently there are 177 shift/reduce conflicts. We should not introduce new conflicts any more. */ -%expect 172 +%expect 177 /* Comments for TOKENS. From db9b2bdc1b229e492d0e60761d7f62db1ee0f652 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2008 21:18:50 +0100 Subject: [PATCH 309/527] Post push fix Fixed a missed case in the patch for Bug#31931. Also makes Bug#33722 a duplicate of Bug#31931. Added tests for better coverage. Replaced some legacy function calls. mysql-test/r/partition.result: Added tests for better coverage mysql-test/r/partition_datatype.result: Added tests for better coverage mysql-test/r/partition_error.result: Added tests for better coverage mysql-test/suite/parts/inc/partition_engine.inc: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/suite/parts/r/partition_engine_innodb.result: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/suite/parts/r/partition_engine_myisam.result: Bug#31931: Mix of handlers error message Bug#33722 is fixed within this patch too mysql-test/t/partition.test: Added tests for better coverage mysql-test/t/partition_datatype.test: Added tests for better coverage mysql-test/t/partition_error.test: Added tests for Bug#31931 sql/partition_info.cc: Bug#31931: Mix of handlers error message Fixed case where given info->db_type not matched thd->lex->create_info.db_type And the check for inconsistent subpartition engines-clauses. sql/sql_partition.cc: Changed ha_legacy_type to ha_resolve_storage_engine_name sql/sql_table.cc: Changed ha_legacy_type to ha_resolve_storage_engine_name --- mysql-test/r/partition.result | 14 + mysql-test/r/partition_datatype.result | 8 + mysql-test/r/partition_error.result | 13 + .../suite/parts/inc/partition_engine.inc | 78 +- .../parts/r/partition_engine_innodb.result | 1378 +++++++++++++++- .../parts/r/partition_engine_myisam.result | 1420 ++++++++++++++++- mysql-test/t/partition.test | 14 +- mysql-test/t/partition_datatype.test | 3 + mysql-test/t/partition_error.test | 18 + sql/partition_info.cc | 99 +- sql/sql_partition.cc | 10 +- sql/sql_table.cc | 7 +- 12 files changed, 2968 insertions(+), 94 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 1cbe0d577b1..b13010f8471 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1052,6 +1052,12 @@ test.t1 repair note The storage engine for the table doesn't support repair OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize note The storage engine for the table doesn't support optimize +CHECK TABLE t1; +Table Op Msg_type Msg_text +test.t1 check note The storage engine for the table doesn't support check +ANALYZE TABLE t1; +Table Op Msg_type Msg_text +test.t1 analyze note The storage engine for the table doesn't support analyze drop table t1; drop procedure if exists mysqltest_1; create table t1 (a int) @@ -1290,6 +1296,14 @@ ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 +ALTER TABLE t1 ANALYZE PARTITION p1; +ERROR 42000: The storage engine for the table doesn't support analyze partition +ALTER TABLE t1 CHECK PARTITION p1; +ERROR 42000: The storage engine for the table doesn't support check partition +ALTER TABLE t1 REPAIR PARTITION p1; +ERROR 42000: The storage engine for the table doesn't support repair partition +ALTER TABLE t1 OPTIMIZE PARTITION p1; +ERROR 42000: The storage engine for the table doesn't support optimize partition DROP TABLE t1; CREATE TABLE t1 (s1 BIGINT UNSIGNED) PARTITION BY RANGE (s1) ( diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result index 43c65f23e61..43d9aac13b7 100644 --- a/mysql-test/r/partition_datatype.result +++ b/mysql-test/r/partition_datatype.result @@ -135,9 +135,17 @@ drop table t1; # test with null allowed create table t1 (a bit) partition by key (a); insert into t1 values (b'1'); +insert into t1 values (NULL); select hex(a) from t1 where a = b'1'; hex(a) 1 +select hex(a) from t1 where a is NULL; +hex(a) +NULL +select hex(a) from t1 order by a; +hex(a) +NULL +1 drop table t1; create table t1 (a tinyint) partition by key (a); insert into t1 values (2); diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result index 46532cb32ab..585447ff333 100644 --- a/mysql-test/r/partition_error.result +++ b/mysql-test/r/partition_error.result @@ -1,4 +1,17 @@ drop table if exists t1; +CREATE TABLE t1 (a INT) +PARTITION BY HASH (a) +( PARTITION p0 ENGINE=MyISAM, +PARTITION p1); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +CREATE TABLE t1 (a INT) +PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) +( PARTITION p0 VALUES IN (0) +( SUBPARTITION s0, SUBPARTITION s1 ENGINE=MyISAM, SUBPARTITION s2), +PARTITION p1 VALUES IN (1) +( SUBPARTITION s3 ENGINE=MyISAM, SUBPARTITION s4, SUBPARTITION s5 ENGINE=MyISAM)); +ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL CREATE TABLE t1 ( a int ) diff --git a/mysql-test/suite/parts/inc/partition_engine.inc b/mysql-test/suite/parts/inc/partition_engine.inc index d2f3277cf6d..b2fab2ff27e 100644 --- a/mysql-test/suite/parts/inc/partition_engine.inc +++ b/mysql-test/suite/parts/inc/partition_engine.inc @@ -112,8 +112,7 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); ---echo # this should fail with ER_MIX_HANDLER_ERROR ---echo # after fixing Bug#33722 +--error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) @@ -126,6 +125,19 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21, SUBPARTITION subpart22 ) ); +eval CREATE TABLE t1 ( +$column_list +) +ENGINE = $engine +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN ($max_row_div2) + (SUBPARTITION subpart11 STORAGE ENGINE = $engine, + SUBPARTITION subpart12 STORAGE ENGINE = $engine), + PARTITION part2 VALUES LESS THAN $MAX_VALUE + (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; --source suite/parts/inc/partition_check.inc @@ -135,14 +147,38 @@ DROP TABLE t1; --echo # 4 Storage engine assignment after partition name + after name of --echo # subpartitions belonging to another partition --echo #------------------------------------------------------------------------ ---echo # this should work ---echo # after fixing Bug#33722 --error ER_MIX_HANDLER_ERROR eval CREATE TABLE t1 ( $column_list ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN ($max_row_div2) + (SUBPARTITION subpart11, + SUBPARTITION subpart12), + PARTITION part2 VALUES LESS THAN $MAX_VALUE + (SUBPARTITION subpart21 STORAGE ENGINE = $engine, + SUBPARTITION subpart22 STORAGE ENGINE = $engine) +); +eval CREATE TABLE t1 ( +$column_list +) +ENGINE = $engine +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN ($max_row_div2) ENGINE = $engine + (SUBPARTITION subpart11, + SUBPARTITION subpart12), + PARTITION part2 VALUES LESS THAN $MAX_VALUE + (SUBPARTITION subpart21, + SUBPARTITION subpart22 STORAGE ENGINE = $engine) +); +DROP TABLE t1; +eval CREATE TABLE t1 ( +$column_list +) +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) ( PARTITION part1 VALUES LESS THAN ($max_row_div2) ENGINE = $engine (SUBPARTITION subpart11, SUBPARTITION subpart12), @@ -150,13 +186,10 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); -#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -#--source suite/parts/inc/partition_check.inc -#DROP TABLE t1; ---echo # this should work ---echo # after fixing Bug#33722 ---error ER_MIX_HANDLER_ERROR +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +--source suite/parts/inc/partition_check.inc +DROP TABLE t1; eval CREATE TABLE t1 ( $column_list ) @@ -166,13 +199,13 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart11 STORAGE ENGINE = $engine, SUBPARTITION subpart12 STORAGE ENGINE = $engine), PARTITION part2 VALUES LESS THAN $MAX_VALUE ENGINE = $engine - (SUBPARTITION subpart21, + (SUBPARTITION subpart21 ENGINE = $engine, 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; -#--source suite/parts/inc/partition_check.inc -#DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +--source suite/parts/inc/partition_check.inc +DROP TABLE t1; # --echo #------------------------------------------------------------------------ --echo # 5 Precedence of storage engine assignments (if there is any) @@ -208,10 +241,7 @@ SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; DROP TABLE t1; --echo # 6.2 Storage engine assignment after partition name + after --echo # subpartition name -# in partition part + in sub partition part ---echo # this should work ---echo # after fixing Bug#33722 ---error ER_MIX_HANDLER_ERROR +--echo # in partition part + in sub partition part eval CREATE TABLE t1 ( $column_list ) @@ -224,10 +254,10 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart21 STORAGE ENGINE = $engine, SUBPARTITION subpart22 STORAGE ENGINE = $engine) ); -#INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -#SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -#--source suite/parts/inc/partition_check.inc -#DROP TABLE t1; +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +--source suite/parts/inc/partition_check.inc +DROP TABLE t1; --echo #------------------------------------------------------------------------ --echo # 6 Session default engine differs from engine used within create table diff --git a/mysql-test/suite/parts/r/partition_engine_innodb.result b/mysql-test/suite/parts/r/partition_engine_innodb.result index fef4186d5b9..4aad4c3c36a 100644 --- a/mysql-test/suite/parts/r/partition_engine_innodb.result +++ b/mysql-test/suite/parts/r/partition_engine_innodb.result @@ -1446,8 +1446,6 @@ PARTITION part2 VALUES LESS THAN (2147483646) SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -# this should fail with ER_MIX_HANDLER_ERROR -# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1464,6 +1462,24 @@ 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 = 'InnoDB' +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN (10) +(SUBPARTITION subpart11 STORAGE ENGINE = 'InnoDB', +SUBPARTITION subpart12 STORAGE ENGINE = 'InnoDB'), +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) @@ -1905,8 +1921,41 @@ DROP TABLE t1; # 4 Storage engine assignment after partition name + after name of # subpartitions belonging to another partition #------------------------------------------------------------------------ -# this should work -# after fixing Bug#33722 +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 = 'InnoDB', +SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') +); +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 = 'InnoDB' +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'InnoDB' +(SUBPARTITION subpart11, +SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart21, +SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') +); +DROP TABLE t1; CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1923,9 +1972,443 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -# this should work -# after fixing Bug#33722 +INSERT INTO t1(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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ + +# 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 able 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, @@ -1939,10 +2422,446 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart11 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart12 STORAGE ENGINE = 'InnoDB'), PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'InnoDB' -(SUBPARTITION subpart21, +(SUBPARTITION subpart21 ENGINE = 'InnoDB', SUBPARTITION subpart22) ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +INSERT INTO t1(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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ + +# 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 able 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) #------------------------------------------------------------------------ @@ -2853,8 +3772,7 @@ TRUNCATE t1; DROP TABLE t1; # 6.2 Storage engine assignment after partition name + after # subpartition name -# this should work -# after fixing Bug#33722 +# in partition part + in sub partition part CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -2871,7 +3789,443 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'InnoDB', SUBPARTITION subpart22 STORAGE ENGINE = 'InnoDB') ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +INSERT INTO t1(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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB)) */ + +# 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 able 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 #------------------------------------------------------------------------ diff --git a/mysql-test/suite/parts/r/partition_engine_myisam.result b/mysql-test/suite/parts/r/partition_engine_myisam.result index 6c228b05113..2dfea58995e 100644 --- a/mysql-test/suite/parts/r/partition_engine_myisam.result +++ b/mysql-test/suite/parts/r/partition_engine_myisam.result @@ -1480,8 +1480,6 @@ PARTITION part2 VALUES LESS THAN (2147483646) SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -# this should fail with ER_MIX_HANDLER_ERROR -# after fixing Bug#33722 CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1498,6 +1496,24 @@ 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 = 'MyISAM' +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN (10) +(SUBPARTITION subpart11 STORAGE ENGINE = 'MyISAM', +SUBPARTITION subpart12 STORAGE ENGINE = 'MyISAM'), +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) @@ -1953,8 +1969,41 @@ DROP TABLE t1; # 4 Storage engine assignment after partition name + after name of # subpartitions belonging to another partition #------------------------------------------------------------------------ -# this should work -# after fixing Bug#33722 +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 = 'MyISAM', +SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') +); +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 = 'MyISAM' +PARTITION BY RANGE(f_int1) +SUBPARTITION BY HASH(f_int1) +( PARTITION part1 VALUES LESS THAN (10) ENGINE = 'MyISAM' +(SUBPARTITION subpart11, +SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart21, +SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') +); +DROP TABLE t1; CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -1971,9 +2020,457 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL -# this should work -# after fixing Bug#33722 +INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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; +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, @@ -1987,10 +2484,460 @@ SUBPARTITION BY HASH(f_int1) (SUBPARTITION subpart11 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart12 STORAGE ENGINE = 'MyISAM'), PARTITION part2 VALUES LESS THAN (2147483646) ENGINE = 'MyISAM' -(SUBPARTITION subpart21, +(SUBPARTITION subpart21 ENGINE = 'MyISAM', SUBPARTITION subpart22) ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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; +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; #------------------------------------------------------------------------ # 5 Precedence of storage engine assignments (if there is any) #------------------------------------------------------------------------ @@ -2925,8 +3872,7 @@ TRUNCATE t1; DROP TABLE t1; # 6.2 Storage engine assignment after partition name + after # subpartition name -# this should work -# after fixing Bug#33722 +# in partition part + in sub partition part CREATE TABLE t1 ( f_int1 INTEGER, f_int2 INTEGER, @@ -2943,7 +3889,457 @@ PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 STORAGE ENGINE = 'MyISAM', SUBPARTITION subpart22 STORAGE ENGINE = 'MyISAM') ); -ERROR HY000: The mix of handlers in the partitions is not allowed in this version of MySQL +INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int1) (PARTITION part1 VALUES LESS THAN (10) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (2147483646) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM)) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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; +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; #------------------------------------------------------------------------ # 6 Session default engine differs from engine used within create table #------------------------------------------------------------------------ diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 5adf21d53e8..c4e447988db 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1215,13 +1215,15 @@ DROP TABLE t1; # # Bug 17455 Partitions: Wrong message and error when using Repair/Optimize # table on partitioned table -# +# (added check/analyze for gcov of Bug#20129) create table t1 (a int) engine=MEMORY partition by key (a); REPAIR TABLE t1; OPTIMIZE TABLE t1; +CHECK TABLE t1; +ANALYZE TABLE t1; drop table t1; @@ -1524,7 +1526,7 @@ select c1 from t1 group by (select c0 from t1 limit 1); drop table t1; # Bug #30495: optimize table t1,t2,t3 extended errors -# +# (added more maintenace commands for Bug#20129 CREATE TABLE t1(a int) PARTITION BY RANGE (a) ( PARTITION p1 VALUES LESS THAN (10), @@ -1534,6 +1536,14 @@ PARTITION BY RANGE (a) ( ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; --error ER_PARSE_ERROR ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 ANALYZE PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 CHECK PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 REPAIR PARTITION p1; +--error ER_CHECK_NOT_IMPLEMENTED +ALTER TABLE t1 OPTIMIZE PARTITION p1; DROP TABLE t1; # diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test index c21fb40f735..7440a9bf3a3 100644 --- a/mysql-test/t/partition_datatype.test +++ b/mysql-test/t/partition_datatype.test @@ -103,7 +103,10 @@ drop table t1; -- echo # test with null allowed create table t1 (a bit) partition by key (a); insert into t1 values (b'1'); +insert into t1 values (NULL); select hex(a) from t1 where a = b'1'; +select hex(a) from t1 where a is NULL; +select hex(a) from t1 order by a; drop table t1; create table t1 (a tinyint) partition by key (a); insert into t1 values (2); diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test index c9b95fc1664..d470fb67b49 100644 --- a/mysql-test/t/partition_error.test +++ b/mysql-test/t/partition_error.test @@ -8,6 +8,24 @@ drop table if exists t1; --enable_warnings +# +# Bug#31931: Mix of handlers error message +# +--error ER_MIX_HANDLER_ERROR +CREATE TABLE t1 (a INT) +PARTITION BY HASH (a) +( PARTITION p0 ENGINE=MyISAM, + PARTITION p1); +--error ER_MIX_HANDLER_ERROR +CREATE TABLE t1 (a INT) +PARTITION BY LIST (a) +SUBPARTITION BY HASH (a) +( PARTITION p0 VALUES IN (0) +( SUBPARTITION s0, SUBPARTITION s1 ENGINE=MyISAM, SUBPARTITION s2), + PARTITION p1 VALUES IN (1) +( SUBPARTITION s3 ENGINE=MyISAM, SUBPARTITION s4, SUBPARTITION s5 ENGINE=MyISAM)); + + # # Bug 29368: # Incorrect error, 1467, for syntax error when creating partition diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 6816fce7818..1d21a10beaa 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -464,15 +464,15 @@ static bool check_engine_condition(partition_element *p_elem, { DBUG_ENTER("check_engine_condition"); - DBUG_PRINT("enter", ("p_eng %u t_eng %u t_eng_set %u first %u state %u", - ha_legacy_type(p_elem->engine_type), - ha_legacy_type(*engine_type), + DBUG_PRINT("enter", ("p_eng %s t_eng %s t_eng_set %u first %u state %u", + ha_resolve_storage_engine_name(p_elem->engine_type), + ha_resolve_storage_engine_name(*engine_type), table_engine_set, *first, p_elem->part_state)); if (*first && !table_engine_set) { *engine_type= p_elem->engine_type; - DBUG_PRINT("info", ("setting table_engine = %u", - ha_legacy_type(*engine_type))); + DBUG_PRINT("info", ("setting table_engine = %s", + ha_resolve_storage_engine_name(*engine_type))); } *first= FALSE; if ((table_engine_set && @@ -522,8 +522,8 @@ bool partition_info::check_engine_mix(handlerton *engine_type, bool first= TRUE; uint no_parts= partitions.elements; DBUG_ENTER("partition_info::check_engine_mix"); - DBUG_PRINT("info", ("in: engine_type = %u, table_engine_set = %u", - ha_legacy_type(engine_type), + DBUG_PRINT("info", ("in: engine_type = %s, table_engine_set = %u", + ha_resolve_storage_engine_name(engine_type), table_engine_set)); if (no_parts) { @@ -532,8 +532,8 @@ bool partition_info::check_engine_mix(handlerton *engine_type, do { partition_element *part_elem= part_it++; - DBUG_PRINT("info", ("part = %d engine = %d table_engine_set %u", - i, ha_legacy_type(part_elem->engine_type), + DBUG_PRINT("info", ("part = %d engine = %s table_engine_set %u", + i, ha_resolve_storage_engine_name(part_elem->engine_type), table_engine_set)); if (is_sub_partitioned() && part_elem->subpartitions.elements) @@ -544,8 +544,8 @@ bool partition_info::check_engine_mix(handlerton *engine_type, do { partition_element *sub_elem= sub_it++; - DBUG_PRINT("info", ("sub = %d engine = %u table_engie_set %u", - j, ha_legacy_type(sub_elem->engine_type), + DBUG_PRINT("info", ("sub = %d engine = %s table_engie_set %u", + j, ha_resolve_storage_engine_name(sub_elem->engine_type), table_engine_set)); if (check_engine_condition(sub_elem, table_engine_set, &engine_type, &first)) @@ -561,8 +561,8 @@ bool partition_info::check_engine_mix(handlerton *engine_type, goto error; } while (++i < no_parts); } - DBUG_PRINT("info", ("engine_type = %u", - ha_legacy_type(engine_type))); + DBUG_PRINT("info", ("engine_type = %s", + ha_resolve_storage_engine_name(engine_type))); if (!engine_type) engine_type= old_engine_type; if (engine_type->flags & HTON_NO_PARTITION) @@ -570,8 +570,8 @@ bool partition_info::check_engine_mix(handlerton *engine_type, my_error(ER_PARTITION_MERGE_ERROR, MYF(0)); DBUG_RETURN(TRUE); } - DBUG_PRINT("info", ("out: engine_type = %u", - ha_legacy_type(engine_type))); + DBUG_PRINT("info", ("out: engine_type = %s", + ha_resolve_storage_engine_name(engine_type))); DBUG_ASSERT(engine_type != partition_hton); DBUG_RETURN(FALSE); error: @@ -859,6 +859,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, DBUG_ENTER("partition_info::check_partition_info"); DBUG_ASSERT(default_engine_type != partition_hton); + DBUG_PRINT("info", ("default table_engine = %s", + ha_resolve_storage_engine_name(table_engine))); if (check_partition_function) { int err= 0; @@ -913,10 +915,16 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, the table and all partitions/subpartitions are set. So when ALTER it is already set on table level */ - if (thd->lex->create_info.used_fields & HA_CREATE_USED_ENGINE) + if (info && info->used_fields & HA_CREATE_USED_ENGINE) { table_engine_set= TRUE; - table_engine= thd->lex->create_info.db_type; + table_engine= info->db_type; + /* if partition_hton, use thd->lex->create_info */ + if (table_engine == partition_hton) + table_engine= thd->lex->create_info.db_type; + DBUG_ASSERT(table_engine != partition_hton); + DBUG_PRINT("info", ("Using table_engine = %s", + ha_resolve_storage_engine_name(table_engine))); } else { @@ -924,6 +932,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, if (thd->lex->sql_command != SQLCOM_CREATE_TABLE) { table_engine_set= TRUE; + DBUG_PRINT("info", ("No create, table_engine = %s", + ha_resolve_storage_engine_name(table_engine))); DBUG_ASSERT(table_engine && table_engine != partition_hton); } } @@ -941,11 +951,6 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, do { partition_element *part_elem= part_it++; - if (part_elem->engine_type == NULL) - { - no_parts_not_set++; - part_elem->engine_type= default_engine_type; - } #ifdef HAVE_READLINK if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) #endif @@ -960,23 +965,29 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } if (!is_sub_partitioned()) { + if (part_elem->engine_type == NULL) + { + no_parts_not_set++; + part_elem->engine_type= default_engine_type; + } if (check_table_name(part_elem->partition_name, strlen(part_elem->partition_name))) { my_error(ER_WRONG_PARTITION_NAME, MYF(0)); goto end; } - DBUG_PRINT("info", ("part = %d engine = %d", - i, ha_legacy_type(part_elem->engine_type))); + DBUG_PRINT("info", ("part = %d engine = %s", + i, ha_resolve_storage_engine_name(part_elem->engine_type))); } else { uint j= 0; uint no_subparts_not_set= 0; List_iterator sub_it(part_elem->subpartitions); + partition_element *sub_elem; do { - partition_element *sub_elem= sub_it++; + sub_elem= sub_it++; if (check_table_name(sub_elem->partition_name, strlen(sub_elem->partition_name))) { @@ -985,24 +996,41 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } if (sub_elem->engine_type == NULL) { - sub_elem->engine_type= default_engine_type; - no_subparts_not_set++; + if (part_elem->engine_type != NULL) + sub_elem->engine_type= part_elem->engine_type; + else + { + sub_elem->engine_type= default_engine_type; + no_subparts_not_set++; + } } - DBUG_PRINT("info", ("part = %d sub = %d engine = %u", - i, j, ha_legacy_type(sub_elem->engine_type))); + DBUG_PRINT("info", ("part = %d sub = %d engine = %s", i, j, + ha_resolve_storage_engine_name(sub_elem->engine_type))); } while (++j < no_subparts); - if (prev_no_subparts_not_set == (no_subparts + 1)) + + if (prev_no_subparts_not_set == (no_subparts + 1) && + (no_subparts_not_set == 0 || no_subparts_not_set == no_subparts)) prev_no_subparts_not_set= no_subparts_not_set; + if (!table_engine_set && - prev_no_subparts_not_set == no_subparts_not_set && - no_subparts_not_set != 0 && - no_subparts_not_set != no_subparts) + prev_no_subparts_not_set != no_subparts_not_set) { DBUG_PRINT("info", ("no_subparts_not_set = %u no_subparts = %u", no_subparts_not_set, no_subparts)); my_error(ER_MIX_HANDLER_ERROR, MYF(0)); goto end; } + + if (part_elem->engine_type == NULL) + { + if (no_subparts_not_set == 0) + part_elem->engine_type= sub_elem->engine_type; + else + { + no_parts_not_set++; + part_elem->engine_type= default_engine_type; + } + } } } while (++i < no_parts); if (!table_engine_set && @@ -1021,9 +1049,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, goto end; } - if (table_engine == partition_hton) - DBUG_PRINT("info", ("Table engine set to partition_hton")); - DBUG_ASSERT(default_engine_type == table_engine); + DBUG_ASSERT(table_engine != partition_hton && + default_engine_type == table_engine); if (eng_type) *eng_type= table_engine; diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index a072b7fa8e4..7eab04b073a 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3819,9 +3819,9 @@ bool mysql_unpack_partition(THD *thd, DBUG_PRINT("info", ("Successful parse")); part_info= lex.part_info; - DBUG_PRINT("info", ("default engine = %d, default_db_type = %d", - ha_legacy_type(part_info->default_engine_type), - ha_legacy_type(default_db_type))); + DBUG_PRINT("info", ("default engine = %s, default_db_type = %s", + ha_resolve_storage_engine_name(part_info->default_engine_type), + ha_resolve_storage_engine_name(default_db_type))); if (is_create_table_ind && old_lex->sql_command == SQLCOM_CREATE_TABLE) { if (old_lex->create_info.options & HA_LEX_CREATE_TABLE_LIKE) @@ -4041,8 +4041,8 @@ static bool check_native_partitioned(HA_CREATE_INFO *create_info,bool *ret_val, DBUG_ASSERT(engine_type && engine_type != partition_hton); } } - DBUG_PRINT("info", ("engine_type = %u, table_engine_set = %u", - ha_legacy_type(engine_type), + DBUG_PRINT("info", ("engine_type = %s, table_engine_set = %u", + ha_resolve_storage_engine_name(engine_type), table_engine_set)); if (part_info->check_engine_mix(engine_type, table_engine_set)) goto error; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 553ce9b3f1a..3114bbc77b3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3295,8 +3295,9 @@ bool mysql_create_table_no_lock(THD *thd, } } } - DBUG_PRINT("info", ("db_type = %d", - ha_legacy_type(part_info->default_engine_type))); + DBUG_PRINT("info", ("db_type = %s create_info->db_type = %s", + ha_resolve_storage_engine_name(part_info->default_engine_type), + ha_resolve_storage_engine_name(create_info->db_type))); if (part_info->check_partition_info(thd, &engine_type, file, create_info, TRUE)) goto err; @@ -3321,7 +3322,7 @@ bool mysql_create_table_no_lock(THD *thd, Assign the partition handler as the handler of the table. */ DBUG_PRINT("info", ("db_type: %d", - ha_legacy_type(create_info->db_type))); + ha_resolve_storage_engine_name(create_info->db_type))); delete file; create_info->db_type= partition_hton; if (!(file= get_ha_partition(part_info))) From 2583c281b67ae8cf470266c7438a5852a1bd2265 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 07:58:46 +0100 Subject: [PATCH 310/527] Removed compiler warning (Missed a change of printf format) sql/sql_table.cc: wrong printf type --- sql/sql_table.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3114bbc77b3..5600abfdc87 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3321,7 +3321,7 @@ bool mysql_create_table_no_lock(THD *thd, The handler assigned to the table cannot handle partitioning. Assign the partition handler as the handler of the table. */ - DBUG_PRINT("info", ("db_type: %d", + DBUG_PRINT("info", ("db_type: %s", ha_resolve_storage_engine_name(create_info->db_type))); delete file; create_info->db_type= partition_hton; From 2967e4e1042a52bbad67009b6084282e53b4a708 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 13:55:46 +0300 Subject: [PATCH 311/527] Use an API instead of looking into stmt internals to fetch fields (Test for Bug#32265) tests/mysql_client_test.c: Use an API instead of looking into stmt internals to fetch fields. --- tests/mysql_client_test.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index d85a40f7393..23e37323fb3 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16120,6 +16120,7 @@ static void test_bug32265() int rc; MYSQL_STMT *stmt; MYSQL_FIELD *field; + MYSQL_RES *metadata; DBUG_ENTER("test_bug32265"); myheader("test_bug32265"); @@ -16137,50 +16138,61 @@ static void test_bug32265() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); + DIE_UNLESS(field); DIE_UNLESS(strcmp(field->table, "t1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT a '' FROM t1 ``"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT a '' FROM t1 ``"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT * FROM v1"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "v1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT * FROM v1 /* SIC */ GROUP BY 1"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "v1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP VIEW v1"); From 24039016f00e4437fa52a37a716195805280d592 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 15:27:46 +0300 Subject: [PATCH 312/527] Fix memory leaks (valgrind) --- tests/mysql_client_test.c | 90 ++++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 38 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 25522a88445..56c4cff3e5a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -8702,8 +8702,8 @@ static void test_sqlmode() strmov(c1, "My"); strmov(c2, "SQL"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - mysql_stmt_close(stmt); + verify_col_data("test_piping", "name", "MySQL"); rc= mysql_query(mysql, "DELETE FROM test_piping"); @@ -12993,7 +12993,7 @@ from t2);"); static void test_bug8378() { #if defined(HAVE_CHARSET_gbk) && !defined(EMBEDDED_LIBRARY) - MYSQL *old_mysql=mysql; + MYSQL *lmysql; char out[9]; /* strlen(TEST_BUG8378)*2+1 */ char buf[256]; int len, rc; @@ -13002,17 +13002,17 @@ static void test_bug8378() if (!opt_silent) fprintf(stdout, "\n Establishing a test connection ..."); - if (!(mysql= mysql_init(NULL))) + if (!(lmysql= mysql_init(NULL))) { myerror("mysql_init() failed"); exit(1); } - if (mysql_options(mysql, MYSQL_SET_CHARSET_NAME, "gbk")) + if (mysql_options(lmysql, MYSQL_SET_CHARSET_NAME, "gbk")) { myerror("mysql_options() failed"); exit(1); } - if (!(mysql_real_connect(mysql, opt_host, opt_user, + if (!(mysql_real_connect(lmysql, opt_host, opt_user, opt_password, current_db, opt_port, opt_unix_socket, 0))) { @@ -13022,19 +13022,17 @@ static void test_bug8378() if (!opt_silent) fprintf(stdout, " OK"); - len= mysql_real_escape_string(mysql, out, TEST_BUG8378_IN, 4); + len= mysql_real_escape_string(lmysql, out, TEST_BUG8378_IN, 4); /* No escaping should have actually happened. */ DIE_UNLESS(memcmp(out, TEST_BUG8378_OUT, len) == 0); sprintf(buf, "SELECT '%s'", out); - rc=mysql_real_query(mysql, buf, strlen(buf)); + rc=mysql_real_query(lmysql, buf, strlen(buf)); myquery(rc); - mysql_close(mysql); - - mysql=old_mysql; + mysql_close(lmysql); #endif } @@ -14869,7 +14867,7 @@ static void test_opt_reconnect() if (mysql_options(lmysql, MYSQL_OPT_RECONNECT, &my_true)) { myerror("mysql_options failed: unknown option MYSQL_OPT_RECONNECT\n"); - exit(1); + DIE_UNLESS(0); } /* reconnect should be 1 */ @@ -14882,7 +14880,7 @@ static void test_opt_reconnect() opt_unix_socket, 0))) { myerror("connection failed"); - exit(1); + DIE_UNLESS(0); } /* reconnect should still be 1 */ @@ -14896,7 +14894,7 @@ static void test_opt_reconnect() if (!(lmysql= mysql_init(NULL))) { myerror("mysql_init() failed"); - exit(1); + DIE_UNLESS(0); } if (!opt_silent) @@ -14908,7 +14906,7 @@ static void test_opt_reconnect() opt_unix_socket, 0))) { myerror("connection failed"); - exit(1); + DIE_UNLESS(0); } /* reconnect should still be 0 */ @@ -14926,32 +14924,32 @@ static void test_opt_reconnect() static void test_bug12744() { MYSQL_STMT *prep_stmt = NULL; + MYSQL *lmysql; int rc; myheader("test_bug12744"); - prep_stmt= mysql_stmt_init(mysql); + lmysql= mysql_init(NULL); + DIE_UNLESS(lmysql); + + if (!mysql_real_connect(lmysql, opt_host, opt_user, opt_password, + current_db, opt_port, opt_unix_socket, 0)) + { + fprintf(stderr, "Failed to connect to the database\n"); + DIE_UNLESS(0); + } + + prep_stmt= mysql_stmt_init(lmysql); rc= mysql_stmt_prepare(prep_stmt, "SELECT 1", 8); - DIE_UNLESS(rc==0); + DIE_UNLESS(rc == 0); - mysql_close(mysql); + mysql_close(lmysql); - if ((rc= mysql_stmt_execute(prep_stmt))) - { - if ((rc= mysql_stmt_reset(prep_stmt))) - printf("OK!\n"); - else - { - printf("Error!"); - DIE_UNLESS(1==0); - } - } - else - { - fprintf(stderr, "expected error but no error occured\n"); - DIE_UNLESS(1==0); - } + rc= mysql_stmt_execute(prep_stmt); + DIE_UNLESS(rc); + rc= mysql_stmt_reset(prep_stmt); + DIE_UNLESS(rc); rc= mysql_stmt_close(prep_stmt); - client_connect(0); + DIE_UNLESS(rc == 0); } #endif /* EMBEDDED_LIBRARY */ @@ -15759,6 +15757,7 @@ static void test_bug24179() mysql_stmt_error(stmt)); } DIE_UNLESS(mysql_stmt_errno(stmt) == 1323); + mysql_stmt_close(stmt); DBUG_VOID_RETURN; } @@ -15801,6 +15800,7 @@ static void test_bug27876() myquery(rc); result= mysql_store_result(mysql); mytest(result); + mysql_free_result(result); sprintf(query, "DROP FUNCTION IF EXISTS %s", utf8_func); rc= mysql_query(mysql, query); @@ -15817,6 +15817,7 @@ static void test_bug27876() myquery(rc); result= mysql_store_result(mysql); mytest(result); + mysql_free_result(result); sprintf(query, "DROP FUNCTION %s", utf8_func); rc= mysql_query(mysql, query); @@ -15965,6 +15966,7 @@ static void test_bug29948() exit(1); } + bzero(&bind, sizeof(bind)); bind.buffer_type= MYSQL_TYPE_LONG; bind.buffer= (char *)&buf; bind.is_null= &is_null; @@ -16162,6 +16164,7 @@ static void test_bug32265() int rc; MYSQL_STMT *stmt; MYSQL_FIELD *field; + MYSQL_RES *metadata; DBUG_ENTER("test_bug32265"); myheader("test_bug32265"); @@ -16179,50 +16182,61 @@ static void test_bug32265() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); + DIE_UNLESS(field); DIE_UNLESS(strcmp(field->table, "t1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT a '' FROM t1 ``"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT a '' FROM t1 ``"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT * FROM v1"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "v1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); stmt= open_cursor("SELECT * FROM v1 /* SIC */ GROUP BY 1"); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); - field= stmt->mysql->fields; + metadata= mysql_stmt_result_metadata(stmt); + field= mysql_fetch_field(metadata); DIE_UNLESS(strcmp(field->table, "v1") == 0); DIE_UNLESS(strcmp(field->org_table, "t1") == 0); DIE_UNLESS(strcmp(field->db, "client_test_db") == 0); + mysql_free_result(metadata); mysql_stmt_close(stmt); rc= mysql_query(mysql, "DROP VIEW v1"); From 226e6821396b35996594be3417e4c6e73c9a9c49 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 16:19:23 +0300 Subject: [PATCH 313/527] We never check the return value of mysql_frm_type for an error. Do not try to push an error into the error stack as it will be ignored anyway. --- sql/sql_view.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 1cf1a22bb90..a654721de37 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -1678,7 +1678,7 @@ frm_type_enum mysql_frm_type(THD *thd, char *path, enum legacy_db_type *dbt) if ((file= my_open(path, O_RDONLY | O_SHARE, MYF(0))) < 0) DBUG_RETURN(FRMTYPE_ERROR); - error= my_read(file, (uchar*) header, sizeof(header), MYF(MY_WME | MY_NABP)); + error= my_read(file, (uchar*) header, sizeof(header), MYF(MY_NABP)); my_close(file, MYF(MY_WME)); if (error) From 6b9db6d213fb8f564a5a9cd15e4fe694acdc6300 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 17:25:21 +0300 Subject: [PATCH 314/527] Valgrind errors in mysql_client_test. tests/mysql_client_test.c: Fix a memory leak. Run the test for Bug#28386 only if logging to tables is enabled. --- tests/mysql_client_test.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 7466f20fbdc..26c243d89a4 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -8985,6 +8985,7 @@ static void test_sqlmode() fprintf(stdout, "\n query: %s", query); stmt= mysql_simple_prepare(mysql, query); check_stmt(stmt); + mysql_stmt_close(stmt); /* ANSI */ strmov(query, "SET SQL_MODE= \"ANSI\""); @@ -17334,12 +17335,36 @@ static void test_bug28386() int rc; MYSQL_STMT *stmt; MYSQL_RES *result; + MYSQL_ROW row; MYSQL_BIND bind; const char hello[]= "hello world!"; DBUG_ENTER("test_bug28386"); myheader("test_bug28386"); + rc= mysql_query(mysql, "select @@global.log_output"); + myquery(rc); + + result= mysql_store_result(mysql); + DIE_UNLESS(result); + + row= mysql_fetch_row(result); + if (! strstr(row[0], "TABLE")) + { + mysql_free_result(result); + if (! opt_silent) + printf("Skipping the test since logging to tables is not enabled\n"); + /* Log output is not to tables */ + return; + } + mysql_free_result(result); + + rc= mysql_query(mysql, "set @save_global_general_log=@@global.general_log"); + myquery(rc); + + rc= mysql_query(mysql, "set @@global.general_log=on"); + myquery(rc); + rc= mysql_query(mysql, "truncate mysql.general_log"); myquery(rc); @@ -17380,6 +17405,9 @@ static void test_bug28386() mysql_free_result(result); + rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log"); + myquery(rc); + DBUG_VOID_RETURN; } From bf9bb656a65c18eb15ee475e5f58412c859ef76a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 12:03:59 -0300 Subject: [PATCH 315/527] Bug#34424 query_cache_debug.test leads to valgrind warnings Bug#34678 @@debug variable's incremental mode The problem is that the per-thread debugging settings stack wasn't being deallocated before the thread termination, leaking the stack memory. The chosen solution is to push a new state if the current is set to the initial settings and pop it (free) once the thread finishes. dbug/dbug.c: Move dbug parser out of _db_set_ to a separate function and make _db_set_ push a new stack if the corrent one is set to the initial settings. dbug/user.r: Update DBUG_SET description. mysql-test/t/disabled.def: Re-enable test case which triggered the leak. mysys/my_thr_init.c: Pop a pushed state, nop if stack is empty. sql/set_var.cc: Handle incremental debug settings. mysql-test/r/variables_debug.result: Add new test case result for Bug#34678 mysql-test/t/variables_debug.test: Add new test case for Bug#34678 --- dbug/dbug.c | 45 ++++++++++++++++++++++------- dbug/user.r | 5 ++-- mysql-test/r/variables_debug.result | 12 ++++++++ mysql-test/t/disabled.def | 1 - mysql-test/t/variables_debug.test | 12 ++++++++ mysys/my_thr_init.c | 1 + sql/set_var.cc | 6 ++-- 7 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 mysql-test/r/variables_debug.result create mode 100644 mysql-test/t/variables_debug.test diff --git a/dbug/dbug.c b/dbug/dbug.c index 7f4292d18b1..666ab2b3e3c 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -412,15 +412,11 @@ void _db_process_(const char *name) cs->process= name; } + /* * FUNCTION * - * _db_set_ set current debugger settings - * - * SYNOPSIS - * - * VOID _db_set_(control) - * char *control; + * DbugParse parse control string and set current debugger setting * * DESCRIPTION * @@ -444,7 +440,7 @@ void _db_process_(const char *name) * */ -void _db_set_(CODE_STATE *cs, const char *control) +static void DbugParse(CODE_STATE *cs, const char *control) { const char *end; int rel=0; @@ -671,6 +667,35 @@ void _db_set_(CODE_STATE *cs, const char *control) } +/* + * FUNCTION + * + * _db_set_ set current debugger settings + * + * SYNOPSIS + * + * VOID _db_set_(control) + * char *control; + * + * DESCRIPTION + * + * Given pointer to a debug control string in "control", + * parses the control string, and sets up a current debug + * settings. Pushes a new debug settings if the current is + * set to the initial debugger settings. + */ + +void _db_set_(CODE_STATE *cs, const char *control) +{ + get_code_state_or_return; + + if (cs->stack == &init_settings) + PushState(cs); + + DbugParse(cs, control); +} + + /* * FUNCTION * @@ -685,7 +710,7 @@ void _db_set_(CODE_STATE *cs, const char *control) * * Given pointer to a debug control string in "control", pushes * the current debug settings, parses the control string, and sets - * up a new debug settings with _db_set_() + * up a new debug settings with DbugParse() * */ @@ -694,7 +719,7 @@ void _db_push_(const char *control) CODE_STATE *cs=0; get_code_state_or_return; PushState(cs); - _db_set_(cs, control); + DbugParse(cs, control); } /* @@ -717,7 +742,7 @@ void _db_set_init_(const char *control) CODE_STATE tmp_cs; bzero((uchar*) &tmp_cs, sizeof(tmp_cs)); tmp_cs.stack= &init_settings; - _db_set_(&tmp_cs, control); + DbugParse(&tmp_cs, control); } /* diff --git a/dbug/user.r b/dbug/user.r index e41367de321..19de840d0ad 100644 --- a/dbug/user.r +++ b/dbug/user.r @@ -730,8 +730,9 @@ warning will be given. The DBUG_POP macro has no arguments. EX:\ \fCDBUG_POP\ ();\fR .SP 1 .LI DBUG_SET\ -Modifies the current debugger state on top of the stack using the -debug control string passed as the macro argument. Unless +Modifies the current debugger state on top of the stack or pushes +a new state if the current is set to the initial settings, using +the debug control string passed as the macro argument. Unless .I incremental control string is used (see below), it's equivalent to a combination of DBUG_POP and DBUG_PUSH. diff --git a/mysql-test/r/variables_debug.result b/mysql-test/r/variables_debug.result new file mode 100644 index 00000000000..9cd133dddb1 --- /dev/null +++ b/mysql-test/r/variables_debug.result @@ -0,0 +1,12 @@ +set debug= 'T'; +select @@debug; +@@debug +T +set debug= '+P'; +select @@debug; +@@debug +P:T +set debug= '-P'; +select @@debug; +@@debug +T diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 670a9c6a755..9309d668a15 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -22,4 +22,3 @@ wait_timeout : Bug#32801 wait_timeout.test fails randomly ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 -query_cache_debug : Bug#34424: query_cache_debug.test leads to valgrind warnings diff --git a/mysql-test/t/variables_debug.test b/mysql-test/t/variables_debug.test new file mode 100644 index 00000000000..7dcaf246803 --- /dev/null +++ b/mysql-test/t/variables_debug.test @@ -0,0 +1,12 @@ +--source include/have_debug.inc + +# +# Bug#34678 @@debug variable's incremental mode +# + +set debug= 'T'; +select @@debug; +set debug= '+P'; +select @@debug; +set debug= '-P'; +select @@debug; diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index 1ba6e5ac92d..933674fa007 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -332,6 +332,7 @@ void my_thread_end(void) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { + DBUG_POP(); free(tmp->dbug); tmp->dbug=0; } diff --git a/sql/set_var.cc b/sql/set_var.cc index 4c77cbfff82..64c79ed3bb3 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3926,10 +3926,8 @@ bool sys_var_thd_dbug::update(THD *thd, set_var *var) if (var->type == OPT_GLOBAL) DBUG_SET_INITIAL(var ? var->value->str_value.c_ptr() : ""); else - { - DBUG_POP(); - DBUG_PUSH(var ? var->value->str_value.c_ptr() : ""); - } + DBUG_SET(var ? var->value->str_value.c_ptr() : ""); + return 0; } From 2aa0927d9c3c91e917bf4bd4d9b3b00e5025f7f8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:07:11 +0300 Subject: [PATCH 316/527] Fix the remaining memory leaks (mysql_client_test). tests/mysql_client_test.c: Fix the remaining memory leaks. --- tests/mysql_client_test.c | 44 +++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 26c243d89a4..24bccee708a 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -2423,7 +2423,7 @@ static uint query_cache_hits(MYSQL *conn) */ static void test_ps_query_cache() { - MYSQL *lmysql; + MYSQL *lmysql= mysql; MYSQL_STMT *stmt; int rc; MYSQL_BIND p_bind[2],r_bind[2]; /* p: param bind; r: result bind */ @@ -2458,7 +2458,6 @@ static void test_ps_query_cache() TEST_QCACHE_ON_OFF }; enum enum_test_ps_query_cache iteration; - LINT_INIT(lmysql); myheader("test_ps_query_cache"); @@ -2478,15 +2477,14 @@ static void test_ps_query_cache() for (iteration= TEST_QCACHE_ON; iteration <= TEST_QCACHE_ON_OFF; iteration++) { - switch (iteration) - { + switch (iteration) { case TEST_QCACHE_ON: case TEST_QCACHE_ON_OFF: - rc= mysql_query(mysql, "set global query_cache_size=1000000"); + rc= mysql_query(lmysql, "set global query_cache_size=1000000"); myquery(rc); break; case TEST_QCACHE_OFF_ON: - rc= mysql_query(mysql, "set global query_cache_size=0"); + rc= mysql_query(lmysql, "set global query_cache_size=0"); myquery(rc); break; case TEST_QCACHE_ON_WITH_OTHER_CONN: @@ -2494,37 +2492,35 @@ static void test_ps_query_cache() fprintf(stdout, "\n Establishing a test connection ..."); if (!(lmysql= mysql_init(NULL))) { - myerror("mysql_init() failed"); - exit(1); + printf("mysql_init() failed"); + DIE_UNLESS(0); } if (!(mysql_real_connect(lmysql, opt_host, opt_user, opt_password, current_db, opt_port, opt_unix_socket, 0))) { - myerror("connection failed"); + printf("connection failed"); mysql_close(lmysql); - exit(1); + DIE_UNLESS(0); } if (!opt_silent) fprintf(stdout, "OK"); - mysql= lmysql; } strmov(query, "select id1, value1 from t1 where id1= ? or " "CONVERT(value1 USING utf8)= ?"); - stmt= mysql_simple_prepare(mysql, query); + stmt= mysql_simple_prepare(lmysql, query); check_stmt(stmt); verify_param_count(stmt, 2); - switch(iteration) - { + switch (iteration) { case TEST_QCACHE_OFF_ON: - rc= mysql_query(mysql, "set global query_cache_size=1000000"); + rc= mysql_query(lmysql, "set global query_cache_size=1000000"); myquery(rc); break; case TEST_QCACHE_ON_OFF: - rc= mysql_query(mysql, "set global query_cache_size=0"); + rc= mysql_query(lmysql, "set global query_cache_size=0"); myquery(rc); default: break; @@ -2562,11 +2558,11 @@ static void test_ps_query_cache() test_ps_query_cache_result(1, "hh", 2, 2, "hh", 2, 1, "ii", 2); /* now retry with the same parameter values and see qcache hits */ - hits1= query_cache_hits(mysql); + hits1= query_cache_hits(lmysql); rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); test_ps_query_cache_result(1, "hh", 2, 2, "hh", 2, 1, "ii", 2); - hits2= query_cache_hits(mysql); + hits2= query_cache_hits(lmysql); switch(iteration) { case TEST_QCACHE_ON_WITH_OTHER_CONN: case TEST_QCACHE_ON: /* should have hit */ @@ -2584,7 +2580,7 @@ static void test_ps_query_cache() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); test_ps_query_cache_result(1, "hh", 2, 1, "ii", 2, 2, "ii", 2); - hits1= query_cache_hits(mysql); + hits1= query_cache_hits(lmysql); switch(iteration) { case TEST_QCACHE_ON: @@ -2601,7 +2597,7 @@ static void test_ps_query_cache() check_execute(stmt, rc); test_ps_query_cache_result(1, "hh", 2, 1, "ii", 2, 2, "ii", 2); - hits2= query_cache_hits(mysql); + hits2= query_cache_hits(lmysql); mysql_stmt_close(stmt); @@ -2620,9 +2616,11 @@ static void test_ps_query_cache() } /* for(iteration=...) */ + if (lmysql != mysql) + mysql_close(lmysql); + rc= mysql_query(mysql, "set global query_cache_size=0"); myquery(rc); - } @@ -16262,6 +16260,7 @@ static void test_bug27876() myquery(rc); result= mysql_store_result(mysql); mytest(result); + mysql_free_result(result); sprintf(query, "DROP FUNCTION IF EXISTS %s", (char*) utf8_func); rc= mysql_query(mysql, query); @@ -16278,6 +16277,7 @@ static void test_bug27876() myquery(rc); result= mysql_store_result(mysql); mytest(result); + mysql_free_result(result); sprintf(query, "DROP FUNCTION %s", (char*) utf8_func); rc= mysql_query(mysql, query); @@ -16915,7 +16915,7 @@ static void test_bug30472() /* Change connection-default character set in the client. */ - con.options.charset_name= my_strdup("utf8", MYF(MY_FAE)); + mysql_options(&con, MYSQL_SET_CHARSET_NAME, "utf8"); /* Call mysql_change_user() in order to check that new connection will From e265b62b52c4fc4c1fbc0724bf4538ddaaf59a35 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:44:04 +0200 Subject: [PATCH 317/527] Reverted wrong patch, fix for Windows 32bit build. mysys/my_getsystime.c: Added extra parenthesis to apply cast to the whole result. sql/mysqld.cc: Reversed a wrong patch. This should however be made better in the future in my_getopt.h, having own define for GET_HA_ROWS. --- mysys/my_getsystime.c | 2 +- sql/mysqld.cc | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mysys/my_getsystime.c b/mysys/my_getsystime.c index 4a9cac09120..b692b18bfc7 100644 --- a/mysys/my_getsystime.c +++ b/mysys/my_getsystime.c @@ -157,7 +157,7 @@ ulonglong my_micro_time_and_time(time_t *time_arg) #if defined(__WIN__) ulonglong newtime; GetSystemTimeAsFileTime((FILETIME*)&newtime); - *time_arg= (time_t) (newtime - OFFSET_TO_EPOCH) / 10000000; + *time_arg= (time_t) ((newtime - OFFSET_TO_EPOCH) / 10000000); return (newtime/10); #elif defined(HAVE_GETHRTIME) /* diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 455698d4ff4..9ca2ab5db0e 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -308,7 +308,11 @@ TYPELIB thread_handling_typelib= const char *first_keyword= "first", *binary_keyword= "BINARY"; const char *my_localhost= "localhost", *delayed_user= "DELAYED"; -#define GET_HA_ROWS (~ (ha_rows) 0) +#if SIZEOF_OFF_T > 4 && defined(BIG_TABLES) +#define GET_HA_ROWS GET_ULL +#else +#define GET_HA_ROWS GET_ULONG +#endif bool opt_large_files= sizeof(my_off_t) > 4; From b93e09a27edaa30f1852df1d11d1a9b49fcf460a Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:18:03 +0100 Subject: [PATCH 318/527] configure.in: Corrected calculation of version id, incorrect last two digits if < 10 Keep "sp1" or "a" in MYSQL_NO_DASH_VERSION, to set correct version in RPM spec file Added MYSQL_NUMERIC_VERSION that is like MYSQL_NO_DASH_VERSION before Added clear doc how the different version variables differ SocketServer.cpp: Corrected typo in debug error message ndb/src/common/util/SocketServer.cpp: Corrected typo in debug error message configure.in: Corrected calculation of version id, incorrect last two digits if < 10 Keep "sp1" or "a" in MYSQL_NO_DASH_VERSION, to set correct version in RPM spec file Added MYSQL_NUMERIC_VERSION that is like MYSQL_NO_DASH_VERSION before Added clear doc how the different version variables differ --- configure.in | 16 +++++++++++++--- ndb/src/common/util/SocketServer.cpp | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/configure.in b/configure.in index 1643426f827..a0fe8ac5f8b 100644 --- a/configure.in +++ b/configure.in @@ -26,9 +26,19 @@ NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? # Remember that regexps needs to quote [ and ] since this is run through m4 -MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"` -MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"` -MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'` +# We take some made up examples +# +# VERSION 5.1.40sp1-alpha 5.0.34a +# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a +# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 +# MYSQL_BASE_VERSION 5.1 5.0 +# MYSQL_VERSION_ID 50140 50034 +# +MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"` +MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"` +MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"` +MYSQL_VERSION_ID=`echo $MYSQL_NUMERIC_VERSION | \ + awk -F. '{printf "%d%0.2d%0.2d", $1, $2, $3}'` # The port should be constant for a LONG time MYSQL_TCP_PORT_DEFAULT=3306 diff --git a/ndb/src/common/util/SocketServer.cpp b/ndb/src/common/util/SocketServer.cpp index 755764c7700..3486567e33d 100644 --- a/ndb/src/common/util/SocketServer.cpp +++ b/ndb/src/common/util/SocketServer.cpp @@ -111,7 +111,7 @@ SocketServer::setup(SocketServer::Service * service, const int on = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)) == -1) { - DBUG_PRINT("error",("getsockopt() - %d - %s", + DBUG_PRINT("error",("setsockopt() - %d - %s", errno, strerror(errno))); NDB_CLOSE_SOCKET(sock); DBUG_RETURN(false); From 1aaa63aabaef8015c71fc6143b3062e197049707 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:36:06 +0100 Subject: [PATCH 319/527] Makefile.am, Info.plist.sh: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot misc.m4, character_sets.m4, openssl.m4: Removed unneded semicolon config/ac-macros/character_sets.m4: Removed unneded semicolon config/ac-macros/misc.m4: Removed unneded semicolon config/ac-macros/openssl.m4: Removed unneded semicolon support-files/MacOSX/Info.plist.sh: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot support-files/MacOSX/Makefile.am: Use MYSQL_NUMERIC_VERSION, only three numbers separated with dot --- config/ac-macros/character_sets.m4 | 6 +++--- config/ac-macros/misc.m4 | 2 +- config/ac-macros/openssl.m4 | 4 ++-- support-files/MacOSX/Info.plist.sh | 2 +- support-files/MacOSX/Makefile.am | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/ac-macros/character_sets.m4 b/config/ac-macros/character_sets.m4 index 8c3e8ca73b7..ea2763a1cd4 100644 --- a/config/ac-macros/character_sets.m4 +++ b/config/ac-macros/character_sets.m4 @@ -199,7 +199,7 @@ do ;; *) AC_MSG_ERROR([Charset '$cs' not available. (Available are: $CHARSETS_AVAILABLE). - See the Installation chapter in the Reference Manual.]); + See the Installation chapter in the Reference Manual.]) esac done @@ -380,7 +380,7 @@ case $default_charset in ;; *) AC_MSG_ERROR([Charset $cs not available. (Available are: $CHARSETS_AVAILABLE). - See the Installation chapter in the Reference Manual.]); + See the Installation chapter in the Reference Manual.]) esac if test "$default_collation" = default; then @@ -405,7 +405,7 @@ else Collation $default_collation is not valid for character set $default_charset. Valid collations are: $default_charset_collations. See the Installation chapter in the Reference Manual. - ]); + ]) fi AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"], diff --git a/config/ac-macros/misc.m4 b/config/ac-macros/misc.m4 index 9c7b9aeb171..8c3b51ebc5e 100644 --- a/config/ac-macros/misc.m4 +++ b/config/ac-macros/misc.m4 @@ -756,7 +756,7 @@ case $SYSTEM_TYPE in esac if test "$CXX_VERSION" then - AC_MSG_CHECKING("C++ compiler version"); + AC_MSG_CHECKING("C++ compiler version") AC_MSG_RESULT("$CXX $CXX_VERSION") fi AC_SUBST(CXX_VERSION) diff --git a/config/ac-macros/openssl.m4 b/config/ac-macros/openssl.m4 index 3130cdc3437..9de69b8a1b4 100644 --- a/config/ac-macros/openssl.m4 +++ b/config/ac-macros/openssl.m4 @@ -126,11 +126,11 @@ AC_MSG_CHECKING(for OpenSSL) AC_MSG_RESULT(no) if test ! -z "$openssl_includes" then - AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-includes without --with-openssl) fi if test ! -z "$openssl_libs" then - AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl); + AC_MSG_ERROR(Can't have --with-openssl-libs without --with-openssl) fi fi AC_SUBST(openssl_libs) diff --git a/support-files/MacOSX/Info.plist.sh b/support-files/MacOSX/Info.plist.sh index fdfb0c7a17c..7df9c5ac710 100644 --- a/support-files/MacOSX/Info.plist.sh +++ b/support-files/MacOSX/Info.plist.sh @@ -9,7 +9,7 @@ CFBundleName MySQL CFBundleShortVersionString - @MYSQL_NO_DASH_VERSION@ + @MYSQL_NUMERIC_VERSION@ IFPkgFlagAllowBackRev IFPkgFlagAuthorizationAction diff --git a/support-files/MacOSX/Makefile.am b/support-files/MacOSX/Makefile.am index 85ccb9c126d..3f11107d714 100644 --- a/support-files/MacOSX/Makefile.am +++ b/support-files/MacOSX/Makefile.am @@ -47,7 +47,7 @@ SUFFIXES = .sh @SED@ \ -e 's!@''prefix''@!$(prefix)!g' \ -e 's!@''VERSION''@!@VERSION@!' \ - -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ + -e 's!@''MYSQL_NUMERIC_VERSION''@!@MYSQL_NUMERIC_VERSION@!' \ -e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \ -e 's!@''MYSQLD_USER''@!@MYSQLD_USER@!' \ $< > $@-t From e45057eace95383456f5067d8097b03245d10809 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 26 Feb 2008 18:43:48 +0100 Subject: [PATCH 320/527] ha_ndbcluster.m4: Use MYSQL_NUMERIC_VERSION, to make sure NDB_VERSION_BUILD is numeric config/ac-macros/ha_ndbcluster.m4: Use MYSQL_NUMERIC_VERSION, to make sure NDB_VERSION_BUILD is numeric --- config/ac-macros/ha_ndbcluster.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4 index 9ea2e9972f7..9df96a7750b 100644 --- a/config/ac-macros/ha_ndbcluster.m4 +++ b/config/ac-macros/ha_ndbcluster.m4 @@ -2,9 +2,9 @@ dnl --------------------------------------------------------------------------- dnl Macro: MYSQL_CHECK_NDBCLUSTER dnl --------------------------------------------------------------------------- -NDB_VERSION_MAJOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f1` -NDB_VERSION_MINOR=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f2` -NDB_VERSION_BUILD=`echo $MYSQL_NO_DASH_VERSION | cut -d. -f3` +NDB_VERSION_MAJOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f1` +NDB_VERSION_MINOR=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f2` +NDB_VERSION_BUILD=`echo $MYSQL_NUMERIC_VERSION | cut -d. -f3` NDB_VERSION_STATUS=`echo $VERSION | sed 's/^[[-.0-9]]*//'` TEST_NDBCLUSTER="" From a4b0a2cf67356c0f8f80b5291b3c1f4f8327cb97 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 12:42:43 +0400 Subject: [PATCH 321/527] Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. There was no way to return an error from the client library if no MYSQL connections was established. So here i added variables to store that king of errors and made functions like mysql_error(NULL) to return these. client/mysql.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. Show the error message on std_error include/sql_common.h: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. cant_connect_sqlstate constant declared libmysql/libmysql.c: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. mysql_sqlstate(NULL) returns 'unknown_sqlstate' libmysqld/lib_sql.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. EMBEDDED_SERVER version of the vprint_msg_to_log() implemented sql-common/client.c: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. mysql_server_last_errno and mysql_server_last_error introduced to store errors not related to particular connections. mysql_error(NULL) and mysql_errno(NULL) now returns these mysql_server_last_error and errno respectively sql/log.cc: Bug #25097 mysql_server_init fails silently if no errmsg.sys is present. EMBEDDED_LIBRARY implementation of the vprint_msg_to_log() moved to lib_sql.cc --- client/mysql.cc | 1 + include/sql_common.h | 1 + libmysql/libmysql.c | 2 +- libmysqld/lib_sql.cc | 10 ++++++++++ sql-common/client.c | 27 +++++++++++++++++++++------ sql/log.cc | 7 +------ 6 files changed, 35 insertions(+), 13 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 76ed82508be..af28dce2cdd 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -420,6 +420,7 @@ int main(int argc,char *argv[]) } if (mysql_server_init(emb_argc, emb_argv, (char**) server_default_groups)) { + put_error(NULL); free_defaults(defaults_argv); my_end(0); exit(1); diff --git a/include/sql_common.h b/include/sql_common.h index a549fe6aeb5..32487f7e569 100644 --- a/include/sql_common.h +++ b/include/sql_common.h @@ -15,6 +15,7 @@ extern const char *unknown_sqlstate; +extern const char *cant_connect_sqlstate; extern const char *not_error_sqlstate; #ifdef __cplusplus diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 4afc3ec5925..0320126a522 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -1486,7 +1486,7 @@ my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql) const char *STDCALL mysql_sqlstate(MYSQL *mysql) { - return mysql->net.sqlstate; + return mysql ? mysql->net.sqlstate : cant_connect_sqlstate; } uint STDCALL mysql_warning_count(MYSQL *mysql) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index ce692169a5f..b0a47727c7c 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -47,6 +47,8 @@ C_MODE_START #include #include "embedded_priv.h" +extern unsigned int mysql_server_last_errno; +extern char mysql_server_last_error[MYSQL_ERRMSG_SIZE]; static my_bool emb_read_query_result(MYSQL *mysql); @@ -1084,3 +1086,11 @@ bool Protocol::net_store_data(const char *from, uint length) return false; } + +void vprint_msg_to_log(enum loglevel level __attribute__((unused)), + const char *format, va_list argsi) +{ + vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error), + format, argsi); + mysql_server_last_errno= CR_UNKNOWN_ERROR; +} diff --git a/sql-common/client.c b/sql-common/client.c index 1fc73549520..d4aceffe227 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -117,6 +117,7 @@ uint mysql_port=0; char *mysql_unix_port= 0; const char *unknown_sqlstate= "HY000"; const char *not_error_sqlstate= "00000"; +const char *cant_connect_sqlstate= "08001"; #ifdef HAVE_SMEM char *shared_memory_base_name= 0; const char *def_shared_memory_base_name= default_shared_memory_base_name; @@ -131,6 +132,9 @@ static int wait_for_data(my_socket fd, uint timeout); CHARSET_INFO *default_client_charset_info = &my_charset_latin1; +/* Server error code and message */ +unsigned int mysql_server_last_errno; +char mysql_server_last_error[MYSQL_ERRMSG_SIZE]; /**************************************************************************** A modified version of connect(). my_connect() allows you to specify @@ -752,10 +756,18 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate) DBUG_PRINT("enter", ("error :%d '%s'", errcode, ER(errcode))); DBUG_ASSERT(mysql != 0); - net= &mysql->net; - net->last_errno= errcode; - strmov(net->last_error, ER(errcode)); - strmov(net->sqlstate, sqlstate); + if (mysql) + { + net= &mysql->net; + net->last_errno= errcode; + strmov(net->last_error, ER(errcode)); + strmov(net->sqlstate, sqlstate); + } + else + { + mysql_server_last_errno= errcode; + strmov(mysql_server_last_error, ER(errcode)); + } DBUG_VOID_RETURN; } @@ -1477,7 +1489,10 @@ mysql_init(MYSQL *mysql) if (!mysql) { if (!(mysql=(MYSQL*) my_malloc(sizeof(*mysql),MYF(MY_WME | MY_ZEROFILL)))) + { + set_mysql_error(NULL, CR_OUT_OF_MEMORY, unknown_sqlstate); return 0; + } mysql->free_me=1; } else @@ -3064,13 +3079,13 @@ unsigned int STDCALL mysql_num_fields(MYSQL_RES *res) uint STDCALL mysql_errno(MYSQL *mysql) { - return mysql->net.last_errno; + return mysql ? mysql->net.last_errno : mysql_server_last_errno; } const char * STDCALL mysql_error(MYSQL *mysql) { - return mysql->net.last_error; + return mysql ? mysql->net.last_error : mysql_server_last_error; } diff --git a/sql/log.cc b/sql/log.cc index e66d965c613..d1da900e1b5 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2454,12 +2454,7 @@ static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, void */ -#ifdef EMBEDDED_LIBRARY -void vprint_msg_to_log(enum loglevel level __attribute__((unused)), - const char *format __attribute__((unused)), - va_list argsi __attribute__((unused))) -{} -#else /*!EMBEDDED_LIBRARY*/ +#ifndef EMBEDDED_LIBRARY static void print_buffer_to_file(enum loglevel level, const char *buffer) { time_t skr; From 4a8c442f040db67763697df8f109f79ec6240979 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 13:30:49 +0400 Subject: [PATCH 322/527] merging --- libmysqld/lib_sql.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index bef51a33d75..85845eb6a0e 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -1118,10 +1118,11 @@ bool Protocol::net_store_data(const uchar *from, size_t length) } -void vprint_msg_to_log(enum loglevel level __attribute__((unused)), +int vprint_msg_to_log(enum loglevel level __attribute__((unused)), const char *format, va_list argsi) { vsnprintf(mysql_server_last_error, sizeof(mysql_server_last_error), format, argsi); mysql_server_last_errno= CR_UNKNOWN_ERROR; + return 0; } From 51a99d70e92ca9fd1e8e9889a531ab86846d4062 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 15:18:27 +0100 Subject: [PATCH 323/527] Fix pushbuild errors. mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test: The test unnecessarily refused to run in non-debug mode. It can safely run in non-debug mode and produces the same result, so I removed the restriction. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Updated result file. It is a little unclear what the best thing to put in the binlog is, but the present results for this particular test are enough to replicate. Mats will figure out more as he fixes BUG#29020. After BUG#34768 has been fixed, these statements should be marked unsafe and not allowed in statement mode. mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Updated result file. It is a little unclear what the best thing to put in the binlog is, but the present results for this particular test are enough to replicate. Mats will figure out more as he fixes BUG#29020. After BUG#34768 has been fixed, these statements should be marked unsafe and not allowed in statement mode. --- mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test | 2 +- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result | 4 +--- mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result | 4 ---- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test index 6ac8a89591a..6879089a1b7 100644 --- a/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test +++ b/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test @@ -7,7 +7,7 @@ -- source include/have_log_bin.inc -- source include/have_innodb.inc --- source include/have_debug.inc + --disable_warnings drop table if exists t1, t2; diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index 63bab2c1169..1c4d52f845a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -586,7 +586,7 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; ROLLBACK +master-bin.000001 # Xid # # COMMIT /* XID */ /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) @@ -822,10 +822,8 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ -master-bin.000001 # Query # # use `test`; ROLLBACK select count(*) from t1 /* must be 4 */; count(*) 4 diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index 39927a8d866..f9a61af1956 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -549,10 +549,8 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ -master-bin.000001 # Query # # use `test`; ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) @@ -788,10 +786,8 @@ UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */; ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Intvar # # INSERT_ID=6 master-bin.000001 # Query # # use `test`; UPDATE t4,t3 SET t4.a=t3.a + bug27417(1) /* top level non-ta table */ -master-bin.000001 # Query # # use `test`; ROLLBACK select count(*) from t1 /* must be 4 */; count(*) 4 From c8885dfb7328525d4068d6354931e1f68374c605 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 18:12:08 +0300 Subject: [PATCH 324/527] Fixed test suite failures with --ps-protocol introduced in PB by the patch for bug #33834. --- mysql-test/t/func_time.test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test index 613a2fc7ca0..ef22adb4251 100644 --- a/mysql-test/t/func_time.test +++ b/mysql-test/t/func_time.test @@ -336,7 +336,7 @@ select date_add(date,INTERVAL "1" QUARTER) from t1; select timestampadd(MINUTE, 1, date) from t1; select timestampadd(WEEK, 1, date) from t1; select timestampadd(SQL_TSI_SECOND, 1, date) from t1; -# Prepared statements doesn't support FRAC_SECOND yet +# mysqltest.c discards an expected 'deprecated' warning on prepare stage --disable_ps_protocol select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1; --enable_ps_protocol @@ -351,7 +351,10 @@ select timestampdiff(SQL_TSI_HOUR, '2001-02-01', '2001-05-01') as a; select timestampdiff(SQL_TSI_DAY, '2001-02-01', '2001-05-01') as a; select timestampdiff(SQL_TSI_MINUTE, '2001-02-01 12:59:59', '2001-05-01 12:58:59') as a; select timestampdiff(SQL_TSI_SECOND, '2001-02-01 12:59:59', '2001-05-01 12:58:58') as a; +# mysqltest.c discards an expected 'deprecated' warning on prepare stage +--disable_ps_protocol select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a; +--enable_ps_protocol select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1, timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2, @@ -810,8 +813,11 @@ select LAST_DAY('2007-12-06 08:59:19.05') - INTERVAL 1 SECOND; # Show that he use of FRAC_SECOND, for anything other than # TIMESTAMPADD / TIMESTAMPDIFF, is a server error. +# mysqltest.c discards an expected 'deprecated' warning on prepare stage +--disable_ps_protocol SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18'); SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18'); +--enable_ps_protocol --error ER_PARSE_ERROR SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND); From 6dd9666d0f8bc40dbba44688c87a5dec1f08cef4 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 18:38:17 +0300 Subject: [PATCH 325/527] Update Bug#12713 test results to take into account fixed bugs (29157, 33846) --- mysql-test/include/commit.inc | 13 ++++--------- mysql-test/r/commit_1innodb.result | 13 ++++--------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 770871fbcca..9bd11bf33c1 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -421,15 +421,10 @@ call p_verify_status_increment(2, 2, 2, 2); --echo # 4. Read-write statement: UPDATE, update 0 rows, 1 row matches WHERE --echo # ---echo # Note the wrong Handler_prepare/Handler_commit count is due to ---echo # Bug#29157 "UPDATE, changed rows incorrect" and ---echo # Bug#Bug #33846 UPDATE word:Wrong 'Changed rows' if InnoDB, unique ---echo # key and no rows qualify WHERE ---echo # update t1 set a=2; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); commit; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); --echo # 5. Read-write statement: UPDATE, update 0 rows, 0 rows match WHERE --echo # @@ -483,9 +478,9 @@ call p_verify_status_increment(2, 2, 2, 2); --echo # 10. Read-write statement: REPLACE, change 0 rows. --echo # replace t1 set a=1; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); commit; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); --echo # 11. Read-write statement: IODKU, change 1 row. --echo # diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index 87f4fc32bc8..8598e231861 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -416,17 +416,12 @@ SUCCESS # 4. Read-write statement: UPDATE, update 0 rows, 1 row matches WHERE # -# Note the wrong Handler_prepare/Handler_commit count is due to -# Bug#29157 "UPDATE, changed rows incorrect" and -# Bug#Bug #33846 UPDATE word:Wrong 'Changed rows' if InnoDB, unique -# key and no rows qualify WHERE -# update t1 set a=2; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); SUCCESS commit; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); SUCCESS # 5. Read-write statement: UPDATE, update 0 rows, 0 rows match WHERE @@ -496,11 +491,11 @@ SUCCESS # 10. Read-write statement: REPLACE, change 0 rows. # replace t1 set a=1; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); SUCCESS commit; -call p_verify_status_increment(2, 2, 2, 2); +call p_verify_status_increment(2, 2, 1, 0); SUCCESS # 11. Read-write statement: IODKU, change 1 row. From e78d896c3feb16cec7bdecc6ea3733730a3826c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 13:05:46 -0300 Subject: [PATCH 326/527] Bug#34889 mysql_client_test::test_mysql_insert_id test fails sporadically Disable the test case. tests/mysql_client_test.c: Disable test case. --- tests/mysql_client_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 56c4cff3e5a..429f6688759 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16527,7 +16527,7 @@ static struct my_tests_st my_tests[]= { { "test_bug17667", test_bug17667 }, { "test_bug19671", test_bug19671 }, { "test_bug15752", test_bug15752 }, - { "test_mysql_insert_id", test_mysql_insert_id }, + /* { "test_mysql_insert_id", test_mysql_insert_id }, Bug#34889 */ { "test_bug21206", test_bug21206 }, { "test_bug21726", test_bug21726 }, { "test_bug15518", test_bug15518 }, From 83bcd5dfab83948353b2f30bfe497f0a92d31977 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 21:46:06 +0400 Subject: [PATCH 327/527] BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if log-slave-updates and circul repl After merge fixes. mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt: Rename: mysql-test/t/rpl_dual_pos_advance-slave.opt -> mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt mysql-test/include/wait_for_slave_sql_to_stop.inc: Do not change connection if it was requested by caller (needed for circular replication tests). mysql-test/suite/rpl/t/rpl_dual_pos_advance.test: Let include/wait_for_slave_sql_to_stop.inc know that we do not want to change connection to slave. sql/rpl_rli.cc: After merge fix. sql/rpl_rli.h: After merge fix. sql/slave.cc: After merge fix. --- mysql-test/include/wait_for_slave_sql_to_stop.inc | 5 ++++- .../{ => suite/rpl}/t/rpl_dual_pos_advance-slave.opt | 0 mysql-test/suite/rpl/t/rpl_dual_pos_advance.test | 9 +++++---- sql/rpl_rli.cc | 9 +++++++-- sql/rpl_rli.h | 2 +- sql/slave.cc | 4 ++-- 6 files changed, 19 insertions(+), 10 deletions(-) rename mysql-test/{ => suite/rpl}/t/rpl_dual_pos_advance-slave.opt (100%) 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 7f435142901..cb5c437a586 100644 --- a/mysql-test/include/wait_for_slave_sql_to_stop.inc +++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc @@ -9,7 +9,10 @@ # sql threads to stop # 3) If loops too long die. #################################################### -connection slave; +if (!$keep_connection) +{ + connection slave; +} let $row_number= 1; let $run= 1; let $counter= 300; diff --git a/mysql-test/t/rpl_dual_pos_advance-slave.opt b/mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt similarity index 100% rename from mysql-test/t/rpl_dual_pos_advance-slave.opt rename to mysql-test/suite/rpl/t/rpl_dual_pos_advance-slave.opt 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 26e477786e1..d51b175ca00 100644 --- a/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test +++ b/mysql-test/suite/rpl/t/rpl_dual_pos_advance.test @@ -12,6 +12,7 @@ source include/have_innodb.inc; # set up "dual head" +let $keep_connection= 1; connection slave; reset master; @@ -67,11 +68,11 @@ connection master; start slave until master_log_file="slave-bin.000001",master_log_pos=195; # wait until it's started (the position below is the start of "CREATE -# TABLE t2") (otherwise wait_for_slave_to_stop may return at once) +# TABLE t2") (otherwise wait_for_slave_sql_to_stop may return at once) select master_pos_wait("slave-bin.000001",137); ---source include/wait_for_slave_to_stop.inc +--source include/wait_for_slave_sql_to_stop.inc # then BUG#13861 causes t3 to show up below (because stopped too # late). @@ -80,12 +81,12 @@ show tables; # ensure that we do not break set @a=1; insert into t3 values(@a); start slave until master_log_file="slave-bin.000001",master_log_pos=438; ---source include/wait_for_slave_to_stop.inc +--source include/wait_for_slave_sql_to_stop.inc select * from t3; # ensure that we do not break transaction start slave until master_log_file="slave-bin.000001",master_log_pos=663; ---source include/wait_for_slave_to_stop.inc +--source include/wait_for_slave_sql_to_stop.inc select * from t3; start slave; diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 03f790b934f..96e6b194916 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -955,6 +955,11 @@ err: Check if condition stated in UNTIL clause of START SLAVE is reached. SYNOPSYS Relay_log_info::is_until_satisfied() + master_beg_pos position of the beginning of to be executed event + (not log_pos member of the event that points to the + beginning of the following event) + + DESCRIPTION Checks if UNTIL condition is reached. Uses caching result of last comparison of current log file name and target log file name. So cached @@ -979,7 +984,7 @@ err: false - condition not met */ -bool Relay_log_info::is_until_satisfied() +bool Relay_log_info::is_until_satisfied(my_off_t master_beg_pos) { const char *log_name; ulonglong log_pos; @@ -990,7 +995,7 @@ bool Relay_log_info::is_until_satisfied() if (until_condition == UNTIL_MASTER_POS) { log_name= group_master_log_name; - log_pos= group_master_log_pos; + log_pos= master_beg_pos; } else { /* until_condition == UNTIL_RELAY_POS */ diff --git a/sql/rpl_rli.h b/sql/rpl_rli.h index 36daffae1af..e13ea93842c 100644 --- a/sql/rpl_rli.h +++ b/sql/rpl_rli.h @@ -296,7 +296,7 @@ public: void close_temporary_tables(); /* Check if UNTIL condition is satisfied. See slave.cc for more. */ - bool is_until_satisfied(); + bool is_until_satisfied(my_off_t master_beg_pos); inline ulonglong until_pos() { return ((until_condition == UNTIL_MASTER_POS) ? group_master_log_pos : diff --git a/sql/slave.cc b/sql/slave.cc index 8bd28c903ae..b8d1fdfbb6b 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1990,7 +1990,7 @@ static int exec_relay_log_event(THD* thd, Relay_log_info* rli) This tests if the position of the beginning of the current event hits the UNTIL barrier. */ - if (rli->until_condition != RELAY_LOG_INFO::UNTIL_NONE && + if (rli->until_condition != Relay_log_info::UNTIL_NONE && rli->is_until_satisfied((rli->is_in_group() || !ev->log_pos) ? rli->group_master_log_pos : ev->log_pos - ev->data_written)) @@ -2648,7 +2648,7 @@ Slave SQL thread aborted. Can't execute init_slave query"); do not want to wait for next event in this case. */ pthread_mutex_lock(&rli->data_lock); - if (rli->until_condition != RELAY_LOG_INFO::UNTIL_NONE && + if (rli->until_condition != Relay_log_info::UNTIL_NONE && rli->is_until_satisfied(rli->group_master_log_pos)) { char buf[22]; From b43f8f695c152849f47b1a33e54ba0009144bc10 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 22:29:58 +0300 Subject: [PATCH 328/527] Eliminate compilation warning. --- tests/mysql_client_test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 429f6688759..260e7b1e7a7 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15215,6 +15215,10 @@ static void test_bug14169() Test that mysql_insert_id() behaves as documented in our manual */ +#if 0 + + Commented out because of Bug#34889. + static void test_mysql_insert_id() { my_ulonglong res; @@ -15390,6 +15394,7 @@ static void test_mysql_insert_id() rc= mysql_query(mysql, "drop table t1,t2"); myquery(rc); } +#endif /* From da413e421730946eff1fe2b6ea4fe1eb391f644e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 22:53:54 +0300 Subject: [PATCH 329/527] Fix information_schema.test to be case-insensitive. --- mysql-test/r/information_schema.result | 4 ++-- mysql-test/t/information_schema.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 7f4efa32dc2..18864148d29 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1552,10 +1552,10 @@ count(*) 0 CREATE VIEW v1 AS SELECT * -FROM INFORMATION_SCHEMA.TABLES; +FROM information_schema.tables; SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1'; VIEW_DEFINITION -select `TABLES`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`TABLES`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`TABLES`.`TABLE_NAME` AS `TABLE_NAME`,`TABLES`.`TABLE_TYPE` AS `TABLE_TYPE`,`TABLES`.`ENGINE` AS `ENGINE`,`TABLES`.`VERSION` AS `VERSION`,`TABLES`.`ROW_FORMAT` AS `ROW_FORMAT`,`TABLES`.`TABLE_ROWS` AS `TABLE_ROWS`,`TABLES`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`TABLES`.`DATA_LENGTH` AS `DATA_LENGTH`,`TABLES`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`TABLES`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`TABLES`.`DATA_FREE` AS `DATA_FREE`,`TABLES`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`TABLES`.`CREATE_TIME` AS `CREATE_TIME`,`TABLES`.`UPDATE_TIME` AS `UPDATE_TIME`,`TABLES`.`CHECK_TIME` AS `CHECK_TIME`,`TABLES`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`TABLES`.`CHECKSUM` AS `CHECKSUM`,`TABLES`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`TABLES`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `INFORMATION_SCHEMA`.`TABLES` +select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` DROP VIEW v1; SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 6e76a043645..2d8a2b738ee 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1194,7 +1194,7 @@ select count(*) from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='' AND TABLE_N # CREATE VIEW v1 AS SELECT * -FROM INFORMATION_SCHEMA.TABLES; +FROM information_schema.tables; SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1'; DROP VIEW v1; From e9068d0b73a6e5c6ac4d0039793f127e1c563144 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 18:08:29 -0300 Subject: [PATCH 330/527] Fix for team tree failure. Synchronously wait for the query state to reach the desired value. mysql-test/r/flush_read_lock_kill.result: Update test case result. mysql-test/t/flush_read_lock_kill.test: Wait for the debug synchronization point to be reached. --- mysql-test/r/flush_read_lock_kill.result | 1 + mysql-test/t/flush_read_lock_kill.test | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/flush_read_lock_kill.result b/mysql-test/r/flush_read_lock_kill.result index 6703b6bd533..f69656806da 100644 --- a/mysql-test/r/flush_read_lock_kill.result +++ b/mysql-test/r/flush_read_lock_kill.result @@ -1,3 +1,4 @@ +set @@global.concurrent_insert= 0; drop table if exists t1; create table t1 (kill_id int); insert into t1 values(connection_id()); diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test index 19a47b2893a..c3926d09205 100644 --- a/mysql-test/t/flush_read_lock_kill.test +++ b/mysql-test/t/flush_read_lock_kill.test @@ -12,6 +12,10 @@ -- source include/have_debug.inc +# Disable concurrent inserts to avoid test failures when reading the +# connection id which was inserted into a table by another thread. +set @@global.concurrent_insert= 0; + connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con1; @@ -34,7 +38,14 @@ send flush tables with read lock; connection con2; select ((@id := kill_id) - kill_id) from t1; ---sleep 2 # leave time for FLUSH to block +# Wait for the debug sync point, test won't run on non-debug +# builds anyway. +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Waiting for all running commits to finish" + and info = "flush tables with read lock"; +--source include/wait_condition.inc + kill connection @id; connection con1; From ed4578c02e446254a5cd1bf7851ff95677068c54 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Feb 2008 16:17:05 -0500 Subject: [PATCH 331/527] Bug #23839 Multiple declarations of macros - Remove duplicate macro defintions. CMakeLists.txt: Bug #23839 Multiple declarations of macros - Make sure _WIN64 is defined for proper Intellisense functionality. include/config-win.h: Bug #23839 Multiple declarations of macros - Remove extra definitions. Use the my_global.h defines instead. include/my_global.h: Bug #23839 Multiple declarations of macros - Slight change to maintain current definitions for Windows. --- CMakeLists.txt | 8 +++++++ include/config-win.h | 54 -------------------------------------------- include/my_global.h | 11 ++++----- 3 files changed, 13 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27b2bf9b70e..55489da784c 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,14 @@ ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR ADD_DEFINITIONS("-D_WINDOWS -D__WIN__ -D_CRT_SECURE_NO_DEPRECATE") +# This definition is necessary to work around a bug with Intellisense described +# here: http://tinyurl.com/2cb428. Syntax highlighting is important for proper +# debugger functionality. +IF(CMAKE_SIZEOF_VOID_P MATCHES 8) + MESSAGE(STATUS "Detected 64-bit platform.") + ADD_DEFINITIONS("-D_WIN64") +ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 8) + IF(EMBED_MANIFESTS) # Search for the tools (mt, makecat, signtool) necessary for embedding # manifests and signing executables with the MySQL AB authenticode cert. diff --git a/include/config-win.h b/include/config-win.h index 45bfeb5ba26..e5abe580b3f 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -254,60 +254,6 @@ inline double ulonglong2double(ulonglong value) #define STACK_DIRECTION -1 - -/* Optimized store functions for Intel x86 */ - -#ifndef _WIN64 -#define sint2korr(A) (*((int16 *) (A))) -#define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ - (((uint32) 255L << 24) | \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0])) : \ - (((uint32) (uchar) (A)[2]) << 16) |\ - (((uint32) (uchar) (A)[1]) << 8) | \ - ((uint32) (uchar) (A)[0]))) -#define sint4korr(A) (*((long *) (A))) -#define uint2korr(A) (*((uint16 *) (A))) -/* - ATTENTION ! - - Please, note, uint3korr reads 4 bytes (not 3) ! - It means, that you have to provide enough allocated space ! -*/ -#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) -#define uint4korr(A) (*((unsigned long *) (A))) -#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ - (((uint32) ((uchar) (A)[1])) << 8) +\ - (((uint32) ((uchar) (A)[2])) << 16) +\ - (((uint32) ((uchar) (A)[3])) << 24)) +\ - (((ulonglong) ((uchar) (A)[4])) << 32)) -#define uint8korr(A) (*((ulonglong *) (A))) -#define sint8korr(A) (*((longlong *) (A))) -#define int2store(T,A) *((uint16*) (T))= (uint16) (A) -#define int3store(T,A) { *(T)= (uchar) ((A));\ - *(T+1)=(uchar) (((uint) (A) >> 8));\ - *(T+2)=(uchar) (((A) >> 16)); } -#define int4store(T,A) *((long *) (T))= (long) (A) -#define int5store(T,A) { *(T)= (uchar)((A));\ - *((T)+1)=(uchar) (((A) >> 8));\ - *((T)+2)=(uchar) (((A) >> 16));\ - *((T)+3)=(uchar) (((A) >> 24)); \ - *((T)+4)=(uchar) (((A) >> 32)); } -#define int8store(T,A) *((ulonglong *) (T))= (ulonglong) (A) - -#define doubleget(V,M) do { *((long *) &V) = *((long*) M); \ - *(((long *) &V)+1) = *(((long*) M)+1); } while(0) -#define doublestore(T,V) do { *((long *) T) = *((long*) &V); \ - *(((long *) T)+1) = *(((long*) &V)+1); } while(0) -#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); } -#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float)) -#define floatget(V,M) memcpy((byte*)(&V), (byte*)(M), sizeof(float)) -#define float8get(V,M) doubleget((V),(M)) -#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float)) -#define float8store(V,M) doublestore((V),(M)) -#endif /* _WIN64 */ - #define HAVE_PERROR #define HAVE_VFPRINT #define HAVE_RENAME /* Have rename() as function */ diff --git a/include/my_global.h b/include/my_global.h index 08877300d8a..e05100fa288 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1053,7 +1053,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ */ /* Optimized store functions for Intel x86 */ -#if defined(__i386__) && !defined(_WIN64) +#if defined(__i386__) || (defined(_WIN32) && !defined(_WIN64)) #define sint2korr(A) (*((int16 *) (A))) #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ (((uint32) 255L << 24) | \ @@ -1065,7 +1065,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ ((uint32) (uchar) (A)[0]))) #define sint4korr(A) (*((long *) (A))) #define uint2korr(A) (*((uint16 *) (A))) -#ifdef HAVE_purify +#if defined(HAVE_purify) && !defined(_WIN32) #define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[2])) << 16)) @@ -1077,7 +1077,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) -#endif +#endif /* HAVE_purify && !_WIN32 */ #define uint4korr(A) (*((uint32 *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ @@ -1116,9 +1116,8 @@ do { doubleget_union _tmp; \ #define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float)) #define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float)) #define float8store(V,M) doublestore((V),(M)) -#endif /* __i386__ */ +#else -#ifndef sint2korr /* We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines were done before) @@ -1243,7 +1242,7 @@ do { doubleget_union _tmp; \ #define float8store(V,M) doublestore((V),(M)) #endif /* WORDS_BIGENDIAN */ -#endif /* sint2korr */ +#endif /* __i386__ OR _WIN32 AND !_WIN64 */ /* Macro for reading 32-bit integer from network byte order (big-endian) From 8a3fb5fb32dfbbab36df9519056381a9f84bb4c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 12:26:45 +0100 Subject: [PATCH 332/527] Update $mysql_get_server_version variable with version of the currently connected server --- client/mysqltest.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index 05c9ced3848..f1cdc653241 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1902,6 +1902,18 @@ void var_set_errno(int sql_errno) var_set_int("$mysql_errno", sql_errno); } + +/* + Update $mysql_get_server_version variable with version + of the currently connected server +*/ + +void var_set_mysql_get_server_version(MYSQL* mysql) +{ + var_set_int("$mysql_get_server_version", mysql_get_server_version(mysql)); +} + + /* Set variable from the result of a query @@ -4018,6 +4030,10 @@ int select_connection_name(const char *name) if (!(cur_con= find_connection_by_name(name))) die("connection '%s' not found in connection pool", name); + + /* Update $mysql_get_server_version to that of current connection */ + var_set_mysql_get_server_version(&cur_con->mysql); + DBUG_RETURN(0); } @@ -4409,6 +4425,9 @@ void do_connect(struct st_command *command) next_con++; /* if we used the next_con slot, advance the pointer */ } + /* Update $mysql_get_server_version to that of current connection */ + var_set_mysql_get_server_version(&cur_con->mysql); + dynstr_free(&ds_connection_name); dynstr_free(&ds_host); dynstr_free(&ds_user); @@ -6924,6 +6943,9 @@ int main(int argc, char **argv) */ var_set_errno(-1); + /* Update $mysql_get_server_version to that of current connection */ + var_set_mysql_get_server_version(&cur_con->mysql); + if (opt_include) { open_file(opt_include); From f28612eae272fb56f9bb07bddf31852882af7ed8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 13:31:19 +0200 Subject: [PATCH 333/527] Bug #34747: crash in debug assertion check after derived table Was a double-free of the Unique member of Item_func_group_concat. This was not causing a crash because the Unique is a descendent of Sql_alloc. Fixed to free the Unique only if it was allocated for the instance of Item_func_group_concat it was referenced from mysql-test/r/func_gconcat.result: Bug #34747: test case mysql-test/t/func_gconcat.test: Bug #34747: test case sql/item_sum.cc: Bug #34747: free the Unique only if it was allocated for this instance of Item_func_group_concat --- mysql-test/r/func_gconcat.result | 15 +++++++++++++++ mysql-test/t/func_gconcat.test | 17 +++++++++++++++++ sql/item_sum.cc | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result index 19b5f03de6b..77d11831842 100644 --- a/mysql-test/r/func_gconcat.result +++ b/mysql-test/r/func_gconcat.result @@ -931,4 +931,19 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1; GROUP_CONCAT(DISTINCT b, a ORDER BY b) 11,22,32 DROP TABLE t1, t2, t3; +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (),(); +SELECT s1.d1 FROM +( +SELECT +t1.a as d1, +GROUP_CONCAT(DISTINCT t1.a) AS d2 +FROM +t1 AS t1, +t1 AS t2 +GROUP BY 1 +) AS s1; +d1 +NULL +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test index 84c286e516b..87632fbdbb8 100644 --- a/mysql-test/t/func_gconcat.test +++ b/mysql-test/t/func_gconcat.test @@ -640,4 +640,21 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1; DROP TABLE t1, t2, t3; +# +# Bug #34747: crash in debug assertion check after derived table +# +CREATE TABLE t1(a INT); +INSERT INTO t1 VALUES (),(); +SELECT s1.d1 FROM +( + SELECT + t1.a as d1, + GROUP_CONCAT(DISTINCT t1.a) AS d2 + FROM + t1 AS t1, + t1 AS t2 + GROUP BY 1 +) AS s1; +DROP TABLE t1; + --echo End of 5.0 tests diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 47a7073c2e7..3d6d46ab3f4 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -3460,6 +3460,6 @@ void Item_func_group_concat::print(String *str) Item_func_group_concat::~Item_func_group_concat() { - if (unique_filter) + if (!original && unique_filter) delete unique_filter; } From 5c78f82915e916d9da0839604a7b608a5846f531 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 14:36:14 +0300 Subject: [PATCH 334/527] WL#4091, replace sleeps mysql-test/suite/rpl/r/rpl_flushlog_loop.result: updated result mysql-test/suite/rpl/r/rpl_row_view01.result: updated result mysql-test/suite/rpl/t/rpl_change_master.test: replace sleep mysql-test/suite/rpl/t/rpl_drop_temp.test: replace sleep mysql-test/suite/rpl/t/rpl_flushlog_loop.test: replace sleep mysql-test/suite/rpl/t/rpl_relayspace.test: replace waiting of state to wait_for_slave_param.inc mysql-test/suite/rpl/t/rpl_row_view01.test: replace sleep mysql-test/suite/rpl/t/rpl_trunc_temp.test: replace sleep mysql-test/include/wait_for_binlog_event.inc: New primitive: waiting an event in binlog on master --- mysql-test/include/wait_for_binlog_event.inc | 33 +++++++++++++++++++ .../suite/rpl/r/rpl_flushlog_loop.result | 6 ++-- mysql-test/suite/rpl/r/rpl_row_view01.result | 3 ++ mysql-test/suite/rpl/t/rpl_change_master.test | 4 ++- mysql-test/suite/rpl/t/rpl_drop_temp.test | 14 +++++--- mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 25 ++++++++++++-- mysql-test/suite/rpl/t/rpl_relayspace.test | 21 +++--------- mysql-test/suite/rpl/t/rpl_row_view01.test | 16 ++++++--- mysql-test/suite/rpl/t/rpl_trunc_temp.test | 7 +++- 9 files changed, 96 insertions(+), 33 deletions(-) create mode 100644 mysql-test/include/wait_for_binlog_event.inc diff --git a/mysql-test/include/wait_for_binlog_event.inc b/mysql-test/include/wait_for_binlog_event.inc new file mode 100644 index 00000000000..2a57c191413 --- /dev/null +++ b/mysql-test/include/wait_for_binlog_event.inc @@ -0,0 +1,33 @@ +# include/wait_for_binlog_event.inc +# +# SUMMARY +# +# Waits until SHOW BINLOG EVENTS has returned in last event a specified substring. +# +# USAGE +# +# let $wait_binlog_event= DROP; +# --source include/wait_for_binlog_event.inc + +let $_loop_count= 300; +let $_last_event= ; +let $_event_pos= 1; + +while (`SELECT INSTR("$_last_event","$wait_binlog_event") = 0`) +{ + dec $_loop_count; + if (!$_loop_count) + { + SHOW BINLOG EVENTS; + --die ERROR: failed while waiting for $wait_binlog_event in binlog + } + real_sleep 0.1; + let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos); + let $_last_event= $_event; + while (`SELECT "$_event" != "No such row"`) + { + inc $_event_pos; + let $_last_event= $_event; + let $_event= query_get_value(SHOW BINLOG EVENTS, Info, $_event_pos); + } +} diff --git a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result index ca06a5a328c..baa740bf250 100644 --- a/mysql-test/suite/rpl/r/rpl_flushlog_loop.result +++ b/mysql-test/suite/rpl/r/rpl_flushlog_loop.result @@ -23,7 +23,7 @@ start slave; let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes%0%0%None%' ; --source include/wait_slave_status.inc -flush logs; +FLUSH LOGS; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -31,7 +31,7 @@ Master_User root Master_Port SLAVE_PORT Connect_Retry 60 Master_Log_File slave-bin.000001 -Read_Master_Log_Pos 216 +Read_Master_Log_Pos POSITION Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File slave-bin.000001 @@ -46,7 +46,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 216 +Exec_Master_Log_Pos POSITION Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_row_view01.result b/mysql-test/suite/rpl/r/rpl_row_view01.result index a4b8d0a05e3..4dfe5826f32 100644 --- a/mysql-test/suite/rpl/r/rpl_row_view01.result +++ b/mysql-test/suite/rpl/r/rpl_row_view01.result @@ -13,6 +13,7 @@ DROP TABLE IF EXISTS mysqltest1.t3; DROP TABLE IF EXISTS mysqltest1.t1; DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; +DROP TABLE IF EXISTS mysqltest1.t10; CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); CREATE TABLE mysqltest1.t2 (a INT, c CHAR(6),PRIMARY KEY(a)); CREATE TABLE mysqltest1.t3 (a INT, c CHAR(6), c2 CHAR(6), PRIMARY KEY(a)); @@ -35,6 +36,7 @@ a c c2 1 Thank GOD 2 it is 3 Friday TGIF +CREATE TABLE mysqltest1.t10 (a INT, PRIMARY KEY(a)); SELECT * FROM mysqltest1.v2; qty price value 3 50 150 @@ -98,4 +100,5 @@ DROP TABLE IF EXISTS mysqltest1.t3; DROP TABLE IF EXISTS mysqltest1.t1; DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; +DROP TABLE IF EXISTS mysqltest1.t10; DROP DATABASE mysqltest1; diff --git a/mysql-test/suite/rpl/t/rpl_change_master.test b/mysql-test/suite/rpl/t/rpl_change_master.test index 7e4800c5c77..d0cd40e2e11 100644 --- a/mysql-test/suite/rpl/t/rpl_change_master.test +++ b/mysql-test/suite/rpl/t/rpl_change_master.test @@ -15,8 +15,10 @@ connection master; insert into t1 values(1); insert into t1 values(2); save_master_pos; +let $slave_param= Read_Master_Log_Pos; +let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); connection slave; ---real_sleep 3 # wait for I/O thread to have read updates +source include/wait_for_slave_param.inc; stop slave; source include/show_slave_status2.inc; change master to master_user='root'; diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index 305c78d3f06..51c5472beb8 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -6,19 +6,25 @@ # to work around NDB's issue with temp tables ############################################## source include/master-slave.inc; +source include/have_binlog_format_mixed_or_statement.inc; + --disable_warnings create database if not exists mysqltest; --enable_warnings create temporary table mysqltest.t1 (n int)ENGINE=MyISAM; create temporary table mysqltest.t2 (n int)ENGINE=MyISAM; -sync_slave_with_master; + connection master; disconnect master; -connection slave; ---real_sleep 3 # time for DROP to be written -show status like 'Slave_open_temp_tables'; +connection master1; +# Wait until drop of temp tables appears in binlog +let $wait_binlog_event= DROP; +source include/wait_for_binlog_event.inc; + +connection slave; +show status like 'Slave_open_temp_tables'; # Cleanup connection default; drop database mysqltest; diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index 750b49f19a9..ab1be9d297b 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -35,12 +35,31 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes% # # Flush logs of slave # -flush logs; -sleep 5; +# Create full loop by following way: +# 1. Insert into t1 on master (1st). +# 2. Insert into t1 on slave (2nd) when the event (1st) for t1 replicated. +# 3. Master waits until the event (2nd) for t1 will be replicated. + +--disable_query_log +CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; +INSERT INTO t1 VALUE(1); +--enable_query_log +FLUSH LOGS; +connection slave; +let $wait_condition= SELECT COUNT(*) = 1 FROM t1; +-- source include/wait_condition.inc +--disable_query_log +INSERT INTO t1 VALUE(2); +--enable_query_log +connection master; +let $wait_condition= SELECT COUNT(*) = 2 FROM t1; +-- source include/wait_condition.inc +--enable_query_log # # Show status of slave # ---replace_result $SLAVE_MYPORT SLAVE_PORT +let $pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); +--replace_result $SLAVE_MYPORT SLAVE_PORT $pos POSITION --replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 # --query_vertical SHOW SLAVE STATUS diff --git a/mysql-test/suite/rpl/t/rpl_relayspace.test b/mysql-test/suite/rpl/t/rpl_relayspace.test index d4ef2fe59bd..0fc564cdb46 100644 --- a/mysql-test/suite/rpl/t/rpl_relayspace.test +++ b/mysql-test/suite/rpl/t/rpl_relayspace.test @@ -14,23 +14,10 @@ connection slave; reset slave; start slave io_thread; # Give the I/O thread time to block. -let $run= 1; -let $counter= 300; -while ($run) -{ - let $io_state= query_get_value("SHOW SLAVE STATUS", Slave_IO_State, 1); - if (`SELECT '$io_state' = 'Waiting for the slave SQL thread to free enough relay log space'`){ - let $run= 0; - } - sleep 0.1; - if (!$counter){ - --echo "Failed while waiting for slave IO thread block" - SHOW SLAVE STATUS; - exit; - } - dec $counter; -} -sleep 2; +let $slave_param= Slave_IO_State; +let $slave_param_value= Waiting for the slave SQL thread to free enough relay log space; +source include/wait_for_slave_param.inc; + # A bug caused the I/O thread to refuse stopping. stop slave io_thread; reset slave; diff --git a/mysql-test/suite/rpl/t/rpl_row_view01.test b/mysql-test/suite/rpl/t/rpl_row_view01.test index 634e3c30cc6..77e4b98f780 100644 --- a/mysql-test/suite/rpl/t/rpl_row_view01.test +++ b/mysql-test/suite/rpl/t/rpl_row_view01.test @@ -23,6 +23,7 @@ DROP TABLE IF EXISTS mysqltest1.t3; DROP TABLE IF EXISTS mysqltest1.t1; DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; +DROP TABLE IF EXISTS mysqltest1.t10; # Begin test section 1 CREATE TABLE mysqltest1.t1 (a INT, c CHAR(6),PRIMARY KEY(a)); @@ -43,12 +44,18 @@ CREATE VIEW mysqltest1.v4 AS SELECT * FROM mysqltest1.v3 WHERE a > 1 WITH LOCAL SELECT * FROM mysqltest1.v2; SELECT * FROM mysqltest1.v1; -# Had to add a sleep for use with NDB + + +# Had to add a waiting for use with NDB # engine. Injector thread would have not -# populated biblog and data would not be on +# populated binlog and data would not be on # the slave. -sleep 10; -sync_slave_with_master; + +CREATE TABLE mysqltest1.t10 (a INT, PRIMARY KEY(a)); +let $wait_binlog_event= CREATE TABLE mysqltest1.t10; +-- source include/wait_for_binlog_event.inc +--sync_slave_with_master + SELECT * FROM mysqltest1.v2; SELECT * FROM mysqltest1.v1; connection master; @@ -82,6 +89,7 @@ DROP TABLE IF EXISTS mysqltest1.t3; DROP TABLE IF EXISTS mysqltest1.t1; DROP TABLE IF EXISTS mysqltest1.t2; DROP TABLE IF EXISTS mysqltest1.t4; +DROP TABLE IF EXISTS mysqltest1.t10; DROP DATABASE mysqltest1; sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_trunc_temp.test b/mysql-test/suite/rpl/t/rpl_trunc_temp.test index 28bcb0c06c3..93308e3eb3f 100644 --- a/mysql-test/suite/rpl/t/rpl_trunc_temp.test +++ b/mysql-test/suite/rpl/t/rpl_trunc_temp.test @@ -27,7 +27,12 @@ show status like 'Slave_open_temp_tables'; # Disconnect the master, temp table on slave should dissapear disconnect master; ---real_sleep 3 # time for DROP to be read by slave + +connection master1; +# Wait until drop of temp tables appers in binlog +let $wait_binlog_event= DROP; +source include/wait_for_binlog_event.inc; + connection slave; show status like 'Slave_open_temp_tables'; From ce7b8e1248d7fe32824ebdc1fa0146c376e743dd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 15:35:25 +0300 Subject: [PATCH 335/527] Fix for Bug#34852: SHOW OPEN TABLES output is not repeatable (show_check.test fails sporadically). Fix test case for Bug#12183 to make it stable. mysql-test/r/show_check.result: Fix result file. mysql-test/t/show_check.test: Make test case for Bug#12183 stable. --- mysql-test/r/show_check.result | 71 +++++++++++++++------------------- mysql-test/t/show_check.test | 70 +++++++++++++++++++++++++-------- 2 files changed, 85 insertions(+), 56 deletions(-) diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result index 103b3c9a289..d1eb213670e 100644 --- a/mysql-test/r/show_check.result +++ b/mysql-test/r/show_check.result @@ -662,53 +662,44 @@ t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect show create table t1; ERROR HY000: Incorrect information in file: './test/t1.frm' drop table if exists t1; -CREATE TABLE txt1(a int); -CREATE TABLE tyt2(a int); -CREATE TABLE urkunde(a int); + +# Bug#12183: SHOW OPEN TABLES behavior doesn't match grammar. + +DROP DATABASE IF EXISTS mysqltest1; +CREATE DATABASE mysqltest1; +use mysqltest1; + +CREATE TABLE t1(a INT); +CREATE TABLE t2(a INT); + FLUSH TABLES; -SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0; + +SELECT 1 FROM t1; 1 -SHOW OPEN TABLES; +SELECT 1 FROM t2; +1 + +SHOW OPEN TABLES FROM mysqltest1; Database Table In_use Name_locked -mysql db 0 0 -test urkunde 0 0 -mysql time_zone 0 0 -mysql general_log 0 0 -test txt1 0 0 -mysql proc 0 0 -test tyt2 0 0 -mysql user 0 0 -mysql time_zone_name 0 0 -SHOW OPEN TABLES FROM mysql; +mysqltest1 t1 0 0 +mysqltest1 t2 0 0 + +SHOW OPEN TABLES FROM mysqltest1 LIKE 'z%'; Database Table In_use Name_locked -mysql db 0 0 -mysql time_zone 0 0 -mysql general_log 0 0 -mysql proc 0 0 -mysql user 0 0 -mysql time_zone_name 0 0 -SHOW OPEN TABLES FROM mysql LIKE 'u%'; + +SHOW OPEN TABLES FROM mysqltest1 LIKE 't1%'; Database Table In_use Name_locked -mysql user 0 0 -SHOW OPEN TABLES LIKE 't%'; +mysqltest1 t1 0 0 + +SHOW OPEN TABLES FROM mysqltest1 LIKE '%1%'; Database Table In_use Name_locked -mysql time_zone 0 0 -test txt1 0 0 -test tyt2 0 0 -mysql time_zone_name 0 0 -SHOW OPEN TABLES LIKE '%o%'; -Database Table In_use Name_locked -mysql time_zone 0 0 -mysql general_log 0 0 -mysql proc 0 0 -mysql time_zone_name 0 0 +mysqltest1 t1 0 0 + FLUSH TABLES; -SHOW OPEN TABLES; -Database Table In_use Name_locked -mysql general_log 0 0 -DROP TABLE txt1; -DROP TABLE tyt2; -DROP TABLE urkunde; + +DROP DATABASE mysqltest1; +use test; + SHOW TABLES FROM non_existing_database; ERROR 42000: Unknown database 'non_existing_database' End of 4.1 tests diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test index 613e9acc4c4..9d32b50fd74 100644 --- a/mysql-test/t/show_check.test +++ b/mysql-test/t/show_check.test @@ -435,28 +435,66 @@ drop table if exists t1; # BUG 12183 - SHOW OPEN TABLES behavior doesn't match grammar # First we close all open tables with FLUSH tables and then we open some. # -CREATE TABLE txt1(a int); -CREATE TABLE tyt2(a int); -CREATE TABLE urkunde(a int); -# make the output deterministic: -# the order used in SHOW OPEN TABLES -# is too much implementation dependent +--echo +--echo # Bug#12183: SHOW OPEN TABLES behavior doesn't match grammar. +--echo + +# NOTE: SHOW OPEN TABLES does not sort result list by database or table names. +# Tables are listed in the order they were opened. We can not use the system +# database (mysql) for the test here, because we have no control over the order +# of opening tables in it. Consequently, we can not use 'SHOW OPEN TABLES'. + +--disable_warnings +DROP DATABASE IF EXISTS mysqltest1; +--enable_warnings + +CREATE DATABASE mysqltest1; +use mysqltest1; + +--echo + +CREATE TABLE t1(a INT); +CREATE TABLE t2(a INT); + +--echo + --disable_ps_protocol FLUSH TABLES; -SELECT 1 FROM mysql.db, mysql.proc, mysql.user, mysql.time_zone, mysql.time_zone_name, txt1, tyt2, urkunde LIMIT 0; -SHOW OPEN TABLES; -SHOW OPEN TABLES FROM mysql; -SHOW OPEN TABLES FROM mysql LIKE 'u%'; -SHOW OPEN TABLES LIKE 't%'; -SHOW OPEN TABLES LIKE '%o%'; + +--echo + +SELECT 1 FROM t1; +SELECT 1 FROM t2; + +--echo + +SHOW OPEN TABLES FROM mysqltest1; + +--echo + +SHOW OPEN TABLES FROM mysqltest1 LIKE 'z%'; + +--echo + +SHOW OPEN TABLES FROM mysqltest1 LIKE 't1%'; + +--echo + +SHOW OPEN TABLES FROM mysqltest1 LIKE '%1%'; + +--echo + FLUSH TABLES; -SHOW OPEN TABLES; --enable_ps_protocol -DROP TABLE txt1; -DROP TABLE tyt2; -DROP TABLE urkunde; +--echo + +DROP DATABASE mysqltest1; +use test; + +--echo + # # BUG #12591 (SHOW TABLES FROM dbname produces wrong error message) # From 1af419436456808d05063810dfbeb11ac6aae9aa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 16:46:52 +0400 Subject: [PATCH 336/527] Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(3rd version for 5.1) added new function test_if_data_home_dir() which checks that path does not contain mysql data home directory. Using of 'mysql data home'/'any db name' in DATA DIRECTORY & INDEX DIRECTORY is disallowed mysql-test/r/partition.result: test result mysql-test/r/partition_not_windows.result: result fix mysql-test/r/partition_symlink.result: result fix mysql-test/r/symlink.result: test result update mysql-test/t/partition.test: test case mysql-test/t/partition_not_windows.test: test case update mysql-test/t/partition_symlink.test: test case update mysql-test/t/symlink.test: test case sql/mysql_priv.h: new variable mysql_unpacked_real_data_home sql/mysqld.cc: new variable mysql_unpacked_real_data_home sql/partition_info.cc: new check_partition_dirs() which checks data directory and index directory for partition elements sql/partition_info.h: new check_partition_dirs() which checks data directory and index directory for partition elements sql/sql_parse.cc: added new function test_if_data_home_dir() which checks that path does not contain mysql data home directory. Using of 'mysql data home'/'any db name' in DATA DIRECTORY & INDEX DIRECTORY is disallowed --- mysql-test/r/partition.result | 28 +++++++ mysql-test/r/partition_not_windows.result | 6 +- mysql-test/r/partition_symlink.result | 32 ++++---- mysql-test/r/symlink.result | 65 +++++++-------- mysql-test/t/partition.test | 42 +++++++++- mysql-test/t/partition_not_windows.test | 32 ++++---- mysql-test/t/partition_symlink.test | 40 +++++---- mysql-test/t/symlink.test | 98 +++++++++++------------ sql/mysql_priv.h | 4 +- sql/mysqld.cc | 4 + sql/partition_info.cc | 56 +++++++++++++ sql/partition_info.h | 1 + sql/sql_parse.cc | 65 +++++++++++++++ 13 files changed, 327 insertions(+), 146 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index a361a8f6bcc..be3c68e6c18 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1320,6 +1320,34 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 DROP TABLE t1; +CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); +ERROR HY000: Incorrect arguments to INDEX DIRECORY +CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a +DATA DIRECTORY = 'TEST_DIR/master-data/test', +SUBPARTITION s0b +DATA DIRECTORY = 'TEST_DIR/master-data/test' +)); +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a +INDEX DIRECTORY = 'TEST_DIR/master-data/test', +SUBPARTITION s0b +INDEX DIRECTORY = 'TEST_DIR/master-data/test' +)); +ERROR HY000: Incorrect arguments to INDEX DIRECORY CREATE TABLE t1 (s1 BIGINT UNSIGNED) PARTITION BY RANGE (s1) ( PARTITION p0 VALUES LESS THAN (0), diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index 31ea300e8ed..af36673a3e0 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -1,13 +1,13 @@ create table t1 (a int) engine myisam partition by range (a) subpartition by hash (a) -(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx' +(partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart00, SUBPARTITION subpart01)); Checking if file exists before alter ALTER TABLE t1 REORGANIZE PARTITION p0 INTO -(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx' +(partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart10, SUBPARTITION subpart11), -partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpdata' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/tmpinx' +partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart20, SUBPARTITION subpart21)); Checking if file exists after alter drop table t1; diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result index 20e841d2e0e..362e97a6262 100644 --- a/mysql-test/r/partition_symlink.result +++ b/mysql-test/r/partition_symlink.result @@ -13,11 +13,11 @@ USE test; CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2', +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test', +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', PARTITION p2 VALUES IN (2) ); # without the patch for bug#32091 this would create @@ -49,32 +49,32 @@ USE mysqltest2; CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2', +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp' ); # user mysqltest_1: USE test; CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2', +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp' ); Got one of the listed errors CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/test', +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) -DATA DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY 'MYSQLTEST_VARDIR/master-data/mysqltest2' +DATA DIRECTORY 'MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY 'MYSQLTEST_VARDIR/tmp' ); Got one of the listed errors # user root (cleanup): diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 4eece9d5b5a..e4ae1d8ea28 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -100,23 +100,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1(a INT) -DATA DIRECTORY='TEST_DIR/master-data/mysql' -INDEX DIRECTORY='TEST_DIR/master-data/mysql'; -RENAME TABLE t1 TO user; -ERROR HY000: Can't create/write to file 'TEST_DIR/master-data/mysql/user.MYI' (Errcode: 17) -DROP TABLE t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +CREATE TABLE t2(a INT) +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +RENAME TABLE t2 TO t1; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +DROP TABLE t2; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( @@ -139,26 +131,25 @@ a 42 drop table t1; End of 4.1 tests -CREATE DATABASE db1; -CREATE DATABASE db2; -USE db2; -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -b -1 -RESET QUERY CACHE; -USE db1; SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; -Got one of the listed errors -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; -a -SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; +ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17) +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; End of 5.0 tests +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data/mysql'; +ERROR HY000: Incorrect arguments to INDEX DIRECORY +CREATE TABLE t1(a INT) +DATA DIRECTORY='TEST_DIR/master-data/test'; +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +DATA DIRECTORY='TEST_DIR/master-data/'; +DROP TABLE t1; +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data'; +DROP TABLE t1; +CREATE TABLE t1(a INT) +INDEX DIRECTORY='TEST_DIR/master-data_var'; +ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 23d6c5f8865..d889fe83dc1 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1407,8 +1407,8 @@ eval create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" + data directory="$MYSQLTEST_VARDIR/tmp/" + index directory="$MYSQLTEST_VARDIR/tmp/" ); enable_query_log; @@ -1574,6 +1574,44 @@ ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; DROP TABLE t1; +# +# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY +# +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); + +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a + DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', +SUBPARTITION s0b + DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' +)); + +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', +SUBPARTITION s0b + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' +)); + # # Bug #29258: Partitions: search fails for maximum unsigned bigint # diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 012b8b50dee..c5f54286095 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -12,12 +12,10 @@ # doesn't remove old directory --disable_query_log ---exec mkdir $MYSQLTEST_VARDIR/master-data/tmpdata || true -eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpdata'''; +eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/tmp'''; let $data_directory = `select @data_dir`; ---exec mkdir $MYSQLTEST_VARDIR/master-data/tmpinx || true -eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/master-data/tmpinx'''; +eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/tmp'''; let $inx_directory = `select @inx_dir`; --enable_query_log @@ -35,10 +33,10 @@ subpartition by hash (a) --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYI --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYD --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart01.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart00.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p0#SP#subpart01.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart00.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p0#SP#subpart01.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart01.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart00.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p0#SP#subpart01.MYI --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO @@ -58,18 +56,16 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart20.MYI --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYD --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p2#SP#subpart21.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart10.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p1#SP#subpart11.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart20.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpdata/t1#P#p2#SP#subpart21.MYD ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart10.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p1#SP#subpart11.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart20.MYI ---file_exists $MYSQLTEST_VARDIR/master-data/tmpinx/t1#P#p2#SP#subpart21.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart10.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart11.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart20.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart21.MYD +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart10.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p1#SP#subpart11.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart20.MYI +--file_exists $MYSQLTEST_VARDIR/tmp/t1#P#p2#SP#subpart21.MYI drop table t1; ---exec rmdir $MYSQLTEST_VARDIR/master-data/tmpdata || true ---exec rmdir $MYSQLTEST_VARDIR/master-data/tmpinx || true # End Windows specific test failures. diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test index ab779ec2b68..4c6acec64eb 100644 --- a/mysql-test/t/partition_symlink.test +++ b/mysql-test/t/partition_symlink.test @@ -24,6 +24,10 @@ DROP DATABASE IF EXISTS mysqltest2; # files, but not the other way around (any db-user can use any # directory or file that the mysqld-process can use, via DATA/INDEX DIR) # this is the security flaw that was used in bug#32091 and bug#32111 + +#--exec mkdir $MYSQLTEST_VARDIR/tmp/test || true +#--exec mkdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true + -- echo # Creating two non colliding tables mysqltest2.t1 and test.t1 -- echo # test.t1 have partitions in mysqltest2-directory! -- echo # user root: @@ -39,11 +43,11 @@ connect(con1,localhost,mysqltest_1,,); eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test', + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', PARTITION p2 VALUES IN (2) ); -- echo # without the patch for bug#32091 this would create @@ -74,17 +78,18 @@ connection default; # So it is using/blocking 2 files in (in 2 different directories -- echo # test that symlinks can not overwrite files when CREATE TABLE -- echo # user root: + CREATE DATABASE mysqltest2; USE mysqltest2; -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp' ); connection con1; -- echo # user mysqltest_1: @@ -94,22 +99,22 @@ connection con1; eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2', + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp' ); -- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR -- error 1,1 eval CREATE TABLE t1 (a INT) PARTITION BY LIST (a) ( PARTITION p0 VALUES IN (0) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test', + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp', PARTITION p1 VALUES IN (1) - DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' - INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/mysqltest2' + DATA DIRECTORY '$MYSQLTEST_VARDIR/tmp' + INDEX DIRECTORY '$MYSQLTEST_VARDIR/tmp' ); connection default; -- echo # user root (cleanup): @@ -118,4 +123,5 @@ connection default; DROP USER mysqltest_1@localhost; disconnect con1; - +#--exec rmdir $MYSQLTEST_VARDIR/tmp/test || true +#--exec rmdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index f339b29c83a..1b75fa6b1ab 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -123,29 +123,22 @@ drop table t1; # # BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE # ---replace_result $MYSQLTEST_VARDIR TEST_DIR -eval CREATE TABLE t1(a INT) -DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql' -INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; +--write_file $MYSQLTEST_VARDIR/tmp/t1.MYI +EOF --replace_result $MYSQLTEST_VARDIR TEST_DIR --error 1 -RENAME TABLE t1 TO user; -DROP TABLE t1; - -# -# Test specifying DATA DIRECTORY that is the same as what would normally -# have been chosen. (Bug #8707) -# -disable_query_log; -eval create table t1 (i int) data directory = "$MYSQLTEST_VARDIR/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; -disable_query_log; -eval create table t1 (i int) index directory = "$MYSQLTEST_VARDIR/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t2(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1 +RENAME TABLE t2 TO t1; +DROP TABLE t2; +--remove_file $MYSQLTEST_VARDIR/tmp/t1.MYI # # Bug#8706 - temporary table with data directory option fails @@ -189,40 +182,41 @@ drop table t1; # # Bug #29325: create table overwrites .MYD file of other table (datadir) # - -CREATE DATABASE db1; -CREATE DATABASE db2; - -USE db2; ---disable_query_log -eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; ---enable_query_log - -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -RESET QUERY CACHE; - -USE db1; - -#no warning from create table SET SESSION keep_files_on_create = TRUE; +--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD +EOF --disable_abort_on_error ---error 1,1 +--error 1 CREATE TABLE t1 (a INT) ENGINE MYISAM; +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD; --enable_abort_on_error - -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; - -SET SESSION keep_files_on_create = DEFAULT; - -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; - +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; --echo End of 5.0 tests + +# +# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY +# +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/test'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/'; +DROP TABLE t1; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data'; +DROP TABLE t1; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data_var'; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index ea552414d9a..ea5e03489ba 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -748,6 +748,7 @@ bool check_string_byte_length(LEX_STRING *str, const char *err_msg, bool check_string_char_length(LEX_STRING *str, const char *err_msg, uint max_char_length, CHARSET_INFO *cs, bool no_error); +bool test_if_data_home_dir(const char *dir); bool parse_sql(THD *thd, class Lex_input_stream *lip, @@ -1789,7 +1790,8 @@ extern time_t server_start_time, flush_status_time; #if defined MYSQL_SERVER || defined INNODB_COMPATIBILITY_HOOKS extern uint mysql_data_home_len; extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH], - mysql_real_data_home[]; + mysql_real_data_home[], mysql_unpacked_real_data_home[]; +extern CHARSET_INFO *character_set_filesystem; #endif /* MYSQL_SERVER || INNODB_COMPATIBILITY_HOOKS */ #ifdef MYSQL_SERVER extern char *opt_mysql_tmpdir, mysql_charsets_dir[], diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6dc63012f55..a62d0afee86 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -510,6 +510,7 @@ char mysql_real_data_home[FN_REFLEN], language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN], *opt_init_file, *opt_tc_log_file, def_ft_boolean_syntax[sizeof(ft_boolean_syntax)]; +char mysql_unpacked_real_data_home[FN_REFLEN]; uint reg_ext_length; const key_map key_map_empty(0); key_map key_map_full(0); // Will be initialized later @@ -8147,6 +8148,9 @@ static void fix_paths(void) pos[1]= 0; } convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS); + (void) fn_format(buff, mysql_real_data_home, "", "", + (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); + (void) unpack_dirname(mysql_unpacked_real_data_home, buff); convert_dirname(language,language,NullS); (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home); diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3b580422da1..3130f84bd73 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1047,4 +1047,60 @@ error: mem_alloc_error(size); DBUG_RETURN(TRUE); } + + +/* + Check if path does not contain mysql data home directory + for partition elements with data directory and index directory + + SYNOPSIS + check_partition_dirs() + part_info partition_info struct + + RETURN VALUES + 0 ok + 1 error +*/ + +bool check_partition_dirs(partition_info *part_info) +{ + if (!part_info) + return 0; + + partition_element *part_elem; + List_iterator part_it(part_info->partitions); + while ((part_elem= part_it++)) + { + if (part_elem->subpartitions.elements) + { + List_iterator sub_it(part_elem->subpartitions); + partition_element *subpart_elem; + while ((subpart_elem= sub_it++)) + { + if (test_if_data_home_dir(subpart_elem->data_file_name)) + goto dd_err; + if (test_if_data_home_dir(subpart_elem->index_file_name)) + goto id_err; + } + } + else + { + if (test_if_data_home_dir(part_elem->data_file_name)) + goto dd_err; + if (test_if_data_home_dir(part_elem->index_file_name)) + goto id_err; + } + } + return 0; + +dd_err: + my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); + return 1; + +id_err: + my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); + return 1; +} + + #endif /* WITH_PARTITION_STORAGE_ENGINE */ diff --git a/sql/partition_info.h b/sql/partition_info.h index b7d13e188f3..2859aaec3be 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -290,6 +290,7 @@ private: }; uint32 get_next_partition_id_range(struct st_partition_iter* part_iter); +bool check_partition_dirs(partition_info *part_info); /* Initialize the iterator to return a single partition with given part_id */ diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 009b81a3893..d79fbed7acb 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2364,6 +2364,28 @@ mysql_execute_command(THD *thd) "INDEX DIRECTORY option ignored"); create_info.data_file_name= create_info.index_file_name= NULL; #else + + if (test_if_data_home_dir(lex->create_info.data_file_name)) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); + res= -1; + break; + } + if (test_if_data_home_dir(lex->create_info.index_file_name)) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); + res= -1; + break; + } + +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (check_partition_dirs(thd->lex->part_info)) + { + res= -1; + break; + } +#endif + /* Fix names if symlinked tables */ if (append_file_to_dir(thd, &create_info.data_file_name, create_table->table_name) || @@ -7354,6 +7376,49 @@ bool check_string_char_length(LEX_STRING *str, const char *err_msg, } +/* + Check if path does not contain mysql data home directory + SYNOPSIS + test_if_data_home_dir() + dir directory + conv_home_dir converted data home directory + home_dir_len converted data home directory length + + RETURN VALUES + 0 ok + 1 error +*/ + +bool test_if_data_home_dir(const char *dir) +{ + char path[FN_REFLEN], conv_path[FN_REFLEN]; + uint dir_len, home_dir_len= strlen(mysql_unpacked_real_data_home); + DBUG_ENTER("test_if_data_home_dir"); + + if (!dir) + DBUG_RETURN(0); + + (void) fn_format(path, dir, "", "", + (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); + dir_len= unpack_dirname(conv_path, dir); + + if (home_dir_len < dir_len) + { + if (lower_case_file_system) + { + if (!my_strnncoll(character_set_filesystem, + (const uchar*) conv_path, home_dir_len, + (const uchar*) mysql_unpacked_real_data_home, + home_dir_len)) + DBUG_RETURN(1); + } + else if (!memcmp(conv_path, mysql_unpacked_real_data_home, home_dir_len)) + DBUG_RETURN(1); + } + DBUG_RETURN(0); +} + + extern int MYSQLparse(void *thd); // from sql_yacc.cc From a0eec8abbb233d9e3f278d343eaed2e70b55161e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 14:23:22 +0100 Subject: [PATCH 337/527] Bug#34749: Server crash when using NAME_CONST() with an aggregate function NAME_CONST('whatever', -1) * MAX(whatever) bombed since -1 was not seen as constant, but as FUNCTION_UNARY_MINUS(constant) while we are at the same time pretending it was a basic const item. This confused the aggregate handlers in exciting ways. We now make NAME_CONST() behave more consistently. mysql-test/r/func_misc.result: show that a combination of NAME_CONST('x', -y) and an aggregate no longer crashes the server. mysql-test/t/func_misc.test: show that a combination of NAME_CONST('x', -y) and an aggregate no longer crashes the server. sql/ha_ndbcluster_cond.cc: tell cluster about "new" function type NEG_FUNC. (this was previous identified as UNKNOWN_FUNC, so we just handle it the same way, that's all.) sql/ha_ndbcluster_cond.h: tell cluster about "new" function type NEG_FUNC. (this was previous identified as UNKNOWN_FUNC, so we just handle it the same way, that's all.) sql/item.cc: make NAME_CONST() transparent in that type() of -constant is that of constant, not that of unary minus (id est, FUNC_ITEM). sql/item.h: Move constructor to item.cc sql/item_func.h: Revert Bug#30832; we can apply the magic more narrowly (just for NAME_CONST() rather than all Item_func_neg). Introduce new function type "NEG_FUNC." --- mysql-test/r/func_misc.result | 19 +++++++++++++++++++ mysql-test/t/func_misc.test | 18 ++++++++++++++++++ sql/ha_ndbcluster_cond.cc | 9 ++++++--- sql/ha_ndbcluster_cond.h | 1 + sql/item.cc | 27 ++++++++++++++++++++++++++- sql/item.h | 9 +-------- sql/item_func.h | 5 +++-- 7 files changed, 74 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index 4f6b6d3a0d8..cccdd391497 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -207,6 +207,25 @@ test SELECT NAME_CONST('test', 'test'); test test +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +SELECT NAME_CONST('flag',1) * MAX(a) FROM t1; +NAME_CONST('flag',1) * MAX(a) +3 +SELECT NAME_CONST('flag',1.5) * MAX(a) FROM t1; +NAME_CONST('flag',1.5) * MAX(a) +4.5 +SELECT NAME_CONST('flag',-1) * MAX(a) FROM t1; +NAME_CONST('flag',-1) * MAX(a) +-3 +SELECT NAME_CONST('flag',-1.5) * MAX(a) FROM t1; +NAME_CONST('flag',-1.5) * MAX(a) +-4.5 +SELECT NAME_CONST('flag', SQRT(4)) * MAX(a) FROM t1; +ERROR HY000: Incorrect arguments to NAME_CONST +SELECT NAME_CONST('flag',-SQRT(4)) * MAX(a) FROM t1; +ERROR HY000: Incorrect arguments to NAME_CONST +DROP TABLE t1; CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (5), (2); SELECT NAME_CONST(x,2) FROM (SELECT a x FROM t1) t; diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index ccb59df5677..17c147f7193 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -204,6 +204,24 @@ SELECT NAME_CONST('test', 1.0); SELECT NAME_CONST('test', -1.0); SELECT NAME_CONST('test', 'test'); +# +# Bug #34749: Server crash when using NAME_CONST() with an aggregate function +# + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3); +# NAME_CONST() + aggregate. +SELECT NAME_CONST('flag',1) * MAX(a) FROM t1; +SELECT NAME_CONST('flag',1.5) * MAX(a) FROM t1; +# Now, wrap the INT_ITEM in Item_func_neg and watch the pretty explosions +SELECT NAME_CONST('flag',-1) * MAX(a) FROM t1; +SELECT NAME_CONST('flag',-1.5) * MAX(a) FROM t1; +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('flag', SQRT(4)) * MAX(a) FROM t1; +--error ER_WRONG_ARGUMENTS +SELECT NAME_CONST('flag',-SQRT(4)) * MAX(a) FROM t1; +DROP TABLE t1; + # # Bug #27545: erroneous usage of NAME_CONST with a name as the first parameter # resolved against a column name of a derived table hangs the client diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index c7b185a92f0..f5b41959b40 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -117,7 +117,8 @@ void ndb_serialize_cond(const Item *item, void *arg) if (item->type() == Item::FUNC_ITEM) { Item_func *func_item= (Item_func *) item; - if (func_item->functype() == Item_func::UNKNOWN_FUNC && + if ((func_item->functype() == Item_func::UNKNOWN_FUNC || + func_item->functype() == Item_func::NEG_FUNC) && func_item->const_item()) { // Skip any arguments since we will evaluate function instead @@ -369,8 +370,9 @@ void ndb_serialize_cond(const Item *item, void *arg) { Item_func *func_item= (Item_func *) item; // Check that we expect a function or functional expression here - if (context->expecting(Item::FUNC_ITEM) || - func_item->functype() == Item_func::UNKNOWN_FUNC) + if (context->expecting(Item::FUNC_ITEM) || + func_item->functype() == Item_func::UNKNOWN_FUNC || + func_item->functype() == Item_func::NEG_FUNC) context->expect_nothing(); else { @@ -584,6 +586,7 @@ void ndb_serialize_cond(const Item *item, void *arg) context->expect(Item::FUNC_ITEM); break; } + case Item_func::NEG_FUNC: case Item_func::UNKNOWN_FUNC: { DBUG_PRINT("info", ("UNKNOWN_FUNC %s", diff --git a/sql/ha_ndbcluster_cond.h b/sql/ha_ndbcluster_cond.h index 6baf6945b58..6504df8d9d4 100644 --- a/sql/ha_ndbcluster_cond.h +++ b/sql/ha_ndbcluster_cond.h @@ -228,6 +228,7 @@ public: case (Item_func::ISNOTNULL_FUNC): { return NDB_ISNOTNULL_FUNC; } case (Item_func::LIKE_FUNC): { return NDB_LIKE_FUNC; } case (Item_func::NOT_FUNC): { return NDB_NOT_FUNC; } + case (Item_func::NEG_FUNC): { return NDB_UNKNOWN_FUNC; } case (Item_func::UNKNOWN_FUNC): { return NDB_UNKNOWN_FUNC; } case (Item_func::COND_AND_FUNC): { return NDB_COND_AND_FUNC; } case (Item_func::COND_OR_FUNC): { return NDB_COND_OR_FUNC; } diff --git a/sql/item.cc b/sql/item.cc index 713e7709bcb..acd8053cbdf 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1207,6 +1207,22 @@ bool Item_name_const::is_null() return value_item->is_null(); } + +Item_name_const::Item_name_const(Item *name_arg, Item *val): + value_item(val), name_item(name_arg) +{ + if (!(valid_args= name_item->basic_const_item() && + (value_item->basic_const_item() || + ((value_item->type() == FUNC_ITEM) && + (((Item_func *) value_item)->functype() == + Item_func::NEG_FUNC) && + (((Item_func *) value_item)->key_item()->type() != + FUNC_ITEM))))) + my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST"); + Item::maybe_null= TRUE; +} + + Item::Type Item_name_const::type() const { /* @@ -1218,8 +1234,17 @@ Item::Type Item_name_const::type() const if (item->type() == FIELD_ITEM) ((Item_field *) item)->... we return NULL_ITEM in the case to avoid wrong casting. + + valid_args guarantees value_item->basic_const_item(); if type is + FUNC_ITEM, then we have a fudged item_func_neg() on our hands + and return the underlying type. */ - return valid_args ? value_item->type() : NULL_ITEM; + return valid_args ? + (((value_item->type() == FUNC_ITEM) && + (((Item_func *) value_item)->functype() == Item_func::NEG_FUNC)) ? + ((Item_func *) value_item)->key_item()->type() : + value_item->type()) : + NULL_ITEM; } diff --git a/sql/item.h b/sql/item.h index 5f511557f47..9af98e0efdb 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1113,14 +1113,7 @@ class Item_name_const : public Item Item *name_item; bool valid_args; public: - Item_name_const(Item *name_arg, Item *val): - value_item(val), name_item(name_arg) - { - if (!(valid_args= name_item->basic_const_item() & - value_item->basic_const_item())) - my_error(ER_WRONG_ARGUMENTS, MYF(0), "NAME_CONST"); - Item::maybe_null= TRUE; - } + Item_name_const(Item *name_arg, Item *val); bool fix_fields(THD *, Item **); diff --git a/sql/item_func.h b/sql/item_func.h index 940586fce01..6dcf32cba07 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -54,7 +54,8 @@ public: NOT_FUNC, NOT_ALL_FUNC, NOW_FUNC, TRIG_COND_FUNC, SUSERVAR_FUNC, GUSERVAR_FUNC, COLLATE_FUNC, - EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC }; + EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC, + NEG_FUNC }; enum optimize_type { OPTIMIZE_NONE,OPTIMIZE_KEY,OPTIMIZE_OP, OPTIMIZE_NULL, OPTIMIZE_EQUAL }; enum Type type() const { return FUNC_ITEM; } @@ -466,7 +467,7 @@ public: longlong int_op(); my_decimal *decimal_op(my_decimal *); const char *func_name() const { return "-"; } - virtual bool basic_const_item() const { return args[0]->basic_const_item(); } + enum Functype functype() const { return NEG_FUNC; } void fix_length_and_dec(); void fix_num_length_and_dec(); uint decimal_precision() const { return args[0]->decimal_precision(); } From 944f2599fedfaa7c9a4348a2fd505419eb59a5b6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 17:28:33 +0300 Subject: [PATCH 338/527] Disable test case due to Bug#34891: sp_notembedded.test fails sporadically. mysql-test/r/sp_notembedded.result: Disable test case. mysql-test/t/sp_notembedded.test: Disable test case. --- mysql-test/r/sp_notembedded.result | 23 ------ mysql-test/t/sp_notembedded.test | 127 +++++++++++++++-------------- 2 files changed, 65 insertions(+), 85 deletions(-) diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 277eea8570e..0b1fa565d28 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -208,26 +208,3 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION drop user mysqltest_1@localhost; drop procedure 15298_1; drop procedure 15298_2; -drop table if exists t1; -drop procedure if exists p1; -create table t1 (value varchar(15)); -create procedure p1() update t1 set value='updated' where value='old'; -call p1(); -insert into t1 (value) values ("old"); -select get_lock('b26162',120); -get_lock('b26162',120) -1 -select 'rl_acquirer', value from t1 where get_lock('b26162',120);; -set session low_priority_updates=on; -call p1();; -select 'rl_contender', value from t1; -rl_contender value -rl_contender old -select release_lock('b26162'); -release_lock('b26162') -1 -rl_acquirer value -rl_acquirer old -drop procedure p1; -drop table t1; -set session low_priority_updates=default; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index 4a747b9c614..4e298b2076a 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -268,66 +268,69 @@ drop procedure 15298_1; drop procedure 15298_2; # -# Bug#29936 Stored Procedure DML ignores low_priority_updates setting +# Test case disabled due to Bug#34891: sp_notembedded.test fails sporadically. # - ---disable_warnings -drop table if exists t1; -drop procedure if exists p1; ---enable_warnings - -create table t1 (value varchar(15)); -create procedure p1() update t1 set value='updated' where value='old'; - -# load the procedure into sp cache and execute once -call p1(); - -insert into t1 (value) values ("old"); - -connect (rl_holder, localhost, root,,); -connect (rl_acquirer, localhost, root,,); -connect (rl_contender, localhost, root,,); -connect (rl_wait, localhost, root,,); - -connection rl_holder; -select get_lock('b26162',120); - -connection rl_acquirer; ---send select 'rl_acquirer', value from t1 where get_lock('b26162',120); - -# we must wait till this select opens and locks the tables -connection rl_wait; -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = "User lock" and - info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)"; ---source include/wait_condition.inc - -connection default; -set session low_priority_updates=on; ---send call p1(); - -connection rl_wait; -let $wait_condition= - select count(*) = 1 from information_schema.processlist - where state = "Locked" and - info = "update t1 set value='updated' where value='old'"; ---source include/wait_condition.inc - -connection rl_contender; -select 'rl_contender', value from t1; - -connection rl_holder; -select release_lock('b26162'); - -connection rl_acquirer; ---reap -connection default; ---reap - -disconnect rl_holder; -disconnect rl_acquirer; -disconnect rl_wait; -drop procedure p1; -drop table t1; -set session low_priority_updates=default; +# # +# # Bug#29936 Stored Procedure DML ignores low_priority_updates setting +# # +# +# --disable_warnings +# drop table if exists t1; +# drop procedure if exists p1; +# --enable_warnings +# +# create table t1 (value varchar(15)); +# create procedure p1() update t1 set value='updated' where value='old'; +# +# # load the procedure into sp cache and execute once +# call p1(); +# +# insert into t1 (value) values ("old"); +# +# connect (rl_holder, localhost, root,,); +# connect (rl_acquirer, localhost, root,,); +# connect (rl_contender, localhost, root,,); +# connect (rl_wait, localhost, root,,); +# +# connection rl_holder; +# select get_lock('b26162',120); +# +# connection rl_acquirer; +# --send select 'rl_acquirer', value from t1 where get_lock('b26162',120); +# +# # we must wait till this select opens and locks the tables +# connection rl_wait; +# let $wait_condition= +# select count(*) = 1 from information_schema.processlist +# where state = "User lock" and +# info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)"; +# --source include/wait_condition.inc +# +# connection default; +# set session low_priority_updates=on; +# --send call p1(); +# +# connection rl_wait; +# let $wait_condition= +# select count(*) = 1 from information_schema.processlist +# where state = "Locked" and +# info = "update t1 set value='updated' where value='old'"; +# --source include/wait_condition.inc +# +# connection rl_contender; +# select 'rl_contender', value from t1; +# +# connection rl_holder; +# select release_lock('b26162'); +# +# connection rl_acquirer; +# --reap +# connection default; +# --reap +# +# disconnect rl_holder; +# disconnect rl_acquirer; +# disconnect rl_wait; +# drop procedure p1; +# drop table t1; +# set session low_priority_updates=default; From f1e18173dcd7da7a536b86dd78d868f64b1752fe Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 16:29:14 +0200 Subject: [PATCH 339/527] merge of bug 33266 to 5.1-opt --- mysql-test/r/subselect.result | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index 20d44933128..fe8374d665b 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4155,6 +4155,41 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1; 0 0 DROP TABLE t1, t2; +create table t1(a int,b int,key(a),key(b)); +insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), +(6,7),(7,4),(5,3); +5 +4 +3 +2 +1 +26 +25 +24 +23 +22 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 +drop table t1; CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5)); INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43); SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1); From 1164e2bc7a6dc18b33e401f0a9f6949c6f2ff6ea Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 11:34:08 -0300 Subject: [PATCH 340/527] Bug#33851 Passing UNSIGNED param to EXECUTE returns ERROR 1210 The problem is that passing anything other than a integer to a limit clause in a prepared statement would fail. This limitation was introduced to avoid replication problems (e.g: replicating the statement with a string argument would cause a parse failure in the slave). The solution is to convert arguments to the limit clause to a integer value and use this converted value when persisting the query to the log. mysql-test/r/limit.result: Update test case result. mysql-test/r/ps.result: Add test case result for Bug#33851 mysql-test/r/rpl_user_variables.result: Test case result for replication of prepared statement with limit clause. mysql-test/t/limit.test: Test parameters to limit clause. mysql-test/t/ps.test: Add test case for Bug#33851 mysql-test/t/rpl_user_variables.test: Test replication of a parameter which value is converted. sql/item.cc: Convert value to integer if it's a parameter to a limit clause. sql/item.h: Flag signal that item is a parameter to a limit clause. sql/item_func.cc: Const member functions, object is not mutated. sql/sql_class.h: Const member functions, object is not mutated. sql/sql_yacc.yy: Flag that item is a parameter to a limit clause. --- mysql-test/r/limit.result | 9 ++++++++ mysql-test/r/ps.result | 30 ++++++++++++++++++++++++++ mysql-test/r/rpl_user_variables.result | 16 ++++++++++++++ mysql-test/t/limit.test | 17 ++++++++++----- mysql-test/t/ps.test | 19 ++++++++++++++++ mysql-test/t/rpl_user_variables.test | 17 +++++++++++++++ sql/item.cc | 11 +++++++--- sql/item.h | 9 ++------ sql/item_func.cc | 2 +- sql/sql_class.h | 2 +- sql/sql_yacc.yy | 2 +- 11 files changed, 116 insertions(+), 18 deletions(-) diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index 01d7d7ca218..2acf74162a4 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -94,6 +94,9 @@ drop table t1; prepare s from "select 1 limit ?"; set @a='qwe'; execute s using @a; +1 +set @a=-1; +execute s using @a; ERROR HY000: Incorrect arguments to EXECUTE prepare s from "select 1 limit 1, ?"; execute s using @a; @@ -101,4 +104,10 @@ ERROR HY000: Incorrect arguments to EXECUTE prepare s from "select 1 limit ?, ?"; execute s using @a, @a; ERROR HY000: Incorrect arguments to EXECUTE +set @a=14632475938453979136; +execute s using @a, @a; +1 +set @a=-14632475938453979136; +execute s using @a, @a; +ERROR HY000: Incorrect arguments to EXECUTE End of 5.0 tests diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 32f48a688e2..9aef58d5702 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -1861,4 +1861,34 @@ prepare stmt from "create view v1 as select * from t1"; ERROR 42S02: Table 'test.t1' doesn't exist prepare stmt from "create view v1 as select * from `t1` `b`"; ERROR 42S02: Table 'test.t1' doesn't exist +prepare stmt from "select ?"; +set @arg= 123456789.987654321; +select @arg; +@arg +123456789.987654321 +execute stmt using @arg; +? +123456789.987654321 +set @arg= "string"; +select @arg; +@arg +string +execute stmt using @arg; +? +string +set @arg= 123456; +select @arg; +@arg +123456 +execute stmt using @arg; +? +123456 +set @arg= cast(-12345.54321 as decimal(20, 10)); +select @arg; +@arg +-12345.5432100000 +execute stmt using @arg; +? +-12345.5432100000 +deallocate prepare stmt; End of 5.0 tests. diff --git a/mysql-test/r/rpl_user_variables.result b/mysql-test/r/rpl_user_variables.result index 26ac2b26aaa..b8032a9c362 100644 --- a/mysql-test/r/rpl_user_variables.result +++ b/mysql-test/r/rpl_user_variables.result @@ -290,6 +290,22 @@ select * from t1; a b 2 1 drop table t1; +create table t1(a int); +insert into t1 values (1),(2); +prepare s1 from 'insert into t1 select a from t1 limit ?'; +set @x='1.1'; +execute s1 using @x; +select * from t1; +a +1 +2 +1 +select * from t1; +a +1 +2 +1 +drop table t1; End of 5.0 tests. DROP FUNCTION IF EXISTS f1; DROP FUNCTION IF EXISTS f2; diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test index 286c04785ff..9cccca1adc3 100644 --- a/mysql-test/t/limit.test +++ b/mysql-test/t/limit.test @@ -76,15 +76,22 @@ drop table t1; # Bug #28464: a string argument to 'limit ?' PS # -prepare s from "select 1 limit ?"; -set @a='qwe'; ---error 1210 +prepare s from "select 1 limit ?"; +set @a='qwe'; +execute s using @a; +set @a=-1; +--error ER_WRONG_ARGUMENTS execute s using @a; prepare s from "select 1 limit 1, ?"; ---error 1210 +--error ER_WRONG_ARGUMENTS execute s using @a; prepare s from "select 1 limit ?, ?"; ---error 1210 +--error ER_WRONG_ARGUMENTS +execute s using @a, @a; +set @a=14632475938453979136; +execute s using @a, @a; +set @a=-14632475938453979136; +--error ER_WRONG_ARGUMENTS execute s using @a, @a; --echo End of 5.0 tests diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 58ba901d82b..6c3f98f6a1a 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -1947,4 +1947,23 @@ prepare stmt from "create view v1 as select * from t1"; --error ER_NO_SUCH_TABLE prepare stmt from "create view v1 as select * from `t1` `b`"; +# +# Bug#33851: Passing UNSIGNED param to EXECUTE returns ERROR 1210 +# + +prepare stmt from "select ?"; +set @arg= 123456789.987654321; +select @arg; +execute stmt using @arg; +set @arg= "string"; +select @arg; +execute stmt using @arg; +set @arg= 123456; +select @arg; +execute stmt using @arg; +set @arg= cast(-12345.54321 as decimal(20, 10)); +select @arg; +execute stmt using @arg; +deallocate prepare stmt; + --echo End of 5.0 tests. diff --git a/mysql-test/t/rpl_user_variables.test b/mysql-test/t/rpl_user_variables.test index 8f8f0accbd1..70b708be258 100644 --- a/mysql-test/t/rpl_user_variables.test +++ b/mysql-test/t/rpl_user_variables.test @@ -337,6 +337,23 @@ select * from t1; connection master; drop table t1; +# +# Bug#33851: Passing UNSIGNED param to EXECUTE returns ERROR 1210 +# + +connection master; +create table t1(a int); +insert into t1 values (1),(2); +prepare s1 from 'insert into t1 select a from t1 limit ?'; +set @x='1.1'; +execute s1 using @x; +select * from t1; +sync_slave_with_master; +connection slave; +select * from t1; +connection master; +drop table t1; + --echo End of 5.0 tests. # This test uses a stored function that uses user-defined variables to return data diff --git a/sql/item.cc b/sql/item.cc index ffb18054750..a6a18e27b09 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2385,7 +2385,7 @@ default_set_param_func(Item_param *param, Item_param::Item_param(unsigned pos_in_query_arg) : - strict_type(FALSE), + limit_clause_param(FALSE), state(NO_VALUE), item_result_type(STRING_RESULT), /* Don't pretend to be a literal unless value for this item is set. */ @@ -2581,8 +2581,13 @@ bool Item_param::set_from_user_var(THD *thd, const user_var_entry *entry) { item_result_type= entry->type; unsigned_flag= entry->unsigned_flag; - if (strict_type && required_result_type != item_result_type) - DBUG_RETURN(1); + if (limit_clause_param) + { + my_bool unused; + set_int(entry->val_int(&unused), MY_INT64_NUM_DECIMAL_DIGITS); + item_type= Item::INT_ITEM; + DBUG_RETURN(!unsigned_flag && value.integer < 0 ? 1 : 0); + } switch (item_result_type) { case REAL_RESULT: set_double(*(double*)entry->value); diff --git a/sql/item.h b/sql/item.h index ae3e240778a..7dc9ed4ec10 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1417,8 +1417,6 @@ class Item_param :public Item char cnvbuf[MAX_FIELD_WIDTH]; String cnvstr; Item *cnvitem; - bool strict_type; - enum Item_result required_result_type; public: enum enum_item_param_state @@ -1548,11 +1546,8 @@ public: Otherwise return FALSE. */ bool eq(const Item *item, bool binary_cmp) const; - void set_strict_type(enum Item_result result_type_arg) - { - strict_type= TRUE; - required_result_type= result_type_arg; - } + /** Item is a argument to a limit clause. */ + bool limit_clause_param; }; diff --git a/sql/item_func.cc b/sql/item_func.cc index 639e069d24e..84dd3e3ebc6 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3985,7 +3985,7 @@ double user_var_entry::val_real(my_bool *null_value) /* Get the value of a variable as an integer */ -longlong user_var_entry::val_int(my_bool *null_value) +longlong user_var_entry::val_int(my_bool *null_value) const { if ((*null_value= (value == 0))) return LL(0); diff --git a/sql/sql_class.h b/sql/sql_class.h index 97f2d07b1d3..4ca8947de30 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2329,7 +2329,7 @@ class user_var_entry bool unsigned_flag; double val_real(my_bool *null_value); - longlong val_int(my_bool *null_value); + longlong val_int(my_bool *null_value) const; String *val_str(my_bool *null_value, String *str, uint decimals); my_decimal *val_decimal(my_bool *null_value, my_decimal *result); DTCollation collation; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index a7c1060025d..04285fea227 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -6320,7 +6320,7 @@ limit_options: limit_option: param_marker { - ((Item_param *) $1)->set_strict_type(INT_RESULT); + ((Item_param *) $1)->limit_clause_param= TRUE; } | ULONGLONG_NUM { $$= new Item_uint($1.str, $1.length); } | LONG_NUM { $$= new Item_uint($1.str, $1.length); } From 33a4e7609095388099bb3048778a5b5d164d26fa Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 14:55:46 -0300 Subject: [PATCH 341/527] Bug#34655 Compile error Rename client_last_error to last_error and client_last_errno to last_errno to not break connectors which use the internal net structure for error handling. include/mysql_com.h: Rename client_last_error to last_error, client_last_errno to last_errno. include/mysql_h.ic: Rename client_last_error to last_error, client_last_errno to last_errno. libmysql/libmysql.c: Rename client_last_error to last_error, client_last_errno to last_errno. libmysql/manager.c: Rename client_last_error to last_error, client_last_errno to last_errno. libmysqld/lib_sql.cc: Rename client_last_error to last_error, client_last_errno to last_errno. libmysqld/libmysqld.c: Rename client_last_error to last_error, client_last_errno to last_errno. server-tools/instance-manager/mysql_connection.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/log_event.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql-common/client.c: Rename client_last_error to last_error, client_last_errno to last_errno. sql/log_event_old.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/net_serv.cc: Rename client_last_error to last_error, client_last_errno to last_errno. sql/repl_failsafe.cc: Rename client_last_error to last_error, client_last_errno to last_errno. --- include/mysql_com.h | 4 +- include/mysql_h.ic | 86 +++++++++---------- libmysql/libmysql.c | 36 ++++---- libmysql/manager.c | 2 +- libmysqld/lib_sql.cc | 6 +- libmysqld/libmysqld.c | 4 +- .../instance-manager/mysql_connection.cc | 2 +- sql-common/client.c | 60 ++++++------- sql/log_event.cc | 2 +- sql/log_event_old.cc | 22 ++--- sql/net_serv.cc | 24 +++--- sql/repl_failsafe.cc | 2 +- 12 files changed, 125 insertions(+), 125 deletions(-) diff --git a/include/mysql_com.h b/include/mysql_com.h index 7eefad44716..cea98cebc61 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -217,12 +217,12 @@ typedef struct st_net { functions and methods to maintain proper locking. */ unsigned char *query_cache_query; - unsigned int client_last_errno; + unsigned int last_errno; unsigned char error; my_bool unused2; /* Please remove with the next incompatible ABI change. */ my_bool return_errno; /** Client library error message buffer. Actually belongs to struct MYSQL. */ - char client_last_error[MYSQL_ERRMSG_SIZE]; + char last_error[MYSQL_ERRMSG_SIZE]; /** Client library sqlstate buffer. Set along with the error message. */ char sqlstate[SQLSTATE_LENGTH+1]; void *extension; diff --git a/include/mysql_h.ic b/include/mysql_h.ic index 4f138d9a229..832678a106b 100644 --- a/include/mysql_h.ic +++ b/include/mysql_h.ic @@ -106,9 +106,9 @@ typedef struct st_mysql_ftparser_param MYSQL_FTPARSER_PARAM; typedef struct st_mysql_methods MYSQL_METHODS; # 47 "mysql_time.h" typedef struct st_mysql_time MYSQL_TIME; -# 384 "mysql_com.h" +# 383 "mysql_com.h" typedef struct st_udf_args UDF_ARGS; -# 398 "mysql_com.h" +# 397 "mysql_com.h" typedef struct st_udf_init UDF_INIT; # 26 "my_alloc.h" typedef struct st_used_mem USED_MEM; @@ -130,7 +130,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo unsigned int mbminlen; unsigned int mbmaxlen; }; -# 370 "mysql_com.h" +# 369 "mysql_com.h" struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(double)))) rand_struct { unsigned long int seed1; @@ -542,11 +542,11 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned my_bool compress; my_bool unused1; unsigned char * query_cache_query; - unsigned int client_last_errno; + unsigned int last_errno; unsigned char error; my_bool unused2; my_bool return_errno; - char client_last_error[512]; + char last_error[512]; char sqlstate[(5 + 1)]; void * extension; }; @@ -558,7 +558,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo char const * * type_names; unsigned int * type_lengths; }; -# 384 "mysql_com.h" +# 383 "mysql_com.h" struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_udf_args { unsigned int arg_count; @@ -570,7 +570,7 @@ struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(vo unsigned long int * attribute_lengths; void * extension; }; -# 398 "mysql_com.h" +# 397 "mysql_com.h" struct __attribute__((aligned(__alignof__(unsigned long int)), aligned(__alignof__(void *)))) st_udf_init { my_bool maybe_null; @@ -587,7 +587,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned unsigned int left; unsigned int size; }; -# 381 "mysql_com.h" +# 380 "mysql_com.h" enum Item_result { STRING_RESULT = 0, @@ -596,7 +596,7 @@ enum Item_result ROW_RESULT = 3, DECIMAL_RESULT = 4, }; -# 322 "mysql_com.h" +# 321 "mysql_com.h" enum enum_cursor_type { CURSOR_TYPE_NO_CURSOR = 0, @@ -604,7 +604,7 @@ enum enum_cursor_type CURSOR_TYPE_FOR_UPDATE = 2, CURSOR_TYPE_SCROLLABLE = 4, }; -# 235 "mysql_com.h" +# 234 "mysql_com.h" enum enum_field_types { MYSQL_TYPE_DECIMAL = 0, @@ -651,7 +651,7 @@ enum enum_ftparser_mode MYSQL_FTPARSER_WITH_STOPWORDS = 1, MYSQL_FTPARSER_FULL_BOOLEAN_INFO = 2, }; -# 332 "mysql_com.h" +# 331 "mysql_com.h" enum enum_mysql_set_option { MYSQL_OPTION_MULTI_STATEMENTS_ON = 0, @@ -730,7 +730,7 @@ enum enum_stmt_attr_type STMT_ATTR_CURSOR_TYPE = 1, STMT_ATTR_PREFETCH_ROWS = 2, }; -# 297 "mysql_com.h" +# 296 "mysql_com.h" enum mysql_enum_shutdown_level { SHUTDOWN_DEFAULT = 0, @@ -790,13 +790,13 @@ enum mysql_status MYSQL_STATUS_GET_RESULT = 1, MYSQL_STATUS_USE_RESULT = 2, }; -# 439 "mysql_com.h" +# 441 "mysql_com.h" extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2); -# 432 "mysql_com.h" +# 434 "mysql_com.h" extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt); # 35 "typelib.h" extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from); -# 427 "mysql_com.h" +# 429 "mysql_com.h" extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); # 32 "typelib.h" extern int find_type(char * x, TYPELIB const * typelib, unsigned int); @@ -804,15 +804,15 @@ extern int find_type(char * x, TYPELIB const * typelib, unsigned int); extern int find_type_or_exit(char const * x, TYPELIB * typelib, char const * option); # 29 "typelib.h" extern my_ulonglong find_typeset(char * x, TYPELIB * typelib, int * error_position); -# 441 "mysql_com.h" +# 443 "mysql_com.h" extern void get_salt_from_password(unsigned char * res, char const * password); -# 434 "mysql_com.h" +# 436 "mysql_com.h" extern void get_salt_from_password_323(unsigned long int * res, char const * password); -# 447 "mysql_com.h" +# 449 "mysql_com.h" extern char * get_tty_password(char const * opt_message); # 34 "typelib.h" extern char const * get_type(TYPELIB * typelib, unsigned int); -# 429 "mysql_com.h" +# 431 "mysql_com.h" extern void hash_password(unsigned long int * to, char const * password, unsigned int); # 30 "my_list.h" extern LIST * list_add(LIST * root, LIST * element); @@ -828,31 +828,31 @@ extern unsigned int list_length(LIST *); extern LIST * list_reverse(LIST * root); # 36 "my_list.h" extern int list_walk(LIST *, list_walk_action, unsigned char * argument); -# 442 "mysql_com.h" +# 444 "mysql_com.h" extern void make_password_from_salt(char * to, unsigned char const * hash_stage2); -# 435 "mysql_com.h" -extern void make_password_from_salt_323(char * to, unsigned long int const * salt); # 437 "mysql_com.h" +extern void make_password_from_salt_323(char * to, unsigned long int const * salt); +# 439 "mysql_com.h" extern void make_scrambled_password(char * to, char const * password); -# 430 "mysql_com.h" +# 432 "mysql_com.h" extern void make_scrambled_password_323(char * to, char const * password); # 33 "typelib.h" extern void make_type(char * to, unsigned int, TYPELIB * typelib); -# 367 "mysql_com.h" +# 366 "mysql_com.h" extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int); -# 344 "mysql_com.h" +# 343 "mysql_com.h" extern my_bool my_net_init(NET * net, Vio * vio); -# 345 "mysql_com.h" +# 344 "mysql_com.h" extern void my_net_local_init(NET * net); -# 355 "mysql_com.h" +# 354 "mysql_com.h" extern unsigned long int my_net_read(NET * net); -# 350 "mysql_com.h" +# 349 "mysql_com.h" extern my_bool my_net_write(NET * net, unsigned char const * packet, size_t); -# 426 "mysql_com.h" +# 428 "mysql_com.h" extern double my_rnd(struct rand_struct *); -# 453 "mysql_com.h" +# 455 "mysql_com.h" extern void my_thread_end(void); -# 452 "mysql_com.h" +# 454 "mysql_com.h" extern my_bool my_thread_init(void); # 560 "mysql.h" extern void myodbc_remove_escape(MYSQL * mysql, char * name); @@ -890,7 +890,7 @@ extern void mysql_enable_rpl_parse(MYSQL * mysql); extern my_bool mysql_eof(MYSQL_RES * res); # 423 "mysql.h" extern unsigned int mysql_errno(MYSQL * mysql); -# 448 "mysql_com.h" +# 450 "mysql_com.h" extern char const * mysql_errno_to_sqlstate(unsigned int); # 424 "mysql.h" extern char const * mysql_error(MYSQL * mysql); @@ -1108,25 +1108,25 @@ extern char * mysql_unix_port; extern MYSQL_RES * mysql_use_result(MYSQL * mysql); # 426 "mysql.h" extern unsigned int mysql_warning_count(MYSQL * mysql); -# 347 "mysql_com.h" -extern void net_clear(NET * net, my_bool); # 346 "mysql_com.h" +extern void net_clear(NET * net, my_bool); +# 345 "mysql_com.h" extern void net_end(NET * net); -# 349 "mysql_com.h" -extern my_bool net_flush(NET * net); -# 354 "mysql_com.h" -extern int net_real_write(NET * net, unsigned char const * packet, size_t); # 348 "mysql_com.h" +extern my_bool net_flush(NET * net); +# 353 "mysql_com.h" +extern int net_real_write(NET * net, unsigned char const * packet, size_t); +# 347 "mysql_com.h" extern my_bool net_realloc(NET * net, size_t); -# 351 "mysql_com.h" +# 350 "mysql_com.h" extern my_bool net_write_command(NET * net, unsigned char, unsigned char const * header, size_t, unsigned char const * packet, size_t); -# 443 "mysql_com.h" +# 445 "mysql_com.h" extern char * octet2hex(char * to, char const * str, unsigned int); -# 424 "mysql_com.h" +# 426 "mysql_com.h" extern void randominit(struct rand_struct *, unsigned long int, unsigned long int); -# 438 "mysql_com.h" +# 440 "mysql_com.h" extern void scramble(char * to, char const * message, char const * password); -# 431 "mysql_com.h" +# 433 "mysql_com.h" extern void scramble_323(char * to, char const * message, char const * password); # 37 "typelib.h" extern TYPELIB sql_protocol_typelib; diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 06eae528574..d79910a2ef4 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -440,11 +440,11 @@ static void expand_error(MYSQL* mysql, int error) char tmp[MYSQL_ERRMSG_SIZE]; char *p; uint err_length; - strmake(tmp, mysql->net.client_last_error, MYSQL_ERRMSG_SIZE-1); - p = strmake(mysql->net.client_last_error, ER(error), MYSQL_ERRMSG_SIZE-1); - err_length= (uint) (p - mysql->net.client_last_error); + strmake(tmp, mysql->net.last_error, MYSQL_ERRMSG_SIZE-1); + p = strmake(mysql->net.last_error, ER(error), MYSQL_ERRMSG_SIZE-1); + err_length= (uint) (p - mysql->net.last_error); strmake(p, tmp, MYSQL_ERRMSG_SIZE-1 - err_length); - mysql->net.client_last_errno = error; + mysql->net.last_errno = error; } /* @@ -870,10 +870,10 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename) VOID(my_net_write(net,(const uchar*) "",0)); /* Server needs one packet */ net_flush(net); strmov(net->sqlstate, unknown_sqlstate); - net->client_last_errno= + net->last_errno= (*options->local_infile_error)(li_ptr, - net->client_last_error, - sizeof(net->client_last_error)-1); + net->last_error, + sizeof(net->last_error)-1); goto err; } @@ -900,10 +900,10 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename) if (readcount < 0) { - net->client_last_errno= + net->last_errno= (*options->local_infile_error)(li_ptr, - net->client_last_error, - sizeof(net->client_last_error)-1); + net->last_error, + sizeof(net->last_error)-1); goto err; } @@ -1397,7 +1397,7 @@ const char *cli_read_statistics(MYSQL *mysql) if (!mysql->net.read_pos[0]) { set_mysql_error(mysql, CR_WRONG_HOST_INFO, unknown_sqlstate); - return mysql->net.client_last_error; + return mysql->net.last_error; } return (char*) mysql->net.read_pos; } @@ -1408,7 +1408,7 @@ mysql_stat(MYSQL *mysql) { DBUG_ENTER("mysql_stat"); if (simple_command(mysql,COM_STATISTICS,0,0,0)) - DBUG_RETURN(mysql->net.client_last_error); + DBUG_RETURN(mysql->net.last_error); DBUG_RETURN((*mysql->methods->read_statistics)(mysql)); } @@ -1773,7 +1773,7 @@ static my_bool my_realloc_str(NET *net, ulong length) if (res) { strmov(net->sqlstate, unknown_sqlstate); - strmov(net->client_last_error, ER(net->client_last_errno)); + strmov(net->last_error, ER(net->last_errno)); } net->write_pos= net->buff+ buf_length; } @@ -1825,14 +1825,14 @@ void set_stmt_errmsg(MYSQL_STMT *stmt, NET *net) { DBUG_ENTER("set_stmt_errmsg"); DBUG_PRINT("enter", ("error: %d/%s '%s'", - net->client_last_errno, + net->last_errno, net->sqlstate, - net->client_last_error)); + net->last_error)); DBUG_ASSERT(stmt != 0); - stmt->last_errno= net->client_last_errno; - if (net->client_last_error && net->client_last_error[0]) - strmov(stmt->last_error, net->client_last_error); + stmt->last_errno= net->last_errno; + if (net->last_error && net->last_error[0]) + strmov(stmt->last_error, net->last_error); strmov(stmt->sqlstate, net->sqlstate); DBUG_VOID_RETURN; diff --git a/libmysql/manager.c b/libmysql/manager.c index 27d35758f3e..53ffffa55c0 100644 --- a/libmysql/manager.c +++ b/libmysql/manager.c @@ -160,7 +160,7 @@ MYSQL_MANAGER* STDCALL mysql_manager_connect(MYSQL_MANAGER* con, msg_len=strlen(msg_buf); if (my_net_write(&con->net,(uchar*) msg_buf,msg_len) || net_flush(&con->net)) { - con->last_errno=con->net.client_last_errno; + con->last_errno=con->net.last_errno; strmov(con->last_error,"Write error on socket"); goto err; } diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index cb3b6a7115d..ae16a63a463 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -61,8 +61,8 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data) { NET *net= &mysql->net; struct embedded_query_result *ei= data->embedded_info; - net->client_last_errno= ei->last_errno; - strmake(net->client_last_error, ei->info, sizeof(net->client_last_error)-1); + net->last_errno= ei->last_errno; + strmake(net->last_error, ei->info, sizeof(net->last_error)-1); memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate)); mysql->server_status= ei->server_status; my_free(data, MYF(0)); @@ -685,7 +685,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db) err: { NET *net= &mysql->net; - strmake(net->client_last_error, thd->main_da.message(), sizeof(net->client_last_error)-1); + strmake(net->last_error, thd->main_da.message(), sizeof(net->last_error)-1); memcpy(net->sqlstate, mysql_errno_to_sqlstate(thd->main_da.sql_errno()), sizeof(net->sqlstate)-1); diff --git a/libmysqld/libmysqld.c b/libmysqld/libmysqld.c index a8542f6fca9..aff9391e015 100644 --- a/libmysqld/libmysqld.c +++ b/libmysqld/libmysqld.c @@ -210,8 +210,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user, error: DBUG_PRINT("error",("message: %u (%s)", - mysql->net.client_last_errno, - mysql->net.client_last_error)); + mysql->net.last_errno, + mysql->net.last_error)); { /* Free alloced memory */ my_bool free_me=mysql->free_me; diff --git a/server-tools/instance-manager/mysql_connection.cc b/server-tools/instance-manager/mysql_connection.cc index 3233b7513a1..bf08f963aa3 100644 --- a/server-tools/instance-manager/mysql_connection.cc +++ b/server-tools/instance-manager/mysql_connection.cc @@ -257,7 +257,7 @@ int Mysql_connection::do_command() return 1; if (thread_registry->is_shutdown()) return 1; - net_send_error(&net, net.client_last_errno); + net_send_error(&net, net.last_errno); net.error= 0; return 0; } diff --git a/sql-common/client.c b/sql-common/client.c index f4d587d4df3..b1728f0f74f 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -289,8 +289,8 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate) DBUG_ASSERT(mysql != 0); net= &mysql->net; - net->client_last_errno= errcode; - strmov(net->client_last_error, ER(errcode)); + net->last_errno= errcode; + strmov(net->last_error, ER(errcode)); strmov(net->sqlstate, sqlstate); DBUG_VOID_RETURN; @@ -304,8 +304,8 @@ void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate) void net_clear_error(NET *net) { - net->client_last_errno= 0; - net->client_last_error[0]= '\0'; + net->last_errno= 0; + net->last_error[0]= '\0'; strmov(net->sqlstate, not_error_sqlstate); } @@ -331,9 +331,9 @@ static void set_mysql_extended_error(MYSQL *mysql, int errcode, DBUG_ASSERT(mysql != 0); net= &mysql->net; - net->client_last_errno= errcode; + net->last_errno= errcode; va_start(args, format); - my_vsnprintf(net->client_last_error, sizeof(net->client_last_error)-1, + my_vsnprintf(net->last_error, sizeof(net->last_error)-1, format, args); va_end(args); strmov(net->sqlstate, sqlstate); @@ -667,7 +667,7 @@ cli_safe_read(MYSQL *mysql) return (packet_error); #endif /*MYSQL_SERVER*/ end_server(mysql); - set_mysql_error(mysql, net->client_last_errno == ER_NET_PACKET_TOO_LARGE ? + set_mysql_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ? CR_NET_PACKET_TOO_LARGE: CR_SERVER_LOST, unknown_sqlstate); return (packet_error); } @@ -676,7 +676,7 @@ cli_safe_read(MYSQL *mysql) if (len > 3) { char *pos=(char*) net->read_pos+1; - net->client_last_errno=uint2korr(pos); + net->last_errno=uint2korr(pos); pos+=2; len-=2; if (protocol_41(mysql) && pos[0] == '#') @@ -684,8 +684,8 @@ cli_safe_read(MYSQL *mysql) strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH); pos+= SQLSTATE_LENGTH+1; } - (void) strmake(net->client_last_error,(char*) pos, - min((uint) len,(uint) sizeof(net->client_last_error)-1)); + (void) strmake(net->last_error,(char*) pos, + min((uint) len,(uint) sizeof(net->last_error)-1)); } else set_mysql_error(mysql, CR_UNKNOWN_ERROR, unknown_sqlstate); @@ -701,9 +701,9 @@ cli_safe_read(MYSQL *mysql) mysql->server_status&= ~SERVER_MORE_RESULTS_EXISTS; DBUG_PRINT("error",("Got error: %d/%s (%s)", - net->client_last_errno, + net->last_errno, net->sqlstate, - net->client_last_error)); + net->last_error)); return(packet_error); } return len; @@ -760,7 +760,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, { DBUG_PRINT("error",("Can't send command to server. Error: %d", socket_errno)); - if (net->client_last_errno == ER_NET_PACKET_TOO_LARGE) + if (net->last_errno == ER_NET_PACKET_TOO_LARGE) { set_mysql_error(mysql, CR_NET_PACKET_TOO_LARGE, unknown_sqlstate); goto end; @@ -845,7 +845,7 @@ static my_bool is_NT(void) @retval 0 success @retval !0 network error or the server is not commercial. - Error code is saved in mysql->net.client_last_errno. + Error code is saved in mysql->net.last_errno. */ static int check_license(MYSQL *mysql) @@ -858,7 +858,7 @@ static int check_license(MYSQL *mysql) if (mysql_real_query(mysql, query, sizeof(query)-1)) { - if (net->client_last_errno == ER_UNKNOWN_SYSTEM_VARIABLE) + if (net->last_errno == ER_UNKNOWN_SYSTEM_VARIABLE) { set_mysql_extended_error(mysql, CR_WRONG_LICENSE, unknown_sqlstate, ER(CR_WRONG_LICENSE), required_license); @@ -873,7 +873,7 @@ static int check_license(MYSQL *mysql) two is ever true for server variables now), or column value mismatch, set wrong license error. */ - if (!net->client_last_errno && + if (!net->last_errno && (!row || !row[0] || strncmp(row[0], required_license, sizeof(required_license)))) { @@ -881,7 +881,7 @@ static int check_license(MYSQL *mysql) ER(CR_WRONG_LICENSE), required_license); } mysql_free_result(res); - return net->client_last_errno; + return net->last_errno; } #endif /* CHECK_LICENSE */ @@ -2090,7 +2090,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, if ((pkt_length=cli_safe_read(mysql)) == packet_error) { - if (mysql->net.client_last_errno == CR_SERVER_LOST) + if (mysql->net.last_errno == CR_SERVER_LOST) set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, ER(CR_SERVER_LOST_EXTENDED), "reading initial communication packet", @@ -2324,7 +2324,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, if ((pkt_length=cli_safe_read(mysql)) == packet_error) { - if (mysql->net.client_last_errno == CR_SERVER_LOST) + if (mysql->net.last_errno == CR_SERVER_LOST) set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, ER(CR_SERVER_LOST_EXTENDED), "reading authorization packet", @@ -2352,7 +2352,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, /* Read what server thinks about out new auth message report */ if (cli_safe_read(mysql) == packet_error) { - if (mysql->net.client_last_errno == CR_SERVER_LOST) + if (mysql->net.last_errno == CR_SERVER_LOST) set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, ER(CR_SERVER_LOST_EXTENDED), "reading final connect information", @@ -2371,7 +2371,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, if (db && mysql_select_db(mysql, db)) { - if (mysql->net.client_last_errno == CR_SERVER_LOST) + if (mysql->net.last_errno == CR_SERVER_LOST) set_mysql_extended_error(mysql, CR_SERVER_LOST, unknown_sqlstate, ER(CR_SERVER_LOST_EXTENDED), "Setting intital database", @@ -2415,9 +2415,9 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, error: reset_sigpipe(mysql); DBUG_PRINT("error",("message: %u/%s (%s)", - net->client_last_errno, + net->last_errno, net->sqlstate, - net->client_last_error)); + net->last_error)); { /* Free alloced memory */ end_server(mysql); @@ -2475,8 +2475,8 @@ my_bool mysql_reconnect(MYSQL *mysql) mysql->db, mysql->port, mysql->unix_socket, mysql->client_flag | CLIENT_REMEMBER_OPTIONS)) { - mysql->net.client_last_errno= tmp_mysql.net.client_last_errno; - strmov(mysql->net.client_last_error, tmp_mysql.net.client_last_error); + mysql->net.last_errno= tmp_mysql.net.last_errno; + strmov(mysql->net.last_error, tmp_mysql.net.last_error); strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate); DBUG_RETURN(1); } @@ -2485,8 +2485,8 @@ my_bool mysql_reconnect(MYSQL *mysql) DBUG_PRINT("error", ("mysql_set_character_set() failed")); bzero((char*) &tmp_mysql.options,sizeof(tmp_mysql.options)); mysql_close(&tmp_mysql); - mysql->net.client_last_errno= tmp_mysql.net.client_last_errno; - strmov(mysql->net.client_last_error, tmp_mysql.net.client_last_error); + mysql->net.last_errno= tmp_mysql.net.last_errno; + strmov(mysql->net.last_error, tmp_mysql.net.last_error); strmov(mysql->net.sqlstate, tmp_mysql.net.sqlstate); DBUG_RETURN(1); } @@ -3087,13 +3087,13 @@ unsigned int STDCALL mysql_num_fields(MYSQL_RES *res) uint STDCALL mysql_errno(MYSQL *mysql) { - return mysql->net.client_last_errno; + return mysql->net.last_errno; } const char * STDCALL mysql_error(MYSQL *mysql) { - return mysql->net.client_last_error; + return mysql->net.last_error; } @@ -3162,7 +3162,7 @@ int STDCALL mysql_set_character_set(MYSQL *mysql, const char *cs_name) ER(CR_CANT_READ_CHARSET), cs_name, cs_dir_name); } charsets_dir= save_csdir; - return mysql->net.client_last_errno; + return mysql->net.last_errno; } diff --git a/sql/log_event.cc b/sql/log_event.cc index 7c98ccaff28..cc6ae14f160 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -137,7 +137,7 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error, " %s, Error_code: %d;", err->msg, err->code); } - rli->report(level, thd->net.client_last_errno, + rli->report(level, thd->net.last_errno, "Could not execute %s event on table %s.%s;" "%s handler error %s; " "the event's master log %s, end_log_pos %lu", diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 13f9763debe..808356a05c7 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -1529,10 +1529,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ - uint actual_error= thd->net.client_last_errno; + uint actual_error= thd->net.last_errno; rli->report(ERROR_LEVEL, actual_error, "Error '%s' in %s event: when locking tables", - (actual_error ? thd->net.client_last_error : + (actual_error ? thd->net.last_error : "unexpected success or fatal error"), get_type_str()); thd->is_fatal_error= 1; @@ -1573,10 +1573,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) Error reporting borrowed from Query_log_event with many excessive simplifications (we don't honour --slave-skip-errors) */ - uint actual_error= thd->net.client_last_errno; + uint actual_error= thd->net.last_errno; rli->report(ERROR_LEVEL, actual_error, "Error '%s' on reopening tables", - (actual_error ? thd->net.client_last_error : + (actual_error ? thd->net.last_error : "unexpected success or fatal error")); thd->is_slave_error= 1; } @@ -1729,10 +1729,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) break; default: - rli->report(ERROR_LEVEL, thd->net.client_last_errno, + rli->report(ERROR_LEVEL, thd->net.last_errno, "Error in %s event: row application failed. %s", get_type_str(), - thd->net.client_last_error ? thd->net.client_last_error : ""); + thd->net.last_error ? thd->net.last_error : ""); thd->is_slave_error= 1; break; } @@ -1779,12 +1779,12 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) if (error) { /* error has occured during the transaction */ - rli->report(ERROR_LEVEL, thd->net.client_last_errno, + rli->report(ERROR_LEVEL, thd->net.last_errno, "Error in %s event: error during transaction execution " "on table %s.%s. %s", get_type_str(), table->s->db.str, table->s->table_name.str, - thd->net.client_last_error ? thd->net.client_last_error : ""); + thd->net.last_error ? thd->net.last_error : ""); /* If one day we honour --skip-slave-errors in row-based replication, and @@ -1913,7 +1913,7 @@ Old_rows_log_event::do_update_pos(Relay_log_info *rli) example "no key found" (as this is allowed). This is a safety measure; apparently those errors (e.g. when executing a Delete_rows_log_event_old of a non-existing row, like in - rpl_row_mystery22.test, thd->net.client_last_error = "Can't + rpl_row_mystery22.test, thd->net.last_error = "Can't find record in 't1'" and last_errno=1032) do not become visible. We still prefer to wipe them out. */ @@ -2647,8 +2647,8 @@ Write_rows_log_event_old::do_exec_row(const Relay_log_info *const rli) DBUG_ASSERT(m_table != NULL); int error= write_row(rli, TRUE /* overwrite */); - if (error && !thd->net.client_last_errno) - thd->net.client_last_errno= error; + if (error && !thd->net.last_errno) + thd->net.last_errno= error; return error; } diff --git a/sql/net_serv.cc b/sql/net_serv.cc index ad653a2267d..1098e8e6832 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -127,10 +127,10 @@ my_bool my_net_init(NET *net, Vio* vio) net->error=0; net->return_errno=0; net->return_status=0; net->pkt_nr=net->compress_pkt_nr=0; net->write_pos=net->read_pos = net->buff; - net->client_last_error[0]=0; + net->last_error[0]=0; net->compress=0; net->reading_or_writing=0; net->where_b = net->remain_in_buf=0; - net->client_last_errno=0; + net->last_errno=0; #ifdef USE_QUERY_CACHE query_cache_init_query(net); #else @@ -177,7 +177,7 @@ my_bool net_realloc(NET *net, size_t length) net->max_packet_size)); /* @todo: 1 and 2 codes are identical. */ net->error= 1; - net->client_last_errno= ER_NET_PACKET_TOO_LARGE; + net->last_errno= ER_NET_PACKET_TOO_LARGE; #ifdef MYSQL_SERVER my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); #endif @@ -194,7 +194,7 @@ my_bool net_realloc(NET *net, size_t length) { /* @todo: 1 and 2 codes are identical. */ net->error= 1; - net->client_last_errno= ER_OUT_OF_RESOURCES; + net->last_errno= ER_OUT_OF_RESOURCES; /* In the server the error is reported by MY_WME flag. */ DBUG_RETURN(1); } @@ -579,7 +579,7 @@ net_real_write(NET *net,const uchar *packet, size_t len) COMP_HEADER_SIZE, MYF(MY_WME)))) { net->error= 2; - net->client_last_errno= ER_OUT_OF_RESOURCES; + net->last_errno= ER_OUT_OF_RESOURCES; /* In the server, the error is reported by MY_WME flag. */ net->reading_or_writing= 0; DBUG_RETURN(1); @@ -632,7 +632,7 @@ net_real_write(NET *net,const uchar *packet, size_t len) my_progname,vio_errno(net->vio)); #endif /* EXTRA_DEBUG */ net->error= 2; /* Close socket */ - net->client_last_errno= ER_NET_PACKET_TOO_LARGE; + net->last_errno= ER_NET_PACKET_TOO_LARGE; #ifdef MYSQL_SERVER my_error(ER_NET_PACKET_TOO_LARGE, MYF(0)); #endif @@ -662,10 +662,10 @@ net_real_write(NET *net,const uchar *packet, size_t len) } #endif /* defined(THREAD_SAFE_CLIENT) && !defined(MYSQL_SERVER) */ net->error= 2; /* Close socket */ - net->client_last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : + net->last_errno= (interrupted ? ER_NET_WRITE_INTERRUPTED : ER_NET_ERROR_ON_WRITE); #ifdef MYSQL_SERVER - my_error(net->client_last_errno, MYF(0)); + my_error(net->last_errno, MYF(0)); #endif /* MYSQL_SERVER */ break; } @@ -844,7 +844,7 @@ my_real_read(NET *net, size_t *complen) #endif /* EXTRA_DEBUG */ len= packet_error; net->error= 2; /* Close socket */ - net->client_last_errno= ER_NET_FCNTL_ERROR; + net->last_errno= ER_NET_FCNTL_ERROR; #ifdef MYSQL_SERVER my_error(ER_NET_FCNTL_ERROR, MYF(0)); #endif @@ -876,11 +876,11 @@ my_real_read(NET *net, size_t *complen) remain, vio_errno(net->vio), (long) length)); len= packet_error; net->error= 2; /* Close socket */ - net->client_last_errno= (vio_was_interrupted(net->vio) ? + net->last_errno= (vio_was_interrupted(net->vio) ? ER_NET_READ_INTERRUPTED : ER_NET_READ_ERROR); #ifdef MYSQL_SERVER - my_error(net->client_last_errno, MYF(0)); + my_error(net->last_errno, MYF(0)); #endif goto end; } @@ -1100,7 +1100,7 @@ my_net_read(NET *net) &complen)) { net->error= 2; /* caller will close socket */ - net->client_last_errno= ER_NET_UNCOMPRESS_ERROR; + net->last_errno= ER_NET_UNCOMPRESS_ERROR; #ifdef MYSQL_SERVER my_error(ER_NET_UNCOMPRESS_ERROR, MYF(0)); #endif diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index f8f01d2cad1..a8953217ce1 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -699,7 +699,7 @@ int connect_to_master(THD *thd, MYSQL* mysql, Master_info* mi) if (!mi->host || !*mi->host) /* empty host */ { - strmov(mysql->net.client_last_error, "Master is not configured"); + strmov(mysql->net.last_error, "Master is not configured"); DBUG_RETURN(1); } mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (char *) &slave_net_timeout); From d40ca16156641481abd45f93e31233044f4b9df6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 22:53:31 +0400 Subject: [PATCH 342/527] Fixed bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*): Assertion `0' failed If ROW item is a part of an expression that also has aggregate function calls (COUNT/SUM/AVG...), a "splitting" with an Item::split_sum_func2 function is applied to that ROW item. Current implementation of Item::split_sum_func2 replaces this Item_row with a newly created Item_aggregate_ref reference to it. Then the row cache tries to work with the Item_aggregate_ref object as with the Item_row object: row cache calls row-emulation methods such as cols and element_index. Item_aggregate_ref (like it's parent Item_ref) inherits dummy implementations of those methods from the hierarchy root Item, and call to them leads to failed assertions and wrong data output. Row-emulation virtual functions (cols, element_index, addr, check_cols, null_inside and bring_value) of Item_ref have been overloaded to forward calls to an underlying item reference. mysql-test/r/row.result: Added test case for bug #34620. mysql-test/t/row.test: Added test case for bug #34620. sql/item.h: Fixed bug #34620. Row-emulation virtual functions (cols, element_index, addr, check_cols, null_inside and bring_value) of Item_ref have been overloaded to forward calls to an underlying item reference. --- mysql-test/r/row.result | 9 +++++++++ mysql-test/t/row.test | 13 +++++++++++++ sql/item.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result index 702e66fea62..98c79d4bc00 100644 --- a/mysql-test/r/row.result +++ b/mysql-test/r/row.result @@ -434,3 +434,12 @@ SELECT @x; @x 99 DROP TABLE t1; +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1); +SELECT ROW(a, 1) IN (SELECT SUM(b), 1) FROM t1 GROUP BY a; +ROW(a, 1) IN (SELECT SUM(b), 1) +1 +SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a; +ROW(a, 1) IN (SELECT SUM(b), 3) +0 +DROP TABLE t1; diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test index 20d044306a6..1601f7afd0e 100644 --- a/mysql-test/t/row.test +++ b/mysql-test/t/row.test @@ -224,3 +224,16 @@ SET @x:= (SELECT h FROM t1 WHERE (a,b,c,d,e,f,g)=(1,2,3,4,5,6,7)); SELECT @x; DROP TABLE t1; + +# +# Bug #34620: item_row.cc:50: Item_row::illegal_method_call(const char*): +# Assertion `0' failed +# + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (1,1); + +SELECT ROW(a, 1) IN (SELECT SUM(b), 1) FROM t1 GROUP BY a; +SELECT ROW(a, 1) IN (SELECT SUM(b), 3) FROM t1 GROUP BY a; + +DROP TABLE t1; diff --git a/sql/item.h b/sql/item.h index f87499f23e3..c8b8e48b0ed 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1990,6 +1990,35 @@ public: Item_field *filed_for_view_update() { return (*ref)->filed_for_view_update(); } virtual Ref_Type ref_type() { return REF; } + + // Row emulation: forwarding of ROW-related calls to ref + uint cols() + { + return ref && result_type() == ROW_RESULT ? (*ref)->cols() : 1; + } + Item* element_index(uint i) + { + return ref && result_type() == ROW_RESULT ? (*ref)->element_index(i) : this; + } + Item** addr(uint i) + { + return ref && result_type() == ROW_RESULT ? (*ref)->addr(i) : 0; + } + bool check_cols(uint c) + { + return ref && result_type() == ROW_RESULT ? (*ref)->check_cols(c) + : Item::check_cols(c); + } + bool null_inside() + { + return ref && result_type() == ROW_RESULT ? (*ref)->null_inside() : 0; + } + void bring_value() + { + if (ref && result_type() == ROW_RESULT) + (*ref)->bring_value(); + } + }; From caf604282f25dbdf8a351b30bfdafe525b3374ba Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 00:50:15 +0300 Subject: [PATCH 343/527] Bug#32663, Bug#33045, Bug#23533, WL#4091 mysql-test/suite/binlog/r/binlog_multi_engine.result: updated result mysql-test/suite/binlog/t/binlog_multi_engine.test: fix for bug#32663 mysql-test/suite/binlog/t/disabled.def: updated mysql-test/suite/rpl/r/rpl_invoked_features.result: updated result mysql-test/suite/rpl/t/disabled.def: updated mysql-test/suite/rpl/t/rpl_invoked_features.test: fix for bug#33045 mysql-test/suite/bugs/r/rpl_bug23533.result: result file mysql-test/suite/bugs/t/rpl_bug23533.test: test case for bug#23533 --- .../suite/binlog/r/binlog_multi_engine.result | 22 ++++------ .../suite/binlog/t/binlog_multi_engine.test | 22 +++++++++- mysql-test/suite/binlog/t/disabled.def | 1 - mysql-test/suite/bugs/r/rpl_bug23533.result | 23 ++++++++++ mysql-test/suite/bugs/t/rpl_bug23533.test | 43 +++++++++++++++++++ .../suite/rpl/r/rpl_invoked_features.result | 16 +++---- mysql-test/suite/rpl/t/disabled.def | 1 + .../suite/rpl/t/rpl_invoked_features.test | 26 +++++++---- 8 files changed, 122 insertions(+), 32 deletions(-) create mode 100644 mysql-test/suite/bugs/r/rpl_bug23533.result create mode 100644 mysql-test/suite/bugs/t/rpl_bug23533.test diff --git a/mysql-test/suite/binlog/r/binlog_multi_engine.result b/mysql-test/suite/binlog/r/binlog_multi_engine.result index 13227c5ecb1..8574a2351a1 100644 --- a/mysql-test/suite/binlog/r/binlog_multi_engine.result +++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result @@ -3,8 +3,8 @@ CREATE TABLE t1b (b INT, c INT) ENGINE=BLACKHOLE; CREATE TABLE t1n (e INT, f INT) ENGINE=NDB; RESET MASTER; SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; *** Please look in binlog_multi_engine.test if you have a diff here **** START TRANSACTION; @@ -17,30 +17,28 @@ TRUNCATE t1b; TRUNCATE t1n; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f master-bin.000001 # Query # # use `test`; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE t1m -master-bin.000001 # Query # # use `test`; TRUNCATE t1b master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1n) master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # COMMIT +master-bin.000001 # Query # # use `test`; TRUNCATE t1m +master-bin.000001 # Query # # use `test`; TRUNCATE t1b master-bin.000001 # Query # # use `test`; TRUNCATE t1n RESET MASTER; SET SESSION BINLOG_FORMAT=MIXED; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; @@ -52,21 +50,19 @@ TRUNCATE t1b; TRUNCATE t1n; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Query # # use `test`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c -master-bin.000001 # Query # # use `test`; COMMIT -master-bin.000001 # Query # # use `test`; TRUNCATE t1m -master-bin.000001 # Query # # use `test`; TRUNCATE t1b +master-bin.000001 # Query # # use `test`; INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2) master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1n) 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`; UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c +master-bin.000001 # Query # # use `test`; TRUNCATE t1m +master-bin.000001 # Query # # use `test`; TRUNCATE t1b master-bin.000001 # Query # # use `test`; TRUNCATE t1n RESET MASTER; SET SESSION BINLOG_FORMAT=ROW; diff --git a/mysql-test/suite/binlog/t/binlog_multi_engine.test b/mysql-test/suite/binlog/t/binlog_multi_engine.test index 058aca0f715..bf84eed6ec1 100644 --- a/mysql-test/suite/binlog/t/binlog_multi_engine.test +++ b/mysql-test/suite/binlog/t/binlog_multi_engine.test @@ -15,11 +15,16 @@ RESET MASTER; SET SESSION BINLOG_FORMAT=STATEMENT; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; +# Here and below we need to wait when some event appears in binlog +# to avoid unsrted mixing local events and from NDB +let $wait_binlog_event= t1m, t1b; +source include/wait_for_binlog_event.inc; + echo *** Please look in binlog_multi_engine.test if you have a diff here ****; START TRANSACTION; INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); @@ -27,20 +32,33 @@ UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; COMMIT; +let $wait_binlog_event= COMMIT; +source include/wait_for_binlog_event.inc; + TRUNCATE t1m; TRUNCATE t1b; TRUNCATE t1n; +let $wait_binlog_event= t1n; +source include/wait_for_binlog_event.inc; + source include/show_binlog_events.inc; RESET MASTER; SET SESSION BINLOG_FORMAT=MIXED; -INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); INSERT INTO t1b VALUES (1,1), (1,2), (2,1), (2,2); +INSERT INTO t1m VALUES (1,1), (1,2), (2,1), (2,2); + +let $wait_binlog_event= t1m; +source include/wait_for_binlog_event.inc; + INSERT INTO t1n VALUES (1,1), (1,2), (2,1), (2,2); +let $wait_binlog_event= COMMIT; +source include/wait_for_binlog_event.inc; + UPDATE t1m, t1b SET m = 2, b = 3 WHERE n = c; error ER_BINLOG_LOGGING_IMPOSSIBLE; UPDATE t1m, t1n SET m = 2, e = 3 WHERE n = f; diff --git a/mysql-test/suite/binlog/t/disabled.def b/mysql-test/suite/binlog/t/disabled.def index a6e73fa31d8..888298bbb09 100644 --- a/mysql-test/suite/binlog/t/disabled.def +++ b/mysql-test/suite/binlog/t/disabled.def @@ -9,4 +9,3 @@ # Do not use any TAB characters for whitespace. # ############################################################################## -binlog_multi_engine : Bug#32663 binlog_multi_engine.test fails randomly diff --git a/mysql-test/suite/bugs/r/rpl_bug23533.result b/mysql-test/suite/bugs/r/rpl_bug23533.result new file mode 100644 index 00000000000..1dda75a69b0 --- /dev/null +++ b/mysql-test/suite/bugs/r/rpl_bug23533.result @@ -0,0 +1,23 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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; +SET AUTOCOMMIT=0; +SET GLOBAL max_binlog_cache_size=4096; +SHOW VARIABLES LIKE 'max_binlog_cache_size'; +Variable_name Value +max_binlog_cache_size 4096 +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB; +SELECT COUNT(*) FROM t1; +COUNT(*) +1000 +START TRANSACTION; +CREATE TABLE t2 SELECT * FROM t1; +ERROR HY000: Writing one row to the row-based binary log failed +COMMIT; +SHOW TABLES LIKE 't%'; +Tables_in_test (t%) +t1 diff --git a/mysql-test/suite/bugs/t/rpl_bug23533.test b/mysql-test/suite/bugs/t/rpl_bug23533.test new file mode 100644 index 00000000000..397f1102f0e --- /dev/null +++ b/mysql-test/suite/bugs/t/rpl_bug23533.test @@ -0,0 +1,43 @@ +############################################################# +# Author: Serge Kozlov +# Date: 02/26/2008 +# Purpose: testing bug report +# Bug#23533: CREATE SELECT max_binlog_cache_size test +# case needed +############################################################# + +--source include/have_innodb.inc +--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'; + +CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b TEXT, PRIMARY KEY(a)) ENGINE=InnoDB; + +--disable_query_log +let $i= 1000; +while ($i) +{ + eval INSERT INTO t1 VALUES($i, REPEAT('x', 4096)); + dec $i; +} +--enable_query_log + +SELECT COUNT(*) FROM t1; + +# Copied data from t1 into t2 large than max_binlog_cache_size +START TRANSACTION; +--error 1534 +CREATE TABLE t2 SELECT * FROM t1; +COMMIT; +SHOW TABLES LIKE 't%'; + + +# 5.1 End of Test diff --git a/mysql-test/suite/rpl/r/rpl_invoked_features.result b/mysql-test/suite/rpl/r/rpl_invoked_features.result index aed1dcdbb47..be9169c785b 100644 --- a/mysql-test/suite/rpl/r/rpl_invoked_features.result +++ b/mysql-test/suite/rpl/r/rpl_invoked_features.result @@ -116,23 +116,23 @@ t12 t13 t2 t3 -SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name; +SELECT table_name FROM information_schema.views WHERE table_schema='test'; table_name v1 v11 -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name; +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; trigger_name event_manipulation event_object_table t11_tr1 INSERT t11 t11_tr2 UPDATE t11 t1_tr1 INSERT t1 t1_tr2 UPDATE t1 -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name; +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; routine_type routine_name FUNCTION f1 FUNCTION f2 PROCEDURE p1 PROCEDURE p11 -SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name; +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; event_name status e1 DISABLED e11 DISABLED @@ -276,23 +276,23 @@ t12 t13 t2 t3 -SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name; +SELECT table_name FROM information_schema.views WHERE table_schema='test'; table_name v1 v11 -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name; +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; trigger_name event_manipulation event_object_table t11_tr1 INSERT t11 t11_tr2 UPDATE t11 t1_tr1 INSERT t1 t1_tr2 UPDATE t1 -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name; +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; routine_type routine_name FUNCTION f1 FUNCTION f2 PROCEDURE p1 PROCEDURE p11 -SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name; +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; event_name status e1 SLAVESIDE_DISABLED e11 SLAVESIDE_DISABLED diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 20c3ccf0486..53868e070e4 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,6 +11,7 @@ ############################################################################## rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master +rpl_flushlog_loop : WL#4091 skozlov: temporary disabled because of failures on some platforms rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported. rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table) rpl_view : Bug#32654: rpl_view.test fails randomly diff --git a/mysql-test/suite/rpl/t/rpl_invoked_features.test b/mysql-test/suite/rpl/t/rpl_invoked_features.test index 17cdc1e61cf..e73964a6e14 100644 --- a/mysql-test/suite/rpl/t/rpl_invoked_features.test +++ b/mysql-test/suite/rpl/t/rpl_invoked_features.test @@ -201,11 +201,16 @@ SET GLOBAL EVENT_SCHEDULER = off; # Check original objects --echo +--sorted_result SHOW TABLES LIKE 't%'; -SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name; -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name; -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name; -SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name; +--sorted_result +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +--sorted_result +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +--sorted_result +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +--sorted_result +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; # Check original data --echo @@ -228,11 +233,16 @@ SELECT a,b FROM v11 ORDER BY a; # Check replicated objects --echo +--sorted_result SHOW TABLES LIKE 't%'; -SELECT table_name FROM information_schema.views WHERE table_schema='test' ORDER BY table_name; -SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test' ORDER BY trigger_name; -SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test' ORDER BY routine_name; -SELECT event_name, status FROM information_schema.events WHERE event_schema='test' ORDER BY event_name; +--sorted_result +SELECT table_name FROM information_schema.views WHERE table_schema='test'; +--sorted_result +SELECT trigger_name, event_manipulation, event_object_table FROM information_schema.triggers WHERE trigger_schema='test'; +--sorted_result +SELECT routine_type, routine_name FROM information_schema.routines WHERE routine_schema='test'; +--sorted_result +SELECT event_name, status FROM information_schema.events WHERE event_schema='test'; # Check replicated data --echo From 8b77945615ed06a9ae0c1861943b73f46f3cbb71 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 20:22:11 -0300 Subject: [PATCH 344/527] Post-merge fix for Bug 33851. The initialization order of members must match the order which they were declared in the class definition. sql/item.cc: Fix initialization order, parameter was the last one declared. --- sql/item.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index a6a18e27b09..a9e99c65580 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2385,14 +2385,14 @@ default_set_param_func(Item_param *param, Item_param::Item_param(unsigned pos_in_query_arg) : - limit_clause_param(FALSE), state(NO_VALUE), item_result_type(STRING_RESULT), /* Don't pretend to be a literal unless value for this item is set. */ item_type(PARAM_ITEM), param_type(MYSQL_TYPE_VARCHAR), pos_in_query(pos_in_query_arg), - set_param_func(default_set_param_func) + set_param_func(default_set_param_func), + limit_clause_param(FALSE) { name= (char*) "?"; /* From 61caf4635d07d83b6aa0cddf9661c32dc0bee61a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 28 Feb 2008 23:53:01 -0500 Subject: [PATCH 345/527] Bug #24992 Enabling Shared Memory support on Windows x64 causes client to fail - Mistaken macro defintions cause mysys to read packets in the wrong order. include/my_global.h: Bug #24992 Enabling Shared Memory support on Windows x64 causes client to fail - Use low byte order optimizations for Windows. --- include/my_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/my_global.h b/include/my_global.h index e05100fa288..f290b690630 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1053,7 +1053,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */ */ /* Optimized store functions for Intel x86 */ -#if defined(__i386__) || (defined(_WIN32) && !defined(_WIN64)) +#if defined(__i386__) || defined(_WIN32) #define sint2korr(A) (*((int16 *) (A))) #define sint3korr(A) ((int32) ((((uchar) (A)[2]) & 128) ? \ (((uint32) 255L << 24) | \ @@ -1242,7 +1242,7 @@ do { doubleget_union _tmp; \ #define float8store(V,M) doublestore((V),(M)) #endif /* WORDS_BIGENDIAN */ -#endif /* __i386__ OR _WIN32 AND !_WIN64 */ +#endif /* __i386__ OR _WIN32 */ /* Macro for reading 32-bit integer from network byte order (big-endian) From 88cb8bba27ddfc4cd30ee6f1247a0bb08d40c6d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 12:52:50 +0400 Subject: [PATCH 346/527] additional test fix for Bug#32167 another privilege bypass with DATA/INDEX DIRECTORY --- .../suite/parts/inc/partition_basic.inc | 16 +- .../suite/parts/inc/partition_check_drop.inc | 6 +- .../parts/inc/partition_layout_check1.inc | 3 +- .../parts/r/partition_basic_innodb.result | 62 +-- .../parts/r/partition_basic_myisam.result | 398 +++++++++--------- 5 files changed, 237 insertions(+), 248 deletions(-) diff --git a/mysql-test/suite/parts/inc/partition_basic.inc b/mysql-test/suite/parts/inc/partition_basic.inc index a5815d3b71c..1039a47626f 100644 --- a/mysql-test/suite/parts/inc/partition_basic.inc +++ b/mysql-test/suite/parts/inc/partition_basic.inc @@ -34,17 +34,13 @@ let $unique= ; # --disable_query_log # DATA DIRECTORY - # Make directory for partition data - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true eval SET @data_dir = 'DATA DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/data'''''; + ''''$MYSQLTEST_VARDIR/tmp'''''; let $data_directory = `select @data_dir`; #INDEX DIRECTORY - # Make directory for partition index - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true eval SET @indx_dir = 'INDEX DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/index'''''; + ''''$MYSQLTEST_VARDIR/tmp'''''; let $index_directory = `select @indx_dir`; let $with_directories= 1; @@ -77,17 +73,13 @@ if ($more_pk_ui_tests) # --disable_query_log # DATA DIRECTORY - # Make directory for partition data - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true eval SET @data_dir = 'DATA DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/data'''''; + ''''$MYSQLTEST_VARDIR/tmp'''''; let $data_directory = `select @data_dir`; #INDEX DIRECTORY - # Make directory for partition index - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true eval SET @indx_dir = 'INDEX DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/index'''''; + ''''$MYSQLTEST_VARDIR/tmp'''''; let $index_directory = `select @indx_dir`; let $with_directories= TRUE; diff --git a/mysql-test/suite/parts/inc/partition_check_drop.inc b/mysql-test/suite/parts/inc/partition_check_drop.inc index 88ebdb7ad48..34a921374e6 100644 --- a/mysql-test/suite/parts/inc/partition_check_drop.inc +++ b/mysql-test/suite/parts/inc/partition_check_drop.inc @@ -27,8 +27,7 @@ if ($do_file_tests) --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 || true if ($with_directories) { ---exec ls $MYSQLTEST_VARDIR/master-data/test/data/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 || true ---exec ls $MYSQLTEST_VARDIR/master-data/test/index/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 || true +--exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 || true } eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')'); let $file_list= `SELECT @aux`; @@ -65,8 +64,7 @@ if ($found_garbage) --exec rm -f $MYSQLTEST_VARDIR/master-data/test/t1* || true if ($with_directories) { - --exec rm -f $MYSQLTEST_VARDIR/master-data/test/data/t1* || true - --exec rm -f $MYSQLTEST_VARDIR/master-data/test/index/t1* || true + --exec rm -f $MYSQLTEST_VARDIR/tmp/t1* || true } } --enable_query_log diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc index 9989f4ed9e3..6fa8df25496 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check1.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc @@ -38,8 +38,7 @@ if ($do_file_tests) --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true if ($with_directories) { ---exec ls $MYSQLTEST_VARDIR/master-data/test/data/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true ---exec ls $MYSQLTEST_VARDIR/master-data/test/index/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +--exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true } eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'' )'); diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result index b9097e33ce0..d2ba7a6a073 100644 --- a/mysql-test/suite/parts/r/partition_basic_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_innodb.result @@ -3620,7 +3620,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4065,7 +4065,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4510,7 +4510,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4955,7 +4955,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5398,7 +5398,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5843,7 +5843,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6286,7 +6286,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6731,7 +6731,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8067,7 +8067,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8512,7 +8512,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -8955,7 +8955,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9400,7 +9400,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -9843,7 +9843,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14878,7 +14878,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15360,7 +15360,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15840,7 +15840,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16322,7 +16322,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16802,7 +16802,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17284,7 +17284,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int2`,`f_int1`), UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18731,7 +18731,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19213,7 +19213,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19693,7 +19693,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20175,7 +20175,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20655,7 +20655,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21137,7 +21137,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, PRIMARY KEY (`f_int1`,`f_int2`), UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22616,7 +22616,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23114,7 +23114,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -23610,7 +23610,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24108,7 +24108,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -24604,7 +24604,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB)) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -25102,7 +25102,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = InnoDB) */ # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result index 7e0d5bcd62a..bcb58b6945b 100644 --- a/mysql-test/suite/parts/r/partition_basic_myisam.result +++ b/mysql-test/suite/parts/r/partition_basic_myisam.result @@ -3728,7 +3728,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -3737,10 +3737,10 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4159,31 +4159,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -4199,7 +4199,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -4214,16 +4214,16 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p3.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p3.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p4.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p4.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#p5.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#p5.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4642,31 +4642,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI MYSQLTEST_VARDIR/tmp/t1#P#p3.MYD MYSQLTEST_VARDIR/tmp/t1#P#p3.MYI MYSQLTEST_VARDIR/tmp/t1#P#p4.MYD MYSQLTEST_VARDIR/tmp/t1#P#p4.MYI MYSQLTEST_VARDIR/tmp/t1#P#p5.MYD MYSQLTEST_VARDIR/tmp/t1#P#p5.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI MYSQLTEST_VARDIR/tmp/t1#P#p3.MYD MYSQLTEST_VARDIR/tmp/t1#P#p3.MYI MYSQLTEST_VARDIR/tmp/t1#P#p4.MYD MYSQLTEST_VARDIR/tmp/t1#P#p4.MYI MYSQLTEST_VARDIR/tmp/t1#P#p5.MYD MYSQLTEST_VARDIR/tmp/t1#P#p5.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#p1.MYD MYSQLTEST_VARDIR/tmp/t1#P#p1.MYI MYSQLTEST_VARDIR/tmp/t1#P#p2.MYD MYSQLTEST_VARDIR/tmp/t1#P#p2.MYI MYSQLTEST_VARDIR/tmp/t1#P#p3.MYD MYSQLTEST_VARDIR/tmp/t1#P#p3.MYI MYSQLTEST_VARDIR/tmp/t1#P#p4.MYD MYSQLTEST_VARDIR/tmp/t1#P#p4.MYI MYSQLTEST_VARDIR/tmp/t1#P#p5.MYD MYSQLTEST_VARDIR/tmp/t1#P#p5.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -4682,7 +4682,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -4703,22 +4703,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5137,31 +5137,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_3.MYI MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYD MYSQLTEST_VARDIR/tmp/t1#P#part_N.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -5177,7 +5177,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -5194,18 +5194,18 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#parta.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#parta.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partb.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partb.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partc.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partc.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partd.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partd.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#parte.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#parte.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partf.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partf.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5622,31 +5622,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd.MYI MYSQLTEST_VARDIR/tmp/t1#P#parte.MYD MYSQLTEST_VARDIR/tmp/t1#P#parte.MYI MYSQLTEST_VARDIR/tmp/t1#P#partf.MYD MYSQLTEST_VARDIR/tmp/t1#P#partf.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd.MYI MYSQLTEST_VARDIR/tmp/t1#P#parte.MYD MYSQLTEST_VARDIR/tmp/t1#P#parte.MYI MYSQLTEST_VARDIR/tmp/t1#P#partf.MYD MYSQLTEST_VARDIR/tmp/t1#P#partf.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd.MYI MYSQLTEST_VARDIR/tmp/t1#P#parte.MYD MYSQLTEST_VARDIR/tmp/t1#P#parte.MYI MYSQLTEST_VARDIR/tmp/t1#P#partf.MYD MYSQLTEST_VARDIR/tmp/t1#P#partf.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -5662,7 +5662,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -5683,22 +5683,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6117,31 +6117,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#partd#SP#partdsp1.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -6157,7 +6157,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -6178,22 +6178,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6610,31 +6610,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#subpart42.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -6650,7 +6650,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -6671,22 +6671,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7105,31 +7105,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/tmp/t1#P#part4#SP#sp42.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -7145,7 +7145,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -7168,24 +7168,24 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYI +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYD +$MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7604,31 +7604,31 @@ OPTIMIZE TABLE t1; Table Op Msg_type Msg_text test.t1 optimize status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 REPAIR TABLE t1 EXTENDED; Table Op Msg_type Msg_text test.t1 repair status OK state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 TRUNCATE t1; # check TRUNCATE success: 1 state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI +Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ +File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/tmp/t1#P#part3#SP#part3sp2.MYI # check layout success: 0 # End usability test (inc/partition_check.inc) DROP TABLE t1; @@ -8549,7 +8549,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -9010,7 +9010,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -9465,7 +9465,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -9926,7 +9926,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -10385,7 +10385,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -15638,7 +15638,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -16152,7 +16152,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -16660,7 +16660,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -17174,7 +17174,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -17686,7 +17686,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -18200,7 +18200,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD From de534f2bc1712cbae314599ff4a230fb2fcecc39 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 12:21:19 +0300 Subject: [PATCH 347/527] Fix for Bug#31947: Declare with a reserved word succeeded. READ_ONLY token was accidentally placed into wrong place ('ident' rule). The proper place is in the 'keyword_sp' rule. The manual should be re-generated after this patch, because the manual depends on the 'keyword_sp' rule. sql/sql_yacc.yy: Move READ_ONLY token to the 'keyword_sp' rule. --- sql/sql_yacc.yy | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 108cf5e9ab3..1bd90e74f47 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -10312,12 +10312,6 @@ TEXT_STRING_filesystem: ident: IDENT_sys { $$=$1; } - | READ_ONLY_SYM - { - THD *thd= YYTHD; - $$.str= thd->strmake("read_only",9); - $$.length= 9; - } | keyword { THD *thd= YYTHD; @@ -10622,6 +10616,7 @@ keyword_sp: | QUARTER_SYM {} | QUERY_SYM {} | QUICK {} + | READ_ONLY_SYM {} | REBUILD_SYM {} | RECOVER_SYM {} | REDO_BUFFER_SIZE_SYM {} From ab6042590186ad14bbd73a64f5d1f3f77223bdb3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 13:55:00 +0400 Subject: [PATCH 348/527] Bug#32167 another privilege bypass with DATA/INDEX DIRECORY(ver 4.1,5.0) added new function test_if_data_home_dir() which checks that path does not contain mysql data home directory. Using of mysql data home directory in DATA DIRECTORY & INDEX DIRECTORY is disallowed. mysql-test/r/symlink.result: test result mysql-test/t/symlink.test: test case sql/mysql_priv.h: new variable mysql_unpacked_real_data_home sql/mysqld.cc: new variable mysql_unpacked_real_data_home sql/sql_parse.cc: added new function test_if_data_home_dir() which checks that path does not contain mysql data home directory. Using of mysql data home directory in DATA DIRECTORY & INDEX DIRECTORY is disallowed. --- mysql-test/r/symlink.result | 38 ++++++++++++----------- mysql-test/t/symlink.test | 52 ++++++++++++++++++------------- sql/mysql_priv.h | 1 + sql/mysqld.cc | 4 +++ sql/sql_parse.cc | 61 ++++++++++++++++++++++++++++++++++++- 5 files changed, 117 insertions(+), 39 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 32dc72b8219..84d7d8f4260 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -91,23 +91,15 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; CREATE TABLE t1(a INT) -DATA DIRECTORY='TEST_DIR/master-data/mysql' -INDEX DIRECTORY='TEST_DIR/master-data/mysql'; -RENAME TABLE t1 TO user; -ERROR HY000: Can't create/write to file 'TEST_DIR/master-data/mysql/user.MYI' (Errcode: 17) -DROP TABLE t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `i` int(11) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +CREATE TABLE t2(a INT) +DATA DIRECTORY='TEST_DIR/tmp' +INDEX DIRECTORY='TEST_DIR/tmp'; +RENAME TABLE t2 TO t1; +ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +DROP TABLE t2; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( @@ -144,4 +136,16 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' drop table t1; deallocate prepare stmt; +CREATE TABLE t1(a INT) +DATA DIRECTORY='TEST_DIR/var/master-data/test'; +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +DATA DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data/'; +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data'; +ERROR HY000: Incorrect arguments to INDEX DIRECORY +CREATE TABLE t1(a INT) +INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var'; +ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2) End of 4.1 tests diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 40127a697ac..7dfccaad8dc 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -121,29 +121,22 @@ drop table t1; # # BUG#32111 - Security Breach via DATA/INDEX DIRECORY and RENAME TABLE # ---replace_result $MYSQLTEST_VARDIR TEST_DIR -eval CREATE TABLE t1(a INT) -DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql' -INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; +--write_file $MYSQLTEST_VARDIR/tmp/t1.MYI +EOF --replace_result $MYSQLTEST_VARDIR TEST_DIR --error 1 -RENAME TABLE t1 TO user; -DROP TABLE t1; - -# -# Test specifying DATA DIRECTORY that is the same as what would normally -# have been chosen. (Bug #8707) -# -disable_query_log; -eval create table t1 (i int) data directory = "$MYSQL_TEST_DIR/var/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; -disable_query_log; -eval create table t1 (i int) index directory = "$MYSQL_TEST_DIR/var/master-data/test/"; -enable_query_log; -show create table t1; -drop table t1; +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +eval CREATE TABLE t2(a INT) +DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' +INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1 +RENAME TABLE t2 TO t1; +DROP TABLE t2; +--remove_file $MYSQLTEST_VARDIR/tmp/t1.MYI # # Bug#8706 - temporary table with data directory option fails @@ -201,4 +194,21 @@ show create table t1; drop table t1; deallocate prepare stmt; +# +# Bug#32167 another privilege bypass with DATA/INDEX DIRECORY +# +--replace_result $MYSQL_TEST_DIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/test'; +--error 1210 +eval CREATE TABLE t1(a INT) +DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/'; +--error 1210 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data'; +--error 1 +eval CREATE TABLE t1(a INT) +INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var'; + --echo End of 4.1 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index b6170ba35f9..4b0031d1f2a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -890,6 +890,7 @@ void my_dbopt_free(void); extern time_t start_time; extern char *mysql_data_home,server_version[SERVER_VERSION_LENGTH], mysql_real_data_home[], *opt_mysql_tmpdir, mysql_charsets_dir[], + mysql_unpacked_real_data_home[], def_ft_boolean_syntax[sizeof(ft_boolean_syntax)]; #define mysql_tmpdir (my_tmpdir(&mysql_tmpdir_list)) extern MY_TMPDIR mysql_tmpdir_list; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 62105e0093a..8111df7ad4d 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -390,6 +390,7 @@ const char *opt_date_time_formats[3]; char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME; char *language_ptr, *default_collation_name, *default_character_set_name; char mysql_data_home_buff[2], *mysql_data_home=mysql_real_data_home; +char mysql_unpacked_real_data_home[FN_REFLEN]; struct passwd *user_info; char server_version[SERVER_VERSION_LENGTH]; char *mysqld_unix_port, *opt_mysql_tmpdir; @@ -6896,6 +6897,9 @@ static void fix_paths(void) pos[1]= 0; } convert_dirname(mysql_real_data_home,mysql_real_data_home,NullS); + (void) fn_format(buff, mysql_real_data_home, "", "", + (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); + (void) unpack_dirname(mysql_unpacked_real_data_home, buff); convert_dirname(language,language,NullS); (void) my_load_path(mysql_home,mysql_home,""); // Resolve current dir (void) my_load_path(mysql_real_data_home,mysql_real_data_home,mysql_home); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 24f9ef30569..4bbd425d80b 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -65,7 +65,8 @@ static bool append_file_to_dir(THD *thd, const char **filename_ptr, const char *table_name); static TABLE_LIST* get_table_by_alias(TABLE_LIST* tl, const char* db, - const char* alias); + const char* alias); +static bool test_if_data_home_dir(const char *dir); const char *any_db="*any*"; // Special symbol for check_access @@ -2531,6 +2532,20 @@ mysql_execute_command(THD *thd) "INDEX DIRECTORY option ignored"); create_info.data_file_name= create_info.index_file_name= NULL; #else + + if (test_if_data_home_dir(lex->create_info.data_file_name)) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); + res= -1; + break; + } + if (test_if_data_home_dir(lex->create_info.index_file_name)) + { + my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); + res= -1; + break; + } + /* Fix names if symlinked tables */ if (append_file_to_dir(thd, &create_info.data_file_name, create_table->real_name) || @@ -5920,3 +5935,47 @@ Item *negate_expression(THD *thd, Item *expr) return negated; return new Item_func_not(expr); } + + +/* + Check if path does not contain mysql data home directory + + SYNOPSIS + test_if_data_home_dir() + dir directory + conv_home_dir converted data home directory + home_dir_len converted data home directory length + + RETURN VALUES + 0 ok + 1 error +*/ + +static bool test_if_data_home_dir(const char *dir) +{ + char path[FN_REFLEN], conv_path[FN_REFLEN]; + uint dir_len, home_dir_len= strlen(mysql_unpacked_real_data_home); + DBUG_ENTER("test_if_data_home_dir"); + + if (!dir) + DBUG_RETURN(0); + + (void) fn_format(path, dir, "", "", + (MY_RETURN_REAL_PATH|MY_RESOLVE_SYMLINKS)); + dir_len= unpack_dirname(conv_path, dir); + + if (home_dir_len <= dir_len) + { + if (lower_case_file_system) + { + if (!my_strnncoll(default_charset_info, (const uchar*) conv_path, + home_dir_len, + (const uchar*) mysql_unpacked_real_data_home, + home_dir_len)) + DBUG_RETURN(1); + } + else if (!memcmp(conv_path, mysql_unpacked_real_data_home, home_dir_len)) + DBUG_RETURN(1); + } + DBUG_RETURN(0); +} From fa9e35b48d1322b80cf3a8f6ffd4b2fde7f46c0c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 15:04:00 +0400 Subject: [PATCH 349/527] after merge fix --- mysql-test/r/symlink.result | 47 ++++++++++++++++++------------------- mysql-test/t/symlink.test | 38 +++++++----------------------- sql/mysqld.cc | 10 ++------ 3 files changed, 33 insertions(+), 62 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index b39ef971539..f014a794dc7 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -130,39 +130,38 @@ select * from t1; a 42 drop table t1; +execute stmt; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' +drop table t1; +execute stmt; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' +drop table t1; +deallocate prepare stmt; CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/var/master-data/test'; ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) -DATA DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data/'; +DATA DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data/'; ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) -INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data'; +INDEX DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data'; ERROR HY000: Incorrect arguments to INDEX DIRECORY CREATE TABLE t1(a INT) -INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var'; -ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2) +INDEX DIRECTORY='/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data_var'; +ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/5.0-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2) End of 4.1 tests -CREATE DATABASE db1; -CREATE DATABASE db2; -USE db2; -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -b -1 -RESET QUERY CACHE; -USE db1; SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; -ERROR HY000: Can't create/write to file './db1/t1.MYD' (Errcode: 17) -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; -a -SET SESSION keep_files_on_create = DEFAULT; -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; +ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17) +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index f4a10bc58d8..ffe5cc76737 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -222,39 +222,17 @@ INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var'; # # Bug #29325: create table overwrites .MYD file of other table (datadir) # - -CREATE DATABASE db1; -CREATE DATABASE db2; - -USE db2; ---disable_query_log -eval CREATE TABLE t1 (b INT) ENGINE MYISAM -DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/db1/'; ---enable_query_log - -INSERT INTO db2.t1 VALUES (1); -SELECT * FROM db2.t1; -RESET QUERY CACHE; - -USE db1; - -#no warning from create table SET SESSION keep_files_on_create = TRUE; +--write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD +EOF --disable_abort_on_error +--error 1 CREATE TABLE t1 (a INT) ENGINE MYISAM; +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD; --enable_abort_on_error - -CREATE TABLE t3 (a INT) Engine=MyISAM; -INSERT INTO t3 VALUES (1),(2),(3); -TRUNCATE TABLE t3; -SELECT * from t3; - -SET SESSION keep_files_on_create = DEFAULT; - -DROP TABLE db2.t1, db1.t3; -DROP DATABASE db1; -DROP DATABASE db2; -USE test; - +SET SESSION keep_files_on_create = FALSE; +CREATE TABLE t1 (a INT) ENGINE MYISAM; +DROP TABLE t1; --echo End of 5.0 tests diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c03c9c34571..4d688d795f7 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -467,19 +467,13 @@ char log_error_file[FN_REFLEN], glob_hostname[FN_REFLEN]; char mysql_real_data_home[FN_REFLEN], language[FN_REFLEN], reg_ext[FN_EXTLEN], mysql_charsets_dir[FN_REFLEN], *opt_init_file, *opt_tc_log_file, + mysql_unpacked_real_data_home[FN_REFLEN], def_ft_boolean_syntax[sizeof(ft_boolean_syntax)]; - +char *mysql_data_home= mysql_real_data_home; const key_map key_map_empty(0); key_map key_map_full(0); // Will be initialized later const char *opt_date_time_formats[3]; - - -char compiled_default_collation_name[]= MYSQL_DEFAULT_COLLATION_NAME; -char *language_ptr, *default_collation_name, *default_character_set_name; -char mysql_data_home_buff[2], *mysql_data_home=mysql_real_data_home; -char mysql_unpacked_real_data_home[FN_REFLEN]; -struct passwd *user_info; char server_version[SERVER_VERSION_LENGTH]; char *mysqld_unix_port, *opt_mysql_tmpdir; const char **errmesg; /* Error messages */ From d276cd905935d9b620cd2f4260b0920a38c35348 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 15:11:11 +0400 Subject: [PATCH 350/527] Fixed bug #34830: mixed table and field names in Item_ref and Item_direct_ref constructor calls. Order of ref->field_name and ref->table_name arguments is of Item_ref and Item_direct_ref in the fix_inner_refs function is inverted. sql/sql_select.cc: Fixed bug #34830: mixed table and field names in Item_ref and Item_direct_ref constructor calls. Order of ref->field_name and ref->table_name arguments is of Item_ref and Item_direct_ref in the fix_inner_refs function is inverted. See definitions: Item_ref(Name_resolution_context *context_arg, Item **item, const char *table_name_arg, const char *field_name_arg, bool alias_name_used_arg= FALSE) and Item_direct_ref(Name_resolution_context *context_arg, Item **item, const char *table_name_arg, const char *field_name_arg, bool alias_name_used_arg= FALSE) --- sql/sql_select.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 38da4e26f5a..926b389f59f 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -360,10 +360,10 @@ fix_inner_refs(THD *thd, List &all_fields, SELECT_LEX *select, } } new_ref= direct_ref ? - new Item_direct_ref(ref->context, item_ref, ref->field_name, - ref->table_name, ref->alias_name_used) : - new Item_ref(ref->context, item_ref, ref->field_name, - ref->table_name, ref->alias_name_used); + new Item_direct_ref(ref->context, item_ref, ref->table_name, + ref->field_name, ref->alias_name_used) : + new Item_ref(ref->context, item_ref, ref->table_name, + ref->field_name, ref->alias_name_used); if (!new_ref) return TRUE; ref->outer_ref= new_ref; From be59a0ea7f6f7a4fc08e1da5888fecde28289194 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 16:56:41 +0400 Subject: [PATCH 351/527] test fix mysql-test/r/symlink.result: result fix --- mysql-test/r/symlink.result | 8 ++++---- mysql-test/t/symlink.test | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 84d7d8f4260..09715d30703 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -140,12 +140,12 @@ CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/var/master-data/test'; ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) -DATA DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data/'; +DATA DIRECTORY='TEST_DIR/var/master-data/'; ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) -INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data'; +INDEX DIRECTORY='TEST_DIR/var/master-data'; ERROR HY000: Incorrect arguments to INDEX DIRECORY CREATE TABLE t1(a INT) -INDEX DIRECTORY='/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var'; -ERROR HY000: Can't create/write to file '/home/gluh/MySQL/Merge/4.1-opt/mysql-test/var/master-data_var/t1.MYI' (Errcode: 2) +INDEX DIRECTORY='TEST_DIR/var/master-data_var'; +ERROR HY000: Can't create/write to file 'TEST_DIR/var/master-data_var/t1.MYI' (Errcode: 2) End of 4.1 tests diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 7dfccaad8dc..c8790c450f9 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -201,12 +201,15 @@ deallocate prepare stmt; --error 1210 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/test'; +--replace_result $MYSQL_TEST_DIR TEST_DIR --error 1210 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/'; +--replace_result $MYSQL_TEST_DIR TEST_DIR --error 1210 eval CREATE TABLE t1(a INT) INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data'; +--replace_result $MYSQL_TEST_DIR TEST_DIR --error 1 eval CREATE TABLE t1(a INT) INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var'; From 4e7c4ab929b85eaaa91a8c678872c44fc421c396 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 17:50:01 +0400 Subject: [PATCH 352/527] wrong merge fix --- sql/sql_parse.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 9e2a4bb77ac..fd16435ff9c 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -76,8 +76,6 @@ static void remove_escape(char *name); static bool append_file_to_dir(THD *thd, const char **filename_ptr, const char *table_name); static bool check_show_create_table_access(THD *thd, TABLE_LIST *table); -static TABLE_LIST* get_table_by_alias(TABLE_LIST* tl, const char* db, - const char* alias); static bool test_if_data_home_dir(const char *dir); const char *any_db="*any*"; // Special symbol for check_access From 1ed34fed3390e10ff67981c4470f46c6ce1e2a6e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 17:56:50 +0400 Subject: [PATCH 353/527] Bug#23924 general_log truncates queries with character set introducers. Problem: logging of utf8-incompatible binary strings didn't work Fix: hex-encoding of incompatible sequences. mysql-test/r/log_tables.result: Adding test mysql-test/t/log_tables.test: Adding test sql/field.cc: Copying with hex escaping sql/field.h: New field flag sql/log.cc: Marking the column "general_log.argument" as hex-escaping field. sql/sql_string.cc: New function to copy strings with hex-encoding of incompatible characters. sql/sql_string.h: Prototype for the new function --- mysql-test/r/log_tables.result | 11 ++++++ mysql-test/t/log_tables.test | 10 ++++++ sql/field.cc | 11 ++++++ sql/field.h | 2 ++ sql/log.cc | 1 + sql/sql_string.cc | 62 ++++++++++++++++++++++++++++++++++ sql/sql_string.h | 3 ++ 7 files changed, 100 insertions(+) diff --git a/mysql-test/r/log_tables.result b/mysql-test/r/log_tables.result index 0a7634df85a..2a4cee9fbbc 100644 --- a/mysql-test/r/log_tables.result +++ b/mysql-test/r/log_tables.result @@ -107,6 +107,17 @@ Database Table In_use Name_locked SET GLOBAL GENERAL_LOG=ON; SET GLOBAL SLOW_QUERY_LOG=ON; truncate table mysql.general_log; +set names binary; +select _koi8r'ÔÅÓÔ' as test; +test +ÔÅÓÔ +select * from mysql.general_log; +event_time user_host thread_id server_id command_type argument +TIMESTAMP USER_HOST THREAD_ID 1 Query set names binary +TIMESTAMP USER_HOST THREAD_ID 1 Query select _koi8r'\xD4\xC5\xD3\xD4' as test +TIMESTAMP USER_HOST THREAD_ID 1 Query select * from mysql.general_log +set names utf8; +truncate table mysql.general_log; set names utf8; create table bug16905 (s char(15) character set utf8 default 'пуÑто'); insert into bug16905 values ('новое'); diff --git a/mysql-test/t/log_tables.test b/mysql-test/t/log_tables.test index 0c986c6d63a..3047d16d3b6 100644 --- a/mysql-test/t/log_tables.test +++ b/mysql-test/t/log_tables.test @@ -130,6 +130,16 @@ show open tables; SET GLOBAL GENERAL_LOG=ON; SET GLOBAL SLOW_QUERY_LOG=ON; +# +# Bug#23924 general_log truncates queries with character set introducers. +# +truncate table mysql.general_log; +set names binary; +select _koi8r'ÔÅÓÔ' as test; +--replace_column 1 TIMESTAMP 2 USER_HOST 3 THREAD_ID +select * from mysql.general_log; +set names utf8; + # # Bug #16905 Log tables: unicode statements are logged incorrectly # diff --git a/sql/field.cc b/sql/field.cc index 88fac96df89..fb14b4d5c77 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -7644,6 +7644,17 @@ int Field_blob::store(const char *from,uint length,CHARSET_INFO *cs) if (value.alloc(new_length)) goto oom_error; + + if (f_is_hex_escape(flags)) + { + copy_length= my_copy_with_hex_escaping(field_charset, + (char*) value.ptr(), new_length, + from, length); + Field_blob::store_length(copy_length); + tmp= value.ptr(); + bmove(ptr + packlength, (uchar*) &tmp, sizeof(char*)); + return 0; + } /* "length" is OK as "nchars" argument to well_formed_copy_nchars as this is never used to limit the length of the data. The cut of long data diff --git a/sql/field.h b/sql/field.h index 38a0b1d5bbd..2e8a27e579a 100644 --- a/sql/field.h +++ b/sql/field.h @@ -2069,6 +2069,7 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions); #define FIELDFLAG_NO_DEFAULT 16384 /* sql */ #define FIELDFLAG_SUM ((uint) 32768)// predit: +#fieldflag #define FIELDFLAG_MAYBE_NULL ((uint) 32768)// sql +#define FIELDFLAG_HEX_ESCAPE ((uint) 0x10000) #define FIELDFLAG_PACK_SHIFT 3 #define FIELDFLAG_DEC_SHIFT 8 #define FIELDFLAG_MAX_DEC 31 @@ -2094,3 +2095,4 @@ int set_field_to_null_with_conversions(Field *field, bool no_conversions); #define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL) #define f_no_default(x) (x & FIELDFLAG_NO_DEFAULT) #define f_bit_as_char(x) ((x) & FIELDFLAG_TREAT_BIT_AS_CHAR) +#define f_is_hex_escape(x) ((x) & FIELDFLAG_HEX_ESCAPE) diff --git a/sql/log.cc b/sql/log.cc index 9b5b2ae5a6c..328aaa45f3f 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -418,6 +418,7 @@ bool Log_to_csv_event_handler:: A positive return value in store() means truncation. Still logging a message in the log in this case. */ + table->field[5]->flags|= FIELDFLAG_HEX_ESCAPE; if (table->field[5]->store(sql_text, sql_text_len, client_cs) < 0) goto err; diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 7fa3786c382..34b310931d6 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -840,6 +840,68 @@ outp: } +/** + Copy string with HEX-encoding of "bad" characters. + + @details This functions copies the string pointed by "src" + to the string pointed by "dst". Not more than "srclen" bytes + are read from "src". Any sequences of bytes representing + a not-well-formed substring (according to cs) are hex-encoded, + and all well-formed substrings (according to cs) are copied as is. + Not more than "dstlen" bytes are written to "dst". The number + of bytes written to "dst" is returned. + + @param cs character set pointer of the destination string + @param[out] dst destination string + @param dstlen size of dst + @param src source string + @param srclen length of src + + @retval result length +*/ + +size_t +my_copy_with_hex_escaping(CHARSET_INFO *cs, + char *dst, size_t dstlen, + const char *src, size_t srclen) +{ + const char *srcend= src + srclen; + char *dst0= dst; + + for ( ; src < srcend ; ) + { + size_t chlen; + if ((chlen= my_ismbchar(cs, src, srcend))) + { + if (dstlen < chlen) + break; /* purecov: inspected */ + memcpy(dst, src, chlen); + src+= chlen; + dst+= chlen; + dstlen-= chlen; + } + else if (*src & 0x80) + { + if (dstlen < 4) + break; /* purecov: inspected */ + *dst++= '\\'; + *dst++= 'x'; + *dst++= _dig_vec_upper[((unsigned char) *src) >> 4]; + *dst++= _dig_vec_upper[((unsigned char) *src) & 15]; + src++; + dstlen-= 4; + } + else + { + if (dstlen < 1) + break; /* purecov: inspected */ + *dst++= *src++; + dstlen--; + } + } + return dst - dst0; +} + /* copy a string, with optional character set conversion, diff --git a/sql/sql_string.h b/sql/sql_string.h index 128ed749b5f..b4d76a1779a 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -37,6 +37,9 @@ uint32 well_formed_copy_nchars(CHARSET_INFO *to_cs, const char **well_formed_error_pos, const char **cannot_convert_error_pos, const char **from_end_pos); +size_t my_copy_with_hex_escaping(CHARSET_INFO *cs, + char *dst, size_t dstlen, + const char *src, size_t srclen); class String { From f39817ce47c650a365358ba76d0e4212cb318905 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 29 Feb 2008 17:58:35 +0400 Subject: [PATCH 354/527] fixed problem with embedded server mysql-test/r/symlink.result: test result fix --- mysql-test/r/symlink.result | 2 +- mysql-test/t/symlink.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index e4ae1d8ea28..97bc092aa22 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -133,7 +133,7 @@ drop table t1; End of 4.1 tests SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; -ERROR HY000: Can't create/write to file './test/t1.MYD' (Errcode: 17) +Got one of the listed errors SET SESSION keep_files_on_create = FALSE; CREATE TABLE t1 (a INT) ENGINE MYISAM; DROP TABLE t1; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 1b75fa6b1ab..69535b7d9d1 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -186,7 +186,7 @@ SET SESSION keep_files_on_create = TRUE; --write_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD EOF --disable_abort_on_error ---error 1 +--error 1,1,ER_TABLE_EXISTS_ERROR CREATE TABLE t1 (a INT) ENGINE MYISAM; --error 0,1 --remove_file $MYSQLTEST_VARDIR/master-data/test/t1.MYD; From ee10d69714fb26c51da2092a3a9fbe2aac9e4f28 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 1 Mar 2008 00:05:23 +0300 Subject: [PATCH 355/527] WL#4091, enable rpl_flushlog_loop.test and fix for rpl_drop_temp.test mysql-test/suite/rpl/t/disabled.def: enable test mysql-test/suite/rpl/t/rpl_drop_temp.test: added sync slave with master mysql-test/suite/rpl/t/rpl_flushlog_loop.test: added sync slave with master --- mysql-test/suite/rpl/t/disabled.def | 1 - mysql-test/suite/rpl/t/rpl_drop_temp.test | 2 +- mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 53868e070e4..20c3ccf0486 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master -rpl_flushlog_loop : WL#4091 skozlov: temporary disabled because of failures on some platforms rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported. rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table) rpl_view : Bug#32654: rpl_view.test fails randomly diff --git a/mysql-test/suite/rpl/t/rpl_drop_temp.test b/mysql-test/suite/rpl/t/rpl_drop_temp.test index 51c5472beb8..f06b0951469 100644 --- a/mysql-test/suite/rpl/t/rpl_drop_temp.test +++ b/mysql-test/suite/rpl/t/rpl_drop_temp.test @@ -23,7 +23,7 @@ connection master1; let $wait_binlog_event= DROP; source include/wait_for_binlog_event.inc; -connection slave; +sync_slave_with_master; show status like 'Slave_open_temp_tables'; # Cleanup connection default; diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index ab1be9d297b..079048bd24d 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -42,6 +42,8 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes% --disable_query_log CREATE TABLE t1 (a INT KEY) ENGINE= MyISAM; +sync_slave_with_master; +connection master; INSERT INTO t1 VALUE(1); --enable_query_log FLUSH LOGS; From 19a2e5a2cd18f3782dede45a8993c260abe771ad Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 1 Mar 2008 18:25:41 +0100 Subject: [PATCH 356/527] mysql.spec.sh: - Aligned copyright headers and text with 5.0 - Don't strip binaries on SuSE 9 - Formatting alignment with spec file in 5.0 - Run full test on "normal" binary, and less on "Max" - Let test runs on "Max" identify the runs with "max" and "max+ps" support-files/mysql.spec.sh: - Aligned copyright headers and text with 5.0 - Don't strip binaries on SuSE 9 - Formatting alignment with spec file in 5.0 - Run full test on "normal" binary, and less on "Max" - Let test runs on "Max" identify the runs with "max" and "max+ps" --- support-files/mysql.spec.sh | 92 ++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b28af51d43e..1a737b70083 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,22 @@ -%define mysql_version @VERSION@ +# 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; see the file COPYING. If not, write to the +# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston +# MA 02110-1301 USA. + +%define mysql_version @VERSION@ +%define mysql_vendor MySQL AB + # use "rpmbuild --with static" or "rpm --define '_with_static 1'" (for RPM 3.x) # to enable static linking (off by default) %{?_with_static:%define STATIC_BUILD 1} @@ -9,7 +27,7 @@ %define release 0.glibc23 %endif %define license GPL -%define mysqld_user mysql +%define mysqld_user mysql %define mysqld_group mysql %define server_suffix -standard %define mysqldatadir /var/lib/mysql @@ -20,6 +38,23 @@ %define see_base For a description of MySQL see the base MySQL RPM or http://www.mysql.com +# On SuSE 9 no separate "debuginfo" package is built. To enable basic +# debugging on that platform, we don't strip binaries on SuSE 9. We +# disable the strip of binaries by redefining the RPM macro +# "__os_install_post" leaving out the script calls that normally does +# this. We do this in all cases, as on platforms where "debuginfo" is +# created, a script "find-debuginfo.sh" will be called that will do +# the strip anyway, part of separating the executable and debug +# information into separate files put into separate packages. +# +# Some references (shows more advanced conditional usage): +# http://www.redhat.com/archives/rpm-list/2001-November/msg00257.html +# http://www.redhat.com/archives/rpm-list/2003-February/msg00275.html +# http://www.redhat.com/archives/rhl-devel-list/2004-January/msg01546.html +# http://lists.opensuse.org/archive/opensuse-commit/2006-May/1171.html + +%define __os_install_post /usr/lib/rpm/brp-compress + Name: MySQL Summary: MySQL: a very fast and reliable SQL database server Group: Applications/Databases @@ -29,7 +64,7 @@ License: %{license} Source: http://www.mysql.com/Downloads/MySQL-@MYSQL_BASE_VERSION@/mysql-%{mysql_version}.tar.gz URL: http://www.mysql.com/ Packager: MySQL Production Engineering Team -Vendor: MySQL AB +Vendor: %{mysql_vendor} Provides: msqlormysql MySQL-server mysql BuildRequires: ncurses-devel Obsoletes: mysql @@ -46,12 +81,9 @@ is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of MySQL AB. -The MySQL software has Dual Licensing, which means you can use the MySQL -software free of charge under the GNU General Public License -(http://www.gnu.org/licenses/). You can also purchase commercial MySQL -licenses from MySQL AB if you do not wish to be bound by the terms of -the GPL. See the chapter "Licensing and Support" in the manual for -further info. +Copyright (C) 2000-2007 MySQL AB +This software comes with ABSOLUTELY NO WARRANTY. This is free software, +and you are welcome to modify and redistribute it under the GPL license. The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the @@ -71,12 +103,9 @@ is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. MySQL is a trademark of MySQL AB. -The MySQL software has Dual Licensing, which means you can use the MySQL -software free of charge under the GNU General Public License -(http://www.gnu.org/licenses/). You can also purchase commercial MySQL -licenses from MySQL AB if you do not wish to be bound by the terms of -the GPL. See the chapter "Licensing and Support" in the manual for -further info. +Copyright (C) 2000-2007 MySQL AB +This software comes with ABSOLUTELY NO WARRANTY. This is free software, +and you are welcome to modify and redistribute it under the GPL license. The MySQL web site (http://www.mysql.com/) provides the latest news and information about the MySQL software. Also please see the @@ -86,7 +115,7 @@ This package includes the MySQL server binary (incl. InnoDB) as well as related utilities to run and administrate a MySQL server. If you want to access and work with the database, you have to install -package "MySQL-client" as well! +the package "MySQL-client" as well! %package client Summary: MySQL - Client @@ -253,7 +282,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \ --includedir=%{_includedir} \ --mandir=%{_mandir} \ --enable-thread-safe-client \ - --with-readline ; + --with-readline ; \ # Add this for more debugging support # --with-debug # Add this for MyISAM RAID support: @@ -319,7 +348,10 @@ then cp -fp config.log "$MYSQL_MAXCONFLOG_DEST" fi -make test-bt +( cd mysql-test + perl ./mysql-test-run.pl --comment="max" --force --report-features + perl ./mysql-test-run.pl --comment="max+ps" --force --ps-protocol + true ) # Save mysqld-max ./libtool --mode=execute cp sql/mysqld sql/mysqld-max @@ -332,7 +364,7 @@ make test-bt (cd ndb; make install DESTDIR=$RBR) # Install embedded server library in the build root -install -m 644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/ +install -m644 libmysqld/libmysqld.a $RBR%{_libdir}/mysql/ # Include libgcc.a in the devel subpackage (BUG 4921) if expr "$CC" : ".*gcc.*" > /dev/null ; @@ -341,7 +373,7 @@ then if [ -f $libgcc ] then %define have_libgcc 1 - install -m 644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a + install -m644 $libgcc $RBR%{_libdir}/mysql/libmygcc.a fi fi @@ -382,10 +414,8 @@ then cp -fp config.log "$MYSQL_CONFLOG_DEST" fi -( cd mysql-test - perl ./mysql-test-run.pl --force --report-features - perl ./mysql-test-run.pl --force --ps-protocol - true ) +echo "# standard" +make test-bt %install RBR=$RPM_BUILD_ROOT @@ -400,7 +430,6 @@ install -d $RBR%{_libdir} install -d $RBR%{_mandir} install -d $RBR%{_sbindir} - # Install all binaries stripped make install-strip DESTDIR=$RBR benchdir_root=%{_datadir} @@ -414,12 +443,12 @@ install -s -m755 $MBD/sql/mysqld-max $RBR%{_sbindir}/mysqld-max install -s -m755 $MBD/extra/perror.ndb $RBR%{_bindir}/perror # install symbol files ( for stack trace resolution) -install -m644 $MBD/sql/mysqld-max.sym $RBR%{_libdir}/mysql/mysqld-max.sym -install -m644 $MBD/sql/mysqld.sym $RBR%{_libdir}/mysql/mysqld.sym +install -m 644 $MBD/sql/mysqld-max.sym $RBR%{_libdir}/mysql/mysqld-max.sym +install -m 644 $MBD/sql/mysqld.sym $RBR%{_libdir}/mysql/mysqld.sym # Install logrotate and autostart -install -m644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql -install -m755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql +install -m 644 $MBD/support-files/mysql-log-rotate $RBR%{_sysconfdir}/logrotate.d/mysql +install -m 755 $MBD/support-files/mysql.server $RBR%{_sysconfdir}/init.d/mysql # Create a symlink "rcmysql", pointing to the init.script. SuSE users # will appreciate that, as all services usually offer this. @@ -451,7 +480,7 @@ fi mysql_datadir=%{mysqldatadir} # Create data directory if needed -if test ! -d $mysql_datadir; then mkdir -m755 $mysql_datadir; fi +if test ! -d $mysql_datadir; then mkdir -m 755 $mysql_datadir; fi if test ! -d $mysql_datadir/mysql; then mkdir $mysql_datadir/mysql; fi if test ! -d $mysql_datadir/test; then mkdir $mysql_datadir/test; fi @@ -493,12 +522,11 @@ chmod -R og-rw $mysql_datadir/mysql # Allow safe_mysqld to start mysqld and print a message before we exit sleep 2 - %post ndb-storage mysql_clusterdir=/var/lib/mysql-cluster # Create cluster directory if needed -if test ! -d $mysql_clusterdir; then mkdir -m755 $mysql_clusterdir; fi +if test ! -d $mysql_clusterdir; then mkdir -m 755 $mysql_clusterdir; fi %post Max From 6c0d316d16c4afd62916eda22380c231c9fdceaa Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Mar 2008 20:17:39 +0300 Subject: [PATCH 357/527] WL#4091, fix for rpl_flushlog_loop for windows platforms mysql-test/suite/rpl/t/rpl_flushlog_loop.test: added waiting for CREATE TABLE --- mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index 079048bd24d..f9f01855aa9 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -42,6 +42,8 @@ let $result_pattern= '%127.0.0.1%root%slave-bin.000001%slave-bin.000001%Yes%Yes% --disable_query_log 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; connection master; INSERT INTO t1 VALUE(1); From 9ffaa745358b6b72cd6a778f01874a325f198198 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 2 Mar 2008 21:20:36 +0300 Subject: [PATCH 358/527] Bug#22438 mysql-test/r/mysqldump.result: updated result mysql-test/t/mysqldump.test: hide master_log_pos number --- mysql-test/r/mysqldump.result | 2 +- mysql-test/t/mysqldump.test | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index ca0aa399a56..b484cf7c51d 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3306,7 +3306,7 @@ grant RELOAD on *.* to mysqltest_1@localhost; mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) mysqldump: Couldn't execute 'SHOW MASTER STATUS': Access denied; you need the SUPER,REPLICATION CLIENT privilege for this operation (1227) grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; -CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=537; +CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=#; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t1` ( diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 6dba0a590d0..88053ae95fb 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1348,6 +1348,7 @@ grant RELOAD on *.* to mysqltest_1@localhost; grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; # Execute mysqldump, should now succeed +--replace_regex /MASTER_LOG_POS=[0-9]+/MASTER_LOG_POS=#/ --exec $MYSQL_DUMP --compact --master-data -u mysqltest_1 test 2>&1 # Clean up From f7458e075de1572d18c2e6006e65ac2fd217a634 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 12:16:43 +0400 Subject: [PATCH 359/527] Bug #32801 wait_timeout.test fails randomly wait_timeout test enabled mysql-test/t/disabled.def: Bug #32801 wait_timeout.test fails randomly wait_timeout enabled --- mysql-test/t/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 2cbfb3cf658..9daaa7a5e03 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -19,7 +19,6 @@ events : Bug#32664 events.test fails randomly lowercase_table3 : Bug#32667 lowercase_table3.test reports to error log kill : Bug#29149: Test "kill" fails on Windows innodb_mysql : Bug#32724: innodb_mysql.test fails randomly -wait_timeout : Bug#32801 wait_timeout.test fails randomly ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 From 2cb35cd680d70f3e1e26b5672f2125d6fdff4921 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 15:02:34 +0400 Subject: [PATCH 360/527] test case fix --- mysql-test/r/symlink.result | 8 ++++---- mysql-test/t/symlink.test | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 8773d3ec6c0..689aa724935 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -147,16 +147,16 @@ drop table t1; deallocate prepare stmt; CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/var/master-data/test'; -ERROR HY000: Incorrect arguments to DATA DIRECORY +Got one of the listed errors CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/var/master-data/'; -ERROR HY000: Incorrect arguments to DATA DIRECORY +Got one of the listed errors CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/var/master-data'; -ERROR HY000: Incorrect arguments to INDEX DIRECORY +Got one of the listed errors CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/var/master-data_var'; -ERROR HY000: Can't create/write to file 'TEST_DIR/var/master-data_var/t1.MYI' (Errcode: 2) +Got one of the listed errors End of 4.1 tests SET SESSION keep_files_on_create = TRUE; CREATE TABLE t1 (a INT) ENGINE MYISAM; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 8878f9fc461..10d8f355c98 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -204,19 +204,19 @@ deallocate prepare stmt; # Bug#32167 another privilege bypass with DATA/INDEX DIRECORY # --replace_result $MYSQL_TEST_DIR TEST_DIR ---error 1210 +--error 1,1210 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/test'; --replace_result $MYSQL_TEST_DIR TEST_DIR ---error 1210 +--error 1,1210 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQL_TEST_DIR/var/master-data/'; --replace_result $MYSQL_TEST_DIR TEST_DIR ---error 1210 +--error 1,1210 eval CREATE TABLE t1(a INT) INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data'; --replace_result $MYSQL_TEST_DIR TEST_DIR ---error 1 +--error 1,1210 eval CREATE TABLE t1(a INT) INDEX DIRECTORY='$MYSQL_TEST_DIR/var/master-data_var'; From 8a176c559bbcded042f79da89878d9824b8286c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 15:38:18 +0400 Subject: [PATCH 361/527] test case fix mysql-test/r/partition.result: the test is moved to 'partition_not_windows' test mysql-test/r/partition_not_windows.result: the test is moved from 'partition' test mysql-test/t/partition.test: the test is moved to 'partition_not_windows' test mysql-test/t/partition_not_windows.test: the test is moved from 'partition' test --- mysql-test/r/partition.result | 19 --------------- mysql-test/r/partition_not_windows.result | 19 +++++++++++++++ mysql-test/t/partition.test | 29 ----------------------- mysql-test/t/partition_not_windows.test | 27 +++++++++++++++++++++ 4 files changed, 46 insertions(+), 48 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index be3c68e6c18..3f22d7e3bb1 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1207,25 +1207,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' id 22589 drop table t1, t2; -set @org_mode=@@sql_mode; -set @@sql_mode='NO_DIR_IN_CREATE'; -select @@sql_mode; -@@sql_mode -NO_DIR_IN_CREATE -create table t1 (i int ) -partition by range (i) -( -partition p01 values less than (1000) -data directory='/not/existing' - index directory='/not/existing' -); -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `i` int(11) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ -DROP TABLE t1, t2; -set @@sql_mode=@org_mode; create table t1 (c1 varchar(255),c2 tinyint,primary key(c1)) partition by key (c1) partitions 10 ; insert into t1 values ('aaa','1') on duplicate key update c2 = c2 + 1; diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index af36673a3e0..3a3897ec65b 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -11,6 +11,25 @@ partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX (SUBPARTITION subpart20, SUBPARTITION subpart21)); Checking if file exists after alter drop table t1; +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +@@sql_mode +NO_DIR_IN_CREATE +create table t1 (i int ) +partition by range (i) +( +partition p01 values less than (1000) +data directory='/not/existing' + index directory='/not/existing' +); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; DROP TABLE IF EXISTS `example`; CREATE TABLE `example` ( `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index d889fe83dc1..e7e4111e261 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1398,35 +1398,6 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' drop table t1, t2; -# -# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables -# - -disable_query_log; -eval create table t2 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/tmp/" - index directory="$MYSQLTEST_VARDIR/tmp/" -); -enable_query_log; - -set @org_mode=@@sql_mode; -set @@sql_mode='NO_DIR_IN_CREATE'; -select @@sql_mode; -create table t1 (i int ) -partition by range (i) -( - partition p01 values less than (1000) - data directory='/not/existing' - index directory='/not/existing' -); - -show create table t2; -DROP TABLE t1, t2; -set @@sql_mode=@org_mode; - # # Bug #27123 partition + on duplicate key update + varchar = Can't find record in
charset_database_numberQ_CHARSET_DATABASE_NUMBER == 8Q_CHARSET_DATABASE_CODE == 8 2 byte integer The value of the collation_database system variable (in the @@ -1457,11 +1461,11 @@ protected: In newer versions, "CREATE TABLE" has been changed to take the character set from the database of the created table, rather than - the database of the current database. This makes a difference - when creating a table in another database than the current one. - "LOAD DATA INFILE" has not yet changed to do this, but there are - plans to eventually do it, and to make collation_database - read-only. + the character set of the current database. This makes a + difference when creating a table in another database than the + current one. "LOAD DATA INFILE" has not yet changed to do this, + but there are plans to eventually do it, and to make + collation_database read-only. This field is written if it is not 0.
# diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index c5f54286095..836d5ab10e6 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -67,6 +67,33 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO drop table t1; +# +# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables +# +disable_query_log; +eval create table t2 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory="$MYSQLTEST_VARDIR/tmp/" + index directory="$MYSQLTEST_VARDIR/tmp/" +); +enable_query_log; + +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +create table t1 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory='/not/existing' + index directory='/not/existing' +); +show create table t2; +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; + # End Windows specific test failures. # These tests contain non-Windows specific directory/file format. From 162eadbe68d6029522b23ab57c84a0b64f6699a9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 17:34:06 +0300 Subject: [PATCH 362/527] Fix for bug #31781: multi-table UPDATE with temp-pool enabled fails with errno 17 my_create() did not perform any checks for the case when a file is successfully created by a call to open(), but the call to my_register_filename() later fails because the number of open files has exceeded the my_open_files limit. This can happen on platforms which do not have getrlimit(), and hence we do not know the real limit for open files. In such a case an error was returned to a caller although the file has actually been created. Since callers assume my_create() to return an error only when it failed to create a file, they did not perform any cleanups, leaving an 'orphaned' file on the file system. Fixed by adding a check for the above case to my_create() and ensuring the newly created file is deleted before returning an error. Creating a deterministic test case in the test suite is impossible, because the exact steps required to reproduce the above situation depend on the platform and/or environment (OS per-user limits, queries executed by previous tests, startup parameters). The patch was manually tested on Windows using examples posted in the bug report. mysys/my_create.c: Ensure that, if the call to my_register_filename() in my_create() failed, but the previous open() called succeeded, the newly created file is deleted before returning an error. --- mysys/my_create.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/mysys/my_create.c b/mysys/my_create.c index d612926c1a5..c535ae73a0a 100644 --- a/mysys/my_create.c +++ b/mysys/my_create.c @@ -35,7 +35,7 @@ File my_create(const char *FileName, int CreateFlags, int access_flags, myf MyFlags) { - int fd; + int fd, rc; DBUG_ENTER("my_create"); DBUG_PRINT("my",("Name: '%s' CreateFlags: %d AccessFlags: %d MyFlags: %d", FileName, CreateFlags, access_flags, MyFlags)); @@ -60,6 +60,20 @@ File my_create(const char *FileName, int CreateFlags, int access_flags, fd = open(FileName, access_flags); #endif - DBUG_RETURN(my_register_filename(fd, FileName, FILE_BY_CREATE, - EE_CANTCREATEFILE, MyFlags)); + rc= my_register_filename(fd, FileName, FILE_BY_CREATE, + EE_CANTCREATEFILE, MyFlags); + /* + my_register_filename() may fail on some platforms even if the call to + *open() above succeeds. In this case, don't leave the stale file because + callers assume the file to not exist if my_create() fails, so they don't + do any cleanups. + */ + if (unlikely(fd >= 0 && rc < 0)) + { + int tmp= my_errno; + my_delete(FileName, MyFlags); + my_errno= tmp; + } + + DBUG_RETURN(rc); } /* my_create */ From 40eef79f9d7a2cafec02de055d4580b945e25a4b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 15:58:56 +0100 Subject: [PATCH 363/527] As result of WL#4204 all charset tests are now disabled. --- mysql-test/suite/funcs_2/t/disabled.def | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mysql-test/suite/funcs_2/t/disabled.def diff --git a/mysql-test/suite/funcs_2/t/disabled.def b/mysql-test/suite/funcs_2/t/disabled.def new file mode 100644 index 00000000000..c903662e052 --- /dev/null +++ b/mysql-test/suite/funcs_2/t/disabled.def @@ -0,0 +1,6 @@ +# Disabled by hhunger (2008-03-03) due to WL4204 +innodb_charset : Due to bug#20447 +myisam_charset : Due to bug#20477 +memory_charset : Due to bug#20447 +ndb_charset : Due to bug#20447 + From 28dc3ac696bd69a08ba4e5591668c3b270710b58 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 20:29:58 +0400 Subject: [PATCH 364/527] fixed test case problem on win mysql-test/r/partition.result: the test is moved to 'partition_not_windows' test case mysql-test/r/partition_not_windows.result: the test is moved from 'partition' test case mysql-test/t/partition.test: the test is moved to 'partition_not_windows' test case mysql-test/t/partition_not_windows.test: the test is moved from 'partition' test case --- mysql-test/r/partition.result | 28 ----------------- mysql-test/r/partition_not_windows.result | 28 +++++++++++++++++ mysql-test/t/partition.test | 38 ----------------------- mysql-test/t/partition_not_windows.test | 38 +++++++++++++++++++++++ 4 files changed, 66 insertions(+), 66 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 3f22d7e3bb1..a0719d51670 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1301,34 +1301,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'EXTENDED' at line 1 DROP TABLE t1; -CREATE TABLE t1(a INT) -PARTITION BY KEY (a) -(PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); -ERROR HY000: Incorrect arguments to DATA DIRECORY -CREATE TABLE t1(a INT) -PARTITION BY KEY (a) -(PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); -ERROR HY000: Incorrect arguments to INDEX DIRECORY -CREATE TABLE ts (id INT, purchased DATE) -PARTITION BY RANGE(YEAR(purchased)) -SUBPARTITION BY HASH(TO_DAYS(purchased)) ( -PARTITION p0 VALUES LESS THAN (1990) ( -SUBPARTITION s0a -DATA DIRECTORY = 'TEST_DIR/master-data/test', -SUBPARTITION s0b -DATA DIRECTORY = 'TEST_DIR/master-data/test' -)); -ERROR HY000: Incorrect arguments to DATA DIRECORY -CREATE TABLE ts (id INT, purchased DATE) -PARTITION BY RANGE(YEAR(purchased)) -SUBPARTITION BY HASH(TO_DAYS(purchased)) ( -PARTITION p0 VALUES LESS THAN (1990) ( -SUBPARTITION s0a -INDEX DIRECTORY = 'TEST_DIR/master-data/test', -SUBPARTITION s0b -INDEX DIRECTORY = 'TEST_DIR/master-data/test' -)); -ERROR HY000: Incorrect arguments to INDEX DIRECORY CREATE TABLE t1 (s1 BIGINT UNSIGNED) PARTITION BY RANGE (s1) ( PARTITION p0 VALUES LESS THAN (0), diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index 3a3897ec65b..501d3a469a1 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -30,6 +30,34 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ DROP TABLE t1, t2; set @@sql_mode=@org_mode; +CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); +ERROR HY000: Incorrect arguments to INDEX DIRECORY +CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a +DATA DIRECTORY = 'TEST_DIR/master-data/test', +SUBPARTITION s0b +DATA DIRECTORY = 'TEST_DIR/master-data/test' +)); +ERROR HY000: Incorrect arguments to DATA DIRECORY +CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a +INDEX DIRECTORY = 'TEST_DIR/master-data/test', +SUBPARTITION s0b +INDEX DIRECTORY = 'TEST_DIR/master-data/test' +)); +ERROR HY000: Incorrect arguments to INDEX DIRECORY DROP TABLE IF EXISTS `example`; CREATE TABLE `example` ( `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index e7e4111e261..c35626e06b7 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1545,44 +1545,6 @@ ALTER TABLE t1 OPTIMIZE PARTITION p1 EXTENDED; ALTER TABLE t1 ANALYZE PARTITION p1 EXTENDED; DROP TABLE t1; -# -# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY -# ---replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 -eval CREATE TABLE t1(a INT) -PARTITION BY KEY (a) -(PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); ---replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 -eval CREATE TABLE t1(a INT) -PARTITION BY KEY (a) -(PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); - ---replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 -eval CREATE TABLE ts (id INT, purchased DATE) -PARTITION BY RANGE(YEAR(purchased)) -SUBPARTITION BY HASH(TO_DAYS(purchased)) ( -PARTITION p0 VALUES LESS THAN (1990) ( -SUBPARTITION s0a - DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', -SUBPARTITION s0b - DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' -)); - ---replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 -eval CREATE TABLE ts (id INT, purchased DATE) -PARTITION BY RANGE(YEAR(purchased)) -SUBPARTITION BY HASH(TO_DAYS(purchased)) ( -PARTITION p0 VALUES LESS THAN (1990) ( -SUBPARTITION s0a - INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', -SUBPARTITION s0b - INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' -)); - # # Bug #29258: Partitions: search fails for maximum unsigned bigint # diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 836d5ab10e6..103fb05029e 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -94,6 +94,44 @@ show create table t2; DROP TABLE t1, t2; set @@sql_mode=@org_mode; +# +# Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY +# +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE t1(a INT) +PARTITION BY KEY (a) +(PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); + +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a + DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', +SUBPARTITION s0b + DATA DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' +)); + +--replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 +eval CREATE TABLE ts (id INT, purchased DATE) +PARTITION BY RANGE(YEAR(purchased)) +SUBPARTITION BY HASH(TO_DAYS(purchased)) ( +PARTITION p0 VALUES LESS THAN (1990) ( +SUBPARTITION s0a + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test', +SUBPARTITION s0b + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/master-data/test' +)); + # End Windows specific test failures. # These tests contain non-Windows specific directory/file format. From cd9f2d1c285d1bc5f5115e517da806ccb2bd1d28 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 20:35:44 +0300 Subject: [PATCH 365/527] BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call to before the late NULLs filtering code. - Backport function comments from 6.0. mysql-test/r/null_key.result: BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" - Testcase mysql-test/t/null_key.test: BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" - Testcase sql/sql_select.cc: BUG#34945: "ref_or_null queries that are null_rejecting and have a null value crash mysql" - Apply Eric Bergen's patch: in join_read_always_key(), move ha_index_init() call to before the late NULLs filtering code. - Backport function comments from 6.0 --- mysql-test/r/null_key.result | 18 ++++++++++++++++++ mysql-test/t/null_key.test | 23 +++++++++++++++++++++++ sql/sql_select.cc | 29 ++++++++++++++++++++++++++--- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result index 8a440284c53..58c587fe588 100644 --- a/mysql-test/r/null_key.result +++ b/mysql-test/r/null_key.result @@ -429,3 +429,21 @@ Handler_read_prev 0 Handler_read_rnd 0 Handler_read_rnd_next 5 DROP TABLE t1,t2,t3,t4; +CREATE TABLE t1 ( +a int(11) default NULL, +b int(11) default NULL, +KEY a (a,b) +); +INSERT INTO t1 VALUES (0,10),(0,11),(0,12); +CREATE TABLE t2 ( +a int(11) default NULL, +b int(11) default NULL, +KEY a (a) +); +INSERT INTO t2 VALUES (3,NULL),(3,11),(3,12); +SELECT * FROM t2 inner join t1 WHERE ( t1.a = 0 OR t1.a IS NULL) AND t2.a = 3 AND t2.b = t1.b; +a b a b +3 11 0 11 +3 12 0 12 +drop table t1, t2; +End of 5.0 tests diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test index e15aec01d2a..1400c643203 100644 --- a/mysql-test/t/null_key.test +++ b/mysql-test/t/null_key.test @@ -240,3 +240,26 @@ SHOW STATUS LIKE "handler_read%"; DROP TABLE t1,t2,t3,t4; # End of 4.1 tests + +# +# BUG#34945 "ref_or_null queries that are null_rejecting and have a null value crash mysql" +# +CREATE TABLE t1 ( + a int(11) default NULL, + b int(11) default NULL, + KEY a (a,b) +); +INSERT INTO t1 VALUES (0,10),(0,11),(0,12); + +CREATE TABLE t2 ( + a int(11) default NULL, + b int(11) default NULL, + KEY a (a) +); +INSERT INTO t2 VALUES (3,NULL),(3,11),(3,12); + +SELECT * FROM t2 inner join t1 WHERE ( t1.a = 0 OR t1.a IS NULL) AND t2.a = 3 AND t2.b = t1.b; + +drop table t1, t2; +-- echo End of 5.0 tests + diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 926b389f59f..6392f7c4299 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -11173,19 +11173,42 @@ join_read_key(JOIN_TAB *tab) } +/* + ref access method implementation: "read_first" function + + SYNOPSIS + join_read_always_key() + tab JOIN_TAB of the accessed table + + DESCRIPTION + This is "read_fist" function for the "ref" access method. + + The functon must leave the index initialized when it returns. + ref_or_null access implementation depends on that. + + RETURN + 0 - Ok + -1 - Row not found + 1 - Error +*/ + static int join_read_always_key(JOIN_TAB *tab) { int error; TABLE *table= tab->table; + /* Initialize the index first */ + if (!table->file->inited) + table->file->ha_index_init(tab->ref.key); + + /* Perform "Late NULLs Filtering" (see internals manual for explanations) */ for (uint i= 0 ; i < tab->ref.key_parts ; i++) { if ((tab->ref.null_rejecting & 1 << i) && tab->ref.items[i]->is_null()) return -1; - } - if (!table->file->inited) - table->file->ha_index_init(tab->ref.key); + } + if (cp_buffer_from_ref(tab->join->thd, &tab->ref)) return -1; if ((error=table->file->index_read(table->record[0], From 4d09306dd19820a742b003417d83f76f5d3633f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 3 Mar 2008 21:19:58 +0100 Subject: [PATCH 366/527] Raise the version number after cloning 5.0.58 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index e65bbd51432..2ee722b4905 100644 --- a/configure.in +++ b/configure.in @@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 5.0.58) +AM_INIT_AUTOMAKE(mysql, 5.0.60) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 @@ -23,7 +23,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=5 NDB_VERSION_MINOR=0 -NDB_VERSION_BUILD=58 +NDB_VERSION_BUILD=60 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 8e4a3fcbc996e41b4d805a926479bfacf13a99dd Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2008 16:13:08 +0400 Subject: [PATCH 367/527] Bug#23097 mysql can't insert korean on mysql prompt. Problem: libedit is a very pure-ASCII oriented library, and it is not aware of extended (0x80..0xFF) or even multi-byte characters. It considered such characters as non-printable and didn't allow to input them. Fix: make libedit think that all bytes >= 0x80 are printable. cmd-line-utils/libedit/el.h: Defining macro, a locale's isprint() replacement. We'll consider all 8bit values as printable characters. cmd-line-utils/libedit/key.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/map.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/read.c: Changing isprint() to el_isprint(). cmd-line-utils/libedit/refresh.c: Changing isprint() to el_isprint(). --- cmd-line-utils/libedit/el.h | 2 ++ cmd-line-utils/libedit/key.c | 4 ++-- cmd-line-utils/libedit/map.c | 2 +- cmd-line-utils/libedit/read.c | 2 +- cmd-line-utils/libedit/refresh.c | 6 +++--- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd-line-utils/libedit/el.h b/cmd-line-utils/libedit/el.h index c4b6cff2186..d9379d7c8aa 100644 --- a/cmd-line-utils/libedit/el.h +++ b/cmd-line-utils/libedit/el.h @@ -136,6 +136,8 @@ struct editline { protected int el_editmode(EditLine *, int, const char **); +#define el_isprint(x) ((unsigned char) (x) < 0x80 ? isprint(x) : 1) + #ifdef DEBUG #define EL_ABORT(a) do { \ fprintf(el->el_errfile, "%s, %d: ", \ diff --git a/cmd-line-utils/libedit/key.c b/cmd-line-utils/libedit/key.c index 090a2684e92..35fcf0651b2 100644 --- a/cmd-line-utils/libedit/key.c +++ b/cmd-line-utils/libedit/key.c @@ -618,7 +618,7 @@ key__decode_char(char *buf, int cnt, int ch) } else if (ch == '\\') { buf[cnt++] = '\\'; buf[cnt] = '\\'; - } else if (ch == ' ' || (isprint(ch) && !isspace(ch))) { + } else if (ch == ' ' || (el_isprint(ch) && !isspace(ch))) { buf[cnt] = ch; } else { buf[cnt++] = '\\'; @@ -660,7 +660,7 @@ key__decode_str(const char *str, char *buf, const char *sep) } else if (*p == '^' || *p == '\\') { *b++ = '\\'; *b++ = *p; - } else if (*p == ' ' || (isprint((unsigned char) *p) && + } else if (*p == ' ' || (el_isprint((unsigned char) *p) && !isspace((unsigned char) *p))) { *b++ = *p; } else { diff --git a/cmd-line-utils/libedit/map.c b/cmd-line-utils/libedit/map.c index d99c36ff665..6be9279b5e5 100644 --- a/cmd-line-utils/libedit/map.c +++ b/cmd-line-utils/libedit/map.c @@ -961,7 +961,7 @@ map_init_nls(EditLine *el) el_action_t *map = el->el_map.key; for (i = 0200; i <= 0377; i++) - if (isprint(i)) + if (el_isprint(i)) map[i] = ED_INSERT; } diff --git a/cmd-line-utils/libedit/read.c b/cmd-line-utils/libedit/read.c index 051f3e8e42e..51848c2038e 100644 --- a/cmd-line-utils/libedit/read.c +++ b/cmd-line-utils/libedit/read.c @@ -508,7 +508,7 @@ el_gets(EditLine *el, int *nread) el->el_chared.c_redo.pos < el->el_chared.c_redo.lim) { if (cmdnum == VI_DELETE_PREV_CHAR && el->el_chared.c_redo.pos != el->el_chared.c_redo.buf - && isprint((unsigned char)el->el_chared.c_redo.pos[-1])) + && el_isprint((unsigned char)el->el_chared.c_redo.pos[-1])) el->el_chared.c_redo.pos--; else *el->el_chared.c_redo.pos++ = ch; diff --git a/cmd-line-utils/libedit/refresh.c b/cmd-line-utils/libedit/refresh.c index b2833d215c5..46aca15ef08 100644 --- a/cmd-line-utils/libedit/refresh.c +++ b/cmd-line-utils/libedit/refresh.c @@ -88,7 +88,7 @@ private void re_addc(EditLine *el, int c) { - if (isprint(c)) { + if (el_isprint(c)) { re_putc(el, c, 1); return; } @@ -964,7 +964,7 @@ re_refresh_cursor(EditLine *el) h = 1; v++; } - } else if (!isprint((unsigned char) c)) { + } else if (!el_isprint((unsigned char) c)) { h += 3; if (h > th) { /* if overflow, compensate */ h = h - th; @@ -1057,7 +1057,7 @@ re_fastaddc(EditLine *el) char mc = (c == '\177') ? '?' : (c | 0100); re_fastputc(el, '^'); re_fastputc(el, mc); - } else if (isprint((unsigned char) c)) { /* normal char */ + } else if (el_isprint((unsigned char) c)) { /* normal char */ re_fastputc(el, c); } else { re_fastputc(el, '\\'); From adeac5cabe01f720ee948fb548c1dfc133f78b2d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2008 13:21:15 +0100 Subject: [PATCH 368/527] Adding code to ignore warning from error log. mysql-test/lib/mtr_report.pl: Filtering out benign warning that can be generated during server shutdown. --- mysql-test/lib/mtr_report.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 2aeda9933f0..debfc0f5726 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -279,6 +279,12 @@ sub mtr_report_stats ($) { /Failed to open log/ or /Failed to open the existing master info file/ or /Forcing shutdown of [0-9]* plugins/ or + + # Due to timing issues, it might be that this warning + # is printed when the server shuts down and the + # computer is loaded. + /Forcing close of thread \d+ user: '.*?'/ or + /Got error [0-9]* when reading table/ or /Incorrect definition of table/ or /Incorrect information in file/ or From 0fa2ee981be78dd30073313a9fbeb48edce6e96b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2008 10:17:49 -0300 Subject: [PATCH 369/527] Bug#35009 Results of mysql_client_test are discarded upon failure It's impossible to determine which test inside mysql_client_test failed if the log file is overwritten by mysqltest when dumping the test case results. Redirect mysql_client_test output to a separate file. mysql-test/t/mysql_client_test.test: Redirect mysql_client_test output to a separate log file so it doesn't get overwritten by mysqltest. --- mysql-test/t/mysql_client_test.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test index 66a27abd61a..b46a127785a 100644 --- a/mysql-test/t/mysql_client_test.test +++ b/mysql-test/t/mysql_client_test.test @@ -8,8 +8,8 @@ # server or run mysql-test-run --debug mysql_client_test and check # var/log/mysql_client_test.trace ---exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1 ---exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.log 2>&1 +--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out 2>&1 +--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out 2>&1 # End of 4.1 tests echo ok; From 0769fe559036512506736768fb31ddb0482ac2e6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2008 10:32:30 -0300 Subject: [PATCH 370/527] Use the same name for mysql_client_test output file in all branches. mysql-test/t/mysql_client_test.test: Rename mysql_client_test output file to mysql_client_test.out.log --- mysql-test/t/mysql_client_test.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/mysql_client_test.test b/mysql-test/t/mysql_client_test.test index b46a127785a..7667522feaf 100644 --- a/mysql-test/t/mysql_client_test.test +++ b/mysql-test/t/mysql_client_test.test @@ -8,8 +8,8 @@ # server or run mysql-test-run --debug mysql_client_test and check # var/log/mysql_client_test.trace ---exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out 2>&1 ---exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out 2>&1 +--exec echo "$MYSQL_CLIENT_TEST" > $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 +--exec $MYSQL_CLIENT_TEST --getopt-ll-test=25600M >> $MYSQLTEST_VARDIR/log/mysql_client_test.out.log 2>&1 # End of 4.1 tests echo ok; From edf9577c791fb8d87e17fc2d6f44f4fe1c822db4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2008 22:00:53 +0100 Subject: [PATCH 371/527] scripts/CMakeLists.txt : Treat "mysql_upgrade_shell" the same way as all the other scripts. scripts/CMakeLists.txt: Treat "mysql_upgrade_shell" the same way as all the other scripts. --- scripts/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index d7bcb8fd4e7..8aca7792e7c 100755 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -73,6 +73,9 @@ CONFIGURE_FILE(mysql_secure_installation.pl.in CONFIGURE_FILE(mysql_tableinfo.sh scripts/mysql_tableinfo.pl ESCAPE_QUOTES @ONLY) +CONFIGURE_FILE(mysql_upgrade_shell.sh + scripts/mysql_upgrade_shell.pl ESCAPE_QUOTES @ONLY) + CONFIGURE_FILE(mysqld_multi.sh scripts/mysqld_multi.pl ESCAPE_QUOTES @ONLY) From 657ef27076d5536f7c17e0643ea5e6829678b6df Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 12:25:55 +0200 Subject: [PATCH 372/527] Bug #28780 report_host is not available through SELECT @@report_host There was no way to see if report-{host,port,user,password} were set up. Fixed with introducing new global variables. The variables are made read-only because of a possible need to change them most probably require the slave server restart. Todo: transform the startup options to be CHANGE master parameters - i.e to deprecate `report-' options, and to change the new vars to be updatable at time of CHANGE master executes with new values. sql/set_var.cc: Adding associations of the server init arguments with the new global read-only variables. mysql-test/suite/rpl/r/rpl_report.result: new results file mysql-test/suite/rpl/t/rpl_report-slave.opt: options initialize the new global variables. mysql-test/suite/rpl/t/rpl_report.test: The new test to check SHOW-ability and SELECT-ablity for the report global vars. --- mysql-test/suite/rpl/r/rpl_report.result | 27 +++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_report-slave.opt | 2 ++ mysql-test/suite/rpl/t/rpl_report.test | 18 ++++++++++++++ sql/set_var.cc | 13 ++++++++++ 4 files changed, 60 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_report.result create mode 100644 mysql-test/suite/rpl/t/rpl_report-slave.opt create mode 100644 mysql-test/suite/rpl/t/rpl_report.test diff --git a/mysql-test/suite/rpl/r/rpl_report.result b/mysql-test/suite/rpl/r/rpl_report.result new file mode 100644 index 00000000000..cc9c989dc80 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_report.result @@ -0,0 +1,27 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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 * from Information_schema.GLOBAL_VARIABLES where variable_name regexp 'report_\(host\|port\|user\|password\)'; +VARIABLE_NAME VARIABLE_VALUE +REPORT_HOST 127.0.0.1 +REPORT_PORT 9308 +REPORT_PASSWORD my_password +REPORT_USER my_user +show global variables like 'report_host'; +Variable_name Value +report_host 127.0.0.1 +show global variables like 'report_port'; +Variable_name Value +report_port 9308 +show global variables like 'report_user'; +Variable_name Value +report_user my_user +show global variables like 'report_password'; +Variable_name Value +report_password my_password +set @@global.report_host='my.new.address.net'; +ERROR HY000: Variable 'report_host' is a read only variable +end of tests diff --git a/mysql-test/suite/rpl/t/rpl_report-slave.opt b/mysql-test/suite/rpl/t/rpl_report-slave.opt new file mode 100644 index 00000000000..123e5c272b9 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_report-slave.opt @@ -0,0 +1,2 @@ +--report-host=127.0.0.1 --report-user='my_user' --report-password='my_password' --report-port=9308 + diff --git a/mysql-test/suite/rpl/t/rpl_report.test b/mysql-test/suite/rpl/t/rpl_report.test new file mode 100644 index 00000000000..ae7eea26d89 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_report.test @@ -0,0 +1,18 @@ +# Verify that mysqld init time --report-{host,port,user,password} parameters +# are SHOW-able and SELECT-able FROM INFORMATION_SCHEMA.global_variables + +source include/master-slave.inc; + +connection slave; +select * from Information_schema.GLOBAL_VARIABLES where variable_name regexp 'report_\(host\|port\|user\|password\)'; +show global variables like 'report_host'; +show global variables like 'report_port'; +show global variables like 'report_user'; +show global variables like 'report_password'; + +# to demonstrate that report global variables are read-only +error ER_INCORRECT_GLOBAL_LOCAL_VAR; +set @@global.report_host='my.new.address.net'; + + +--echo end of tests diff --git a/sql/set_var.cc b/sql/set_var.cc index 410608f154f..d44bfe4ae47 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -648,6 +648,19 @@ sys_var_thd_time_zone sys_time_zone(&vars, "time_zone"); /* Global read-only variable containing hostname */ static sys_var_const_str sys_hostname(&vars, "hostname", glob_hostname); +static sys_var_const_str_ptr sys_repl_report_host(&vars, "report_host", &report_host); +static sys_var_const_str_ptr sys_repl_report_user(&vars, "report_user", &report_user); +static sys_var_const_str_ptr sys_repl_report_password(&vars, "report_password", &report_password); + +static uchar *slave_get_report_port(THD *thd) +{ + thd->sys_var_tmp.long_value= report_port; + return (uchar*) &thd->sys_var_tmp.long_value; +} + +static sys_var_readonly sys_repl_report_port(&vars, "report_port", OPT_GLOBAL, SHOW_INT, slave_get_report_port); + + sys_var_thd_bool sys_keep_files_on_create(&vars, "keep_files_on_create", &SV::keep_files_on_create); From cc3bf06878d1543bcbd421afc706eba617da26ea Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 13:59:32 +0100 Subject: [PATCH 373/527] Updating result file. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Result file change. --- mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index abb030dd4f0..d26913da2b2 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -586,7 +586,7 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t4) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 4 */; count(*) From 0c1dd98ec883323fc79fd5ac558ed3d278a68c31 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 16:02:33 +0300 Subject: [PATCH 374/527] Fix for bug #34889: mysql_client_test::test_mysql_insert_id test fails sporadically Under some circumstances, the mysql_insert_id() value after SELECT ... INSERT could return a wrong value. This could happen when the last SELECT ... INSERT did not involve an AUTO_INCREMENT column, but the value of mysql_insert_id() was changed by some previous statements. Fixed by checking the value of thd->insert_id_used in select_insert::send_eof() and returning 0 for mysql_insert_id() if it is not set. sql/sql_insert.cc: Do not return thd->last_insert_id unconditionally in select_insert::send_eof(). First check if thd->insert_id_used is non-zero, and return 0 otherwise. tests/mysql_client_test.c: Added a test case for bug #34889. --- sql/sql_insert.cc | 3 ++- tests/mysql_client_test.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 14292f1cd9d..1d324872409 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -3006,7 +3006,8 @@ bool select_insert::send_eof() ((thd->client_capabilities & CLIENT_FOUND_ROWS) ? info.touched : info.updated); id= autoinc_value_of_first_inserted_row > 0 ? - autoinc_value_of_first_inserted_row : thd->last_insert_id; + autoinc_value_of_first_inserted_row : thd->insert_id_used ? + thd->last_insert_id : 0; ::send_ok(thd, (ulong) thd->row_count_func, id, buff); DBUG_RETURN(0); } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 9cc2af25529..f8c554a06fd 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15241,6 +15241,22 @@ static void test_mysql_insert_id() myquery(rc); res= mysql_insert_id(mysql); DIE_UNLESS(res == 0); + + /* + Test for bug #34889: mysql_client_test::test_mysql_insert_id test fails + sporadically + */ + rc= mysql_query(mysql, "create table t2 (f1 int not null primary key auto_increment, f2 varchar(255))"); + myquery(rc); + rc= mysql_query(mysql, "insert into t2 values (null,'b')"); + myquery(rc); + rc= mysql_query(mysql, "insert into t1 select 5,'c'"); + myquery(rc); + res= mysql_insert_id(mysql); + DIE_UNLESS(res == 0); + rc= mysql_query(mysql, "drop table t2"); + myquery(rc); + rc= mysql_query(mysql, "insert into t1 select null,'d'"); myquery(rc); res= mysql_insert_id(mysql); From a2e2831bd8a4308463fe50a3d5991d523d0e360e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 14:03:05 +0100 Subject: [PATCH 375/527] Include "mysql_upgrade_shell.pl" in a binary distribution on Windows. --- scripts/make_win_bin_dist | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 56510dc857b..2b2477c52cd 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -337,6 +337,7 @@ mysql_explain_log.pl \ mysql_install_db.pl \ mysql_secure_installation.pl \ mysql_tableinfo.pl \ +mysql_upgrade_shell.pl \ mysqld_multi.pl \ mysqldumpslow.pl \ mysqlhotcopy.pl \ From 41a80039b62fa8628339cabe264bb4807d4869be Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 14:45:40 +0100 Subject: [PATCH 376/527] Adding missing drop of view last in test. mysql-test/suite/binlog/r/binlog_unsafe.result: Result change. mysql-test/suite/binlog/t/binlog_unsafe.test: Dropping view created in test. --- mysql-test/suite/binlog/r/binlog_unsafe.result | 1 + mysql-test/suite/binlog/t/binlog_unsafe.test | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 47284ed8bc3..8467a18aa6b 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -11,3 +11,4 @@ Level Warning Code 1592 Message Statement is not safe to log in statement format. DROP TABLE t1,t2,t3; +DROP VIEW v1; diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index f34c22dc5f7..fa2a5eac128 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -14,5 +14,5 @@ INSERT INTO t1 SELECT UUID(); query_vertical SHOW WARNINGS; DROP TABLE t1,t2,t3; - +DROP VIEW v1; From eea48abc777b98bc06699fa4593aff2a71751e79 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 14:57:13 +0100 Subject: [PATCH 377/527] Fix for Bug #34786 Compiling ndb on Mac OS X 10.5.2 (Intel) fails storage/ndb/src/kernel/blocks/tsman.cpp: Fix build on Tiger and Leopard, incl. 10.5.2 This is already in vm/ndb_malloc_impl.cpp --- storage/ndb/src/kernel/blocks/tsman.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 8e68e118f98..ce5797cf209 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -181,7 +181,6 @@ struct TsmanChunk Vector bitmask; }; template class Vector; -template class Vector; #endif void From 2b7dda9e9d06f2ab6036da39250a765926c9c437 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 09:33:32 -0500 Subject: [PATCH 378/527] Bug#33464: DROP FUNCTION caused a crash The cause of the crash is an assertion failure that we do not emit an error message (grant not found) and then return "ok". The assertion is valid, and we were ignoring the buggy behavior prior to the "Diagnostics" result-verification. Use an error handler to mutate innocuous missing-grant errors, when removing routines, into warnings. mysql-test/r/drop.result: Show that the crash disappears. Also prepare for the larger bug to be fixed with only minor changes to this test. mysql-test/t/drop.test: Show that the crash disappears. Also prepare for the larger bug to be fixed with only minor changes to this test. sql/sql_acl.cc: Disable a segment of code that makes a faulty assumption about the existence of a routine's defining user, until that assumption becomes true. Push a new handler onto the error-handler stack, so that when removing a routine, a missing ACL grant is now a warning instead of an error. If any unexpected error is raised then tell the caller. --- mysql-test/r/drop.result | 39 +++++++++++++++ mysql-test/t/drop.test | 62 +++++++++++++++++++++++ sql/sql_acl.cc | 105 +++++++++++++++++++++++++++++++-------- 3 files changed, 184 insertions(+), 22 deletions(-) diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 71d6fcc7cd0..b4f6395819f 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -91,4 +91,43 @@ create table mysql_test.`#sql-347f_7` (f1 int); create table mysql_test.`#sql-347f_8` (f1 int); drop table mysql_test.`#sql-347f_8`; drop database mysql_test; +CREATE DATABASE dbbug33464; +CREATE USER 'userbug33464'@'localhost'; +GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; + +userbug33464@localhost dbbug33464 +DROP PROCEDURE IF EXISTS sp3; +DROP FUNCTION IF EXISTS fn1; +CREATE PROCEDURE sp3(v1 char(20)) +BEGIN +SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; +END// +CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER +BEGIN +return 1; +END// +CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER +BEGIN +return 2; +END// +USE dbbug33464; + +root@localhost dbbug33464 +SELECT fn1(); +fn1() +1 +SELECT fn2(); +fn2() +2 +DROP USER 'userbug33464'@'localhost'; +DROP FUNCTION fn1; +Warnings: +Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1' +DROP FUNCTION fn2; +Warnings: +Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2' +DROP PROCEDURE sp3; +DROP USER 'userbug33464'@'localhost'; +use test; +DROP DATABASE dbbug33464; End of 5.1 tests diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index a79044436eb..3dd180f2d78 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -134,4 +134,66 @@ drop table mysql_test.`#sql-347f_8`; copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm; drop database mysql_test; + +# +# Bug#33464: DROP FUNCTION caused a crash. +# +CREATE DATABASE dbbug33464; +CREATE USER 'userbug33464'@'localhost'; + +GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; + +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (connbug33464, localhost, userbug33464, , dbbug33464); +--source suite/funcs_1/include/show_connection.inc + +--disable_warnings +DROP PROCEDURE IF EXISTS sp3; +DROP FUNCTION IF EXISTS fn1; +--enable_warnings + +delimiter //; +CREATE PROCEDURE sp3(v1 char(20)) +BEGIN + SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER +BEGIN + return 1; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER +BEGIN + return 2; +END// +delimiter ;// + +disconnect connbug33464; + +# cleanup +connection default; +USE dbbug33464; +--source suite/funcs_1/include/show_connection.inc + +SELECT fn1(); +SELECT fn2(); + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +DROP FUNCTION fn1; +DROP FUNCTION fn2; +DROP PROCEDURE sp3; + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +use test; +DROP DATABASE dbbug33464; + --echo End of 5.1 tests diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 0d563ab9051..b9d72998933 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2779,6 +2779,10 @@ table_error: } +/** + @retval 0 success + @retval -1 error +*/ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name, TABLE *table, const LEX_USER &combo, const char *db, const char *routine_name, @@ -2800,14 +2804,11 @@ static int replace_routine_table(THD *thd, GRANT_NAME *grant_name, thd->security_ctx->host_or_ip, NullS); /* - The following should always succeed as new users are created before - this function is called! + New users are created before this function is called. + + There may be some cases where a routine's definer is removed but the + routine remains. */ - if (!find_acl_user(combo.host.str, combo.user.str, FALSE)) - { - my_error(ER_PASSWORD_NO_MATCH,MYF(0)); - DBUG_RETURN(-1); - } table->use_all_columns(); restore_record(table, s->default_values); // Get empty record @@ -3321,7 +3322,8 @@ bool mysql_routine_grant(THD *thd, TABLE_LIST *table_list, bool is_proc, } if (replace_routine_table(thd, grant_name, tables[1].table, *Str, - db_name, table_name, is_proc, rights, revoke_grant)) + db_name, table_name, is_proc, rights, + revoke_grant) != 0) { result= TRUE; continue; @@ -5949,11 +5951,11 @@ bool mysql_revoke_all(THD *thd, List &list) if (!strcmp(lex_user->user.str,user) && !strcmp(lex_user->host.str, host)) { - if (!replace_routine_table(thd,grant_proc,tables[4].table,*lex_user, + if (replace_routine_table(thd,grant_proc,tables[4].table,*lex_user, grant_proc->db, grant_proc->tname, is_proc, - ~(ulong)0, 1)) + ~(ulong)0, 1) == 0) { revoked= 1; continue; @@ -5979,17 +5981,73 @@ bool mysql_revoke_all(THD *thd, List &list) } -/* - Revoke privileges for all users on a stored procedure - SYNOPSIS - sp_revoke_privileges() + +/** + If the defining user for a routine does not exist, then the ACL lookup + code should raise two errors which we should intercept. We convert the more + descriptive error into a warning, and consume the other. + + If any other errors are raised, then we set a flag that should indicate + that there was some failure we should complain at a higher level. +*/ +class Silence_routine_definer_errors : public Internal_error_handler +{ +public: + Silence_routine_definer_errors() + : is_grave(FALSE) + {} + + virtual ~Silence_routine_definer_errors() + {} + + virtual bool handle_error(uint sql_errno, const char *message, + MYSQL_ERROR::enum_warning_level level, + THD *thd); + + bool has_errors() { return is_grave; } + +private: + bool is_grave; +}; + +bool +Silence_routine_definer_errors::handle_error(uint sql_errno, + const char *message, + MYSQL_ERROR::enum_warning_level level, + THD *thd) +{ + if (level == MYSQL_ERROR::WARN_LEVEL_ERROR) + { + switch (sql_errno) + { + case ER_NONEXISTING_PROC_GRANT: + /* Convert the error into a warning. */ + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, sql_errno, message); + return TRUE; + default: + is_grave= TRUE; + } + } + + return FALSE; +} + + +/** + Revoke privileges for all users on a stored procedure. Use an error handler + that converts errors about missing grants into warnings. + + @param thd The current thread. + @param db DB of the stored procedure + @param name Name of the stored procedure - RETURN + @retval 0 OK. + @retval < 0 Error. Error message not yet sent. */ @@ -6000,11 +6058,15 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, int result; TABLE_LIST tables[GRANT_TABLES]; HASH *hash= is_proc ? &proc_priv_hash : &func_priv_hash; + Silence_routine_definer_errors error_handler; DBUG_ENTER("sp_revoke_privileges"); if ((result= open_grant_tables(thd, tables))) DBUG_RETURN(result != 1); + /* Be sure to pop this before exiting this scope! */ + thd->push_internal_handler(&error_handler); + rw_wrlock(&LOCK_grant); VOID(pthread_mutex_lock(&acl_cache->lock)); @@ -6031,14 +6093,14 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, grant_proc->host.hostname : (char*)""; lex_user.host.length= grant_proc->host.hostname ? strlen(grant_proc->host.hostname) : 0; - if (!replace_routine_table(thd,grant_proc,tables[4].table,lex_user, - grant_proc->db, grant_proc->tname, - is_proc, ~(ulong)0, 1)) + + if (replace_routine_table(thd,grant_proc,tables[4].table,lex_user, + grant_proc->db, grant_proc->tname, + is_proc, ~(ulong)0, 1) == 0) { revoked= 1; continue; } - result= -1; // Something went wrong } counter++; } @@ -6048,10 +6110,9 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, rw_unlock(&LOCK_grant); close_thread_tables(thd); - if (result) - my_message(ER_REVOKE_GRANTS, ER(ER_REVOKE_GRANTS), MYF(0)); + thd->pop_internal_handler(); - DBUG_RETURN(result); + DBUG_RETURN(error_handler.has_errors()); } From b6595704efebe3678b5696996bd84d35e3511256 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 11:23:58 -0500 Subject: [PATCH 379/527] Bug#34726: open_tables() crashes server if running with --debug The DBUG code emits the current value of the proc_info member of THD, which may be set to NULL. It was wrong to dereference that value with the format string %s without verifying that it was valid. Now, insert an inline test that substitutes the string "(null)" for NULL pointers. sql/sql_class.cc: Dereferencing a NULL is illegal (though not fatal for %s on some platforms), and we have no assurance that the caller didn't call us with a valid string. --- sql/sql_class.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 75376c53f68..ead7439bc81 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -253,7 +253,8 @@ const char *set_thd_proc_info(THD *thd, const char *info, const unsigned int calling_line) { const char *old_info= thd->proc_info; - DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, info)); + DBUG_PRINT("proc_info", ("%s:%d %s", calling_file, calling_line, + (info != NULL) ? info : "(null)")); #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) thd->profiling.status_change(info, calling_function, calling_file, calling_line); #endif From 2eb67908704727d276cae0d63e5d116511a5fc7d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Mar 2008 14:18:35 -0500 Subject: [PATCH 380/527] Move test that has more to do with grants than DROP. We shouldn't have grant warnings on embedded server. mysql-test/r/drop.result: Move test that has more to do with grants than DROP. mysql-test/r/grant.result: Move test that has more to do with grants than DROP. mysql-test/t/drop.test: Move test that has more to do with grants than DROP. mysql-test/t/grant.test: Move test that has more to do with grants than DROP. --- mysql-test/r/drop.result | 39 ------------------------ mysql-test/r/grant.result | 39 ++++++++++++++++++++++++ mysql-test/t/drop.test | 62 --------------------------------------- mysql-test/t/grant.test | 62 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+), 101 deletions(-) diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index b4f6395819f..71d6fcc7cd0 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -91,43 +91,4 @@ create table mysql_test.`#sql-347f_7` (f1 int); create table mysql_test.`#sql-347f_8` (f1 int); drop table mysql_test.`#sql-347f_8`; drop database mysql_test; -CREATE DATABASE dbbug33464; -CREATE USER 'userbug33464'@'localhost'; -GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; - -userbug33464@localhost dbbug33464 -DROP PROCEDURE IF EXISTS sp3; -DROP FUNCTION IF EXISTS fn1; -CREATE PROCEDURE sp3(v1 char(20)) -BEGIN -SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; -END// -CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER -BEGIN -return 1; -END// -CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER -BEGIN -return 2; -END// -USE dbbug33464; - -root@localhost dbbug33464 -SELECT fn1(); -fn1() -1 -SELECT fn2(); -fn2() -2 -DROP USER 'userbug33464'@'localhost'; -DROP FUNCTION fn1; -Warnings: -Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1' -DROP FUNCTION fn2; -Warnings: -Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2' -DROP PROCEDURE sp3; -DROP USER 'userbug33464'@'localhost'; -use test; -DROP DATABASE dbbug33464; End of 5.1 tests diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 0df3ac6de8a..d99de0beda6 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1283,4 +1283,43 @@ CALL mysqltest1.test(); DROP DATABASE mysqltest1; RENAME TABLE mysql.procs_gone TO mysql.procs_priv; FLUSH PRIVILEGES; +CREATE DATABASE dbbug33464; +CREATE USER 'userbug33464'@'localhost'; +GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; + +userbug33464@localhost dbbug33464 +DROP PROCEDURE IF EXISTS sp3; +DROP FUNCTION IF EXISTS fn1; +CREATE PROCEDURE sp3(v1 char(20)) +BEGIN +SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; +END// +CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER +BEGIN +return 1; +END// +CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER +BEGIN +return 2; +END// +USE dbbug33464; + +root@localhost dbbug33464 +SELECT fn1(); +fn1() +1 +SELECT fn2(); +fn2() +2 +DROP USER 'userbug33464'@'localhost'; +DROP FUNCTION fn1; +Warnings: +Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1' +DROP FUNCTION fn2; +Warnings: +Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2' +DROP PROCEDURE sp3; +DROP USER 'userbug33464'@'localhost'; +use test; +DROP DATABASE dbbug33464; End of 5.1 tests diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index 3dd180f2d78..a79044436eb 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -134,66 +134,4 @@ drop table mysql_test.`#sql-347f_8`; copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm; drop database mysql_test; - -# -# Bug#33464: DROP FUNCTION caused a crash. -# -CREATE DATABASE dbbug33464; -CREATE USER 'userbug33464'@'localhost'; - -GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (connbug33464, localhost, userbug33464, , dbbug33464); ---source suite/funcs_1/include/show_connection.inc - ---disable_warnings -DROP PROCEDURE IF EXISTS sp3; -DROP FUNCTION IF EXISTS fn1; ---enable_warnings - -delimiter //; -CREATE PROCEDURE sp3(v1 char(20)) -BEGIN - SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; -END// -delimiter ;// - -delimiter //; -CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER -BEGIN - return 1; -END// -delimiter ;// - -delimiter //; -CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER -BEGIN - return 2; -END// -delimiter ;// - -disconnect connbug33464; - -# cleanup -connection default; -USE dbbug33464; ---source suite/funcs_1/include/show_connection.inc - -SELECT fn1(); -SELECT fn2(); - ---error 0, ER_CANNOT_USER -DROP USER 'userbug33464'@'localhost'; - -DROP FUNCTION fn1; -DROP FUNCTION fn2; -DROP PROCEDURE sp3; - ---error 0, ER_CANNOT_USER -DROP USER 'userbug33464'@'localhost'; - -use test; -DROP DATABASE dbbug33464; - --echo End of 5.1 tests diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 16cccd1a1f4..eb02433c71e 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1377,4 +1377,66 @@ RENAME TABLE mysql.procs_gone TO mysql.procs_priv; FLUSH PRIVILEGES; +# +# Bug#33464: DROP FUNCTION caused a crash. +# +CREATE DATABASE dbbug33464; +CREATE USER 'userbug33464'@'localhost'; + +GRANT CREATE ROUTINE ON dbbug33464.* TO 'userbug33464'@'localhost'; + +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (connbug33464, localhost, userbug33464, , dbbug33464); +--source suite/funcs_1/include/show_connection.inc + +--disable_warnings +DROP PROCEDURE IF EXISTS sp3; +DROP FUNCTION IF EXISTS fn1; +--enable_warnings + +delimiter //; +CREATE PROCEDURE sp3(v1 char(20)) +BEGIN + SELECT * from dbbug33464.t6 where t6.f2= 'xyz'; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn1() returns char(50) SQL SECURITY INVOKER +BEGIN + return 1; +END// +delimiter ;// + +delimiter //; +CREATE FUNCTION fn2() returns char(50) SQL SECURITY DEFINER +BEGIN + return 2; +END// +delimiter ;// + +disconnect connbug33464; + +# cleanup +connection default; +USE dbbug33464; +--source suite/funcs_1/include/show_connection.inc + +SELECT fn1(); +SELECT fn2(); + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +DROP FUNCTION fn1; +DROP FUNCTION fn2; +DROP PROCEDURE sp3; + +--error 0, ER_CANNOT_USER +DROP USER 'userbug33464'@'localhost'; + +use test; +DROP DATABASE dbbug33464; + + --echo End of 5.1 tests From f2c9483dd5071747bfb46f4dd97d3607fe7d74ec Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 09:58:49 +0400 Subject: [PATCH 381/527] additional test fixes for bug 27580 --- mysql-test/r/ctype_cp1250_ch.result | 34 +++++++++++++++++++++++++++++ mysql-test/r/ctype_cp932.result | 19 ++++++++++++++++ mysql-test/r/ctype_ucs.result | 17 +++++++++++++++ 3 files changed, 70 insertions(+) diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result index 3f22933e260..2ed22802805 100644 --- a/mysql-test/r/ctype_cp1250_ch.result +++ b/mysql-test/r/ctype_cp1250_ch.result @@ -57,6 +57,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +create table t1 (a set('a') not null); +insert into t1 values (),(); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +select cast(a as char(1)) from t1; +cast(a as char(1)) + + +select a sounds like a from t1; +a sounds like a +1 +1 +select 1 from t1 order by cast(a as char(1)); +1 +1 +1 +drop table t1; set names utf8; create table t1 ( name varchar(10), @@ -133,6 +150,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +create table t1 (a set('a') not null); +insert into t1 values (),(); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +select cast(a as char(1)) from t1; +cast(a as char(1)) + + +select a sounds like a from t1; +a sounds like a +1 +1 +select 1 from t1 order by cast(a as char(1)); +1 +1 +1 +drop table t1; set names utf8; create table t1 ( name varchar(10), diff --git a/mysql-test/r/ctype_cp932.result b/mysql-test/r/ctype_cp932.result index 8974a6a8594..63cd720746f 100755 --- a/mysql-test/r/ctype_cp932.result +++ b/mysql-test/r/ctype_cp932.result @@ -6,6 +6,8 @@ SET @test_character_set= 'cp932'; SET @test_collation= 'cp932_japanese_ci'; SET @safe_character_set_server= @@character_set_server; SET @safe_collation_server= @@collation_server; +SET @safe_character_set_client= @@character_set_client; +SET @safe_character_set_results= @@character_set_results; SET character_set_server= @test_character_set; SET collation_server= @test_collation; CREATE DATABASE d1; @@ -72,10 +74,27 @@ select 1 from t1 order by cast(a as char(1)); 1 1 drop table t1; +set names utf8; +create table t1 ( +name varchar(10), +level smallint unsigned); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `name` varchar(10) default NULL, + `level` smallint(5) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=cp932 +insert into t1 values ('string',1); +select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; +concat(name,space(level)) concat(name, repeat(' ',level)) +string string +drop table t1; DROP DATABASE d1; USE test; SET character_set_server= @safe_character_set_server; SET collation_server= @safe_collation_server; +SET character_set_client= @safe_character_set_client; +SET character_set_results= @safe_character_set_results; set names cp932; set character_set_database = cp932; CREATE TABLE t1(c1 CHAR(1)) DEFAULT CHARACTER SET = cp932; diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result index a69c98590c6..f1a2da6c6bb 100644 --- a/mysql-test/r/ctype_ucs.result +++ b/mysql-test/r/ctype_ucs.result @@ -54,6 +54,23 @@ SELECT c1 as want1result from t1 where c1 like 'location%'; want1result location DROP TABLE t1; +create table t1 (a set('a') not null); +insert into t1 values (),(); +Warnings: +Warning 1364 Field 'a' doesn't have a default value +select cast(a as char(1)) from t1; +cast(a as char(1)) + + +select a sounds like a from t1; +a sounds like a +1 +1 +select 1 from t1 order by cast(a as char(1)); +1 +1 +1 +drop table t1; set names utf8; create table t1 ( name varchar(10), From c184cd6320ac3b5cbd1ab953d94ea1ef8c4d200e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 12:40:46 +0100 Subject: [PATCH 382/527] Bug#25132 disabled query cache: Qcache_free_blocks = 1 The initial value of free memory blocks in 0. When the query cache is enabled a new memory block gets allocated and is assigned number 1. The free memory block is later split each time query cache memory is allocated for new blocks. This means that the free memory block counter won't be reduced to zero when the number of allocated blocks are zero, but rather one. To avoid confusion this patch changes this behavior so that the free memory block counter is reset to zero when the query cache is disabled. Note that when the query cache is enabled and resized the free memory block counter was still calculated correctly. mysql-test/r/query_cache.result: test case mysql-test/t/query_cache.test: test case sql/sql_cache.cc: Restore the memory block count to 0 for consistency. --- mysql-test/r/query_cache.result | 10 ++++++++++ mysql-test/t/query_cache.test | 9 +++++++++ sql/sql_cache.cc | 1 + 3 files changed, 20 insertions(+) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 68f18d1b0b2..b47c91b0406 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1650,6 +1650,16 @@ Variable_name Value Qcache_queries_in_cache 1 DROP DATABASE bug30269; DROP USER 'bug30269'@'localhost'; +# +# Bug#25132 disabled query cache: Qcache_free_blocks = 1 +# +set global query_cache_size=100000; +set global query_cache_size=0; +set global query_cache_type=0; +show status like 'Qcache_free_blocks'; +Variable_name Value +Qcache_free_blocks 0 +Restore default values. set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 44b63df9739..e0042ab6311 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1251,6 +1251,15 @@ DROP DATABASE bug30269; disconnect bug30269; DROP USER 'bug30269'@'localhost'; +--echo # +--echo # Bug#25132 disabled query cache: Qcache_free_blocks = 1 +--echo # +set global query_cache_size=100000; +set global query_cache_size=0; +set global query_cache_type=0; +show status like 'Qcache_free_blocks'; + +--echo Restore default values. set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 8c868971911..2bf00e7e51f 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1794,6 +1794,7 @@ void Query_cache::make_disabled() query_cache_size= 0; queries_blocks= 0; free_memory= 0; + free_memory_blocks= 0; bins= 0; steps= 0; cache= 0; From aafb492d594776ead1014163461d30cbf9ca5772 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 09:16:53 -0300 Subject: [PATCH 383/527] Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures Disable test case for bug 29948, which is causing sporadically failures in other tests inside mysql_client_test. tests/mysql_client_test.c: Disable test case. --- tests/mysql_client_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 260e7b1e7a7..0deb37d25c3 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15942,6 +15942,7 @@ static void test_bug27592() DBUG_VOID_RETURN; } +#if 0 static void test_bug29948() { @@ -16017,6 +16018,8 @@ static void test_bug29948() mysql_close(dbc); } +#endif + /** Bug#29306 Truncated data in MS Access with decimal (3,1) columns in a VIEW */ @@ -16543,7 +16546,7 @@ static struct my_tests_st my_tests[]= { { "test_bug28505", test_bug28505 }, { "test_bug28934", test_bug28934 }, { "test_bug27592", test_bug27592 }, - { "test_bug29948", test_bug29948 }, + /* { "test_bug29948", test_bug29948 }, Bug#35103 */ { "test_bug29306", test_bug29306 }, { "test_bug31669", test_bug31669 }, { "test_bug32265", test_bug32265 }, From 04c5af18023014c2925c83df32f68906e706495d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 14:49:21 +0200 Subject: [PATCH 384/527] Bug#26622 MASTER_POS_WAIT does not work as documented MASTER_POS_WAIT return values are different than expected when the server is not a slave. It returns -1 instead of NULL. Fixed with correcting st_relay_log_info::wait_for_pos() to return the proper value in the case of rli info is not inited. mysql-test/r/rpl_master_pos_wait.result: results changed mysql-test/t/rpl_master_pos_wait.test: the new test to check that select master_pos_wait() to a server does not have master info returns NULL as specified. sql/slave.cc: changing the return value to correspond the specification. --- mysql-test/r/rpl_master_pos_wait.result | 6 ++++++ mysql-test/t/rpl_master_pos_wait.test | 11 +++++++++++ sql/slave.cc | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/rpl_master_pos_wait.result b/mysql-test/r/rpl_master_pos_wait.result index f0f48de4e07..b831eb9b95a 100644 --- a/mysql-test/r/rpl_master_pos_wait.result +++ b/mysql-test/r/rpl_master_pos_wait.result @@ -16,3 +16,9 @@ select master_pos_wait('master-bin.999999',0); stop slave sql_thread; master_pos_wait('master-bin.999999',0) NULL +"*** must be empty ***" +show slave status; +"*** must be NULL ***" +select master_pos_wait('foo', 98); +master_pos_wait('foo', 98) +NULL diff --git a/mysql-test/t/rpl_master_pos_wait.test b/mysql-test/t/rpl_master_pos_wait.test index 893c8746efc..2f7b18ae04b 100644 --- a/mysql-test/t/rpl_master_pos_wait.test +++ b/mysql-test/t/rpl_master_pos_wait.test @@ -15,4 +15,15 @@ stop slave sql_thread; connection slave; reap; +# +# bug#26622 MASTER_POS_WAIT does not work as documented +# + +connection master; +echo "*** must be empty ***"; +query_vertical show slave status; + +echo "*** must be NULL ***"; +select master_pos_wait('foo', 98); + # End of 4.1 tests diff --git a/sql/slave.cc b/sql/slave.cc index 181ad4ed8cb..d4d0655f366 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2685,7 +2685,7 @@ int st_relay_log_info::wait_for_pos(THD* thd, String* log_name, longlong timeout) { if (!inited) - return -1; + return -2; int event_count = 0; ulong init_abort_pos_wait; int error=0; From 8270d9875ff44900f3c57c15711c03d0b83cbe5d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 18:19:47 +0300 Subject: [PATCH 385/527] Fix for bug #34512: CAST( AVG( double ) AS DECIMAL ) returns wrong results Casting AVG() to DECIMAL led to incorrect results when the arguments had a non-DECIMAL type, because in this case Item_sum_avg::val_decimal() performed the division by the number of arguments twice. Fixed by changing Item_sum_avg::val_decimal() to not rely on Item_sum_sum::val_decimal(), i.e. calculate sum and divide using DECIMAL arithmetics for DECIMAL arguments, and utilize val_real() with subsequent conversion to DECIMAL otherwise. mysql-test/r/func_group.result: Added a test case for bug #34512. mysql-test/t/func_group.test: Added a test case for bug #34512. sql/item_sum.cc: Do not use Item_sum_sum::val_decimal() in Item_sum_avg::val_decimal() because the first one, depending on the arguments type, may return either the sum of the arguments, or the average calculated by the virtual val_real() method of Item_sum_avg. Instead, do our own calculation based on the arguments type. --- mysql-test/r/func_group.result | 6 ++++++ mysql-test/t/func_group.test | 10 ++++++++++ sql/item_sum.cc | 10 +++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index 4785ca9919d..772e432355b 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1419,4 +1419,10 @@ Note 1003 select (`test`.`t1`.`a` + 1) AS `y` from `test`.`t1` group by (`test`. DROP VIEW v1; DROP TABLE t1; SET SQL_MODE=DEFAULT; +CREATE TABLE t1(a DOUBLE); +INSERT INTO t1 VALUES (10), (20); +SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1; +AVG(a) CAST(AVG(a) AS DECIMAL) +15 15 +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 75a380c733f..dbe6d3113d5 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -916,5 +916,15 @@ DROP VIEW v1; DROP TABLE t1; SET SQL_MODE=DEFAULT; +# +# Bug #34512: CAST( AVG( double ) AS DECIMAL ) returns wrong results +# + +CREATE TABLE t1(a DOUBLE); +INSERT INTO t1 VALUES (10), (20); +SELECT AVG(a), CAST(AVG(a) AS DECIMAL) FROM t1; + +DROP TABLE t1; + ### --echo End of 5.0 tests diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 3d6d46ab3f4..f583fc7f988 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1206,7 +1206,15 @@ my_decimal *Item_sum_avg::val_decimal(my_decimal *val) null_value=1; return NULL; } - sum_dec= Item_sum_sum::val_decimal(&sum_buff); + + /* + For non-DECIMAL hybrid_type the division will be done in + Item_sum_avg::val_real(). + */ + if (hybrid_type != DECIMAL_RESULT) + return val_decimal_from_real(val); + + sum_dec= dec_buffs + curr_dec_buff; int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &cnt); my_decimal_div(E_DEC_FATAL_ERROR, val, sum_dec, &cnt, prec_increment); return val; From 9526a24b2f3b5763ef0589c6a299c09bd0e89b17 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 20:32:47 +0200 Subject: [PATCH 386/527] Bug #22234 Extra Slave Col: Slave should stop on Error Field `d` of table There was a failure in that show slave status displayed a wrong message when slave stopped at processing a row event inserting to a default-less column. The problem seem to have ceased after recent fixes in rbr code. However, the test was not updated to carry testing of the case commented-out. Uncommenting and editing the test. Notice, Bug#23907 is most probably a duplicate of this one. mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test: uncommenting the test that previously failed. mysql-test/suite/rpl/r/rpl_extraCol_innodb.result: results changed due to the correct expected error message of an added test is displayed. mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: results changed to reflect the test changes mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result: results changed to reflect the uncommented test sql/log_event.cc: correcting of a merge with bug#12713 to use the correct object holding the error code. --- .../extra/rpl_tests/rpl_extraSlave_Col.test | 59 ++++++++----------- .../suite/rpl/r/rpl_extraCol_innodb.result | 56 ++++++++++++++++++ .../suite/rpl/r/rpl_extraCol_myisam.result | 56 ++++++++++++++++++ .../suite/rpl_ndb/r/rpl_ndb_extraCol.result | 56 ++++++++++++++++++ sql/log_event.cc | 2 +- 5 files changed, 195 insertions(+), 34 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test index 6fa2c9ac1b5..7e726828a1e 100644 --- a/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test +++ b/mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test @@ -403,45 +403,38 @@ sync_slave_with_master; # added columns do not have default values# # Expect: Proper error message # ########################################### -# Commented out due to Bug #23907 Extra Slave Col is not -# erroring on extra col with no default values. +# Bug#22234, Bug#23907 Extra Slave Col is not +# erroring on extra col with no default values. ######################################################## #--echo *** Create t9 on slave *** -#STOP SLAVE; -#RESET SLAVE; -#eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), -# d TIMESTAMP, -# e INT DEFAULT '1')ENGINE=$engine_type; +STOP SLAVE; +RESET SLAVE; +eval CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), + d TIMESTAMP, + e INT NOT NULL) ENGINE=$engine_type; -#--echo *** Create t9 on Master *** -#connection master; -#eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) -# ) ENGINE=$engine_type; -#RESET MASTER; +--echo *** Create t9 on Master *** +connection master; +eval CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) + ) ENGINE=$engine_type; +RESET MASTER; -#--echo *** Start Slave *** -#connection slave; -#START SLAVE; +--echo *** Start Slave *** +connection slave; +START SLAVE; -#--echo *** Master Data Insert *** -#connection master; -#set @b1 = 'b1b1b1b1'; -#set @b1 = concat(@b1,@b1); -#INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +--echo *** Master Data Insert *** +connection master; +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); -#--echo ************************************************* -#--echo ** Currently giving wrong error see bug#22234 *** -#--echo ************************************************* -#sync_slave_with_master; -#connection slave; - -#--echo *** Select from T9 *** -#--source include/wait_for_slave_sql_to_stop.inc -#--replace_result $MASTER_MYPORT MASTER_PORT -#--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # -#--query_vertical SHOW SLAVE STATUS -#SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; -#START SLAVE; +--source include/wait_for_slave_sql_to_stop.inc +--replace_result $MASTER_MYPORT MASTER_PORT +--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # +--query_vertical SHOW SLAVE STATUS +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; #--echo *** Drop t9 *** #connection master; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result index e268e4c2e51..f0f41c02a84 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_innodb.result @@ -399,6 +399,62 @@ set @b1 = concat(@b1,@b1); INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); *** Drop t8 *** DROP TABLE t8; +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP, +e INT NOT NULL) ENGINE='InnoDB'; +*** Create t9 on Master *** +CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='InnoDB'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1364 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 1364 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result index 364354d3a17..ad67e3ecf80 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -399,6 +399,62 @@ set @b1 = concat(@b1,@b1); INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); *** Drop t8 *** DROP TABLE t8; +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP, +e INT NOT NULL) ENGINE='MyISAM'; +*** Create t9 on Master *** +CREATE TABLE t9 (a INT PRIMARY KEY, b BLOB, c CHAR(5) +) ENGINE='MyISAM'; +RESET MASTER; +*** Start Slave *** +START SLAVE; +*** Master Data Insert *** +set @b1 = 'b1b1b1b1'; +set @b1 = concat(@b1,@b1); +INSERT INTO t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1364 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 262 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 1364 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 262 +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; 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 685fdbf0a6e..3ab515806e7 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result @@ -399,6 +399,62 @@ set @b1 = concat(@b1,@b1); INSERT INTO t8 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); *** Drop t8 *** DROP TABLE t8; +STOP SLAVE; +RESET SLAVE; +CREATE TABLE t9 (a INT KEY, b BLOB, c CHAR(5), +d TIMESTAMP, +e INT NOT NULL) ENGINE='NDB'; +*** Create t9 on Master *** +CREATE TABLE t9 (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 t9 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA'); +SHOW SLAVE STATUS; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port # +Connect_Retry 1 +Master_Log_File master-bin.000001 +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File master-bin.000001 +Slave_IO_Running Yes +Slave_SQL_Running No +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 1364 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 447 +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 1364 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 447 +SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; +START SLAVE; *** Create t10 on slave *** STOP SLAVE; RESET SLAVE; diff --git a/sql/log_event.cc b/sql/log_event.cc index 0d2f3e7e708..5461d5489eb 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -137,7 +137,7 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error, " %s, Error_code: %d;", err->msg, err->code); } - rli->report(level, thd->net.client_last_errno, + rli->report(level, thd->is_error()? thd->main_da.sql_errno() : 0, "Could not execute %s event on table %s.%s;" "%s handler error %s; " "the event's master log %s, end_log_pos %lu", From b2a68038cecdd9881ef420fcbe984acfaa934b7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Mar 2008 14:07:49 -0500 Subject: [PATCH 387/527] Bug#28269: FEDERATED engine fails to quote reserved words for \ field names Add a test that proves the bug is fixed. This doesn't add any new server code. mysql-test/r/federated.result: Verifying that one can use federated with keyword and bizarre column names. mysql-test/t/federated.test: Verifying that one can use federated with keyword and bizarre column names. Eval interprets one level of backslash escaping, so some of this may look strange. --- mysql-test/r/federated.result | 30 +++++++++++++++++++++++++++--- mysql-test/t/federated.test | 21 +++++++++++++++++++++ 2 files changed, 48 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index 00287338459..f43e1efc643 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -14,6 +14,9 @@ Warnings: Note 1051 Unknown table 't1' CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` int NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) DEFAULT CHARSET=latin1; @@ -22,6 +25,9 @@ Warnings: Note 1051 Unknown table 't1' CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` inT NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -29,6 +35,9 @@ CONNECTION='mysql://root@127.0.0.1:@/too/many/items/federated/t1'; ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1:@/too/many/items/federated/t1' is not in the correct format CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` iNt NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -36,6 +45,9 @@ CONNECTION='mysql://root@127.0.0.1'; ERROR HY000: Can't create federated table. The data source connection string 'mysql://root@127.0.0.1' is not in the correct format CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` iNT NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -45,6 +57,9 @@ ERROR HY000: The foreign data source you are trying to reference does not exist. DROP TABLE federated.t1; CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` Int NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -54,16 +69,25 @@ ERROR HY000: Unable to connect to foreign data source: Access denied for user 'u DROP TABLE federated.t1; CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, +`group` int NOT NULL default 0, +`a\\b` InT NOT NULL default 0, +`a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/federated/t1'; INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); +INSERT INTO federated.t1 (id, `group`) VALUES (3, 42); +INSERT INTO federated.t1 (id, `a\\b`) VALUES (4, 23); +INSERT INTO federated.t1 (id, `a\\`) VALUES (5, 1); SELECT * FROM federated.t1; -id name -1 foo -2 fee +id group a\\b a\\ name +1 0 0 0 foo +2 0 0 0 fee +3 42 0 0 +4 0 23 0 +5 0 0 1 DELETE FROM federated.t1; DROP TABLE federated.t1; DROP TABLE IF EXISTS federated.t2; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index 76cb5fd4793..191bba244c3 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -6,6 +6,9 @@ connection slave; DROP TABLE IF EXISTS federated.t1; CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\b` int NOT NULL default 0, + `a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) DEFAULT CHARSET=latin1; @@ -16,6 +19,9 @@ DROP TABLE IF EXISTS federated.t1; --error 1432 CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\b` inT NOT NULL default 0, + `a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -25,6 +31,9 @@ CREATE TABLE federated.t1 ( --error 1432 CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\b` iNt NOT NULL default 0, + `a\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -34,6 +43,9 @@ CREATE TABLE federated.t1 ( --replace_result $SLAVE_MYPORT SLAVE_PORT eval CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\\\b` iNT NOT NULL default 0, + `a\\\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -46,6 +58,9 @@ DROP TABLE federated.t1; --replace_result $SLAVE_MYPORT SLAVE_PORT eval CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\\\b` Int NOT NULL default 0, + `a\\\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -58,6 +73,9 @@ DROP TABLE federated.t1; --replace_result $SLAVE_MYPORT SLAVE_PORT eval CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, + `group` int NOT NULL default 0, + `a\\\\b` InT NOT NULL default 0, + `a\\\\` int NOT NULL default 0, `name` varchar(32) NOT NULL default '' ) ENGINE="FEDERATED" DEFAULT CHARSET=latin1 @@ -65,6 +83,9 @@ eval CREATE TABLE federated.t1 ( INSERT INTO federated.t1 (id, name) VALUES (1, 'foo'); INSERT INTO federated.t1 (id, name) VALUES (2, 'fee'); +INSERT INTO federated.t1 (id, `group`) VALUES (3, 42); +INSERT INTO federated.t1 (id, `a\\b`) VALUES (4, 23); +INSERT INTO federated.t1 (id, `a\\`) VALUES (5, 1); SELECT * FROM federated.t1; DELETE FROM federated.t1; From 99c0b5e10ff2f64df6b3d90096be0ece31130dcb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 11:15:49 +0200 Subject: [PATCH 388/527] Bug #34909: mysqldump returns a 0 status on error when using --master-data No error code was returned by mysqldump if it detects that binary logging is not enabled on the server. Fixed by returning error code. client/mysqldump.c: Bug #34909: add error code mysql-test/r/mysqldump-no-binlog.result: Bug #34909: test case mysql-test/t/mysqldump-no-binlog-master.opt: Bug #34909: test case mysql-test/t/mysqldump-no-binlog.test: Bug #34909: test case --- client/mysqldump.c | 1 + mysql-test/r/mysqldump-no-binlog.result | 1 + mysql-test/t/mysqldump-no-binlog-master.opt | 1 + mysql-test/t/mysqldump-no-binlog.test | 6 ++++++ 4 files changed, 9 insertions(+) create mode 100644 mysql-test/r/mysqldump-no-binlog.result create mode 100644 mysql-test/t/mysqldump-no-binlog-master.opt create mode 100644 mysql-test/t/mysqldump-no-binlog.test diff --git a/client/mysqldump.c b/client/mysqldump.c index 980013d539a..e8129a6fd73 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3285,6 +3285,7 @@ static int do_show_master_status(MYSQL *mysql_con) my_printf_error(0, "Error: Binlogging on server not active", MYF(0)); mysql_free_result(master); + maybe_exit(EX_MYSQLERR); return 1; } mysql_free_result(master); diff --git a/mysql-test/r/mysqldump-no-binlog.result b/mysql-test/r/mysqldump-no-binlog.result new file mode 100644 index 00000000000..78bc19b7cba --- /dev/null +++ b/mysql-test/r/mysqldump-no-binlog.result @@ -0,0 +1 @@ +mysqldump: Error: Binlogging on server not active diff --git a/mysql-test/t/mysqldump-no-binlog-master.opt b/mysql-test/t/mysqldump-no-binlog-master.opt new file mode 100644 index 00000000000..789275fa25e --- /dev/null +++ b/mysql-test/t/mysqldump-no-binlog-master.opt @@ -0,0 +1 @@ +--skip-log-bin diff --git a/mysql-test/t/mysqldump-no-binlog.test b/mysql-test/t/mysqldump-no-binlog.test new file mode 100644 index 00000000000..434b2931792 --- /dev/null +++ b/mysql-test/t/mysqldump-no-binlog.test @@ -0,0 +1,6 @@ +# Embedded server doesn't support external clients +--source include/not_embedded.inc + +--replace_regex /MASTER_LOG_POS=[0-9]+/XX/ +--error 2 +--exec $MYSQL_DUMP --compact --master-data=2 test 2>&1 From f613588c2bc6b1d1f735eb97eb58231a9c7d2f7f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 14:39:37 +0200 Subject: [PATCH 389/527] Bug #28780 report_host is not available through SELECT @@report_host merging and post-make-test changes. mysql-test/suite/rpl/r/rpl_report.result: results changed mysql-test/suite/rpl/t/rpl_report.test: correcting test because of non-deterministic select's result sql/set_var.cc: compilation issue --- mysql-test/suite/rpl/r/rpl_report.result | 26 +++++++++++++++--------- mysql-test/suite/rpl/t/rpl_report.test | 13 +++++++----- sql/set_var.cc | 4 +++- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_report.result b/mysql-test/suite/rpl/r/rpl_report.result index cc9c989dc80..e129d7c8f22 100644 --- a/mysql-test/suite/rpl/r/rpl_report.result +++ b/mysql-test/suite/rpl/r/rpl_report.result @@ -4,24 +4,30 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; -select * from Information_schema.GLOBAL_VARIABLES where variable_name regexp 'report_\(host\|port\|user\|password\)'; +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_host'; VARIABLE_NAME VARIABLE_VALUE REPORT_HOST 127.0.0.1 +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_port'; +VARIABLE_NAME VARIABLE_VALUE REPORT_PORT 9308 -REPORT_PASSWORD my_password +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_user'; +VARIABLE_NAME VARIABLE_VALUE REPORT_USER my_user +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_password'; +VARIABLE_NAME VARIABLE_VALUE +REPORT_PASSWORD my_password show global variables like 'report_host'; -Variable_name Value -report_host 127.0.0.1 +Variable_name report_host +Value 127.0.0.1 show global variables like 'report_port'; -Variable_name Value -report_port 9308 +Variable_name report_port +Value 9308 show global variables like 'report_user'; -Variable_name Value -report_user my_user +Variable_name report_user +Value my_user show global variables like 'report_password'; -Variable_name Value -report_password my_password +Variable_name report_password +Value my_password set @@global.report_host='my.new.address.net'; ERROR HY000: Variable 'report_host' is a read only variable end of tests diff --git a/mysql-test/suite/rpl/t/rpl_report.test b/mysql-test/suite/rpl/t/rpl_report.test index ae7eea26d89..8798905d372 100644 --- a/mysql-test/suite/rpl/t/rpl_report.test +++ b/mysql-test/suite/rpl/t/rpl_report.test @@ -4,11 +4,14 @@ source include/master-slave.inc; connection slave; -select * from Information_schema.GLOBAL_VARIABLES where variable_name regexp 'report_\(host\|port\|user\|password\)'; -show global variables like 'report_host'; -show global variables like 'report_port'; -show global variables like 'report_user'; -show global variables like 'report_password'; +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_host'; +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_port'; +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_user'; +select * from Information_schema.GLOBAL_VARIABLES where variable_name like 'report_password'; +query_vertical show global variables like 'report_host'; +query_vertical show global variables like 'report_port'; +query_vertical show global variables like 'report_user'; +query_vertical show global variables like 'report_password'; # to demonstrate that report global variables are read-only error ER_INCORRECT_GLOBAL_LOCAL_VAR; diff --git a/sql/set_var.cc b/sql/set_var.cc index d80ae577a0d..71131df0ce3 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -648,6 +648,8 @@ sys_var_thd_time_zone sys_time_zone(&vars, "time_zone"); /* Global read-only variable containing hostname */ static sys_var_const_str sys_hostname(&vars, "hostname", glob_hostname); + +#ifndef EMBEDDED_LIBRARY static sys_var_const_str_ptr sys_repl_report_host(&vars, "report_host", &report_host); static sys_var_const_str_ptr sys_repl_report_user(&vars, "report_user", &report_user); static sys_var_const_str_ptr sys_repl_report_password(&vars, "report_password", &report_password); @@ -660,7 +662,7 @@ static uchar *slave_get_report_port(THD *thd) static sys_var_readonly sys_repl_report_port(&vars, "report_port", OPT_GLOBAL, SHOW_INT, slave_get_report_port); - +#endif sys_var_thd_bool sys_keep_files_on_create(&vars, "keep_files_on_create", &SV::keep_files_on_create); From 4aae2099c941ccbac80c855bfb6b70ec7a227a2f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 13:56:15 +0100 Subject: [PATCH 390/527] Bug #34367: sql/sql_show.cc: create_schema_table should handle MYSQL_TYPE_NEWDECIMAL Added support for the type MYSQL_TYPE_NEWDECIMAL. It now works like MYSQL_TYPE_DECIMAL. Unfortunately there cannot be a test case until we have a working information_schema plugin as part of the source distribution. sql/sql_show.cc: Bug#34367: The fix. Corrected wrong comments and a DBUG_ENTER with wrong function name. sql/table.h: Bug#34367: Added comments to st_field_info. --- sql/sql_show.cc | 8 +++++--- sql/table.h | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6d817cb0620..8816247fb83 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5384,8 +5384,9 @@ ST_SCHEMA_TABLE *get_schema_table(enum enum_schema_tables schema_table_idx) @param thd thread handler - @param - schema_table pointer to 'shema_tables' element + + @param table_list Used to pass I_S table information(fields info, tables + parameters etc) and table name. @retval \# Pointer to created table @retval NULL Can't create table @@ -5436,6 +5437,7 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(NULL); break; case MYSQL_TYPE_DECIMAL: + case MYSQL_TYPE_NEWDECIMAL: if (!(item= new Item_decimal((longlong) fields_info->value, false))) { DBUG_RETURN(0); @@ -5785,7 +5787,7 @@ int make_schema_select(THD *thd, SELECT_LEX *sel, { ST_SCHEMA_TABLE *schema_table= get_schema_table(schema_table_idx); LEX_STRING db, table; - DBUG_ENTER("mysql_schema_select"); + DBUG_ENTER("make_schema_select"); DBUG_PRINT("enter", ("mysql_schema_select: %s", schema_table->table_name)); /* We have to make non const db_name & table_name diff --git a/sql/table.h b/sql/table.h index 284885658e0..aa2e075ec62 100644 --- a/sql/table.h +++ b/sql/table.h @@ -759,12 +759,36 @@ enum enum_schema_tables typedef struct st_field_info { + /** + This is used as column name. + */ const char* field_name; + /** + For string-type columns, this is the maximum number of + characters. Otherwise, it is the 'display-length' for the column. + */ uint field_length; + /** + This denotes data type for the column. For the most part, there seems to + be one entry in the enum for each SQL data type, although there seem to + be a number of additional entries in the enum. + */ enum enum_field_types field_type; int value; + /** + This is used to set column attributes. By default, columns are @c NOT + @c NULL and @c SIGNED, and you can deviate from the default + by setting the appopriate flags. You can use either one of the flags + @c MY_I_S_MAYBE_NULL and @cMY_I_S_UNSIGNED or + combine them using the bitwise or operator @c |. Both flags are + defined in table.h. + */ uint field_flags; // Field atributes(maybe_null, signed, unsigned etc.) const char* old_name; + /** + This should be one of @c SKIP_OPEN_TABLE, + @c OPEN_FRM_ONLY or @c OPEN_FULL_TABLE. + */ uint open_method; } ST_FIELD_INFO; From 875ad6d8b8f89eed171325a1e8b31816f7edef12 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 13:59:36 +0100 Subject: [PATCH 391/527] BUG#31168: @@hostname does not replicate Problem: in mixed and statement mode, a query that refers to a system variable will use the slave's value when replayed on slave. So if the value of a system variable is inserted into a table, the slave will differ from the master. Fix: mark statements that refer to a system variable as "unsafe", meaning they will be replicated by row in mixed mode and produce a warning in statement mode. There are some exceptions: some variables are actually replicated. Those should *not* be marked as unsafe. BUG#34732: mysqlbinlog does not print default values for auto_increment variables Problem: mysqlbinlog does not print default values for some variables, including auto_increment_increment and others. So if a client executing the output of mysqlbinlog has different default values, replication will be wrong. Fix: Always print default values for all variables that are replicated. I need to fix the two bugs at the same time, because the test cases would fail if I only fixed one of them. include/m_ctype.h: Added definition of ILLEGAL_CHARSET_INFO_NUMBER. We just need a symbol for a number that will never be used by any charset. ~0U should be safe since charset numbers are sequential, starting from 0. mysql-test/include/commit.inc: Upated test to avoid making statements unsafe. mysql-test/r/commit_1innodb.result: Updated test needs updated result file. mysql-test/r/mysqlbinlog.result: Updated result file. mysql-test/r/mysqlbinlog2.result: Updated result file. mysql-test/r/user_var-binlog.result: Updated result file. mysql-test/suite/binlog/r/binlog_base64_flag.result: Updated result file. mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result: Updated result file. mysql-test/suite/binlog/r/binlog_unsafe.result: Modified test file needs modified result file. mysql-test/suite/binlog/t/binlog_base64_flag.test: Need to filter out pseudo_thread_id from result since it is nondeterministic. mysql-test/suite/binlog/t/binlog_unsafe.test: Add tests that using variables is unsafe. The 'CREATE VIEW' tests didn't make sense, so I removed them. SHOW WARNINGS is not necessary either, because we get warnings for each statement in the result file. mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result: Updated result file. mysql-test/suite/rpl/r/rpl_skip_error.result: Updated result file. mysql-test/suite/rpl/t/rpl_skip_error.test: The test used @@server_id, which is not safe to replicate, so it would have given a warning. The way it used @@server_id was hackish (issue a query on master that removes rows only on master), so I replaced it by a more robust way to do the same thing (connect to slave and insert the rows only there). Also clarified what the test case does. mysql-test/t/mysqlbinlog2.test: Use --short-form instead of manually filtering out nondeterministic stuff from mysqlbinlog (because we added the nondeterministic @@pseudo_thread_id to the output). sql/item_func.cc: Added method of Item_func_get_system_var that indicates whether the given system variable will be written to the binlog or not. sql/item_func.h: Added method of Item_func_get_system_var that indicates whether the given system variable will be written to the binlog or not. sql/log_event.cc: - auto_increment_offset was not written to the binlog if auto_increment_increment=1 - mysqlbinlog did not output default values for some variables (BUG#34732). In st_print_event_info, we remember for each variable whether it has been printed or not. This is achieved in different ways for different variables: - For auto_increment_*, lc_time_names, charset_database_number, we set the default values in st_print_event_info to something illegal, so that it will look like they have changed the first time they are seen. - For charset, sql_mode, pseudo_thread_id, we add a flag to st_print_event_info which indicates whether the variable has been printed. - Since pseudo_thread_id is now printed more often, and its value is not guaranteed to be constant across different runs of the same test script, I replaced it by a constant if --short-form is used. - Moved st_print_event_info constructor from log_event.h to log_event.cc, since it now depends on ILLEGAL_CHARSET_NUMBER, which is defined in m_ctype.h, which is better to include from a .cc file than from a header file. sql/log_event.h: Added fields to st_print_event_info that indicate whether some of the variables have been written or not. Since the initialization of charset_database_number now depends on ILLEGAL_CHARSET_INFO_NUMBER, which is defined in a header file, which we'd better not include from this header file -- I moved the constructor from here to log_event.cc. sql/set_var.cc: System variables now have a flag binlog_status, which indicates if they are written to the binlog. If nothing is specified, all variables are marked as not written to the binlog (NOT_IN_BINLOG) when created. In this file, the variables that are written to the binlog are marked with SESSION_VARIABLE_IN_BINLOG. sql/set_var.h: Added flag binlog_status to class sys_var. Added a getter and a constructor parameter that sets it. Since I had to change sys_var_thd_enum constructor anyways, I simplified it to use default values of arguments instead of three copies of the constructor. sql/sql_yacc.yy: Mark statements that refer to a system variable as "unsafe", meaning they will be replicated by row in mixed mode. Added comment to explain strange piece of code just above. mysql-test/include/diff_tables.inc: New auxiliary test file that tests whether two tables (possibly one on master and one on slave) differ. mysql-test/suite/rpl/r/rpl_variables.result: New test case needs new result file. mysql-test/suite/rpl/r/rpl_variables_stm.result: New test file needs new result file. mysql-test/suite/rpl/t/rpl_variables.test: Test that INSERT of @@variables is replicated correctly (by switching to row-based mode). mysql-test/suite/rpl/t/rpl_variables_stm.test: Test that replication of @@variables which are replicated explicitly works as expected in statement mode (without giving warnings). --- include/m_ctype.h | 1 + mysql-test/include/commit.inc | 10 +- mysql-test/include/diff_tables.inc | 122 +++ mysql-test/r/commit_1innodb.result | 3 +- mysql-test/r/mysqlbinlog.result | 40 + mysql-test/r/mysqlbinlog2.result | 166 +++- mysql-test/r/user_var-binlog.result | 4 + .../suite/binlog/r/binlog_base64_flag.result | 9 +- .../binlog/r/binlog_stm_ctype_ucs.result | 4 + .../suite/binlog/r/binlog_unsafe.result | 190 ++++- .../suite/binlog/t/binlog_base64_flag.test | 2 +- mysql-test/suite/binlog/t/binlog_unsafe.test | 237 +++++- .../suite/rpl/r/rpl_row_mysqlbinlog.result | 16 + mysql-test/suite/rpl/r/rpl_skip_error.result | 27 +- mysql-test/suite/rpl/r/rpl_variables.result | 584 ++++++++++++++ .../suite/rpl/r/rpl_variables_stm.result | 526 +++++++++++++ mysql-test/suite/rpl/t/rpl_skip_error.test | 75 +- mysql-test/suite/rpl/t/rpl_variables.test | 739 ++++++++++++++++++ mysql-test/suite/rpl/t/rpl_variables_stm.test | 636 +++++++++++++++ mysql-test/t/mysqlbinlog2.test | 3 +- sql/item_func.cc | 6 + sql/item_func.h | 9 + sql/log_event.cc | 116 ++- sql/log_event.h | 29 +- sql/set_var.cc | 132 +++- sql/set_var.h | 152 ++-- sql/sql_yacc.yy | 3 + 27 files changed, 3576 insertions(+), 265 deletions(-) create mode 100644 mysql-test/include/diff_tables.inc create mode 100644 mysql-test/suite/rpl/r/rpl_variables.result create mode 100644 mysql-test/suite/rpl/r/rpl_variables_stm.result create mode 100644 mysql-test/suite/rpl/t/rpl_variables.test create mode 100644 mysql-test/suite/rpl/t/rpl_variables_stm.test diff --git a/include/m_ctype.h b/include/m_ctype.h index 9025507ce15..b85894e94f5 100644 --- a/include/m_ctype.h +++ b/include/m_ctype.h @@ -282,6 +282,7 @@ typedef struct charset_info_st MY_COLLATION_HANDLER *coll; } CHARSET_INFO; +#define ILLEGAL_CHARSET_INFO_NUMBER (~0U) extern CHARSET_INFO my_charset_bin; diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 9bd11bf33c1..38c123295fb 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -341,6 +341,14 @@ drop function if exists f1; drop procedure if exists p_verify_status_increment; --enable_warnings +# Save binlog_format in a user variable. References to system +# variables are "unsafe", meaning they are written as rows instead of +# as statements to the binlog, if the loggging mode is 'mixed'. But +# we don't want p_verify_status_increment to affect the logging mode. +# Hence, we save binlog_format in a user variable (which is not +# unsafe) and use that inside p_verify_status_increment. +set @binlog_format=@@global.binlog_format; + set sql_mode=no_engine_substitution; create table t1 (a int unique); create table t2 (a int) engine=myisam; @@ -367,7 +375,7 @@ begin where variable_name='Handler_commit' or variable_name='Handler_prepare' order by variable_name; - if @@global.binlog_format = 'ROW' then + if @binlog_format = 'ROW' then set commit_inc= commit_inc_row; set prepare_inc= prepare_inc_row; else diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc new file mode 100644 index 00000000000..d15dd56b35d --- /dev/null +++ b/mysql-test/include/diff_tables.inc @@ -0,0 +1,122 @@ +# ==== Purpose ==== +# +# Check if the two given tables (possibly residing on different +# master/slave servers) are equal. +# +# ==== 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: +# +# [master:|slave:]database.table +# +# 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". +# +# - 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 ==== +# +# - It is currently not possible to use this for tables that are +# supposed to be different, because if the files are different: +# - 'diff' produces system-dependent output, +# - the output includes the absolute path of the compared files, +# - the output includes a timestamp. +# To fix that, we'd probably have to use SQL to compute the +# symmetric difference between the tables. I'm not sure how to do +# that efficiently. If we implement this, it would be nice to +# compare the table definitions too. +# +# - It actually compares the result of "SELECT * FROM table ORDER BY +# col1, col2, ..., colN INTO OUTFILE 'file'". Hence, it is assumed +# that the comparison orders for both tables are equal and that two +# rows that are equal in the comparison order cannot differ, e.g., +# by character case. + + +# ==== Save both tables to file ==== + +--echo Comparing tables $diff_table_1 and $diff_table_2 +disable_query_log; + +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/diff_table_1 +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/diff_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 $_diff_conn_master=`SELECT SUBSTR('$_diff_table', 1, 7) = 'master:'`; + if ($_diff_conn_master) { + let $_diff_table=`SELECT SUBSTR('$_diff_table', 8)`; + connection master; + } + let $_diff_conn_slave=`SELECT SUBSTR('$_diff_table', 1, 6) = 'slave:'`; + if ($_diff_conn_slave) { + let $_diff_table=`SELECT SUBSTR('$_diff_table', 7)`; + connection slave; + } + + # 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; + } + + # 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; + } + + # 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'; + + # Do the same for $diff_table_1. + dec $_diff_i; + let $_diff_table=$diff_table_1; +} + + +# ==== 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; diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index 8598e231861..76eee3874d6 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -331,6 +331,7 @@ drop table if exists t1; drop table if exists t2; drop function if exists f1; drop procedure if exists p_verify_status_increment; +set @binlog_format=@@global.binlog_format; set sql_mode=no_engine_substitution; create table t1 (a int unique); create table t2 (a int) engine=myisam; @@ -355,7 +356,7 @@ select variable_value from information_schema.session_status where variable_name='Handler_commit' or variable_name='Handler_prepare' order by variable_name; -if @@global.binlog_format = 'ROW' then +if @binlog_format = 'ROW' then set commit_inc= commit_inc_row; set prepare_inc= prepare_inc_row; else diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 4ffcb7cdeeb..7c5fdf5f3d0 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -19,10 +19,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; drop table if exists t1,t2,t3,t4,t5,t03,t04 /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -61,10 +65,14 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values ("Alas") /*!*/; DELIMITER ; @@ -89,10 +97,14 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values ("Alas") /*!*/; DELIMITER ; @@ -107,10 +119,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; drop table if exists t1,t2,t3,t4,t5,t03,t04 /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -149,10 +165,14 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values ("Alas") /*!*/; DELIMITER ; @@ -177,10 +197,14 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values ("Alas") /*!*/; DELIMITER ; @@ -195,6 +219,10 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1108844556/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1108844555/*!*/; @@ -209,6 +237,10 @@ ROLLBACK /* added by mysqlbinlog */; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1108844556/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=1108844555/*!*/; @@ -265,10 +297,14 @@ ERROR 42000: PROCEDURE test.p1 does not exist DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; CREATE DEFINER=`root`@`localhost` procedure p1() begin select 1; @@ -311,10 +347,14 @@ flush logs; DELIMITER /*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a varchar(64) character set utf8) /*!*/; SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result index 0c9ba34fc61..89fc4b87d29 100644 --- a/mysql-test/r/mysqlbinlog2.result +++ b/mysql-test/r/mysqlbinlog2.result @@ -18,61 +18,39 @@ insert into t1 values(null, "f"); /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Start: binlog v #, server v ## created {yymmdd} {HH:MM:SS} at startup ROLLBACK/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar SET INSERT_ID=1/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "a") /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar SET INSERT_ID=2/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 SET TIMESTAMP=1579609942/*!*/; insert into t1 values(null, "b") /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar SET INSERT_ID=3/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 SET TIMESTAMP=1579609944/*!*/; insert into t1 values(null, "c") /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar SET INSERT_ID=4/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 SET TIMESTAMP=1579609946/*!*/; insert into t1 values(null, "d") /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar SET INSERT_ID=5/*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0 SET TIMESTAMP=1579609946/*!*/; insert into t1 values(null, "e") /*!*/; -# at {pos} -#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Rotate to master-bin.000002 pos: {pos} DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; @@ -86,10 +64,14 @@ ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "a") /*!*/; SET INSERT_ID=2/*!*/; @@ -121,10 +103,14 @@ ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; SET INSERT_ID=5/*!*/; @@ -143,10 +129,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -174,10 +164,14 @@ ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; DELIMITER ; @@ -193,10 +187,14 @@ ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; use test/*!*/; SET TIMESTAMP=1579609944/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "c") /*!*/; SET INSERT_ID=4/*!*/; @@ -219,10 +217,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -246,10 +248,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -277,10 +283,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -296,10 +306,14 @@ ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "a") /*!*/; SET INSERT_ID=2/*!*/; @@ -323,10 +337,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -342,10 +360,14 @@ ROLLBACK/*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; SET INSERT_ID=5/*!*/; @@ -357,10 +379,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -375,10 +401,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -417,10 +447,14 @@ ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; use test/*!*/; SET TIMESTAMP=1579609944/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "c") /*!*/; SET INSERT_ID=4/*!*/; @@ -436,10 +470,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -454,10 +492,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -480,10 +522,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -519,10 +565,14 @@ ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "a") /*!*/; SET INSERT_ID=2/*!*/; @@ -553,10 +603,14 @@ DELIMITER /*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; SET INSERT_ID=5/*!*/; @@ -575,10 +629,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -605,10 +663,14 @@ DELIMITER /*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; DELIMITER ; @@ -624,10 +686,14 @@ ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; use test/*!*/; SET TIMESTAMP=1579609944/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "c") /*!*/; SET INSERT_ID=4/*!*/; @@ -650,10 +716,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -676,10 +746,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -707,10 +781,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -726,10 +804,14 @@ ROLLBACK/*!*/; SET INSERT_ID=1/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "a") /*!*/; SET INSERT_ID=2/*!*/; @@ -753,10 +835,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -771,10 +857,14 @@ DELIMITER /*!*/; SET INSERT_ID=4/*!*/; use test/*!*/; SET TIMESTAMP=1579609946/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "d") /*!*/; SET INSERT_ID=5/*!*/; @@ -786,10 +876,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -804,10 +898,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -846,10 +944,14 @@ ROLLBACK/*!*/; SET INSERT_ID=3/*!*/; use test/*!*/; SET TIMESTAMP=1579609944/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "c") /*!*/; SET INSERT_ID=4/*!*/; @@ -865,10 +967,14 @@ DELIMITER /*!*/; SET INSERT_ID=6/*!*/; use test/*!*/; SET TIMESTAMP=1579609943/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t1 values(null, "f") /*!*/; DELIMITER ; @@ -883,10 +989,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; @@ -909,10 +1019,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1579609942/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; SET INSERT_ID=1/*!*/; diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result index 44fcfc0c478..3a7d59798ae 100644 --- a/mysql-test/r/user_var-binlog.result +++ b/mysql-test/r/user_var-binlog.result @@ -21,10 +21,14 @@ ROLLBACK/*!*/; SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/; use test/*!*/; SET TIMESTAMP=10000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; INSERT INTO t1 VALUES(@`a b`) /*!*/; SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result index 8e5d7def823..557f584fcc1 100644 --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result @@ -32,14 +32,17 @@ a /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 -#ROLLBACK/*!*/; +<#>ROLLBACK/*!*/; # at 102 -#use test/*!*/; +<#>use test/*!*/; SET TIMESTAMP=1196959712/*!*/; -SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int) engine= myisam /*!*/; # at 203 diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index 3030af7bd68..1b14686a97d 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -15,10 +15,14 @@ ROLLBACK/*!*/; SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/; use test/*!*/; SET TIMESTAMP=10000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; insert into t2 values (@v) /*!*/; DELIMITER ; diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 8467a18aa6b..1c155cd0876 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -1,14 +1,182 @@ -SET BINLOG_FORMAT=STATEMENT; -CREATE TABLE t1 (a CHAR(40)); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE t3 (b INT AUTO_INCREMENT PRIMARY KEY); -CREATE VIEW v1(a,b) AS SELECT a,b FROM t2,t3; -INSERT INTO t1 SELECT UUID(); +==== Setup tables ==== +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); +CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table2 (a INT); +==== Non-deterministic statements ==== +INSERT DELAYED INTO t1 VALUES (5); +==== Some variables that *should* be unsafe ==== +---- Insert directly ---- +INSERT INTO t1 VALUES (@@global.sync_binlog); Warnings: Warning 1592 Statement is not safe to log in statement format. -SHOW WARNINGS; -Level Warning -Code 1592 -Message Statement is not safe to log in statement format. -DROP TABLE t1,t2,t3; +INSERT INTO t1 VALUES (@@session.insert_id); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +INSERT INTO t1 VALUES (@@global.auto_increment_increment); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +INSERT INTO t2 SELECT UUID(); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +INSERT INTO t2 VALUES (@@global.init_slave); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +INSERT INTO t2 VALUES (@@hostname); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +---- Insert from stored procedure ---- +CREATE PROCEDURE proc() +BEGIN +INSERT INTO t1 VALUES (@@global.sync_binlog); +INSERT INTO t1 VALUES (@@session.insert_id); +INSERT INTO t1 VALUES (@@global.auto_increment_increment); +INSERT INTO t2 SELECT UUID(); +INSERT INTO t2 VALUES (@@global.init_slave); +INSERT INTO t2 VALUES (@@hostname); +END| +CALL proc(); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +---- Insert from stored function ---- +CREATE FUNCTION func() +RETURNS INT +BEGIN +INSERT INTO t1 VALUES (@@global.sync_binlog); +INSERT INTO t1 VALUES (@@session.insert_id); +INSERT INTO t1 VALUES (@@global.auto_increment_increment); +INSERT INTO t2 SELECT UUID(); +INSERT INTO t2 VALUES (@@global.init_slave); +INSERT INTO t2 VALUES (@@hostname); +RETURN 0; +END| +SELECT func(); +func() +0 +Warnings: +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +---- Insert from trigger ---- +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN +INSERT INTO t1 VALUES (@@global.sync_binlog); +INSERT INTO t1 VALUES (@@session.insert_id); +INSERT INTO t1 VALUES (@@global.auto_increment_increment); +INSERT INTO t2 SELECT UUID(); +INSERT INTO t2 VALUES (@@global.init_slave); +INSERT INTO t2 VALUES (@@hostname); +END| +INSERT INTO trigger_table VALUES ('bye.'); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +---- Insert from prepared statement ---- +PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)'; +PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)'; +PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)'; +PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()'; +PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)'; +PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@hostname)'; +EXECUTE p1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +EXECUTE p2; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +EXECUTE p3; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +EXECUTE p4; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +EXECUTE p5; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +EXECUTE p6; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +---- Insert from nested call of triggers / functions / procedures ---- +CREATE PROCEDURE proc1() +INSERT INTO trigger_table VALUES ('ha!')| +CREATE FUNCTION func2() +RETURNS INT +BEGIN +CALL proc1(); +RETURN 0; +END| +CREATE TRIGGER trig3 +BEFORE INSERT ON trigger_table2 +FOR EACH ROW +BEGIN +DECLARE tmp INT; +SELECT func2() INTO tmp; +END| +CREATE PROCEDURE proc4() +INSERT INTO trigger_table2 VALUES (1)| +CREATE FUNCTION func5() +RETURNS INT +BEGIN +CALL proc4; +RETURN 0; +END| +PREPARE prep6 FROM 'SELECT func5()'| +EXECUTE prep6; +func5() +0 +Warnings: +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +==== Variables that should *not* be unsafe ==== +INSERT INTO t1 VALUES (@@session.pseudo_thread_id); +INSERT INTO t1 VALUES (@@session.pseudo_thread_id); +INSERT INTO t1 VALUES (@@session.foreign_key_checks); +INSERT INTO t1 VALUES (@@session.sql_auto_is_null); +INSERT INTO t1 VALUES (@@session.unique_checks); +INSERT INTO t2 VALUES (@@session.sql_mode); +INSERT INTO t1 VALUES (@@session.auto_increment_increment); +INSERT INTO t1 VALUES (@@session.auto_increment_offset); +INSERT INTO t2 VALUES (@@session.character_set_client); +INSERT INTO t2 VALUES (@@session.collation_connection); +INSERT INTO t2 VALUES (@@session.collation_server); +INSERT INTO t2 VALUES (@@session.time_zone); +INSERT INTO t2 VALUES (@@session.lc_time_names); +INSERT INTO t2 VALUES (@@session.collation_database); +INSERT INTO t2 VALUES (@@session.timestamp); +INSERT INTO t2 VALUES (@@session.last_insert_id); +SET @my_var= 4711; +INSERT INTO t1 VALUES (@my_var); +SET insert_id=12; +INSERT INTO t3 VALUES (NULL); +==== Clean up ==== +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP PROCEDURE proc1; +DROP FUNCTION func2; +DROP TRIGGER trig3; +DROP PROCEDURE proc4; +DROP FUNCTION func5; +DROP PREPARE prep6; +DROP TABLE t1, t2, t3, trigger_table, trigger_table2; DROP VIEW v1; diff --git a/mysql-test/suite/binlog/t/binlog_base64_flag.test b/mysql-test/suite/binlog/t/binlog_base64_flag.test index 01f98b8a134..a25c6b68420 100644 --- a/mysql-test/suite/binlog/t/binlog_base64_flag.test +++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test @@ -70,7 +70,7 @@ select * from t1; --echo ==== Test --base64-output=never on a binlog with row events ==== # mysqlbinlog should fail ---replace_regex /#[0-9][0-9][0-9][0-9][0-9][0-9] .*/#/ +--replace_regex /#[0-9][0-9][0-9][0-9][0-9][0-9] .*/<#>/ /SET \@\@session.pseudo_thread_id.*/<#>/ error 1; exec $MYSQL_BINLOG --base64-output=never suite/binlog/std_data/bug32407.001; # the above line should output the query log event and then stop diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index fa2a5eac128..5aa20a6947d 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -1,18 +1,233 @@ -# Test to check that a warning is generated for unsafe statements -# executed under statement mode logging. +# ==== Purpose ==== +# +# Some statements can not be written to the binlog in a safe manner +# with statement-based replication, either because they rely on +# features that are local to the server they are replicated from +# (e.g., @@variables), or because they include nondeterministic +# queries (e.g., LIMIT), or because the time at which the query is +# executed cannot be determined (e.g., INSERT DELAYED). Such +# statements should be marked unsafe. All unsafe statements should +# give a warning. +# +# This test verifies that a warning is generated for statements that +# should be unsafe, when they are executed under statement mode +# logging. +# +# All variables should be unsafe, with some exceptions. Therefore, +# this test also verifies that the exceptions do *not* generare a +# warning. +# +# +# ==== Method ==== +# +# We try an INSERT DELAYED statement and verify that a warning is +# issued. +# +# We try to insert unsafe variables into a table in several ways: +# directly with an INSERT statement, from a stored procedure, from a +# stored function, from a trigger, from a prepared statement, and from +# a complicated nesting of triggers, functions, procedures, and +# prepared statements. In all cases, a warning should be issued. +# +# We try to insert the variables that should not be unsafe into a +# table, and verify that *no* warning is issued. +# +# +# ==== Related bugs and worklogs ==== +# +# WL#3339: Issue warnings when statement-based replication may fail +# BUG#31168: @@hostname does not replicate +# BUG#34732: mysqlbinlog does not print default values for auto_increment variables +# BUG#34768: nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed +# +# +# ==== Related test cases ==== +# +# rpl.rpl_variables verifies that variables which cannot be replicated +# safely in statement mode are replicated correctly in mixed or row +# mode. +# +# rpl.rpl_variables_stm tests the small subset of variables that +# actually can be replicated safely in statement mode. +# +# +# ==== Todo ==== +# +# There are several other ways to create unsafe statements: see, e.g., +# WL#3339, BUG#34768. source include/have_log_bin.inc; +source include/have_binlog_format_statement.inc; -SET BINLOG_FORMAT=STATEMENT; +--echo ==== Setup tables ==== -CREATE TABLE t1 (a CHAR(40)); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE t3 (b INT AUTO_INCREMENT PRIMARY KEY); -CREATE VIEW v1(a,b) AS SELECT a,b FROM t2,t3; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (a CHAR(40)); +CREATE TABLE t3 (a INT AUTO_INCREMENT PRIMARY KEY); +CREATE TABLE trigger_table (a CHAR(7)); +CREATE TABLE trigger_table2 (a INT); -INSERT INTO t1 SELECT UUID(); -query_vertical SHOW WARNINGS; -DROP TABLE t1,t2,t3; -DROP VIEW v1; +--echo ==== Non-deterministic statements ==== +INSERT DELAYED INTO t1 VALUES (5); + + +--echo ==== Some variables that *should* be unsafe ==== + +--echo ---- Insert directly ---- + +INSERT INTO t1 VALUES (@@global.sync_binlog); +INSERT INTO t1 VALUES (@@session.insert_id); +INSERT INTO t1 VALUES (@@global.auto_increment_increment); +INSERT INTO t2 SELECT UUID(); +INSERT INTO t2 VALUES (@@global.init_slave); +INSERT INTO t2 VALUES (@@hostname); + +--echo ---- Insert from stored procedure ---- + +DELIMITER |; +CREATE PROCEDURE proc() +BEGIN + INSERT INTO t1 VALUES (@@global.sync_binlog); + INSERT INTO t1 VALUES (@@session.insert_id); + INSERT INTO t1 VALUES (@@global.auto_increment_increment); + INSERT INTO t2 SELECT UUID(); + INSERT INTO t2 VALUES (@@global.init_slave); + INSERT INTO t2 VALUES (@@hostname); +END| +DELIMITER ;| + +CALL proc(); + +--echo ---- Insert from stored function ---- + +DELIMITER |; +CREATE FUNCTION func() +RETURNS INT +BEGIN + INSERT INTO t1 VALUES (@@global.sync_binlog); + INSERT INTO t1 VALUES (@@session.insert_id); + INSERT INTO t1 VALUES (@@global.auto_increment_increment); + INSERT INTO t2 SELECT UUID(); + INSERT INTO t2 VALUES (@@global.init_slave); + INSERT INTO t2 VALUES (@@hostname); + RETURN 0; +END| +DELIMITER ;| + +SELECT func(); + +--echo ---- Insert from trigger ---- + +DELIMITER |; +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN + INSERT INTO t1 VALUES (@@global.sync_binlog); + INSERT INTO t1 VALUES (@@session.insert_id); + INSERT INTO t1 VALUES (@@global.auto_increment_increment); + INSERT INTO t2 SELECT UUID(); + INSERT INTO t2 VALUES (@@global.init_slave); + INSERT INTO t2 VALUES (@@hostname); +END| +DELIMITER ;| + +INSERT INTO trigger_table VALUES ('bye.'); + +--echo ---- Insert from prepared statement ---- + +PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)'; +PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)'; +PREPARE p3 FROM 'INSERT INTO t1 VALUES (@@global.auto_increment_increment)'; +PREPARE p4 FROM 'INSERT INTO t2 SELECT UUID()'; +PREPARE p5 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)'; +PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@hostname)'; + +EXECUTE p1; EXECUTE p2; EXECUTE p3; EXECUTE p4; EXECUTE p5; EXECUTE p6; + +--echo ---- Insert from nested call of triggers / functions / procedures ---- + +DELIMITER |; + +# proc1: cause trigger 'trig' above to be triggered. +CREATE PROCEDURE proc1() + INSERT INTO trigger_table VALUES ('ha!')| + +# func2: call proc1 above. +CREATE FUNCTION func2() +RETURNS INT +BEGIN + CALL proc1(); + RETURN 0; +END| + +# trig3: call func2 above +CREATE TRIGGER trig3 +BEFORE INSERT ON trigger_table2 +FOR EACH ROW +BEGIN + DECLARE tmp INT; + SELECT func2() INTO tmp; +END| + +# proc4: cause trig3 above to be triggered. +CREATE PROCEDURE proc4() + INSERT INTO trigger_table2 VALUES (1)| + +# func5: call proc4 above. +CREATE FUNCTION func5() +RETURNS INT +BEGIN + CALL proc4; + RETURN 0; +END| + +# prep6: call func5() above. +PREPARE prep6 FROM 'SELECT func5()'| + +DELIMITER ;| + +# try a complicated call path to trigger 'trig'. +EXECUTE prep6; + + +--echo ==== Variables that should *not* be unsafe ==== + +INSERT INTO t1 VALUES (@@session.pseudo_thread_id); +INSERT INTO t1 VALUES (@@session.pseudo_thread_id); +INSERT INTO t1 VALUES (@@session.foreign_key_checks); +INSERT INTO t1 VALUES (@@session.sql_auto_is_null); +INSERT INTO t1 VALUES (@@session.unique_checks); +INSERT INTO t2 VALUES (@@session.sql_mode); +INSERT INTO t1 VALUES (@@session.auto_increment_increment); +INSERT INTO t1 VALUES (@@session.auto_increment_offset); +INSERT INTO t2 VALUES (@@session.character_set_client); +INSERT INTO t2 VALUES (@@session.collation_connection); +INSERT INTO t2 VALUES (@@session.collation_server); +INSERT INTO t2 VALUES (@@session.time_zone); +INSERT INTO t2 VALUES (@@session.lc_time_names); +INSERT INTO t2 VALUES (@@session.collation_database); +INSERT INTO t2 VALUES (@@session.timestamp); +INSERT INTO t2 VALUES (@@session.last_insert_id); +SET @my_var= 4711; +INSERT INTO t1 VALUES (@my_var); + +# using insert_id implicitly should be ok. +SET insert_id=12; +INSERT INTO t3 VALUES (NULL); + + +--echo ==== Clean up ==== + +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP PROCEDURE proc1; +DROP FUNCTION func2; +DROP TRIGGER trig3; +DROP PROCEDURE proc4; +DROP FUNCTION func5; +DROP PREPARE prep6; +DROP TABLE t1, t2, t3, trigger_table, trigger_table2; diff --git a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result index 1d5b118d822..2d9d801047b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result +++ b/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result @@ -158,10 +158,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT) /*!*/; DELIMITER ; @@ -176,10 +180,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; DROP TABLE IF EXISTS t1,t2,t3 /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -281,10 +289,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; DROP TABLE IF EXISTS t1,t2,t3 /*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -308,10 +320,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=1000000000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT) /*!*/; DELIMITER ; diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index aacc89f7a47..0421df81b42 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -4,31 +4,33 @@ reset master; reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; +==== Test Without sql_mode=strict_trans_tables ==== +[on master] create table t1 (n int not null primary key); +[on slave] insert into t1 values (1); +[on master] insert into t1 values (1); insert into t1 values (2),(3); +[on slave] select * from t1 ORDER BY n; n 1 2 3 -drop table t1; -create table t1(a int primary key); -insert into t1 values (1),(2); -delete from t1 where @@server_id=1; +==== Test With sql_mode=strict_trans_tables ==== +insert into t1 values (7), (8); +[on master] set sql_mode=strict_trans_tables; -select @@server_id; -@@server_id -1 -insert into t1 values (1),(2),(3); -select @@server_id; -@@server_id -2 +insert into t1 values (7), (8), (9); +[on slave] select * from t1; -a +n 1 2 +3 +7 +8 SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -68,4 +70,5 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error +==== Clean Up ==== drop table t1; diff --git a/mysql-test/suite/rpl/r/rpl_variables.result b/mysql-test/suite/rpl/r/rpl_variables.result new file mode 100644 index 00000000000..73354666b7a --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_variables.result @@ -0,0 +1,584 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +==== Initialization ==== +[on master] +SET @m_default_week_format= @@global.default_week_format; +SET @m_init_slave= @@global.init_slave; +SET @m_lc_time_names= @@global.lc_time_names; +SET @m_low_priority_updates= @@global.low_priority_updates; +SET @m_relay_log_purge= @@global.relay_log_purge; +SET @m_slave_exec_mode= @@global.slave_exec_mode; +SET @m_sql_mode= @@global.sql_mode; +SET @m_sync_binlog= @@global.sync_binlog; +[on slave] +SET @s_default_week_format= @@global.default_week_format; +SET @s_init_slave= @@global.init_slave; +SET @s_lc_time_names= @@global.lc_time_names; +SET @s_low_priority_updates= @@global.low_priority_updates; +SET @s_relay_log_purge= @@global.relay_log_purge; +SET @s_slave_exec_mode= @@global.slave_exec_mode; +SET @s_sql_mode= @@global.sql_mode; +SET @s_sync_binlog= @@global.sync_binlog; +SET @@global.relay_log_purge = OFF; +SET @@global.sync_binlog = 1000000; +SET @@global.slave_exec_mode = 'STRICT'; +SET @@sql_big_selects = OFF; +SET @@last_insert_id = 10; +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = OFF; +SET @@global.default_week_format = 1; +SET @@local.default_week_format = 2; +SET @@global.lc_time_names = 'zh_HK'; +SET @@local.lc_time_names = 'zh_TW'; +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 **** +STOP SLAVE; +RESET SLAVE; +RESET MASTER; +START SLAVE; +[on slave] +SET @@global.init_slave = 'ant'; +[on master] +CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY, +truth BOOLEAN, +num INT, +text VARCHAR(100)); +CREATE TABLE tproc LIKE tstmt; +CREATE TABLE tfunc LIKE tstmt; +CREATE TABLE ttrig LIKE tstmt; +CREATE TABLE tprep LIKE tstmt; +CREATE TABLE trigger_table (text CHAR(4)); +==== Insert variables directly ==== +---- global variables ---- +SET @@global.relay_log_purge = ON; +INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge); +SET @@global.relay_log_purge = OFF; +INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge); +SET @@global.sync_binlog = 2000000; +INSERT INTO tstmt(num) VALUES (@@global.sync_binlog); +SET @@global.sync_binlog = 3000000; +INSERT INTO tstmt(num) VALUES (@@global.sync_binlog); +SET @@global.init_slave = 'bison'; +INSERT INTO tstmt(text) VALUES (@@global.init_slave); +SET @@global.init_slave = 'cat'; +INSERT INTO tstmt(text) VALUES (@@global.init_slave); +SET @@global.slave_exec_mode = 'IDEMPOTENT'; +INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode); +SET @@global.slave_exec_mode = 'STRICT'; +INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode); +---- session variables ---- +SET @@sql_big_selects = ON; +INSERT INTO tstmt(truth) VALUES (@@sql_big_selects); +SET @@sql_big_selects = OFF; +INSERT INTO tstmt(truth) VALUES (@@sql_big_selects); +SET @@last_insert_id = 20; +INSERT INTO tstmt(num) VALUES (@@last_insert_id); +SET @@last_insert_id = 30; +INSERT INTO tstmt(num) VALUES (@@last_insert_id); +---- global and session variables ---- +SET @@global.low_priority_updates = ON; +SET @@local.low_priority_updates = OFF; +INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates); +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = ON; +INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates); +SET @@global.default_week_format = 3; +SET @@local.default_week_format = 4; +INSERT INTO tstmt(num) VALUES (@@global.default_week_format); +INSERT INTO tstmt(num) VALUES (@@local.default_week_format); +SET @@global.default_week_format = 5; +SET @@local.default_week_format = 6; +INSERT INTO tstmt(num) VALUES (@@global.default_week_format); +INSERT INTO tstmt(num) VALUES (@@local.default_week_format); +SET @@global.lc_time_names = 'sv_SE'; +SET @@local.lc_time_names = 'sv_FI'; +INSERT INTO tstmt(text) VALUES (@@global.lc_time_names); +INSERT INTO tstmt(text) VALUES (@@local.lc_time_names); +SET @@global.lc_time_names = 'ar_TN'; +SET @@local.lc_time_names = 'ar_IQ'; +INSERT INTO tstmt(text) VALUES (@@global.lc_time_names); +INSERT INTO tstmt(text) VALUES (@@local.lc_time_names); +SET @@global.sql_mode = ''; +SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; +INSERT INTO tstmt(text) VALUES (@@global.sql_mode); +INSERT INTO tstmt(text) VALUES (@@local.sql_mode); +SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; +SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; +INSERT INTO tstmt(text) VALUES (@@global.sql_mode); +INSERT INTO tstmt(text) VALUES (@@local.sql_mode); +---- user variables ---- +SET @user_num = 20; +INSERT INTO tstmt(num) VALUES (@user_num); +SET @user_num = 30; +INSERT INTO tstmt(num) VALUES (@user_num); +SET @user_text = 'Bergsbrunna'; +INSERT INTO tstmt(text) VALUES (@user_text); +SET @user_text = 'Centrum'; +INSERT INTO tstmt(text) VALUES (@user_text); +==== Insert variables from a stored procedure ==== +CREATE PROCEDURE proc() +BEGIN +# GLOBAL +# boolean +SET @@global.relay_log_purge = ON; +INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge); +SET @@global.relay_log_purge = OFF; +INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge); +# numeric +SET @@global.sync_binlog = 2000000; +INSERT INTO tproc(num) VALUES (@@global.sync_binlog); +SET @@global.sync_binlog = 3000000; +INSERT INTO tproc(num) VALUES (@@global.sync_binlog); +# string +SET @@global.init_slave = 'bison'; +INSERT INTO tproc(text) VALUES (@@global.init_slave); +SET @@global.init_slave = 'cat'; +INSERT INTO tproc(text) VALUES (@@global.init_slave); +# enumeration +SET @@global.slave_exec_mode = 'IDEMPOTENT'; +INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode); +SET @@global.slave_exec_mode = 'STRICT'; +INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode); +# SESSION +# boolean +SET @@sql_big_selects = ON; +INSERT INTO tproc(truth) VALUES (@@sql_big_selects); +SET @@sql_big_selects = OFF; +INSERT INTO tproc(truth) VALUES (@@sql_big_selects); +# numeric +SET @@last_insert_id = 20; +INSERT INTO tproc(num) VALUES (@@last_insert_id); +SET @@last_insert_id = 30; +INSERT INTO tproc(num) VALUES (@@last_insert_id); +# BOTH +# boolean +SET @@global.low_priority_updates = ON; +SET @@local.low_priority_updates = OFF; +INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates); +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = ON; +INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates); +# numeric +SET @@global.default_week_format = 3; +SET @@local.default_week_format = 4; +INSERT INTO tproc(num) VALUES (@@global.default_week_format); +INSERT INTO tproc(num) VALUES (@@local.default_week_format); +SET @@global.default_week_format = 5; +SET @@local.default_week_format = 6; +INSERT INTO tproc(num) VALUES (@@global.default_week_format); +INSERT INTO tproc(num) VALUES (@@local.default_week_format); +# text +SET @@global.lc_time_names = 'sv_SE'; +SET @@local.lc_time_names = 'sv_FI'; +INSERT INTO tproc(text) VALUES (@@global.lc_time_names); +INSERT INTO tproc(text) VALUES (@@local.lc_time_names); +SET @@global.lc_time_names = 'ar_TN'; +SET @@local.lc_time_names = 'ar_IQ'; +INSERT INTO tproc(text) VALUES (@@global.lc_time_names); +INSERT INTO tproc(text) VALUES (@@local.lc_time_names); +# enum +SET @@global.sql_mode = ''; +SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; +INSERT INTO tproc(text) VALUES (@@global.sql_mode); +INSERT INTO tproc(text) VALUES (@@local.sql_mode); +SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; +SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; +INSERT INTO tproc(text) VALUES (@@global.sql_mode); +INSERT INTO tproc(text) VALUES (@@local.sql_mode); +# USER +# numeric +SET @user_num = 20; +INSERT INTO tproc(num) VALUES (@user_num); +SET @user_num = 30; +INSERT INTO tproc(num) VALUES (@user_num); +# string +SET @user_text = 'Bergsbrunna'; +INSERT INTO tproc(text) VALUES (@user_text); +SET @user_text = 'Centrum'; +INSERT INTO tproc(text) VALUES (@user_text); +END| +CALL proc(); +==== Insert variables from a stored function ==== +CREATE FUNCTION func() +RETURNS INT +BEGIN +# GLOBAL +# boolean +SET @@global.relay_log_purge = ON; +INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge); +SET @@global.relay_log_purge = OFF; +INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge); +# numeric +SET @@global.sync_binlog = 2000000; +INSERT INTO tfunc(num) VALUES (@@global.sync_binlog); +SET @@global.sync_binlog = 3000000; +INSERT INTO tfunc(num) VALUES (@@global.sync_binlog); +# string +SET @@global.init_slave = 'bison'; +INSERT INTO tfunc(text) VALUES (@@global.init_slave); +SET @@global.init_slave = 'cat'; +INSERT INTO tfunc(text) VALUES (@@global.init_slave); +# enumeration +SET @@global.slave_exec_mode = 'IDEMPOTENT'; +INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode); +SET @@global.slave_exec_mode = 'STRICT'; +INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode); +# SESSION +# boolean +SET @@sql_big_selects = ON; +INSERT INTO tfunc(truth) VALUES (@@sql_big_selects); +SET @@sql_big_selects = OFF; +INSERT INTO tfunc(truth) VALUES (@@sql_big_selects); +# numeric +SET @@last_insert_id = 20; +INSERT INTO tfunc(num) VALUES (@@last_insert_id); +SET @@last_insert_id = 30; +INSERT INTO tfunc(num) VALUES (@@last_insert_id); +# BOTH +# boolean +SET @@global.low_priority_updates = ON; +SET @@local.low_priority_updates = OFF; +INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates); +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = ON; +INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates); +# numeric +SET @@global.default_week_format = 3; +SET @@local.default_week_format = 4; +INSERT INTO tfunc(num) VALUES (@@global.default_week_format); +INSERT INTO tfunc(num) VALUES (@@local.default_week_format); +SET @@global.default_week_format = 5; +SET @@local.default_week_format = 6; +INSERT INTO tfunc(num) VALUES (@@global.default_week_format); +INSERT INTO tfunc(num) VALUES (@@local.default_week_format); +# text +SET @@global.lc_time_names = 'sv_SE'; +SET @@local.lc_time_names = 'sv_FI'; +INSERT INTO tfunc(text) VALUES (@@global.lc_time_names); +INSERT INTO tfunc(text) VALUES (@@local.lc_time_names); +SET @@global.lc_time_names = 'ar_TN'; +SET @@local.lc_time_names = 'ar_IQ'; +INSERT INTO tfunc(text) VALUES (@@global.lc_time_names); +INSERT INTO tfunc(text) VALUES (@@local.lc_time_names); +# enum +SET @@global.sql_mode = ''; +SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; +INSERT INTO tfunc(text) VALUES (@@global.sql_mode); +INSERT INTO tfunc(text) VALUES (@@local.sql_mode); +SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; +SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; +INSERT INTO tfunc(text) VALUES (@@global.sql_mode); +INSERT INTO tfunc(text) VALUES (@@local.sql_mode); +# USER +# numeric +SET @user_num = 20; +INSERT INTO tfunc(num) VALUES (@user_num); +SET @user_num = 30; +INSERT INTO tfunc(num) VALUES (@user_num); +# string +SET @user_text = 'Bergsbrunna'; +INSERT INTO tfunc(text) VALUES (@user_text); +SET @user_text = 'Centrum'; +INSERT INTO tfunc(text) VALUES (@user_text); +RETURN 0; +END| +SELECT func(); +func() +0 +==== Insert variables from a trigger ==== +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN +# GLOBAL +# boolean +SET @@global.relay_log_purge = ON; +INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge); +SET @@global.relay_log_purge = OFF; +INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge); +# numeric +SET @@global.sync_binlog = 2000000; +INSERT INTO ttrig(num) VALUES (@@global.sync_binlog); +SET @@global.sync_binlog = 3000000; +INSERT INTO ttrig(num) VALUES (@@global.sync_binlog); +# string +SET @@global.init_slave = 'bison'; +INSERT INTO ttrig(text) VALUES (@@global.init_slave); +SET @@global.init_slave = 'cat'; +INSERT INTO ttrig(text) VALUES (@@global.init_slave); +# enumeration +SET @@global.slave_exec_mode = 'IDEMPOTENT'; +INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode); +SET @@global.slave_exec_mode = 'STRICT'; +INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode); +# SESSION +# boolean +SET @@sql_big_selects = ON; +INSERT INTO ttrig(truth) VALUES (@@sql_big_selects); +SET @@sql_big_selects = OFF; +INSERT INTO ttrig(truth) VALUES (@@sql_big_selects); +# numeric +SET @@last_insert_id = 20; +INSERT INTO ttrig(num) VALUES (@@last_insert_id); +SET @@last_insert_id = 30; +INSERT INTO ttrig(num) VALUES (@@last_insert_id); +# BOTH +# boolean +SET @@global.low_priority_updates = ON; +SET @@local.low_priority_updates = OFF; +INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates); +INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates); +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = ON; +INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates); +INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates); +# numeric +SET @@global.default_week_format = 3; +SET @@local.default_week_format = 4; +INSERT INTO ttrig(num) VALUES (@@global.default_week_format); +INSERT INTO ttrig(num) VALUES (@@local.default_week_format); +SET @@global.default_week_format = 5; +SET @@local.default_week_format = 6; +INSERT INTO ttrig(num) VALUES (@@global.default_week_format); +INSERT INTO ttrig(num) VALUES (@@local.default_week_format); +# text +SET @@global.lc_time_names = 'sv_SE'; +SET @@local.lc_time_names = 'sv_FI'; +INSERT INTO ttrig(text) VALUES (@@global.lc_time_names); +INSERT INTO ttrig(text) VALUES (@@local.lc_time_names); +SET @@global.lc_time_names = 'ar_TN'; +SET @@local.lc_time_names = 'ar_IQ'; +INSERT INTO ttrig(text) VALUES (@@global.lc_time_names); +INSERT INTO ttrig(text) VALUES (@@local.lc_time_names); +# enum +SET @@global.sql_mode = ''; +SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; +INSERT INTO ttrig(text) VALUES (@@global.sql_mode); +INSERT INTO ttrig(text) VALUES (@@local.sql_mode); +SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; +SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; +INSERT INTO ttrig(text) VALUES (@@global.sql_mode); +INSERT INTO ttrig(text) VALUES (@@local.sql_mode); +# USER +# numeric +SET @user_num = 20; +INSERT INTO ttrig(num) VALUES (@user_num); +SET @user_num = 30; +INSERT INTO ttrig(num) VALUES (@user_num); +# string +SET @user_text = 'Bergsbrunna'; +INSERT INTO ttrig(text) VALUES (@user_text); +SET @user_text = 'Centrum'; +INSERT INTO ttrig(text) VALUES (@user_text); +END| +INSERT INTO trigger_table VALUES ('bye.'); +==== Insert variables from a prepared statement ==== +PREPARE p1 FROM 'SET @@global.relay_log_purge = ON'; +PREPARE p2 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)'; +PREPARE p3 FROM 'SET @@global.relay_log_purge = OFF'; +PREPARE p4 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)'; +PREPARE p5 FROM 'SET @@global.sync_binlog = 2000000'; +PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)'; +PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000'; +PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)'; +PREPARE p9 FROM 'SET @@global.init_slave = \'bison\''; +PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)'; +PREPARE p11 FROM 'SET @@global.init_slave = \'cat\''; +PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)'; +PREPARE p13 FROM 'SET @@global.slave_exec_mode = \'IDEMPOTENT\''; +PREPARE p14 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)'; +PREPARE p15 FROM 'SET @@global.slave_exec_mode = \'STRICT\''; +PREPARE p16 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)'; +PREPARE p17 FROM 'SET @@sql_big_selects = ON'; +PREPARE p18 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)'; +PREPARE p19 FROM 'SET @@sql_big_selects = OFF'; +PREPARE p20 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)'; +PREPARE p21 FROM 'SET @@last_insert_id = 20'; +PREPARE p22 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)'; +PREPARE p23 FROM 'SET @@last_insert_id = 30'; +PREPARE p24 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)'; +PREPARE p25 FROM 'SET @@global.low_priority_updates = ON'; +PREPARE p26 FROM 'SET @@local.low_priority_updates = OFF'; +PREPARE p27 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)'; +PREPARE p28 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)'; +PREPARE p29 FROM 'SET @@global.low_priority_updates = OFF'; +PREPARE p30 FROM 'SET @@local.low_priority_updates = ON'; +PREPARE p31 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)'; +PREPARE p32 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)'; +PREPARE p33 FROM 'SET @@global.default_week_format = 3'; +PREPARE p34 FROM 'SET @@local.default_week_format = 4'; +PREPARE p35 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)'; +PREPARE p36 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)'; +PREPARE p37 FROM 'SET @@global.default_week_format = 5'; +PREPARE p38 FROM 'SET @@local.default_week_format = 6'; +PREPARE p39 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)'; +PREPARE p40 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)'; +PREPARE p41 FROM 'SET @@global.lc_time_names = \'sv_SE\''; +PREPARE p42 FROM 'SET @@local.lc_time_names = \'sv_FI\''; +PREPARE p43 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)'; +PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)'; +PREPARE p45 FROM 'SET @@global.lc_time_names = \'ar_TN\''; +PREPARE p46 FROM 'SET @@local.lc_time_names = \'ar_IQ\''; +PREPARE p47 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)'; +PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)'; +PREPARE p49 FROM 'SET @@global.sql_mode = \'\''; +PREPARE p50 FROM 'SET @@local.sql_mode = \'IGNORE_SPACE,NO_AUTO_CREATE_USER\''; +PREPARE p51 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)'; +PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)'; +PREPARE p53 FROM 'SET @@global.sql_mode = \'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION\''; +PREPARE p54 FROM 'SET @@local.sql_mode = \'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS\''; +PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)'; +PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)'; +PREPARE p57 FROM 'SET @user_num = 20'; +PREPARE p58 FROM 'INSERT INTO tprep(num) VALUES (@user_num)'; +PREPARE p59 FROM 'SET @user_num = 30'; +PREPARE p60 FROM 'INSERT INTO tprep(num) VALUES (@user_num)'; +PREPARE p61 FROM 'SET @user_text = \'Bergsbrunna\''; +PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@user_text)'; +PREPARE p63 FROM 'SET @user_text = \'Centrum\''; +PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@user_text)'; +EXECUTE p1; +EXECUTE p2; +EXECUTE p3; +EXECUTE p4; +EXECUTE p5; +EXECUTE p6; +EXECUTE p7; +EXECUTE p8; +EXECUTE p9; +EXECUTE p10; +EXECUTE p11; +EXECUTE p12; +EXECUTE p13; +EXECUTE p14; +EXECUTE p15; +EXECUTE p16; +EXECUTE p17; +EXECUTE p18; +EXECUTE p19; +EXECUTE p20; +EXECUTE p21; +EXECUTE p22; +EXECUTE p23; +EXECUTE p24; +EXECUTE p25; +EXECUTE p26; +EXECUTE p27; +EXECUTE p28; +EXECUTE p29; +EXECUTE p30; +EXECUTE p31; +EXECUTE p32; +EXECUTE p33; +EXECUTE p34; +EXECUTE p35; +EXECUTE p36; +EXECUTE p37; +EXECUTE p38; +EXECUTE p39; +EXECUTE p40; +EXECUTE p41; +EXECUTE p42; +EXECUTE p43; +EXECUTE p44; +EXECUTE p45; +EXECUTE p46; +EXECUTE p47; +EXECUTE p48; +EXECUTE p49; +EXECUTE p50; +EXECUTE p51; +EXECUTE p52; +EXECUTE p53; +EXECUTE p54; +EXECUTE p55; +EXECUTE p56; +EXECUTE p57; +EXECUTE p58; +EXECUTE p59; +EXECUTE p60; +EXECUTE p61; +EXECUTE p62; +EXECUTE p63; +EXECUTE p64; +==== Results ==== +SELECT * FROM tstmt ORDER BY id; +id truth num text +1 1 NULL NULL +2 0 NULL NULL +3 NULL 2000000 NULL +4 NULL 3000000 NULL +5 NULL NULL bison +6 NULL NULL cat +7 NULL NULL IDEMPOTENT +8 NULL NULL STRICT +9 1 NULL NULL +10 0 NULL NULL +11 NULL 20 NULL +12 NULL 30 NULL +13 1 NULL NULL +14 0 NULL NULL +15 0 NULL NULL +16 1 NULL NULL +17 NULL 3 NULL +18 NULL 4 NULL +19 NULL 5 NULL +20 NULL 6 NULL +21 NULL NULL sv_SE +22 NULL NULL sv_FI +23 NULL NULL ar_TN +24 NULL NULL ar_IQ +25 NULL NULL +26 NULL NULL IGNORE_SPACE,NO_AUTO_CREATE_USER +27 NULL NULL NO_DIR_IN_CREATE,NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_ENGINE_SUBSTITUTION +28 NULL NULL NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS +29 NULL 20 NULL +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 +==== Clean up ==== +[on master] +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table; +SET @@global.default_week_format= @m_default_week_format; +SET @@global.init_slave= @m_init_slave; +SET @@global.lc_time_names= @m_lc_time_names; +SET @@global.low_priority_updates= @m_low_priority_updates; +SET @@global.relay_log_purge= @m_relay_log_purge; +SET @@global.slave_exec_mode= @m_slave_exec_mode; +SET @@global.sql_mode= @m_sql_mode; +SET @@global.sync_binlog= @m_sync_binlog; +[on slave] +SET @@global.default_week_format= @s_default_week_format; +SET @@global.init_slave= @s_init_slave; +SET @@global.lc_time_names= @s_lc_time_names; +SET @@global.low_priority_updates= @s_low_priority_updates; +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; diff --git a/mysql-test/suite/rpl/r/rpl_variables_stm.result b/mysql-test/suite/rpl/r/rpl_variables_stm.result new file mode 100644 index 00000000000..18b90b1264d --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_variables_stm.result @@ -0,0 +1,526 @@ +stop slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +start slave; +==== Initialization ==== +[on master] +SET @m_pseudo_thread_id= @@global.pseudo_thread_id; +SET @m_auto_increment_increment= @@global.auto_increment_increment; +SET @m_auto_increment_offset= @@global.auto_increment_offset; +SET @m_character_set_client= @@global.character_set_client; +SET @m_collation_connection= @@global.collation_connection; +SET @m_collation_server= @@global.collation_server; +SET @m_time_zone= @@global.time_zone; +SET @m_lc_time_names= @@global.lc_time_names; +SET @m_collation_database= @@global.collation_database; +[on slave] +SET @s_pseudo_thread_id= @@global.pseudo_thread_id; +SET @s_auto_increment_increment= @@global.auto_increment_increment; +SET @s_auto_increment_offset= @@global.auto_increment_offset; +SET @s_character_set_client= @@global.character_set_client; +SET @s_collation_connection= @@global.collation_connection; +SET @s_collation_server= @@global.collation_server; +SET @s_time_zone= @@global.time_zone; +SET @s_lc_time_names= @@global.lc_time_names; +SET @s_collation_database= @@global.collation_database; +SET @@global.pseudo_thread_id= 4711; +SET @@global.auto_increment_increment=19; +SET @@global.auto_increment_offset=4; +SET @@global.character_set_client='eucjpms'; +SET @@global.collation_connection='eucjpms_bin'; +SET @@global.collation_server='geostd8_general_ci'; +SET @@global.time_zone='Japan'; +SET @@global.lc_time_names='sv_SE'; +SET @@global.collation_database='geostd8_bin'; +[on master] +CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY, +num INT, +text VARCHAR(100)); +CREATE TABLE tproc LIKE tstmt; +CREATE TABLE tfunc LIKE tstmt; +CREATE TABLE ttrig LIKE tstmt; +CREATE TABLE tprep LIKE tstmt; +CREATE TABLE trigger_table (text CHAR(4)); +==== Insert variables directly ==== +SET @@pseudo_thread_id= 4712; +INSERT INTO tstmt(num) VALUES (@@session.pseudo_thread_id); +SET @@pseudo_thread_id= 4713; +INSERT INTO tstmt(num) VALUES (@@session.pseudo_thread_id); +SET @@foreign_key_checks= 0; +INSERT INTO tstmt(num) VALUES (@@session.foreign_key_checks); +SET @@foreign_key_checks= 1; +INSERT INTO tstmt(num) VALUES (@@session.foreign_key_checks); +SET @@sql_auto_is_null= 0; +INSERT INTO tstmt(num) VALUES (@@session.sql_auto_is_null); +SET @@sql_auto_is_null= 1; +INSERT INTO tstmt(num) VALUES (@@session.sql_auto_is_null); +SET @@unique_checks= 0; +INSERT INTO tstmt(num) VALUES (@@session.unique_checks); +SET @@unique_checks= 1; +INSERT INTO tstmt(num) VALUES (@@session.unique_checks); +SET @@auto_increment_increment= 11; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_increment= 19; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_offset= 13; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_offset= 17; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_increment= 1; +SET @@auto_increment_offset= 1; +SET @@character_set_client= 'cp1257'; +INSERT INTO tstmt(text) VALUES (@@session.character_set_client); +SET @@character_set_client= 'cp1256'; +INSERT INTO tstmt(text) VALUES (@@session.character_set_client); +SET @@collation_connection= 'cp1251_ukrainian_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_connection); +INSERT INTO tstmt(text) VALUES (@@session.character_set_connection); +SET @@collation_connection= 'cp1251_bulgarian_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_connection); +INSERT INTO tstmt(text) VALUES (@@session.character_set_connection); +SET @@collation_server= 'latin7_bin'; +INSERT INTO tstmt(text) VALUES (@@session.collation_server); +INSERT INTO tstmt(text) VALUES (@@session.character_set_server); +SET @@collation_server= 'latin7_general_cs'; +INSERT INTO tstmt(text) VALUES (@@session.collation_server); +INSERT INTO tstmt(text) VALUES (@@session.character_set_server); +SET @@time_zone= 'Europe/Moscow'; +INSERT INTO tstmt(text) VALUES (@@session.time_zone); +SET @@time_zone= 'Universal'; +INSERT INTO tstmt(text) VALUES (@@session.time_zone); +SET @@lc_time_names= 'sv_FI'; +INSERT INTO tstmt(text) VALUES (@@session.lc_time_names); +SET @@lc_time_names= 'no_NO'; +INSERT INTO tstmt(text) VALUES (@@session.lc_time_names); +SET @@collation_database= 'latin7_general_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_database); +INSERT INTO tstmt(text) VALUES (@@session.character_set_database); +SET @@collation_database= 'latin7_estonian_cs'; +INSERT INTO tstmt(text) VALUES (@@session.collation_database); +INSERT INTO tstmt(text) VALUES (@@session.character_set_database); +SET @@timestamp= 47114711; +INSERT INTO tstmt(text) VALUES (@@session.timestamp); +SET @@timestamp= 47124712; +INSERT INTO tstmt(text) VALUES (@@session.timestamp); +SET @@last_insert_id= 1616; +INSERT INTO tstmt(text) VALUES (@@session.last_insert_id); +SET @@last_insert_id= 1717; +INSERT INTO tstmt(text) VALUES (@@session.last_insert_id); +==== Insert variables from a stored procedure ==== +CREATE PROCEDURE proc() +BEGIN +SET @@pseudo_thread_id= 4712; +INSERT INTO tproc(num) VALUES (@@session.pseudo_thread_id); +SET @@pseudo_thread_id= 4713; +INSERT INTO tproc(num) VALUES (@@session.pseudo_thread_id); +SET @@foreign_key_checks= 0; +INSERT INTO tproc(num) VALUES (@@session.foreign_key_checks); +SET @@foreign_key_checks= 1; +INSERT INTO tproc(num) VALUES (@@session.foreign_key_checks); +SET @@sql_auto_is_null= 0; +INSERT INTO tproc(num) VALUES (@@session.sql_auto_is_null); +SET @@sql_auto_is_null= 1; +INSERT INTO tproc(num) VALUES (@@session.sql_auto_is_null); +SET @@unique_checks= 0; +INSERT INTO tproc(num) VALUES (@@session.unique_checks); +SET @@unique_checks= 1; +INSERT INTO tproc(num) VALUES (@@session.unique_checks); +SET @@auto_increment_increment= 11; +INSERT INTO tproc(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_increment= 19; +INSERT INTO tproc(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_offset= 13; +INSERT INTO tproc(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_offset= 17; +INSERT INTO tproc(num) VALUES (@@session.auto_increment_offset); +# reset these as they affect the index column +SET @@auto_increment_increment= 1; +SET @@auto_increment_offset= 1; +SET @@character_set_client= 'cp1257'; +INSERT INTO tproc(text) VALUES (@@session.character_set_client); +SET @@character_set_client= 'cp1256'; +INSERT INTO tproc(text) VALUES (@@session.character_set_client); +SET @@collation_connection= 'cp1251_ukrainian_ci'; +INSERT INTO tproc(text) VALUES (@@session.collation_connection); +INSERT INTO tproc(text) VALUES (@@session.character_set_connection); +SET @@collation_connection= 'cp1251_bulgarian_ci'; +INSERT INTO tproc(text) VALUES (@@session.collation_connection); +INSERT INTO tproc(text) VALUES (@@session.character_set_connection); +SET @@collation_server= 'latin7_bin'; +INSERT INTO tproc(text) VALUES (@@session.collation_server); +INSERT INTO tproc(text) VALUES (@@session.character_set_server); +SET @@collation_server= 'latin7_general_cs'; +INSERT INTO tproc(text) VALUES (@@session.collation_server); +INSERT INTO tproc(text) VALUES (@@session.character_set_server); +SET @@time_zone= 'Europe/Moscow'; +INSERT INTO tproc(text) VALUES (@@session.time_zone); +SET @@time_zone= 'Universal'; +INSERT INTO tproc(text) VALUES (@@session.time_zone); +SET @@lc_time_names= 'sv_FI'; +INSERT INTO tproc(text) VALUES (@@session.lc_time_names); +SET @@lc_time_names= 'no_NO'; +INSERT INTO tproc(text) VALUES (@@session.lc_time_names); +SET @@collation_database= 'latin7_general_ci'; +INSERT INTO tproc(text) VALUES (@@session.collation_database); +INSERT INTO tproc(text) VALUES (@@session.character_set_database); +SET @@collation_database= 'latin7_estonian_cs'; +INSERT INTO tproc(text) VALUES (@@session.collation_database); +INSERT INTO tproc(text) VALUES (@@session.character_set_database); +SET @@timestamp= 47114711; +INSERT INTO tproc(text) VALUES (@@session.timestamp); +SET @@timestamp= 47124712; +INSERT INTO tproc(text) VALUES (@@session.timestamp); +SET @@last_insert_id= 1616; +INSERT INTO tproc(text) VALUES (@@session.last_insert_id); +SET @@last_insert_id= 1717; +INSERT INTO tproc(text) VALUES (@@session.last_insert_id); +END| +CALL proc(); +==== Insert variables from a stored function ==== +CREATE FUNCTION func() +RETURNS INT +BEGIN +SET @@pseudo_thread_id= 4712; +INSERT INTO tfunc(num) VALUES (@@session.pseudo_thread_id); +SET @@pseudo_thread_id= 4713; +INSERT INTO tfunc(num) VALUES (@@session.pseudo_thread_id); +SET @@foreign_key_checks= 0; +INSERT INTO tfunc(num) VALUES (@@session.foreign_key_checks); +SET @@foreign_key_checks= 1; +INSERT INTO tfunc(num) VALUES (@@session.foreign_key_checks); +SET @@sql_auto_is_null= 0; +INSERT INTO tfunc(num) VALUES (@@session.sql_auto_is_null); +SET @@sql_auto_is_null= 1; +INSERT INTO tfunc(num) VALUES (@@session.sql_auto_is_null); +SET @@unique_checks= 0; +INSERT INTO tfunc(num) VALUES (@@session.unique_checks); +SET @@unique_checks= 1; +INSERT INTO tfunc(num) VALUES (@@session.unique_checks); +SET @@auto_increment_increment= 11; +INSERT INTO tfunc(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_increment= 19; +INSERT INTO tfunc(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_offset= 13; +INSERT INTO tfunc(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_offset= 17; +INSERT INTO tfunc(num) VALUES (@@session.auto_increment_offset); +# reset these as they affect the index column +SET @@auto_increment_increment= 1; +SET @@auto_increment_offset= 1; +SET @@character_set_client= 'cp1257'; +INSERT INTO tfunc(text) VALUES (@@session.character_set_client); +SET @@character_set_client= 'cp1256'; +INSERT INTO tfunc(text) VALUES (@@session.character_set_client); +SET @@collation_connection= 'cp1251_ukrainian_ci'; +INSERT INTO tfunc(text) VALUES (@@session.collation_connection); +INSERT INTO tfunc(text) VALUES (@@session.character_set_connection); +SET @@collation_connection= 'cp1251_bulgarian_ci'; +INSERT INTO tfunc(text) VALUES (@@session.collation_connection); +INSERT INTO tfunc(text) VALUES (@@session.character_set_connection); +SET @@collation_server= 'latin7_bin'; +INSERT INTO tfunc(text) VALUES (@@session.collation_server); +INSERT INTO tfunc(text) VALUES (@@session.character_set_server); +SET @@collation_server= 'latin7_general_cs'; +INSERT INTO tfunc(text) VALUES (@@session.collation_server); +INSERT INTO tfunc(text) VALUES (@@session.character_set_server); +SET @@time_zone= 'Europe/Moscow'; +INSERT INTO tfunc(text) VALUES (@@session.time_zone); +SET @@time_zone= 'Universal'; +INSERT INTO tfunc(text) VALUES (@@session.time_zone); +SET @@lc_time_names= 'sv_FI'; +INSERT INTO tfunc(text) VALUES (@@session.lc_time_names); +SET @@lc_time_names= 'no_NO'; +INSERT INTO tfunc(text) VALUES (@@session.lc_time_names); +SET @@collation_database= 'latin7_general_ci'; +INSERT INTO tfunc(text) VALUES (@@session.collation_database); +INSERT INTO tfunc(text) VALUES (@@session.character_set_database); +SET @@collation_database= 'latin7_estonian_cs'; +INSERT INTO tfunc(text) VALUES (@@session.collation_database); +INSERT INTO tfunc(text) VALUES (@@session.character_set_database); +SET @@timestamp= 47114711; +INSERT INTO tfunc(text) VALUES (@@session.timestamp); +SET @@timestamp= 47124712; +INSERT INTO tfunc(text) VALUES (@@session.timestamp); +SET @@last_insert_id= 1616; +INSERT INTO tfunc(text) VALUES (@@session.last_insert_id); +SET @@last_insert_id= 1717; +INSERT INTO tfunc(text) VALUES (@@session.last_insert_id); +RETURN 0; +END| +SELECT func(); +func() +0 +==== Insert variables from a trigger ==== +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN +SET @@pseudo_thread_id= 4712; +INSERT INTO ttrig(num) VALUES (@@session.pseudo_thread_id); +SET @@pseudo_thread_id= 4713; +INSERT INTO ttrig(num) VALUES (@@session.pseudo_thread_id); +SET @@foreign_key_checks= 0; +INSERT INTO ttrig(num) VALUES (@@session.foreign_key_checks); +SET @@foreign_key_checks= 1; +INSERT INTO ttrig(num) VALUES (@@session.foreign_key_checks); +SET @@sql_auto_is_null= 0; +INSERT INTO ttrig(num) VALUES (@@session.sql_auto_is_null); +SET @@sql_auto_is_null= 1; +INSERT INTO ttrig(num) VALUES (@@session.sql_auto_is_null); +SET @@unique_checks= 0; +INSERT INTO ttrig(num) VALUES (@@session.unique_checks); +SET @@unique_checks= 1; +INSERT INTO ttrig(num) VALUES (@@session.unique_checks); +SET @@auto_increment_increment= 11; +INSERT INTO ttrig(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_increment= 19; +INSERT INTO ttrig(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_offset= 13; +INSERT INTO ttrig(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_offset= 17; +INSERT INTO ttrig(num) VALUES (@@session.auto_increment_offset); +# reset these as they affect the index column +SET @@auto_increment_increment= 1; +SET @@auto_increment_offset= 1; +SET @@character_set_client= 'cp1257'; +INSERT INTO ttrig(text) VALUES (@@session.character_set_client); +SET @@character_set_client= 'cp1256'; +INSERT INTO ttrig(text) VALUES (@@session.character_set_client); +SET @@collation_connection= 'cp1251_ukrainian_ci'; +INSERT INTO ttrig(text) VALUES (@@session.collation_connection); +INSERT INTO ttrig(text) VALUES (@@session.character_set_connection); +SET @@collation_connection= 'cp1251_bulgarian_ci'; +INSERT INTO ttrig(text) VALUES (@@session.collation_connection); +INSERT INTO ttrig(text) VALUES (@@session.character_set_connection); +SET @@collation_server= 'latin7_bin'; +INSERT INTO ttrig(text) VALUES (@@session.collation_server); +INSERT INTO ttrig(text) VALUES (@@session.character_set_server); +SET @@collation_server= 'latin7_general_cs'; +INSERT INTO ttrig(text) VALUES (@@session.collation_server); +INSERT INTO ttrig(text) VALUES (@@session.character_set_server); +SET @@time_zone= 'Europe/Moscow'; +INSERT INTO ttrig(text) VALUES (@@session.time_zone); +SET @@time_zone= 'Universal'; +INSERT INTO ttrig(text) VALUES (@@session.time_zone); +SET @@lc_time_names= 'sv_FI'; +INSERT INTO ttrig(text) VALUES (@@session.lc_time_names); +SET @@lc_time_names= 'no_NO'; +INSERT INTO ttrig(text) VALUES (@@session.lc_time_names); +SET @@collation_database= 'latin7_general_ci'; +INSERT INTO ttrig(text) VALUES (@@session.collation_database); +INSERT INTO ttrig(text) VALUES (@@session.character_set_database); +SET @@collation_database= 'latin7_estonian_cs'; +INSERT INTO ttrig(text) VALUES (@@session.collation_database); +INSERT INTO ttrig(text) VALUES (@@session.character_set_database); +SET @@timestamp= 47114711; +INSERT INTO ttrig(text) VALUES (@@session.timestamp); +SET @@timestamp= 47124712; +INSERT INTO ttrig(text) VALUES (@@session.timestamp); +SET @@last_insert_id= 1616; +INSERT INTO ttrig(text) VALUES (@@session.last_insert_id); +SET @@last_insert_id= 1717; +INSERT INTO ttrig(text) VALUES (@@session.last_insert_id); +END| +INSERT INTO trigger_table VALUES ('bye.'); +==== Insert variables from a prepared statement ==== +PREPARE p1 FROM 'SET @@pseudo_thread_id= 4712'; +PREPARE p2 FROM 'INSERT INTO tprep(num) VALUES (@@session.pseudo_thread_id)'; +PREPARE p3 FROM 'SET @@pseudo_thread_id= 4713'; +PREPARE p4 FROM 'INSERT INTO tprep(num) VALUES (@@session.pseudo_thread_id)'; +PREPARE p5 FROM 'SET @@foreign_key_checks= 0'; +PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@session.foreign_key_checks)'; +PREPARE p7 FROM 'SET @@foreign_key_checks= 1'; +PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@session.foreign_key_checks)'; +PREPARE p9 FROM 'SET @@sql_auto_is_null= 0'; +PREPARE p10 FROM 'INSERT INTO tprep(num) VALUES (@@session.sql_auto_is_null)'; +PREPARE p11 FROM 'SET @@sql_auto_is_null= 1'; +PREPARE p12 FROM 'INSERT INTO tprep(num) VALUES (@@session.sql_auto_is_null)'; +PREPARE p13 FROM 'SET @@unique_checks= 0'; +PREPARE p14 FROM 'INSERT INTO tprep(num) VALUES (@@session.unique_checks)'; +PREPARE p15 FROM 'SET @@unique_checks= 1'; +PREPARE p16 FROM 'INSERT INTO tprep(num) VALUES (@@session.unique_checks)'; +PREPARE p17 FROM 'SET @@auto_increment_increment= 11'; +PREPARE p18 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_increment)'; +PREPARE p19 FROM 'SET @@auto_increment_increment= 19'; +PREPARE p20 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_increment)'; +PREPARE p21 FROM 'SET @@auto_increment_offset= 13'; +PREPARE p22 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_offset)'; +PREPARE p23 FROM 'SET @@auto_increment_offset= 17'; +PREPARE p24 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_offset)'; +PREPARE p25 FROM 'SET @@auto_increment_increment= 1'; +PREPARE p26 FROM 'SET @@auto_increment_offset= 1'; +PREPARE p27 FROM 'SET @@character_set_client= \'cp1257\''; +PREPARE p28 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)'; +PREPARE p29 FROM 'SET @@character_set_client= \'cp1256\''; +PREPARE p30 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)'; +PREPARE p31 FROM 'SET @@collation_connection= \'cp1251_ukrainian_ci\''; +PREPARE p32 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)'; +PREPARE p33 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)'; +PREPARE p34 FROM 'SET @@collation_connection= \'cp1251_bulgarian_ci\''; +PREPARE p35 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)'; +PREPARE p36 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)'; +PREPARE p37 FROM 'SET @@collation_server= \'latin7_bin\''; +PREPARE p38 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)'; +PREPARE p39 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)'; +PREPARE p40 FROM 'SET @@collation_server= \'latin7_general_cs\''; +PREPARE p41 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)'; +PREPARE p42 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)'; +PREPARE p43 FROM 'SET @@time_zone= \'Europe/Moscow\''; +PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)'; +PREPARE p45 FROM 'SET @@time_zone= \'Universal\''; +PREPARE p46 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)'; +PREPARE p47 FROM 'SET @@lc_time_names= \'sv_FI\''; +PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)'; +PREPARE p49 FROM 'SET @@lc_time_names= \'no_NO\''; +PREPARE p50 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)'; +PREPARE p51 FROM 'SET @@collation_database= \'latin7_general_ci\''; +PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)'; +PREPARE p53 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)'; +PREPARE p54 FROM 'SET @@collation_database= \'latin7_estonian_cs\''; +PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)'; +PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)'; +PREPARE p57 FROM 'SET @@timestamp= 47114711'; +PREPARE p58 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)'; +PREPARE p59 FROM 'SET @@timestamp= 47124712'; +PREPARE p60 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)'; +PREPARE p61 FROM 'SET @@last_insert_id= 1616'; +PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)'; +PREPARE p63 FROM 'SET @@last_insert_id= 1717'; +PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)'; +EXECUTE p1; +EXECUTE p2; +EXECUTE p3; +EXECUTE p4; +EXECUTE p5; +EXECUTE p6; +EXECUTE p7; +EXECUTE p8; +EXECUTE p9; +EXECUTE p10; +EXECUTE p11; +EXECUTE p12; +EXECUTE p13; +EXECUTE p14; +EXECUTE p15; +EXECUTE p16; +EXECUTE p17; +EXECUTE p18; +EXECUTE p19; +EXECUTE p20; +EXECUTE p21; +EXECUTE p22; +EXECUTE p23; +EXECUTE p24; +EXECUTE p25; +EXECUTE p26; +EXECUTE p27; +EXECUTE p28; +EXECUTE p29; +EXECUTE p30; +EXECUTE p31; +EXECUTE p32; +EXECUTE p33; +EXECUTE p34; +EXECUTE p35; +EXECUTE p36; +EXECUTE p37; +EXECUTE p38; +EXECUTE p39; +EXECUTE p40; +EXECUTE p41; +EXECUTE p42; +EXECUTE p43; +EXECUTE p44; +EXECUTE p45; +EXECUTE p46; +EXECUTE p47; +EXECUTE p48; +EXECUTE p49; +EXECUTE p50; +EXECUTE p51; +EXECUTE p52; +EXECUTE p53; +EXECUTE p54; +EXECUTE p55; +EXECUTE p56; +EXECUTE p57; +EXECUTE p58; +EXECUTE p59; +EXECUTE p60; +EXECUTE p61; +EXECUTE p62; +EXECUTE p63; +EXECUTE p64; +==== Results ==== +SELECT * FROM tstmt ORDER BY id; +id num text +1 4712 NULL +2 4713 NULL +3 0 NULL +4 1 NULL +5 0 NULL +6 1 NULL +7 0 NULL +8 1 NULL +12 11 NULL +20 19 NULL +32 13 NULL +36 17 NULL +37 NULL cp1257 +38 NULL cp1256 +39 NULL cp1251_ukrainian_ci +40 NULL cp1251 +41 NULL cp1251_bulgarian_ci +42 NULL cp1251 +43 NULL latin7_bin +44 NULL latin7 +45 NULL latin7_general_cs +46 NULL latin7 +47 NULL Europe/Moscow +48 NULL Universal +49 NULL sv_FI +50 NULL no_NO +51 NULL latin7_general_ci +52 NULL latin7 +53 NULL latin7_estonian_cs +54 NULL latin7 +55 NULL 47114711 +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 +==== Clean up ==== +[on master] +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table; +SET @@global.pseudo_thread_id= @m_pseudo_thread_id; +SET @@global.auto_increment_increment= @m_auto_increment_increment; +SET @@global.auto_increment_offset= @m_auto_increment_offset; +SET @@global.character_set_client= @m_character_set_client; +SET @@global.collation_connection= @m_collation_connection; +SET @@global.collation_server= @m_collation_server; +SET @@global.time_zone= @m_time_zone; +SET @@global.lc_time_names= @m_lc_time_names; +SET @@global.collation_database= @m_collation_database; +[on slave] +SET @@global.pseudo_thread_id= @s_pseudo_thread_id; +SET @@global.auto_increment_increment= @s_auto_increment_increment; +SET @@global.auto_increment_offset= @s_auto_increment_offset; +SET @@global.character_set_client= @s_character_set_client; +SET @@global.collation_connection= @s_collation_connection; +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; diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index efd46f4fa09..8129cdec25a 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -1,57 +1,66 @@ -########################################## -# 2006-02-07 By JBM: Added order by -######################################### -# Note that errors are ignored by opt file. +# ==== Purpose ==== +# +# Verify that --slave-skip-errors works correctly. The error messages +# specified by --slave-skip-errors on slave should be ignored. If +# such errors occur, they should not be reported and not cause the +# slave to stop. +# +# ==== Method ==== +# +# We run the slave with --slave-skip-errors=1062 (the code for +# duplicate key). On slave, we insert value 1 in a table, and then, +# on master, we insert value 1 in the table. The error should be +# ignored on slave. +# +# ==== Related bugs ==== +# +# BUG#28839: Errors in strict mode silently stop SQL thread if --slave-skip-errors exists +# bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic + source include/master-slave.inc; source include/have_binlog_format_mixed_or_statement.inc; -# -# Bug #30594 -# Skipping error due to applying Row-based repliation events -# should be checked with another test file -# consider names like rpl_row_skip_error -# +--echo ==== Test Without sql_mode=strict_trans_tables ==== + +--echo [on master] create table t1 (n int not null primary key); -save_master_pos; -connection slave; -sync_with_master; + +--echo [on slave] +sync_slave_with_master; insert into t1 values (1); + +--echo [on master] connection master; # Here we expect (ignored) error, since 1 is already in slave table insert into t1 values (1); - # These should work fine insert into t1 values (2),(3); -save_master_pos; -connection slave; -sync_with_master; +--echo [on slave] +sync_slave_with_master; select * from t1 ORDER BY n; -# Cleanup -connection master; -drop table t1; -sync_slave_with_master; -# End of 4.1 tests +--echo ==== Test With sql_mode=strict_trans_tables ==== -# -# #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists -# +insert into t1 values (7), (8); + +--echo [on master] connection master; -create table t1(a int primary key); -insert into t1 values (1),(2); -delete from t1 where @@server_id=1; set sql_mode=strict_trans_tables; -select @@server_id; -insert into t1 values (1),(2),(3); +insert into t1 values (7), (8), (9); + +--echo [on slave] sync_slave_with_master; -connection slave; -select @@server_id; select * from t1; source include/show_slave_status2.inc; + + +--echo ==== Clean Up ==== + connection master; drop table t1; -sync_with_master; +sync_slave_with_master; + # End of 5.0 tests diff --git a/mysql-test/suite/rpl/t/rpl_variables.test b/mysql-test/suite/rpl/t/rpl_variables.test new file mode 100644 index 00000000000..3669e14c5df --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_variables.test @@ -0,0 +1,739 @@ +# ==== Purpose ==== +# +# Test that queries referencing variables are replicated correctly in +# mixed and row-based logging mode. +# +# +# ==== Method ==== +# +# The test simply does a lot of "INSERT INTO t1 VALUES (@@variable)" +# and checks the result on the slave. +# +# Statements referencing a variable only replicate correctly in mixed +# and row mode: in row mode, the values inserted are replicated. In +# mixed mode, statements referencing a variable are marked as unsafe, +# meaning they will be replicated by row. In statement mode, the +# slave's value will be used and replication will break. (Except in a +# small number of special cases: random seeds, insert_id, and +# auto_increment are replicated). +# +# We test the following variable scopes: +# - server system variables +# - server session variables +# - server "both" variables +# - user variables +# +# For each scope, we use variables of the following types if they +# exist: +# - boolean +# - numeric +# - string +# - enumeration variables +# +# We use these types of variables in the following contexts: +# - directly +# - from a stored procedure +# - from a stored function +# - from a trigger +# - from a prepared statement +# +# For all variables where it is possible, we set the variable to one +# value on slave, and insert it on the master with two distinct +# values. +# +# The same insertions are made in four different tables using direct +# insert, stored procedure, stored function, or trigger. Then all +# eight resulting tables on master and slave are compared. +# +# +# ==== Related bugs ==== +# +# BUG#31168: @@hostname does not replicate +# +# +# ==== Related test cases ==== +# +# binlog.binlog_unsafe tests that a warning is issued if system +# variables are replicated in statement mode. +# +# rpl.rpl_variables_stm tests the small subset of variables that +# actually can be replicated safely in statement mode. + + +source include/master-slave.inc; +source include/have_binlog_format_mixed_or_row.inc; + + +--echo ==== Initialization ==== + +# Backup the values of global variables so that they can be restored +# later. +--echo [on master] +connection master; +SET @m_default_week_format= @@global.default_week_format; +SET @m_init_slave= @@global.init_slave; +SET @m_lc_time_names= @@global.lc_time_names; +SET @m_low_priority_updates= @@global.low_priority_updates; +SET @m_relay_log_purge= @@global.relay_log_purge; +SET @m_slave_exec_mode= @@global.slave_exec_mode; +SET @m_sql_mode= @@global.sql_mode; +SET @m_sync_binlog= @@global.sync_binlog; + +--echo [on slave] +connection slave; +SET @s_default_week_format= @@global.default_week_format; +SET @s_init_slave= @@global.init_slave; +SET @s_lc_time_names= @@global.lc_time_names; +SET @s_low_priority_updates= @@global.low_priority_updates; +SET @s_relay_log_purge= @@global.relay_log_purge; +SET @s_slave_exec_mode= @@global.slave_exec_mode; +SET @s_sql_mode= @@global.sql_mode; +SET @s_sync_binlog= @@global.sync_binlog; + +# Set global variables on slave to something different than on master. +SET @@global.relay_log_purge = OFF; +SET @@global.sync_binlog = 1000000; +SET @@global.slave_exec_mode = 'STRICT'; +SET @@sql_big_selects = OFF; +SET @@last_insert_id = 10; +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = OFF; +SET @@global.default_week_format = 1; +SET @@local.default_week_format = 2; +SET @@global.lc_time_names = 'zh_HK'; +SET @@local.lc_time_names = 'zh_TW'; +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'; + +# 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; + +# We would have wanted to set this together with the other variables +# above, but can't because it affects how the slave works. +--echo [on slave] +connection slave; +SET @@global.init_slave = 'ant'; + + +--echo [on master] +connection master; + +# Tables where everything happens. +CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY, + truth BOOLEAN, + num INT, + text VARCHAR(100)); +CREATE TABLE tproc LIKE tstmt; +CREATE TABLE tfunc LIKE tstmt; +CREATE TABLE ttrig LIKE tstmt; +CREATE TABLE tprep LIKE tstmt; + +# Table on which we put a trigger. +CREATE TABLE trigger_table (text CHAR(4)); + + +--echo ==== Insert variables directly ==== + +--echo ---- global variables ---- + +# boolean +SET @@global.relay_log_purge = ON; +INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge); +SET @@global.relay_log_purge = OFF; +INSERT INTO tstmt(truth) VALUES (@@global.relay_log_purge); + +# numeric +SET @@global.sync_binlog = 2000000; +INSERT INTO tstmt(num) VALUES (@@global.sync_binlog); +SET @@global.sync_binlog = 3000000; +INSERT INTO tstmt(num) VALUES (@@global.sync_binlog); + +# string +SET @@global.init_slave = 'bison'; +INSERT INTO tstmt(text) VALUES (@@global.init_slave); +SET @@global.init_slave = 'cat'; +INSERT INTO tstmt(text) VALUES (@@global.init_slave); + +# enumeration +SET @@global.slave_exec_mode = 'IDEMPOTENT'; +INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode); +SET @@global.slave_exec_mode = 'STRICT'; +INSERT INTO tstmt(text) VALUES (@@global.slave_exec_mode); + + +--echo ---- session variables ---- + +# boolean +SET @@sql_big_selects = ON; +INSERT INTO tstmt(truth) VALUES (@@sql_big_selects); +SET @@sql_big_selects = OFF; +INSERT INTO tstmt(truth) VALUES (@@sql_big_selects); + +# numeric +SET @@last_insert_id = 20; +INSERT INTO tstmt(num) VALUES (@@last_insert_id); +SET @@last_insert_id = 30; +INSERT INTO tstmt(num) VALUES (@@last_insert_id); + +--echo ---- global and session variables ---- + +# boolean +SET @@global.low_priority_updates = ON; +SET @@local.low_priority_updates = OFF; +INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates); +SET @@global.low_priority_updates = OFF; +SET @@local.low_priority_updates = ON; +INSERT INTO tstmt(truth) VALUES (@@global.low_priority_updates); +INSERT INTO tstmt(truth) VALUES (@@local.low_priority_updates); + +# numeric +SET @@global.default_week_format = 3; +SET @@local.default_week_format = 4; +INSERT INTO tstmt(num) VALUES (@@global.default_week_format); +INSERT INTO tstmt(num) VALUES (@@local.default_week_format); +SET @@global.default_week_format = 5; +SET @@local.default_week_format = 6; +INSERT INTO tstmt(num) VALUES (@@global.default_week_format); +INSERT INTO tstmt(num) VALUES (@@local.default_week_format); + +# string +SET @@global.lc_time_names = 'sv_SE'; +SET @@local.lc_time_names = 'sv_FI'; +INSERT INTO tstmt(text) VALUES (@@global.lc_time_names); +INSERT INTO tstmt(text) VALUES (@@local.lc_time_names); +SET @@global.lc_time_names = 'ar_TN'; +SET @@local.lc_time_names = 'ar_IQ'; +INSERT INTO tstmt(text) VALUES (@@global.lc_time_names); +INSERT INTO tstmt(text) VALUES (@@local.lc_time_names); + +# enum +SET @@global.sql_mode = ''; +SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; +INSERT INTO tstmt(text) VALUES (@@global.sql_mode); +INSERT INTO tstmt(text) VALUES (@@local.sql_mode); +SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; +SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; +INSERT INTO tstmt(text) VALUES (@@global.sql_mode); +INSERT INTO tstmt(text) VALUES (@@local.sql_mode); + +--echo ---- user variables ---- + +# numeric +SET @user_num = 20; +INSERT INTO tstmt(num) VALUES (@user_num); +SET @user_num = 30; +INSERT INTO tstmt(num) VALUES (@user_num); + +# string +SET @user_text = 'Bergsbrunna'; +INSERT INTO tstmt(text) VALUES (@user_text); +SET @user_text = 'Centrum'; +INSERT INTO tstmt(text) VALUES (@user_text); + + +--echo ==== Insert variables from a stored procedure ==== + +DELIMITER |; +CREATE PROCEDURE proc() +BEGIN + + # GLOBAL + + # boolean + SET @@global.relay_log_purge = ON; + INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge); + SET @@global.relay_log_purge = OFF; + INSERT INTO tproc(truth) VALUES (@@global.relay_log_purge); + + # numeric + SET @@global.sync_binlog = 2000000; + INSERT INTO tproc(num) VALUES (@@global.sync_binlog); + SET @@global.sync_binlog = 3000000; + INSERT INTO tproc(num) VALUES (@@global.sync_binlog); + + # string + SET @@global.init_slave = 'bison'; + INSERT INTO tproc(text) VALUES (@@global.init_slave); + SET @@global.init_slave = 'cat'; + INSERT INTO tproc(text) VALUES (@@global.init_slave); + + # enumeration + SET @@global.slave_exec_mode = 'IDEMPOTENT'; + INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode); + SET @@global.slave_exec_mode = 'STRICT'; + INSERT INTO tproc(text) VALUES (@@global.slave_exec_mode); + + # SESSION + + # boolean + SET @@sql_big_selects = ON; + INSERT INTO tproc(truth) VALUES (@@sql_big_selects); + SET @@sql_big_selects = OFF; + INSERT INTO tproc(truth) VALUES (@@sql_big_selects); + + # numeric + SET @@last_insert_id = 20; + INSERT INTO tproc(num) VALUES (@@last_insert_id); + SET @@last_insert_id = 30; + INSERT INTO tproc(num) VALUES (@@last_insert_id); + + # BOTH + + # boolean + SET @@global.low_priority_updates = ON; + SET @@local.low_priority_updates = OFF; + INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates); + INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates); + SET @@global.low_priority_updates = OFF; + SET @@local.low_priority_updates = ON; + INSERT INTO tproc(truth) VALUES (@@global.low_priority_updates); + INSERT INTO tproc(truth) VALUES (@@local.low_priority_updates); + + # numeric + SET @@global.default_week_format = 3; + SET @@local.default_week_format = 4; + INSERT INTO tproc(num) VALUES (@@global.default_week_format); + INSERT INTO tproc(num) VALUES (@@local.default_week_format); + SET @@global.default_week_format = 5; + SET @@local.default_week_format = 6; + INSERT INTO tproc(num) VALUES (@@global.default_week_format); + INSERT INTO tproc(num) VALUES (@@local.default_week_format); + + # text + SET @@global.lc_time_names = 'sv_SE'; + SET @@local.lc_time_names = 'sv_FI'; + INSERT INTO tproc(text) VALUES (@@global.lc_time_names); + INSERT INTO tproc(text) VALUES (@@local.lc_time_names); + SET @@global.lc_time_names = 'ar_TN'; + SET @@local.lc_time_names = 'ar_IQ'; + INSERT INTO tproc(text) VALUES (@@global.lc_time_names); + INSERT INTO tproc(text) VALUES (@@local.lc_time_names); + + # enum + SET @@global.sql_mode = ''; + SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; + INSERT INTO tproc(text) VALUES (@@global.sql_mode); + INSERT INTO tproc(text) VALUES (@@local.sql_mode); + SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; + SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; + INSERT INTO tproc(text) VALUES (@@global.sql_mode); + INSERT INTO tproc(text) VALUES (@@local.sql_mode); + + # USER + + # numeric + SET @user_num = 20; + INSERT INTO tproc(num) VALUES (@user_num); + SET @user_num = 30; + INSERT INTO tproc(num) VALUES (@user_num); + + # string + SET @user_text = 'Bergsbrunna'; + INSERT INTO tproc(text) VALUES (@user_text); + SET @user_text = 'Centrum'; + INSERT INTO tproc(text) VALUES (@user_text); + +END| +DELIMITER ;| + +CALL proc(); + + +--echo ==== Insert variables from a stored function ==== + +DELIMITER |; +CREATE FUNCTION func() +RETURNS INT +BEGIN + + # GLOBAL + + # boolean + SET @@global.relay_log_purge = ON; + INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge); + SET @@global.relay_log_purge = OFF; + INSERT INTO tfunc(truth) VALUES (@@global.relay_log_purge); + + # numeric + SET @@global.sync_binlog = 2000000; + INSERT INTO tfunc(num) VALUES (@@global.sync_binlog); + SET @@global.sync_binlog = 3000000; + INSERT INTO tfunc(num) VALUES (@@global.sync_binlog); + + # string + SET @@global.init_slave = 'bison'; + INSERT INTO tfunc(text) VALUES (@@global.init_slave); + SET @@global.init_slave = 'cat'; + INSERT INTO tfunc(text) VALUES (@@global.init_slave); + + # enumeration + SET @@global.slave_exec_mode = 'IDEMPOTENT'; + INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode); + SET @@global.slave_exec_mode = 'STRICT'; + INSERT INTO tfunc(text) VALUES (@@global.slave_exec_mode); + + # SESSION + + # boolean + SET @@sql_big_selects = ON; + INSERT INTO tfunc(truth) VALUES (@@sql_big_selects); + SET @@sql_big_selects = OFF; + INSERT INTO tfunc(truth) VALUES (@@sql_big_selects); + + # numeric + SET @@last_insert_id = 20; + INSERT INTO tfunc(num) VALUES (@@last_insert_id); + SET @@last_insert_id = 30; + INSERT INTO tfunc(num) VALUES (@@last_insert_id); + + # BOTH + + # boolean + SET @@global.low_priority_updates = ON; + SET @@local.low_priority_updates = OFF; + INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates); + INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates); + SET @@global.low_priority_updates = OFF; + SET @@local.low_priority_updates = ON; + INSERT INTO tfunc(truth) VALUES (@@global.low_priority_updates); + INSERT INTO tfunc(truth) VALUES (@@local.low_priority_updates); + + # numeric + SET @@global.default_week_format = 3; + SET @@local.default_week_format = 4; + INSERT INTO tfunc(num) VALUES (@@global.default_week_format); + INSERT INTO tfunc(num) VALUES (@@local.default_week_format); + SET @@global.default_week_format = 5; + SET @@local.default_week_format = 6; + INSERT INTO tfunc(num) VALUES (@@global.default_week_format); + INSERT INTO tfunc(num) VALUES (@@local.default_week_format); + + # text + SET @@global.lc_time_names = 'sv_SE'; + SET @@local.lc_time_names = 'sv_FI'; + INSERT INTO tfunc(text) VALUES (@@global.lc_time_names); + INSERT INTO tfunc(text) VALUES (@@local.lc_time_names); + SET @@global.lc_time_names = 'ar_TN'; + SET @@local.lc_time_names = 'ar_IQ'; + INSERT INTO tfunc(text) VALUES (@@global.lc_time_names); + INSERT INTO tfunc(text) VALUES (@@local.lc_time_names); + + # enum + SET @@global.sql_mode = ''; + SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; + INSERT INTO tfunc(text) VALUES (@@global.sql_mode); + INSERT INTO tfunc(text) VALUES (@@local.sql_mode); + SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; + SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; + INSERT INTO tfunc(text) VALUES (@@global.sql_mode); + INSERT INTO tfunc(text) VALUES (@@local.sql_mode); + + # USER + + # numeric + SET @user_num = 20; + INSERT INTO tfunc(num) VALUES (@user_num); + SET @user_num = 30; + INSERT INTO tfunc(num) VALUES (@user_num); + + # string + SET @user_text = 'Bergsbrunna'; + INSERT INTO tfunc(text) VALUES (@user_text); + SET @user_text = 'Centrum'; + INSERT INTO tfunc(text) VALUES (@user_text); + + RETURN 0; +END| +DELIMITER ;| + +SELECT func(); + + +--echo ==== Insert variables from a trigger ==== + +DELIMITER |; +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN + + # GLOBAL + + # boolean + SET @@global.relay_log_purge = ON; + INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge); + SET @@global.relay_log_purge = OFF; + INSERT INTO ttrig(truth) VALUES (@@global.relay_log_purge); + + # numeric + SET @@global.sync_binlog = 2000000; + INSERT INTO ttrig(num) VALUES (@@global.sync_binlog); + SET @@global.sync_binlog = 3000000; + INSERT INTO ttrig(num) VALUES (@@global.sync_binlog); + + # string + SET @@global.init_slave = 'bison'; + INSERT INTO ttrig(text) VALUES (@@global.init_slave); + SET @@global.init_slave = 'cat'; + INSERT INTO ttrig(text) VALUES (@@global.init_slave); + + # enumeration + SET @@global.slave_exec_mode = 'IDEMPOTENT'; + INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode); + SET @@global.slave_exec_mode = 'STRICT'; + INSERT INTO ttrig(text) VALUES (@@global.slave_exec_mode); + + # SESSION + + # boolean + SET @@sql_big_selects = ON; + INSERT INTO ttrig(truth) VALUES (@@sql_big_selects); + SET @@sql_big_selects = OFF; + INSERT INTO ttrig(truth) VALUES (@@sql_big_selects); + + # numeric + SET @@last_insert_id = 20; + INSERT INTO ttrig(num) VALUES (@@last_insert_id); + SET @@last_insert_id = 30; + INSERT INTO ttrig(num) VALUES (@@last_insert_id); + + # BOTH + + # boolean + SET @@global.low_priority_updates = ON; + SET @@local.low_priority_updates = OFF; + INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates); + INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates); + SET @@global.low_priority_updates = OFF; + SET @@local.low_priority_updates = ON; + INSERT INTO ttrig(truth) VALUES (@@global.low_priority_updates); + INSERT INTO ttrig(truth) VALUES (@@local.low_priority_updates); + + # numeric + SET @@global.default_week_format = 3; + SET @@local.default_week_format = 4; + INSERT INTO ttrig(num) VALUES (@@global.default_week_format); + INSERT INTO ttrig(num) VALUES (@@local.default_week_format); + SET @@global.default_week_format = 5; + SET @@local.default_week_format = 6; + INSERT INTO ttrig(num) VALUES (@@global.default_week_format); + INSERT INTO ttrig(num) VALUES (@@local.default_week_format); + + # text + SET @@global.lc_time_names = 'sv_SE'; + SET @@local.lc_time_names = 'sv_FI'; + INSERT INTO ttrig(text) VALUES (@@global.lc_time_names); + INSERT INTO ttrig(text) VALUES (@@local.lc_time_names); + SET @@global.lc_time_names = 'ar_TN'; + SET @@local.lc_time_names = 'ar_IQ'; + INSERT INTO ttrig(text) VALUES (@@global.lc_time_names); + INSERT INTO ttrig(text) VALUES (@@local.lc_time_names); + + # enum + SET @@global.sql_mode = ''; + SET @@local.sql_mode = 'IGNORE_SPACE,NO_AUTO_CREATE_USER'; + INSERT INTO ttrig(text) VALUES (@@global.sql_mode); + INSERT INTO ttrig(text) VALUES (@@local.sql_mode); + SET @@global.sql_mode = 'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION'; + SET @@local.sql_mode = 'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS'; + INSERT INTO ttrig(text) VALUES (@@global.sql_mode); + INSERT INTO ttrig(text) VALUES (@@local.sql_mode); + + # USER + + # numeric + SET @user_num = 20; + INSERT INTO ttrig(num) VALUES (@user_num); + SET @user_num = 30; + INSERT INTO ttrig(num) VALUES (@user_num); + + # string + SET @user_text = 'Bergsbrunna'; + INSERT INTO ttrig(text) VALUES (@user_text); + SET @user_text = 'Centrum'; + INSERT INTO ttrig(text) VALUES (@user_text); +END| +DELIMITER ;| + +INSERT INTO trigger_table VALUES ('bye.'); + + +--echo ==== Insert variables from a prepared statement ==== + +# GLOBAL + +# boolean +PREPARE p1 FROM 'SET @@global.relay_log_purge = ON'; +PREPARE p2 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)'; +PREPARE p3 FROM 'SET @@global.relay_log_purge = OFF'; +PREPARE p4 FROM 'INSERT INTO tprep(truth) VALUES (@@global.relay_log_purge)'; + +# numeric +PREPARE p5 FROM 'SET @@global.sync_binlog = 2000000'; +PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)'; +PREPARE p7 FROM 'SET @@global.sync_binlog = 3000000'; +PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@global.sync_binlog)'; + +# string +PREPARE p9 FROM 'SET @@global.init_slave = \'bison\''; +PREPARE p10 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)'; +PREPARE p11 FROM 'SET @@global.init_slave = \'cat\''; +PREPARE p12 FROM 'INSERT INTO tprep(text) VALUES (@@global.init_slave)'; + +# enumeration +PREPARE p13 FROM 'SET @@global.slave_exec_mode = \'IDEMPOTENT\''; +PREPARE p14 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)'; +PREPARE p15 FROM 'SET @@global.slave_exec_mode = \'STRICT\''; +PREPARE p16 FROM 'INSERT INTO tprep(text) VALUES (@@global.slave_exec_mode)'; + +# SESSION + +# boolean +PREPARE p17 FROM 'SET @@sql_big_selects = ON'; +PREPARE p18 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)'; +PREPARE p19 FROM 'SET @@sql_big_selects = OFF'; +PREPARE p20 FROM 'INSERT INTO tprep(truth) VALUES (@@sql_big_selects)'; + +# numeric +PREPARE p21 FROM 'SET @@last_insert_id = 20'; +PREPARE p22 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)'; +PREPARE p23 FROM 'SET @@last_insert_id = 30'; +PREPARE p24 FROM 'INSERT INTO tprep(num) VALUES (@@last_insert_id)'; + +# BOTH + +# boolean +PREPARE p25 FROM 'SET @@global.low_priority_updates = ON'; +PREPARE p26 FROM 'SET @@local.low_priority_updates = OFF'; +PREPARE p27 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)'; +PREPARE p28 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)'; +PREPARE p29 FROM 'SET @@global.low_priority_updates = OFF'; +PREPARE p30 FROM 'SET @@local.low_priority_updates = ON'; +PREPARE p31 FROM 'INSERT INTO tprep(truth) VALUES (@@global.low_priority_updates)'; +PREPARE p32 FROM 'INSERT INTO tprep(truth) VALUES (@@local.low_priority_updates)'; + +# numeric +PREPARE p33 FROM 'SET @@global.default_week_format = 3'; +PREPARE p34 FROM 'SET @@local.default_week_format = 4'; +PREPARE p35 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)'; +PREPARE p36 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)'; +PREPARE p37 FROM 'SET @@global.default_week_format = 5'; +PREPARE p38 FROM 'SET @@local.default_week_format = 6'; +PREPARE p39 FROM 'INSERT INTO tprep(num) VALUES (@@global.default_week_format)'; +PREPARE p40 FROM 'INSERT INTO tprep(num) VALUES (@@local.default_week_format)'; + +# text +PREPARE p41 FROM 'SET @@global.lc_time_names = \'sv_SE\''; +PREPARE p42 FROM 'SET @@local.lc_time_names = \'sv_FI\''; +PREPARE p43 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)'; +PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)'; +PREPARE p45 FROM 'SET @@global.lc_time_names = \'ar_TN\''; +PREPARE p46 FROM 'SET @@local.lc_time_names = \'ar_IQ\''; +PREPARE p47 FROM 'INSERT INTO tprep(text) VALUES (@@global.lc_time_names)'; +PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@local.lc_time_names)'; + +# enum +PREPARE p49 FROM 'SET @@global.sql_mode = \'\''; +PREPARE p50 FROM 'SET @@local.sql_mode = \'IGNORE_SPACE,NO_AUTO_CREATE_USER\''; +PREPARE p51 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)'; +PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)'; +PREPARE p53 FROM 'SET @@global.sql_mode = \'NO_AUTO_VALUE_ON_ZERO,NO_BACKSLASH_ESCAPES,NO_DIR_IN_CREATE,NO_ENGINE_SUBSTITUTION\''; +PREPARE p54 FROM 'SET @@local.sql_mode = \'NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS\''; +PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@global.sql_mode)'; +PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@local.sql_mode)'; + +# USER + +# numeric +PREPARE p57 FROM 'SET @user_num = 20'; +PREPARE p58 FROM 'INSERT INTO tprep(num) VALUES (@user_num)'; +PREPARE p59 FROM 'SET @user_num = 30'; +PREPARE p60 FROM 'INSERT INTO tprep(num) VALUES (@user_num)'; + +# string +PREPARE p61 FROM 'SET @user_text = \'Bergsbrunna\''; +PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@user_text)'; +PREPARE p63 FROM 'SET @user_text = \'Centrum\''; +PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@user_text)'; + +EXECUTE p1; EXECUTE p2; EXECUTE p3; EXECUTE p4; EXECUTE p5; EXECUTE p6; +EXECUTE p7; EXECUTE p8; EXECUTE p9; EXECUTE p10; EXECUTE p11; EXECUTE p12; +EXECUTE p13; EXECUTE p14; EXECUTE p15; EXECUTE p16; EXECUTE p17; EXECUTE p18; +EXECUTE p19; EXECUTE p20; EXECUTE p21; EXECUTE p22; EXECUTE p23; EXECUTE p24; +EXECUTE p25; EXECUTE p26; EXECUTE p27; EXECUTE p28; EXECUTE p29; EXECUTE p30; +EXECUTE p31; EXECUTE p32; EXECUTE p33; EXECUTE p34; EXECUTE p35; EXECUTE p36; +EXECUTE p37; EXECUTE p38; EXECUTE p39; EXECUTE p40; EXECUTE p41; EXECUTE p42; +EXECUTE p43; EXECUTE p44; EXECUTE p45; EXECUTE p46; EXECUTE p47; EXECUTE p48; +EXECUTE p49; EXECUTE p50; EXECUTE p51; EXECUTE p52; EXECUTE p53; EXECUTE p54; +EXECUTE p55; EXECUTE p56; EXECUTE p57; EXECUTE p58; EXECUTE p59; EXECUTE p60; +EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; + + +--echo ==== Results ==== + +# 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; + +# ... 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; +source include/diff_tables.inc; + + +--echo ==== Clean up ==== + +--echo [on master] +connection master; +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table; + +SET @@global.default_week_format= @m_default_week_format; +SET @@global.init_slave= @m_init_slave; +SET @@global.lc_time_names= @m_lc_time_names; +SET @@global.low_priority_updates= @m_low_priority_updates; +SET @@global.relay_log_purge= @m_relay_log_purge; +SET @@global.slave_exec_mode= @m_slave_exec_mode; +SET @@global.sql_mode= @m_sql_mode; +SET @@global.sync_binlog= @m_sync_binlog; + +--echo [on slave] +connection slave; +SET @@global.default_week_format= @s_default_week_format; +SET @@global.init_slave= @s_init_slave; +SET @@global.lc_time_names= @s_lc_time_names; +SET @@global.low_priority_updates= @s_low_priority_updates; +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; + +connection master; +sync_slave_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_variables_stm.test b/mysql-test/suite/rpl/t/rpl_variables_stm.test new file mode 100644 index 00000000000..6548b9e90e3 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_variables_stm.test @@ -0,0 +1,636 @@ +# ==== Purpose ==== +# +# In general, queries referencing @@system_variables are not +# considered safe to write to the binlog in statement-based logging +# mode. However, a few special cases are supported. +# +# This test verifies that queries referencing these specially +# supported variables are replicated correctly in statement mode. +# +# +# ==== Method ==== +# +# The test simply does a lot of "INSERT INTO t1 VALUES (@@variable)" +# and checks the result on the slave. +# +# Statements referencing a variable only replicate correctly in mixed +# and row mode: in row mode, the values inserted are replicated. In +# mixed mode, statements referencing a variable are marked as unsafe, +# meaning they will be replicated by row. In statement mode, the +# slave's value will be used and replication will break. (Except in a +# small number of special cases: random seeds, insert_id, and +# auto_increment are replicated). +# +# We test all replicated variables, from each of the following +# contexts: +# - directly +# - from a stored procedure +# - from a stored function +# - from a trigger +# - from a prepared statement +# +# For all variables where it is possible, we set the variable to one +# value on slave, and insert it on the master with two distinct +# values. +# +# The same insertions are made in four different tables using direct +# insert, stored procedure, stored function, or trigger. Then all +# eight resulting tables on master and slave are compared. +# +# +# ==== Related bugs ==== +# +# BUG#31168: @@hostname does not replicate +# +# +# ==== Related test cases ==== +# +# binlog.binlog_unsafe tests that a warning is issued if system +# variables are replicated in statement mode. +# +# rpl.rpl_variables verifies that variables which cannot be replicated +# safely in statement mode are replicated correctly in mixed or row +# mode. + +source include/master-slave.inc; +source include/have_binlog_format_mixed_or_statement.inc; + + +--echo ==== Initialization ==== + +# Backup the values of global variables so that they can be restored +# later. + +--echo [on master] +connection master; +SET @m_pseudo_thread_id= @@global.pseudo_thread_id; +SET @m_auto_increment_increment= @@global.auto_increment_increment; +SET @m_auto_increment_offset= @@global.auto_increment_offset; +SET @m_character_set_client= @@global.character_set_client; +SET @m_collation_connection= @@global.collation_connection; +SET @m_collation_server= @@global.collation_server; +SET @m_time_zone= @@global.time_zone; +SET @m_lc_time_names= @@global.lc_time_names; +SET @m_collation_database= @@global.collation_database; + +--echo [on slave] +connection slave; +SET @s_pseudo_thread_id= @@global.pseudo_thread_id; +SET @s_auto_increment_increment= @@global.auto_increment_increment; +SET @s_auto_increment_offset= @@global.auto_increment_offset; +SET @s_character_set_client= @@global.character_set_client; +SET @s_collation_connection= @@global.collation_connection; +SET @s_collation_server= @@global.collation_server; +SET @s_time_zone= @@global.time_zone; +SET @s_lc_time_names= @@global.lc_time_names; +SET @s_collation_database= @@global.collation_database; + +SET @@global.pseudo_thread_id= 4711; +SET @@global.auto_increment_increment=19; +SET @@global.auto_increment_offset=4; +SET @@global.character_set_client='eucjpms'; +SET @@global.collation_connection='eucjpms_bin'; +SET @@global.collation_server='geostd8_general_ci'; +SET @@global.time_zone='Japan'; +SET @@global.lc_time_names='sv_SE'; +SET @@global.collation_database='geostd8_bin'; + +--echo [on master] +connection master; + +# Tables where everything happens. +CREATE TABLE tstmt (id INT AUTO_INCREMENT PRIMARY KEY, + num INT, + text VARCHAR(100)); +CREATE TABLE tproc LIKE tstmt; +CREATE TABLE tfunc LIKE tstmt; +CREATE TABLE ttrig LIKE tstmt; +CREATE TABLE tprep LIKE tstmt; + +# Table on which we put a trigger. +CREATE TABLE trigger_table (text CHAR(4)); + + +--echo ==== Insert variables directly ==== + +SET @@pseudo_thread_id= 4712; +INSERT INTO tstmt(num) VALUES (@@session.pseudo_thread_id); +SET @@pseudo_thread_id= 4713; +INSERT INTO tstmt(num) VALUES (@@session.pseudo_thread_id); + +SET @@foreign_key_checks= 0; +INSERT INTO tstmt(num) VALUES (@@session.foreign_key_checks); +SET @@foreign_key_checks= 1; +INSERT INTO tstmt(num) VALUES (@@session.foreign_key_checks); + +SET @@sql_auto_is_null= 0; +INSERT INTO tstmt(num) VALUES (@@session.sql_auto_is_null); +SET @@sql_auto_is_null= 1; +INSERT INTO tstmt(num) VALUES (@@session.sql_auto_is_null); + +SET @@unique_checks= 0; +INSERT INTO tstmt(num) VALUES (@@session.unique_checks); +SET @@unique_checks= 1; +INSERT INTO tstmt(num) VALUES (@@session.unique_checks); + +SET @@auto_increment_increment= 11; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_increment); +SET @@auto_increment_increment= 19; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_increment); + +SET @@auto_increment_offset= 13; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_offset); +SET @@auto_increment_offset= 17; +INSERT INTO tstmt(num) VALUES (@@session.auto_increment_offset); + +# reset these as they affect the index column +SET @@auto_increment_increment= 1; +SET @@auto_increment_offset= 1; + +SET @@character_set_client= 'cp1257'; +INSERT INTO tstmt(text) VALUES (@@session.character_set_client); +SET @@character_set_client= 'cp1256'; +INSERT INTO tstmt(text) VALUES (@@session.character_set_client); + +SET @@collation_connection= 'cp1251_ukrainian_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_connection); +INSERT INTO tstmt(text) VALUES (@@session.character_set_connection); +SET @@collation_connection= 'cp1251_bulgarian_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_connection); +INSERT INTO tstmt(text) VALUES (@@session.character_set_connection); + +SET @@collation_server= 'latin7_bin'; +INSERT INTO tstmt(text) VALUES (@@session.collation_server); +INSERT INTO tstmt(text) VALUES (@@session.character_set_server); +SET @@collation_server= 'latin7_general_cs'; +INSERT INTO tstmt(text) VALUES (@@session.collation_server); +INSERT INTO tstmt(text) VALUES (@@session.character_set_server); + +SET @@time_zone= 'Europe/Moscow'; +INSERT INTO tstmt(text) VALUES (@@session.time_zone); +SET @@time_zone= 'Universal'; +INSERT INTO tstmt(text) VALUES (@@session.time_zone); + +SET @@lc_time_names= 'sv_FI'; +INSERT INTO tstmt(text) VALUES (@@session.lc_time_names); +SET @@lc_time_names= 'no_NO'; +INSERT INTO tstmt(text) VALUES (@@session.lc_time_names); + +SET @@collation_database= 'latin7_general_ci'; +INSERT INTO tstmt(text) VALUES (@@session.collation_database); +INSERT INTO tstmt(text) VALUES (@@session.character_set_database); +SET @@collation_database= 'latin7_estonian_cs'; +INSERT INTO tstmt(text) VALUES (@@session.collation_database); +INSERT INTO tstmt(text) VALUES (@@session.character_set_database); + +SET @@timestamp= 47114711; +INSERT INTO tstmt(text) VALUES (@@session.timestamp); +SET @@timestamp= 47124712; +INSERT INTO tstmt(text) VALUES (@@session.timestamp); + +SET @@last_insert_id= 1616; +INSERT INTO tstmt(text) VALUES (@@session.last_insert_id); +SET @@last_insert_id= 1717; +INSERT INTO tstmt(text) VALUES (@@session.last_insert_id); + + +--echo ==== Insert variables from a stored procedure ==== + +DELIMITER |; +CREATE PROCEDURE proc() +BEGIN + + SET @@pseudo_thread_id= 4712; + INSERT INTO tproc(num) VALUES (@@session.pseudo_thread_id); + SET @@pseudo_thread_id= 4713; + INSERT INTO tproc(num) VALUES (@@session.pseudo_thread_id); + + SET @@foreign_key_checks= 0; + INSERT INTO tproc(num) VALUES (@@session.foreign_key_checks); + SET @@foreign_key_checks= 1; + INSERT INTO tproc(num) VALUES (@@session.foreign_key_checks); + + SET @@sql_auto_is_null= 0; + INSERT INTO tproc(num) VALUES (@@session.sql_auto_is_null); + SET @@sql_auto_is_null= 1; + INSERT INTO tproc(num) VALUES (@@session.sql_auto_is_null); + + SET @@unique_checks= 0; + INSERT INTO tproc(num) VALUES (@@session.unique_checks); + SET @@unique_checks= 1; + INSERT INTO tproc(num) VALUES (@@session.unique_checks); + + SET @@auto_increment_increment= 11; + INSERT INTO tproc(num) VALUES (@@session.auto_increment_increment); + SET @@auto_increment_increment= 19; + INSERT INTO tproc(num) VALUES (@@session.auto_increment_increment); + + SET @@auto_increment_offset= 13; + INSERT INTO tproc(num) VALUES (@@session.auto_increment_offset); + SET @@auto_increment_offset= 17; + INSERT INTO tproc(num) VALUES (@@session.auto_increment_offset); + + # reset these as they affect the index column + SET @@auto_increment_increment= 1; + SET @@auto_increment_offset= 1; + + SET @@character_set_client= 'cp1257'; + INSERT INTO tproc(text) VALUES (@@session.character_set_client); + SET @@character_set_client= 'cp1256'; + INSERT INTO tproc(text) VALUES (@@session.character_set_client); + + SET @@collation_connection= 'cp1251_ukrainian_ci'; + INSERT INTO tproc(text) VALUES (@@session.collation_connection); + INSERT INTO tproc(text) VALUES (@@session.character_set_connection); + SET @@collation_connection= 'cp1251_bulgarian_ci'; + INSERT INTO tproc(text) VALUES (@@session.collation_connection); + INSERT INTO tproc(text) VALUES (@@session.character_set_connection); + + SET @@collation_server= 'latin7_bin'; + INSERT INTO tproc(text) VALUES (@@session.collation_server); + INSERT INTO tproc(text) VALUES (@@session.character_set_server); + SET @@collation_server= 'latin7_general_cs'; + INSERT INTO tproc(text) VALUES (@@session.collation_server); + INSERT INTO tproc(text) VALUES (@@session.character_set_server); + + SET @@time_zone= 'Europe/Moscow'; + INSERT INTO tproc(text) VALUES (@@session.time_zone); + SET @@time_zone= 'Universal'; + INSERT INTO tproc(text) VALUES (@@session.time_zone); + + SET @@lc_time_names= 'sv_FI'; + INSERT INTO tproc(text) VALUES (@@session.lc_time_names); + SET @@lc_time_names= 'no_NO'; + INSERT INTO tproc(text) VALUES (@@session.lc_time_names); + + SET @@collation_database= 'latin7_general_ci'; + INSERT INTO tproc(text) VALUES (@@session.collation_database); + INSERT INTO tproc(text) VALUES (@@session.character_set_database); + SET @@collation_database= 'latin7_estonian_cs'; + INSERT INTO tproc(text) VALUES (@@session.collation_database); + INSERT INTO tproc(text) VALUES (@@session.character_set_database); + + SET @@timestamp= 47114711; + INSERT INTO tproc(text) VALUES (@@session.timestamp); + SET @@timestamp= 47124712; + INSERT INTO tproc(text) VALUES (@@session.timestamp); + + SET @@last_insert_id= 1616; + INSERT INTO tproc(text) VALUES (@@session.last_insert_id); + SET @@last_insert_id= 1717; + INSERT INTO tproc(text) VALUES (@@session.last_insert_id); + +END| +DELIMITER ;| + +CALL proc(); + + +--echo ==== Insert variables from a stored function ==== + +DELIMITER |; +CREATE FUNCTION func() +RETURNS INT +BEGIN + + SET @@pseudo_thread_id= 4712; + INSERT INTO tfunc(num) VALUES (@@session.pseudo_thread_id); + SET @@pseudo_thread_id= 4713; + INSERT INTO tfunc(num) VALUES (@@session.pseudo_thread_id); + + SET @@foreign_key_checks= 0; + INSERT INTO tfunc(num) VALUES (@@session.foreign_key_checks); + SET @@foreign_key_checks= 1; + INSERT INTO tfunc(num) VALUES (@@session.foreign_key_checks); + + SET @@sql_auto_is_null= 0; + INSERT INTO tfunc(num) VALUES (@@session.sql_auto_is_null); + SET @@sql_auto_is_null= 1; + INSERT INTO tfunc(num) VALUES (@@session.sql_auto_is_null); + + SET @@unique_checks= 0; + INSERT INTO tfunc(num) VALUES (@@session.unique_checks); + SET @@unique_checks= 1; + INSERT INTO tfunc(num) VALUES (@@session.unique_checks); + + SET @@auto_increment_increment= 11; + INSERT INTO tfunc(num) VALUES (@@session.auto_increment_increment); + SET @@auto_increment_increment= 19; + INSERT INTO tfunc(num) VALUES (@@session.auto_increment_increment); + + SET @@auto_increment_offset= 13; + INSERT INTO tfunc(num) VALUES (@@session.auto_increment_offset); + SET @@auto_increment_offset= 17; + INSERT INTO tfunc(num) VALUES (@@session.auto_increment_offset); + + # reset these as they affect the index column + SET @@auto_increment_increment= 1; + SET @@auto_increment_offset= 1; + + SET @@character_set_client= 'cp1257'; + INSERT INTO tfunc(text) VALUES (@@session.character_set_client); + SET @@character_set_client= 'cp1256'; + INSERT INTO tfunc(text) VALUES (@@session.character_set_client); + + SET @@collation_connection= 'cp1251_ukrainian_ci'; + INSERT INTO tfunc(text) VALUES (@@session.collation_connection); + INSERT INTO tfunc(text) VALUES (@@session.character_set_connection); + SET @@collation_connection= 'cp1251_bulgarian_ci'; + INSERT INTO tfunc(text) VALUES (@@session.collation_connection); + INSERT INTO tfunc(text) VALUES (@@session.character_set_connection); + + SET @@collation_server= 'latin7_bin'; + INSERT INTO tfunc(text) VALUES (@@session.collation_server); + INSERT INTO tfunc(text) VALUES (@@session.character_set_server); + SET @@collation_server= 'latin7_general_cs'; + INSERT INTO tfunc(text) VALUES (@@session.collation_server); + INSERT INTO tfunc(text) VALUES (@@session.character_set_server); + + SET @@time_zone= 'Europe/Moscow'; + INSERT INTO tfunc(text) VALUES (@@session.time_zone); + SET @@time_zone= 'Universal'; + INSERT INTO tfunc(text) VALUES (@@session.time_zone); + + SET @@lc_time_names= 'sv_FI'; + INSERT INTO tfunc(text) VALUES (@@session.lc_time_names); + SET @@lc_time_names= 'no_NO'; + INSERT INTO tfunc(text) VALUES (@@session.lc_time_names); + + SET @@collation_database= 'latin7_general_ci'; + INSERT INTO tfunc(text) VALUES (@@session.collation_database); + INSERT INTO tfunc(text) VALUES (@@session.character_set_database); + SET @@collation_database= 'latin7_estonian_cs'; + INSERT INTO tfunc(text) VALUES (@@session.collation_database); + INSERT INTO tfunc(text) VALUES (@@session.character_set_database); + + SET @@timestamp= 47114711; + INSERT INTO tfunc(text) VALUES (@@session.timestamp); + SET @@timestamp= 47124712; + INSERT INTO tfunc(text) VALUES (@@session.timestamp); + + SET @@last_insert_id= 1616; + INSERT INTO tfunc(text) VALUES (@@session.last_insert_id); + SET @@last_insert_id= 1717; + INSERT INTO tfunc(text) VALUES (@@session.last_insert_id); + + RETURN 0; +END| +DELIMITER ;| + +SELECT func(); + + +--echo ==== Insert variables from a trigger ==== + +DELIMITER |; +CREATE TRIGGER trig +BEFORE INSERT ON trigger_table +FOR EACH ROW +BEGIN + + SET @@pseudo_thread_id= 4712; + INSERT INTO ttrig(num) VALUES (@@session.pseudo_thread_id); + SET @@pseudo_thread_id= 4713; + INSERT INTO ttrig(num) VALUES (@@session.pseudo_thread_id); + + SET @@foreign_key_checks= 0; + INSERT INTO ttrig(num) VALUES (@@session.foreign_key_checks); + SET @@foreign_key_checks= 1; + INSERT INTO ttrig(num) VALUES (@@session.foreign_key_checks); + + SET @@sql_auto_is_null= 0; + INSERT INTO ttrig(num) VALUES (@@session.sql_auto_is_null); + SET @@sql_auto_is_null= 1; + INSERT INTO ttrig(num) VALUES (@@session.sql_auto_is_null); + + SET @@unique_checks= 0; + INSERT INTO ttrig(num) VALUES (@@session.unique_checks); + SET @@unique_checks= 1; + INSERT INTO ttrig(num) VALUES (@@session.unique_checks); + + SET @@auto_increment_increment= 11; + INSERT INTO ttrig(num) VALUES (@@session.auto_increment_increment); + SET @@auto_increment_increment= 19; + INSERT INTO ttrig(num) VALUES (@@session.auto_increment_increment); + + SET @@auto_increment_offset= 13; + INSERT INTO ttrig(num) VALUES (@@session.auto_increment_offset); + SET @@auto_increment_offset= 17; + INSERT INTO ttrig(num) VALUES (@@session.auto_increment_offset); + + # reset these as they affect the index column + SET @@auto_increment_increment= 1; + SET @@auto_increment_offset= 1; + + SET @@character_set_client= 'cp1257'; + INSERT INTO ttrig(text) VALUES (@@session.character_set_client); + SET @@character_set_client= 'cp1256'; + INSERT INTO ttrig(text) VALUES (@@session.character_set_client); + + SET @@collation_connection= 'cp1251_ukrainian_ci'; + INSERT INTO ttrig(text) VALUES (@@session.collation_connection); + INSERT INTO ttrig(text) VALUES (@@session.character_set_connection); + SET @@collation_connection= 'cp1251_bulgarian_ci'; + INSERT INTO ttrig(text) VALUES (@@session.collation_connection); + INSERT INTO ttrig(text) VALUES (@@session.character_set_connection); + + SET @@collation_server= 'latin7_bin'; + INSERT INTO ttrig(text) VALUES (@@session.collation_server); + INSERT INTO ttrig(text) VALUES (@@session.character_set_server); + SET @@collation_server= 'latin7_general_cs'; + INSERT INTO ttrig(text) VALUES (@@session.collation_server); + INSERT INTO ttrig(text) VALUES (@@session.character_set_server); + + SET @@time_zone= 'Europe/Moscow'; + INSERT INTO ttrig(text) VALUES (@@session.time_zone); + SET @@time_zone= 'Universal'; + INSERT INTO ttrig(text) VALUES (@@session.time_zone); + + SET @@lc_time_names= 'sv_FI'; + INSERT INTO ttrig(text) VALUES (@@session.lc_time_names); + SET @@lc_time_names= 'no_NO'; + INSERT INTO ttrig(text) VALUES (@@session.lc_time_names); + + SET @@collation_database= 'latin7_general_ci'; + INSERT INTO ttrig(text) VALUES (@@session.collation_database); + INSERT INTO ttrig(text) VALUES (@@session.character_set_database); + SET @@collation_database= 'latin7_estonian_cs'; + INSERT INTO ttrig(text) VALUES (@@session.collation_database); + INSERT INTO ttrig(text) VALUES (@@session.character_set_database); + + SET @@timestamp= 47114711; + INSERT INTO ttrig(text) VALUES (@@session.timestamp); + SET @@timestamp= 47124712; + INSERT INTO ttrig(text) VALUES (@@session.timestamp); + + SET @@last_insert_id= 1616; + INSERT INTO ttrig(text) VALUES (@@session.last_insert_id); + SET @@last_insert_id= 1717; + INSERT INTO ttrig(text) VALUES (@@session.last_insert_id); + +END| +DELIMITER ;| + +INSERT INTO trigger_table VALUES ('bye.'); + + +--echo ==== Insert variables from a prepared statement ==== + +# GLOBAL + +PREPARE p1 FROM 'SET @@pseudo_thread_id= 4712'; +PREPARE p2 FROM 'INSERT INTO tprep(num) VALUES (@@session.pseudo_thread_id)'; +PREPARE p3 FROM 'SET @@pseudo_thread_id= 4713'; +PREPARE p4 FROM 'INSERT INTO tprep(num) VALUES (@@session.pseudo_thread_id)'; + +PREPARE p5 FROM 'SET @@foreign_key_checks= 0'; +PREPARE p6 FROM 'INSERT INTO tprep(num) VALUES (@@session.foreign_key_checks)'; +PREPARE p7 FROM 'SET @@foreign_key_checks= 1'; +PREPARE p8 FROM 'INSERT INTO tprep(num) VALUES (@@session.foreign_key_checks)'; + +PREPARE p9 FROM 'SET @@sql_auto_is_null= 0'; +PREPARE p10 FROM 'INSERT INTO tprep(num) VALUES (@@session.sql_auto_is_null)'; +PREPARE p11 FROM 'SET @@sql_auto_is_null= 1'; +PREPARE p12 FROM 'INSERT INTO tprep(num) VALUES (@@session.sql_auto_is_null)'; + +PREPARE p13 FROM 'SET @@unique_checks= 0'; +PREPARE p14 FROM 'INSERT INTO tprep(num) VALUES (@@session.unique_checks)'; +PREPARE p15 FROM 'SET @@unique_checks= 1'; +PREPARE p16 FROM 'INSERT INTO tprep(num) VALUES (@@session.unique_checks)'; + +PREPARE p17 FROM 'SET @@auto_increment_increment= 11'; +PREPARE p18 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_increment)'; +PREPARE p19 FROM 'SET @@auto_increment_increment= 19'; +PREPARE p20 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_increment)'; + +PREPARE p21 FROM 'SET @@auto_increment_offset= 13'; +PREPARE p22 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_offset)'; +PREPARE p23 FROM 'SET @@auto_increment_offset= 17'; +PREPARE p24 FROM 'INSERT INTO tprep(num) VALUES (@@session.auto_increment_offset)'; + +# reset these as they affect the index column +PREPARE p25 FROM 'SET @@auto_increment_increment= 1'; +PREPARE p26 FROM 'SET @@auto_increment_offset= 1'; + +PREPARE p27 FROM 'SET @@character_set_client= \'cp1257\''; +PREPARE p28 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)'; +PREPARE p29 FROM 'SET @@character_set_client= \'cp1256\''; +PREPARE p30 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_client)'; + +PREPARE p31 FROM 'SET @@collation_connection= \'cp1251_ukrainian_ci\''; +PREPARE p32 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)'; +PREPARE p33 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)'; +PREPARE p34 FROM 'SET @@collation_connection= \'cp1251_bulgarian_ci\''; +PREPARE p35 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_connection)'; +PREPARE p36 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_connection)'; + +PREPARE p37 FROM 'SET @@collation_server= \'latin7_bin\''; +PREPARE p38 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)'; +PREPARE p39 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)'; +PREPARE p40 FROM 'SET @@collation_server= \'latin7_general_cs\''; +PREPARE p41 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_server)'; +PREPARE p42 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_server)'; + +PREPARE p43 FROM 'SET @@time_zone= \'Europe/Moscow\''; +PREPARE p44 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)'; +PREPARE p45 FROM 'SET @@time_zone= \'Universal\''; +PREPARE p46 FROM 'INSERT INTO tprep(text) VALUES (@@session.time_zone)'; + +PREPARE p47 FROM 'SET @@lc_time_names= \'sv_FI\''; +PREPARE p48 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)'; +PREPARE p49 FROM 'SET @@lc_time_names= \'no_NO\''; +PREPARE p50 FROM 'INSERT INTO tprep(text) VALUES (@@session.lc_time_names)'; + +PREPARE p51 FROM 'SET @@collation_database= \'latin7_general_ci\''; +PREPARE p52 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)'; +PREPARE p53 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)'; +PREPARE p54 FROM 'SET @@collation_database= \'latin7_estonian_cs\''; +PREPARE p55 FROM 'INSERT INTO tprep(text) VALUES (@@session.collation_database)'; +PREPARE p56 FROM 'INSERT INTO tprep(text) VALUES (@@session.character_set_database)'; + +PREPARE p57 FROM 'SET @@timestamp= 47114711'; +PREPARE p58 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)'; +PREPARE p59 FROM 'SET @@timestamp= 47124712'; +PREPARE p60 FROM 'INSERT INTO tprep(text) VALUES (@@session.timestamp)'; + +PREPARE p61 FROM 'SET @@last_insert_id= 1616'; +PREPARE p62 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)'; +PREPARE p63 FROM 'SET @@last_insert_id= 1717'; +PREPARE p64 FROM 'INSERT INTO tprep(text) VALUES (@@session.last_insert_id)'; + +EXECUTE p1; EXECUTE p2; EXECUTE p3; EXECUTE p4; EXECUTE p5; EXECUTE p6; +EXECUTE p7; EXECUTE p8; EXECUTE p9; EXECUTE p10; EXECUTE p11; EXECUTE p12; +EXECUTE p13; EXECUTE p14; EXECUTE p15; EXECUTE p16; EXECUTE p17; EXECUTE p18; +EXECUTE p19; EXECUTE p20; EXECUTE p21; EXECUTE p22; EXECUTE p23; EXECUTE p24; +EXECUTE p25; EXECUTE p26; EXECUTE p27; EXECUTE p28; EXECUTE p29; EXECUTE p30; +EXECUTE p31; EXECUTE p32; EXECUTE p33; EXECUTE p34; EXECUTE p35; EXECUTE p36; +EXECUTE p37; EXECUTE p38; EXECUTE p39; EXECUTE p40; EXECUTE p41; EXECUTE p42; +EXECUTE p43; EXECUTE p44; EXECUTE p45; EXECUTE p46; EXECUTE p47; EXECUTE p48; +EXECUTE p49; EXECUTE p50; EXECUTE p51; EXECUTE p52; EXECUTE p53; EXECUTE p54; +EXECUTE p55; EXECUTE p56; EXECUTE p57; EXECUTE p58; EXECUTE p59; EXECUTE p60; +EXECUTE p61; EXECUTE p62; EXECUTE p63; EXECUTE p64; + + +--echo ==== Results ==== + +# 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; + +# ... 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; +source include/diff_tables.inc; + + +--echo ==== Clean up ==== + +--echo [on master] +connection master; +DROP PROCEDURE proc; +DROP FUNCTION func; +DROP TRIGGER trig; +DROP TABLE tstmt, tproc, tfunc, ttrig, tprep, trigger_table; + +SET @@global.pseudo_thread_id= @m_pseudo_thread_id; +SET @@global.auto_increment_increment= @m_auto_increment_increment; +SET @@global.auto_increment_offset= @m_auto_increment_offset; +SET @@global.character_set_client= @m_character_set_client; +SET @@global.collation_connection= @m_collation_connection; +SET @@global.collation_server= @m_collation_server; +SET @@global.time_zone= @m_time_zone; +SET @@global.lc_time_names= @m_lc_time_names; +SET @@global.collation_database= @m_collation_database; + +--echo [on slave] +connection slave; +SET @@global.pseudo_thread_id= @s_pseudo_thread_id; +SET @@global.auto_increment_increment= @s_auto_increment_increment; +SET @@global.auto_increment_offset= @s_auto_increment_offset; +SET @@global.character_set_client= @s_character_set_client; +SET @@global.collation_connection= @s_collation_connection; +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; + +connection master; +sync_slave_with_master; diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index 2ac16f4c590..59017b09c54 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -41,8 +41,7 @@ select "--- Local --" as ""; # be time dependent (the Start events). Better than nothing. # ---replace_regex /[[:<:]][0-9]{6} [0-9 ][0-9]:[0-9]{2}:[0-9]{2}[[:>:]]/{yymmdd} {HH:MM:SS}/ /=[0-9]+ /={integer} / /# at [0-9]+/# at {pos}/ /(pos:?) [0-9]+/\1 {pos}/ /binlog v [0-9]+, server v [^ ]* created/binlog v #, server v ## created/ ---exec $MYSQL_BINLOG --base64-output=never $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --base64-output=never $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- offset --" as ""; diff --git a/sql/item_func.cc b/sql/item_func.cc index 984fa9038b7..12bb0999ffc 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4789,6 +4789,12 @@ Item_func_get_system_var::fix_fields(THD *thd, Item **ref) } +bool Item_func_get_system_var::is_written_to_binlog() +{ + return var->is_written_to_binlog(var_type); +} + + longlong Item_func_inet_aton::val_int() { DBUG_ASSERT(fixed == 1); diff --git a/sql/item_func.h b/sql/item_func.h index f8eb7ff6200..9ab30a2cf93 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1435,6 +1435,15 @@ public: void fix_length_and_dec() { DBUG_ASSERT(0); } /* TODO: fix to support views */ const char *func_name() const { return "get_system_var"; } + /** + Indicates whether this system variable is written to the binlog or not. + + Variables are written to the binlog as part of "status_vars" in + Query_log_event, as an Intvar_log_event, or a Rand_log_event. + + @return true if the variable is written to the binlog, false otherwise. + */ + bool is_written_to_binlog(); }; diff --git a/sql/log_event.cc b/sql/log_event.cc index af802f52611..15f1a957149 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -14,7 +14,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef MYSQL_CLIENT +#ifdef MYSQL_CLIENT + +#include "mysql_priv.h" + +#else #ifdef USE_PRAGMA_IMPLEMENTATION #pragma implementation // gcc: Class implementation @@ -28,7 +32,9 @@ #include "rpl_utility.h" #include "rpl_record.h" #include + #endif /* MYSQL_CLIENT */ + #include #include @@ -1589,7 +1595,7 @@ bool Query_log_event::write(IO_CACHE* file) recognize Q_CATALOG_CODE and have no problem. */ } - if (auto_increment_increment != 1) + if (auto_increment_increment != 1 || auto_increment_offset != 1) { *start++= Q_AUTO_INCREMENT; int2store(start, auto_increment_increment); @@ -2102,9 +2108,17 @@ void Query_log_event::print_query_header(IO_CACHE* file, end= strmov(end, print_event_info->delimiter); *end++='\n'; my_b_write(file, (uchar*) buff, (uint) (end-buff)); - if (flags & LOG_EVENT_THREAD_SPECIFIC_F) + if ((!print_event_info->thread_id_printed || + ((flags & LOG_EVENT_THREAD_SPECIFIC_F) && + thread_id != print_event_info->thread_id))) + { + // If --short-form, print deterministic value instead of pseudo_thread_id. my_b_printf(file,"SET @@session.pseudo_thread_id=%lu%s\n", - (ulong)thread_id, print_event_info->delimiter); + short_form ? 999999999 : (ulong)thread_id, + print_event_info->delimiter); + print_event_info->thread_id= thread_id; + print_event_info->thread_id_printed= 1; + } /* If flags2_inited==0, this is an event from 3.23 or 4.0; nothing to @@ -2151,20 +2165,14 @@ void Query_log_event::print_query_header(IO_CACHE* file, gracefully). So this code should always be good. */ - if (likely(sql_mode_inited)) + if (likely(sql_mode_inited) && + (unlikely(print_event_info->sql_mode != sql_mode || + !print_event_info->sql_mode_inited))) { - if (unlikely(!print_event_info->sql_mode_inited)) /* first Query event */ - { - print_event_info->sql_mode_inited= 1; - /* force a difference to force write */ - print_event_info->sql_mode= ~sql_mode; - } - if (unlikely(print_event_info->sql_mode != sql_mode)) - { - my_b_printf(file,"SET @@session.sql_mode=%lu%s\n", - (ulong)sql_mode, print_event_info->delimiter); - print_event_info->sql_mode= sql_mode; - } + my_b_printf(file,"SET @@session.sql_mode=%lu%s\n", + (ulong)sql_mode, print_event_info->delimiter); + print_event_info->sql_mode= sql_mode; + print_event_info->sql_mode_inited= 1; } if (print_event_info->auto_increment_increment != auto_increment_increment || print_event_info->auto_increment_offset != auto_increment_offset) @@ -2178,33 +2186,28 @@ void Query_log_event::print_query_header(IO_CACHE* file, /* TODO: print the catalog when we feature SET CATALOG */ - if (likely(charset_inited)) + if (likely(charset_inited) && + (unlikely(!print_event_info->charset_inited || + bcmp((uchar*) print_event_info->charset, (uchar*) charset, 6)))) { - if (unlikely(!print_event_info->charset_inited)) /* first Query event */ + CHARSET_INFO *cs_info= get_charset(uint2korr(charset), MYF(MY_WME)); + if (cs_info) { - print_event_info->charset_inited= 1; - print_event_info->charset[0]= ~charset[0]; // force a difference to force write - } - if (unlikely(bcmp((uchar*) print_event_info->charset, (uchar*) charset, 6))) - { - CHARSET_INFO *cs_info= get_charset(uint2korr(charset), MYF(MY_WME)); - if (cs_info) - { - /* for mysql client */ - my_b_printf(file, "/*!\\C %s */%s\n", - cs_info->csname, print_event_info->delimiter); - } - my_b_printf(file,"SET " - "@@session.character_set_client=%d," - "@@session.collation_connection=%d," - "@@session.collation_server=%d" - "%s\n", - uint2korr(charset), - uint2korr(charset+2), - uint2korr(charset+4), - print_event_info->delimiter); - memcpy(print_event_info->charset, charset, 6); + /* for mysql client */ + my_b_printf(file, "/*!\\C %s */%s\n", + cs_info->csname, print_event_info->delimiter); } + my_b_printf(file,"SET " + "@@session.character_set_client=%d," + "@@session.collation_connection=%d," + "@@session.collation_server=%d" + "%s\n", + uint2korr(charset), + uint2korr(charset+2), + uint2korr(charset+4), + print_event_info->delimiter); + memcpy(print_event_info->charset, charset, 6); + print_event_info->charset_inited= 1; } if (time_zone_len) { @@ -8631,3 +8634,34 @@ Incident_log_event::write_data_body(IO_CACHE *file) DBUG_ENTER("Incident_log_event::write_data_body"); DBUG_RETURN(write_str(file, m_message.str, m_message.length)); } + + +#ifdef MYSQL_CLIENT +/** + The default values for these variables should be values that are + *incorrect*, i.e., values that cannot occur in an event. This way, + they will always be printed for the first event. +*/ +st_print_event_info::st_print_event_info() + :flags2_inited(0), sql_mode_inited(0), + auto_increment_increment(0),auto_increment_offset(0), charset_inited(0), + lc_time_names_number(~0), + charset_database_number(ILLEGAL_CHARSET_INFO_NUMBER), + thread_id(0), thread_id_printed(false), + base64_output_mode(BASE64_OUTPUT_UNSPEC), printed_fd_event(FALSE) +{ + /* + Currently we only use static PRINT_EVENT_INFO objects, so zeroed at + program's startup, but these explicit bzero() is for the day someone + creates dynamic instances. + */ + bzero(db, sizeof(db)); + bzero(charset, sizeof(charset)); + bzero(time_zone_str, sizeof(time_zone_str)); + delimiter[0]= ';'; + delimiter[1]= 0; + myf const flags = MYF(MY_WME | MY_NABP); + open_cached_file(&head_cache, NULL, NULL, 0, flags); + open_cached_file(&body_cache, NULL, NULL, 0, flags); +} +#endif diff --git a/sql/log_event.h b/sql/log_event.h index c46827253a3..2cf69e975f4 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -592,8 +592,9 @@ typedef struct st_print_event_info { /* Settings for database, sql_mode etc that comes from the last event - that was printed. - */ + that was printed. We cache these so that we don't have to print + them if they are unchanged. + */ // TODO: have the last catalog here ?? char db[FN_REFLEN+1]; // TODO: make this a LEX_STRING when thd->db is bool flags2_inited; @@ -606,26 +607,10 @@ typedef struct st_print_event_info char time_zone_str[MAX_TIME_ZONE_NAME_LENGTH]; uint lc_time_names_number; uint charset_database_number; - st_print_event_info() - :flags2_inited(0), sql_mode_inited(0), - auto_increment_increment(1),auto_increment_offset(1), charset_inited(0), - lc_time_names_number(0), charset_database_number(0), - base64_output_mode(BASE64_OUTPUT_UNSPEC), printed_fd_event(FALSE) - { - /* - Currently we only use static PRINT_EVENT_INFO objects, so zeroed at - program's startup, but these explicit bzero() is for the day someone - creates dynamic instances. - */ - bzero(db, sizeof(db)); - bzero(charset, sizeof(charset)); - bzero(time_zone_str, sizeof(time_zone_str)); - delimiter[0]= ';'; - delimiter[1]= 0; - myf const flags = MYF(MY_WME | MY_NABP); - open_cached_file(&head_cache, NULL, NULL, 0, flags); - open_cached_file(&body_cache, NULL, NULL, 0, flags); - } + uint thread_id; + bool thread_id_printed; + + st_print_event_info(); ~st_print_event_info() { close_cached_file(&head_cache); diff --git a/sql/set_var.cc b/sql/set_var.cc index 71131df0ce3..0d1d8b92d3b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -161,10 +161,14 @@ static void sys_default_slow_log_path(THD *thd, enum_var_type type); static sys_var_chain vars = { NULL, NULL }; -static sys_var_thd_ulong sys_auto_increment_increment(&vars, "auto_increment_increment", - &SV::auto_increment_increment); -static sys_var_thd_ulong sys_auto_increment_offset(&vars, "auto_increment_offset", - &SV::auto_increment_offset); +static sys_var_thd_ulong +sys_auto_increment_increment(&vars, "auto_increment_increment", + &SV::auto_increment_increment, NULL, NULL, + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_thd_ulong +sys_auto_increment_offset(&vars, "auto_increment_offset", + &SV::auto_increment_offset, NULL, NULL, + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_bool_ptr sys_automatic_sp_privileges(&vars, "automatic_sp_privileges", &sp_automatic_privileges); @@ -176,19 +180,25 @@ static sys_var_thd_binlog_format sys_binlog_format(&vars, "binlog_format", &SV::binlog_format); static sys_var_thd_ulong sys_bulk_insert_buff_size(&vars, "bulk_insert_buffer_size", &SV::bulk_insert_buff_size); -static sys_var_character_set_sv sys_character_set_server(&vars, "character_set_server", - &SV::collation_server, - &default_charset_info); +static sys_var_character_set_sv +sys_character_set_server(&vars, "character_set_server", + &SV::collation_server, &default_charset_info, 0, + sys_var::SESSION_VARIABLE_IN_BINLOG); sys_var_const_str sys_charset_system(&vars, "character_set_system", (char *)my_charset_utf8_general_ci.name); -static sys_var_character_set_database sys_character_set_database(&vars, "character_set_database"); -static sys_var_character_set_client sys_character_set_client(&vars, - "character_set_client", - &SV::character_set_client, - &default_charset_info); -static sys_var_character_set_sv sys_character_set_connection(&vars, "character_set_connection", - &SV::collation_connection, - &default_charset_info); +static sys_var_character_set_database +sys_character_set_database(&vars, "character_set_database", + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_character_set_client +sys_character_set_client(&vars, "character_set_client", + &SV::character_set_client, + &default_charset_info, + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_character_set_sv +sys_character_set_connection(&vars, "character_set_connection", + &SV::collation_connection, + &default_charset_info, 0, + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_character_set_sv sys_character_set_results(&vars, "character_set_results", &SV::character_set_results, &default_charset_info, true); @@ -199,15 +209,18 @@ static sys_var_thd_ulong sys_completion_type(&vars, "completion_type", &SV::completion_type, check_completion_type, fix_completion_type); -static sys_var_collation_sv sys_collation_connection(&vars, "collation_connection", - &SV::collation_connection, - &default_charset_info); -static sys_var_collation_sv sys_collation_database(&vars, "collation_database", - &SV::collation_database, - &default_charset_info); -static sys_var_collation_sv sys_collation_server(&vars, "collation_server", - &SV::collation_server, - &default_charset_info); +static sys_var_collation_sv +sys_collation_connection(&vars, "collation_connection", + &SV::collation_connection, &default_charset_info, + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_collation_sv +sys_collation_database(&vars, "collation_database", &SV::collation_database, + &default_charset_info, + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_collation_sv +sys_collation_server(&vars, "collation_server", &SV::collation_server, + &default_charset_info, + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_long_ptr sys_concurrent_insert(&vars, "concurrent_insert", &myisam_concurrent_insert); static sys_var_long_ptr sys_connect_timeout(&vars, "connect_timeout", @@ -303,9 +316,10 @@ static sys_var_thd_ulong sys_max_error_count(&vars, "max_error_count", &SV::max_error_count); static sys_var_thd_ulonglong sys_max_heap_table_size(&vars, "max_heap_table_size", &SV::max_heap_table_size); -static sys_var_thd_ulong sys_pseudo_thread_id(&vars, "pseudo_thread_id", - &SV::pseudo_thread_id, - check_pseudo_thread_id, 0); +static sys_var_thd_ulong sys_pseudo_thread_id(&vars, "pseudo_thread_id", + &SV::pseudo_thread_id, + check_pseudo_thread_id, 0, + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_thd_ha_rows sys_max_join_size(&vars, "max_join_size", &SV::max_join_size, fix_max_join_size); @@ -436,8 +450,14 @@ static sys_var_long_ptr sys_slow_launch_time(&vars, "slow_launch_time", &slow_launch_time); static sys_var_thd_ulong sys_sort_buffer(&vars, "sort_buffer_size", &SV::sortbuff_size); +/* + sql_mode should *not* have binlog_mode=SESSION_VARIABLE_IN_BINLOG: + even though it is written to the binlog, the slave ignores the + MODE_NO_DIR_IN_CREATE variable, so slave's value differs from + master's (see log_event.cc: Query_log_event::do_apply_event()). +*/ static sys_var_thd_sql_mode sys_sql_mode(&vars, "sql_mode", - &SV::sql_mode); + &SV::sql_mode); #ifdef HAVE_OPENSSL extern char *opt_ssl_ca, *opt_ssl_capath, *opt_ssl_cert, *opt_ssl_cipher, *opt_ssl_key; @@ -588,7 +608,8 @@ static sys_var_thd_bit sys_sql_notes(&vars, "sql_notes", 0, OPTION_SQL_NOTES); static sys_var_thd_bit sys_auto_is_null(&vars, "sql_auto_is_null", 0, set_option_bit, - OPTION_AUTO_IS_NULL); + OPTION_AUTO_IS_NULL, 0, + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_thd_bit sys_safe_updates(&vars, "sql_safe_updates", 0, set_option_bit, OPTION_SAFE_UPDATES); @@ -601,11 +622,12 @@ static sys_var_thd_bit sys_quote_show_create(&vars, "sql_quote_show_create", 0, static sys_var_thd_bit sys_foreign_key_checks(&vars, "foreign_key_checks", 0, set_option_bit, OPTION_NO_FOREIGN_KEY_CHECKS, - 1); + 1, sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_thd_bit sys_unique_checks(&vars, "unique_checks", 0, set_option_bit, OPTION_RELAXED_UNIQUE_CHECKS, - 1); + 1, + sys_var::SESSION_VARIABLE_IN_BINLOG); #if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER) static sys_var_thd_bit sys_profiling(&vars, "profiling", NULL, set_option_bit, @@ -618,13 +640,41 @@ static sys_var_thd_ulong sys_profiling_history_size(&vars, "profiling_history_si static sys_var_thd_ha_rows sys_select_limit(&vars, "sql_select_limit", &SV::select_limit); -static sys_var_timestamp sys_timestamp(&vars, "timestamp"); -static sys_var_last_insert_id sys_last_insert_id(&vars, "last_insert_id"); -static sys_var_last_insert_id sys_identity(&vars, "identity"); +static sys_var_timestamp sys_timestamp(&vars, "timestamp", + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_last_insert_id +sys_last_insert_id(&vars, "last_insert_id", + sys_var::SESSION_VARIABLE_IN_BINLOG); +/* + identity is an alias for last_insert_id(), so that we are compatible + with Sybase +*/ +static sys_var_last_insert_id +sys_identity(&vars, "identity", sys_var::SESSION_VARIABLE_IN_BINLOG); -static sys_var_thd_lc_time_names sys_lc_time_names(&vars, "lc_time_names"); +static sys_var_thd_lc_time_names +sys_lc_time_names(&vars, "lc_time_names", sys_var::SESSION_VARIABLE_IN_BINLOG); -static sys_var_insert_id sys_insert_id(&vars, "insert_id"); +/* + insert_id should *not* be marked as written to the binlog (i.e., it + should *not* have binlog_status==SESSION_VARIABLE_IN_BINLOG), + because we want any statement that refers to insert_id explicitly to + be unsafe. (By "explicitly", we mean using @@session.insert_id, + whereas insert_id is used "implicitly" when NULL value is inserted + into an auto_increment column). + + We want statements referring explicitly to @@session.insert_id to be + unsafe, because insert_id is modified internally by the slave sql + thread when NULL values are inserted in an AUTO_INCREMENT column. + This modification interfers with the value of the + @@session.insert_id variable if @@session.insert_id is referred + explicitly by an insert statement (as is seen by executing "SET + @@session.insert_id=0; CREATE TABLE t (a INT, b INT KEY + AUTO_INCREMENT); INSERT INTO t(a) VALUES (@@session.insert_id);" in + statement-based logging mode: t will be different on master and + slave). +*/ +static sys_var_insert_id sys_insert_id(&vars, "insert_id"); static sys_var_readonly sys_error_count(&vars, "error_count", OPT_SESSION, SHOW_LONG, @@ -634,9 +684,10 @@ static sys_var_readonly sys_warning_count(&vars, "warning_count", SHOW_LONG, get_warning_count); -/* alias for last_insert_id() to be compatible with Sybase */ -static sys_var_rand_seed1 sys_rand_seed1(&vars, "rand_seed1"); -static sys_var_rand_seed2 sys_rand_seed2(&vars, "rand_seed2"); +static sys_var_rand_seed1 sys_rand_seed1(&vars, "rand_seed1", + sys_var::SESSION_VARIABLE_IN_BINLOG); +static sys_var_rand_seed2 sys_rand_seed2(&vars, "rand_seed2", + sys_var::SESSION_VARIABLE_IN_BINLOG); static sys_var_thd_ulong sys_default_week_format(&vars, "default_week_format", &SV::default_week_format); @@ -644,7 +695,8 @@ static sys_var_thd_ulong sys_default_week_format(&vars, "default_week_for sys_var_thd_ulong sys_group_concat_max_len(&vars, "group_concat_max_len", &SV::group_concat_max_len); -sys_var_thd_time_zone sys_time_zone(&vars, "time_zone"); +sys_var_thd_time_zone sys_time_zone(&vars, "time_zone", + sys_var::SESSION_VARIABLE_IN_BINLOG); /* Global read-only variable containing hostname */ static sys_var_const_str sys_hostname(&vars, "hostname", glob_hostname); diff --git a/sql/set_var.h b/sql/set_var.h index 171158fcf1e..46fe7755baf 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -48,6 +48,22 @@ struct sys_var_chain class sys_var { public: + + /** + Enumeration type to indicate for a system variable whether it will be written to the binlog or not. + */ + enum Binlog_status_enum + { + /* The variable value is not in the binlog. */ + NOT_IN_BINLOG, + /* The value of the @@session variable is in the binlog. */ + SESSION_VARIABLE_IN_BINLOG + /* + Currently, no @@global variable is ever in the binlog, so we + don't need an enumeration value for that. + */ + }; + sys_var *next; struct my_option *option_limits; /* Updated by by set_var_init() */ uint name_length; /* Updated by by set_var_init() */ @@ -55,8 +71,9 @@ public: sys_after_update_func after_update; bool no_support_one_shot; - sys_var(const char *name_arg,sys_after_update_func func= NULL) - :name(name_arg), after_update(func) + sys_var(const char *name_arg, sys_after_update_func func= NULL, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :name(name_arg), after_update(func), binlog_status(binlog_status_arg) , no_support_one_shot(1) {} virtual ~sys_var() {} @@ -71,6 +88,11 @@ public: virtual bool check(THD *thd, set_var *var); bool check_enum(THD *thd, set_var *var, const TYPELIB *enum_names); bool check_set(THD *thd, set_var *var, TYPELIB *enum_names); + bool is_written_to_binlog(enum_var_type type) + { + return (type == OPT_SESSION || type == OPT_DEFAULT) && + (binlog_status == SESSION_VARIABLE_IN_BINLOG); + } virtual bool update(THD *thd, set_var *var)=0; virtual void set_default(THD *thd_arg, enum_var_type type) {} virtual SHOW_TYPE show_type() { return SHOW_UNDEF; } @@ -86,6 +108,9 @@ public: virtual bool is_struct() { return 0; } virtual bool is_readonly() const { return 0; } virtual sys_var_pluginvar *cast_pluginvar() { return 0; } + +private: + const Binlog_status_enum binlog_status; }; @@ -232,8 +257,9 @@ class sys_var_const_str :public sys_var { public: char *value; // Pointer to const value - sys_var_const_str(sys_var_chain *chain, const char *name_arg, const char *value_arg) - :sys_var(name_arg),value((char*) value_arg) + sys_var_const_str(sys_var_chain *chain, const char *name_arg, + const char *value_arg) + :sys_var(name_arg), value((char*) value_arg) { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { @@ -328,8 +354,9 @@ class sys_var_thd :public sys_var { public: sys_var_thd(const char *name_arg, - sys_after_update_func func= NULL) - :sys_var(name_arg,func) + sys_after_update_func func= NULL, + Binlog_status_enum binlog_status= NOT_IN_BINLOG) + :sys_var(name_arg, func, binlog_status) {} bool check_type(enum_var_type type) { return 0; } bool check_default(enum_var_type type) @@ -344,12 +371,13 @@ class sys_var_thd_ulong :public sys_var_thd sys_check_func check_func; public: ulong SV::*offset; - sys_var_thd_ulong(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg) - :sys_var_thd(name_arg), check_func(0), offset(offset_arg) - { chain_sys_var(chain); } - sys_var_thd_ulong(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, - sys_check_func c_func, sys_after_update_func au_func) - :sys_var_thd(name_arg,au_func), check_func(c_func), offset(offset_arg) + sys_var_thd_ulong(sys_var_chain *chain, const char *name_arg, + ulong SV::*offset_arg, + sys_check_func c_func= NULL, + sys_after_update_func au_func= NULL, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_thd(name_arg, au_func, binlog_status_arg), check_func(c_func), + offset(offset_arg) { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); @@ -440,22 +468,12 @@ protected: TYPELIB *enum_names; sys_check_func check_func; public: - sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, - TYPELIB *typelib) - :sys_var_thd(name_arg), offset(offset_arg), enum_names(typelib), - check_func(0) - { chain_sys_var(chain); } - sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, - TYPELIB *typelib, - sys_after_update_func func) - :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), - check_func(0) - { chain_sys_var(chain); } - sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg, - TYPELIB *typelib, sys_after_update_func func, - sys_check_func check) - :sys_var_thd(name_arg,func), offset(offset_arg), enum_names(typelib), - check_func(check) + sys_var_thd_enum(sys_var_chain *chain, const char *name_arg, + ulong SV::*offset_arg, TYPELIB *typelib, + sys_after_update_func func= NULL, + sys_check_func check= NULL) + :sys_var_thd(name_arg, func), offset(offset_arg), + enum_names(typelib), check_func(check) { chain_sys_var(chain); } bool check(THD *thd, set_var *var) { @@ -480,7 +498,7 @@ public: sys_var_thd_sql_mode(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg) :sys_var_thd_enum(chain, name_arg, offset_arg, &sql_mode_typelib, - fix_sql_mode_var) + fix_sql_mode_var) {} bool check(THD *thd, set_var *var) { @@ -534,9 +552,10 @@ public: bool reverse; sys_var_thd_bit(sys_var_chain *chain, const char *name_arg, sys_check_func c_func, sys_update_func u_func, - ulonglong bit, bool reverse_arg=0) - :sys_var_thd(name_arg), check_func(c_func), update_func(u_func), - bit_flag(bit), reverse(reverse_arg) + ulonglong bit, bool reverse_arg=0, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_thd(name_arg, NULL, binlog_status_arg), check_func(c_func), + update_func(u_func), bit_flag(bit), reverse(reverse_arg) { chain_sys_var(chain); } bool check(THD *thd, set_var *var); bool update(THD *thd, set_var *var); @@ -567,8 +586,9 @@ public: class sys_var_timestamp :public sys_var { public: - sys_var_timestamp(sys_var_chain *chain, const char *name_arg) - :sys_var(name_arg) + sys_var_timestamp(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var(name_arg, NULL, binlog_status_arg) { chain_sys_var(chain); } bool update(THD *thd, set_var *var); void set_default(THD *thd, enum_var_type type); @@ -582,8 +602,9 @@ public: class sys_var_last_insert_id :public sys_var { public: - sys_var_last_insert_id(sys_var_chain *chain, const char *name_arg) - :sys_var(name_arg) + sys_var_last_insert_id(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var(name_arg, NULL, binlog_status_arg) { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } @@ -608,8 +629,9 @@ public: class sys_var_rand_seed1 :public sys_var { public: - sys_var_rand_seed1(sys_var_chain *chain, const char *name_arg) - :sys_var(name_arg) + sys_var_rand_seed1(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var(name_arg, NULL, binlog_status_arg) { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } @@ -618,8 +640,9 @@ public: class sys_var_rand_seed2 :public sys_var { public: - sys_var_rand_seed2(sys_var_chain *chain, const char *name_arg) - :sys_var(name_arg) + sys_var_rand_seed2(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var(name_arg, NULL, binlog_status_arg) { chain_sys_var(chain); } bool update(THD *thd, set_var *var); bool check_type(enum_var_type type) { return type == OPT_GLOBAL; } @@ -629,11 +652,12 @@ public: class sys_var_collation :public sys_var_thd { public: - sys_var_collation(const char *name_arg) - :sys_var_thd(name_arg) - { + sys_var_collation(const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_thd(name_arg, NULL, binlog_status_arg) + { no_support_one_shot= 0; - } + } bool check(THD *thd, set_var *var); SHOW_TYPE show_type() { return SHOW_CHAR; } bool check_update_type(Item_result type) @@ -648,8 +672,9 @@ class sys_var_character_set :public sys_var_thd { public: bool nullable; - sys_var_character_set(const char *name_arg, bool is_nullable= 0) : - sys_var_thd(name_arg), nullable(is_nullable) + sys_var_character_set(const char *name_arg, bool is_nullable= 0, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_thd(name_arg, NULL, binlog_status_arg), nullable(is_nullable) { /* In fact only almost all variables derived from sys_var_character_set @@ -678,8 +703,9 @@ public: sys_var_character_set_sv(sys_var_chain *chain, const char *name_arg, CHARSET_INFO *SV::*offset_arg, CHARSET_INFO **global_default_arg, - bool is_nullable= 0) - : sys_var_character_set(name_arg, is_nullable), + bool is_nullable= 0, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + : sys_var_character_set(name_arg, is_nullable, binlog_status_arg), offset(offset_arg), global_default(global_default_arg) { chain_sys_var(chain); } void set_default(THD *thd, enum_var_type type); @@ -693,9 +719,9 @@ public: sys_var_character_set_client(sys_var_chain *chain, const char *name_arg, CHARSET_INFO *SV::*offset_arg, CHARSET_INFO **global_default_arg, - bool is_nullable= 0) + Binlog_status_enum binlog_status_arg) : sys_var_character_set_sv(chain, name_arg, offset_arg, global_default_arg, - is_nullable) + 0, binlog_status_arg) { } bool check(THD *thd, set_var *var); }; @@ -704,8 +730,10 @@ public: class sys_var_character_set_database :public sys_var_character_set { public: - sys_var_character_set_database(sys_var_chain *chain, const char *name_arg) : - sys_var_character_set(name_arg) + sys_var_character_set_database(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= + NOT_IN_BINLOG) + : sys_var_character_set(name_arg, 0, binlog_status_arg) { chain_sys_var(chain); } void set_default(THD *thd, enum_var_type type); CHARSET_INFO **ci_ptr(THD *thd, enum_var_type type); @@ -718,8 +746,9 @@ class sys_var_collation_sv :public sys_var_collation public: sys_var_collation_sv(sys_var_chain *chain, const char *name_arg, CHARSET_INFO *SV::*offset_arg, - CHARSET_INFO **global_default_arg) - :sys_var_collation(name_arg), + CHARSET_INFO **global_default_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_collation(name_arg, binlog_status_arg), offset(offset_arg), global_default(global_default_arg) { chain_sys_var(chain); @@ -946,8 +975,9 @@ public: class sys_var_thd_time_zone :public sys_var_thd { public: - sys_var_thd_time_zone(sys_var_chain *chain, const char *name_arg): - sys_var_thd(name_arg) + sys_var_thd_time_zone(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + :sys_var_thd(name_arg, NULL, binlog_status_arg) { no_support_one_shot= 0; chain_sys_var(chain); @@ -1034,8 +1064,9 @@ public: class sys_var_thd_lc_time_names :public sys_var_thd { public: - sys_var_thd_lc_time_names(sys_var_chain *chain, const char *name_arg): - sys_var_thd(name_arg) + sys_var_thd_lc_time_names(sys_var_chain *chain, const char *name_arg, + Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) + : sys_var_thd(name_arg, NULL, binlog_status_arg) { #if MYSQL_VERSION_ID < 50000 no_support_one_shot= 0; @@ -1079,9 +1110,8 @@ public: sys_var_thd_binlog_format(sys_var_chain *chain, const char *name_arg, ulong SV::*offset_arg) :sys_var_thd_enum(chain, name_arg, offset_arg, - &binlog_format_typelib - , fix_binlog_format_after_update - ) + &binlog_format_typelib, + fix_binlog_format_after_update) {}; bool is_readonly() const; }; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 1bd90e74f47..98434d15d87 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -7389,6 +7389,7 @@ variable_aux: } | '@' opt_var_ident_type ident_or_text opt_component { + /* disallow "SELECT @@global.global.variable" */ if ($3.str && $4.str && check_reserved_words(&$3)) { my_parse_error(ER(ER_SYNTAX_ERROR)); @@ -7396,6 +7397,8 @@ variable_aux: } if (!($$= get_system_var(YYTHD, $2, $3, $4))) MYSQL_YYABORT; + if (!((Item_func_get_system_var*) $$)->is_written_to_binlog()) + Lex->set_stmt_unsafe(); } ; From 44df0f6e9cece95b914f3f3b0ce3d3baa6f2dbf1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 18:41:50 +0400 Subject: [PATCH 392/527] BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR || m_status == DA_OK Reading from information_scema.tables or information_schema.columns may cause assertion failure in debug builds. This may happen under rare circumstances when information_schema fails to get information about a table (e.g. when a connection is killed). This happens because open_normal_and_derived_tables() can return an error without setting an error message in THD. But information_schema attempts to get an error message from THD unconditionally. With this fix information_schema attempts to get an error message from THD only in case error message is set in THD. mysql-test/r/information_schema.result: A test case for BUG#34656. mysql-test/t/information_schema.test: A test case for BUG#34656. sql/item_func.cc: Set proc info to "User sleep". sql/sql_show.cc: open_normal_and_derived_tables() can return an error without setting an error message in THD. That means we must access error message conditionally, only in case thd->is_error() is true. --- mysql-test/r/information_schema.result | 2 ++ mysql-test/t/information_schema.test | 44 ++++++++++++++++++++++++++ sql/item_func.cc | 2 ++ sql/sql_show.cc | 7 ++-- 4 files changed, 52 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 708d8ab027d..cfd96ccfd68 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1638,4 +1638,6 @@ show open tables where f1()=0; show open tables where f1()=0; drop table t1; drop function f1; +select * from information_schema.tables where 1=sleep(100000); +select * from information_schema.columns where 1=sleep(100000); End of 5.1 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 6e76a043645..9f99f0fe32b 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1270,4 +1270,48 @@ show open tables where f1()=0; drop table t1; drop function f1; +# +# BUG#34656 - KILL a query = Assertion failed: m_status == DA_ERROR || +# m_status == DA_OK +# +connect (conn1, localhost, root,,); +connection conn1; +let $ID= `select connection_id()`; +send select * from information_schema.tables where 1=sleep(100000); +connection default; +let $wait_timeout= 10; +let $wait_condition=select count(*)=1 from information_schema.processlist +where state='User sleep' and +info='select * from information_schema.tables where 1=sleep(100000)'; +--source include/wait_condition.inc +disable_query_log; +eval kill $ID; +enable_query_log; +disconnect conn1; +let $wait_timeout= 10; +let $wait_condition=select count(*)=0 from information_schema.processlist +where state='User sleep' and +info='select * from information_schema.tables where 1=sleep(100000)'; +--source include/wait_condition.inc + +connect (conn1, localhost, root,,); +connection conn1; +let $ID= `select connection_id()`; +send select * from information_schema.columns where 1=sleep(100000); +connection default; +let $wait_timeout= 10; +let $wait_condition=select count(*)=1 from information_schema.processlist +where state='User sleep' and +info='select * from information_schema.columns where 1=sleep(100000)'; +--source include/wait_condition.inc +disable_query_log; +eval kill $ID; +enable_query_log; +disconnect conn1; +let $wait_timeout= 10; +let $wait_condition=select count(*)=0 from information_schema.processlist +where state='User sleep' and +info='select * from information_schema.columns where 1=sleep(100000)'; +--source include/wait_condition.inc + --echo End of 5.1 tests. diff --git a/sql/item_func.cc b/sql/item_func.cc index 65d3a627d2d..b61f683ae9f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3722,6 +3722,7 @@ longlong Item_func_sleep::val_int() pthread_cond_init(&cond, NULL); pthread_mutex_lock(&LOCK_user_locks); + thd_proc_info(thd, "User sleep"); thd->mysys_var->current_mutex= &LOCK_user_locks; thd->mysys_var->current_cond= &cond; @@ -3733,6 +3734,7 @@ longlong Item_func_sleep::val_int() break; error= 0; } + thd_proc_info(thd, 0); pthread_mutex_unlock(&LOCK_user_locks); pthread_mutex_lock(&thd->mysys_var->mutex); thd->mysys_var->current_mutex= 0; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6d817cb0620..a6516d5bf46 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3430,7 +3430,7 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, /* there was errors during opening tables */ - const char *error= thd->main_da.message(); + const char *error= thd->is_error() ? thd->main_da.message() : ""; if (tables->view) table->field[3]->store(STRING_WITH_LEN("VIEW"), cs); else if (tables->schema_table) @@ -3631,8 +3631,9 @@ static int get_schema_column_record(THD *thd, TABLE_LIST *tables, I.e. we are in SELECT FROM INFORMATION_SCHEMA.COLUMS rather than in SHOW COLUMNS */ - push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, - thd->main_da.sql_errno(), thd->main_da.message()); + if (thd->is_error()) + push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + thd->main_da.sql_errno(), thd->main_da.message()); thd->clear_error(); res= 0; } From d6e42aace333c5bbb7d1b76835e6947d1dac916c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 17:33:07 +0100 Subject: [PATCH 393/527] WL#4203 Reorganize and fix the data dictionary tests of testsuite funcs_1 1. Fix the following bugs Bug#30440 "datadict" tests (all engines) fail: Character sets depend on configuration Solution: Test variants charset_collation_* adjusted to different builds Bug#32603 "datadict" tests (all engines) fail in "community" tree: "PROFILING" table Solution: Excluding "PROFILING" table from queries Bug#33654 "slow log" is missing a line Solution: Unify the content of the fields TABLES.TABLE_ROWS and STATISTICS.CARDINALITY within result sets Bug#34532 Some funcs_1 tests do not clean up at end of testing Solution: DROP objects/reset global server variables modified during testing + let tests missing implementation end before loading of tables Bug#31421 funcs_1: ndb__datadict fails, discrepancy between scripts and expected results Solution: Cut __datadict tests into smaller tests + generate new results. Bug#33599 INFORMATION_SCHEMA.STATISTICS got a new column INDEX_COMMENT: tests fail (2) Generation of new results during post merge fix Bug#33600 CHARACTER_OCTET_LENGTH is now CHARACTER_MAXIMUM_LENGTH * 4 Generation of new results during post merge fix Bug#33631 Platform-specific replace of CHARACTER_MAXIMUM_LENGTH broken by 4-byte encoding Generation of new results during post merge fix + removal of platform-specific replace routine (no more needed) 2. Restructure the tests - Test not more than one INFORMATION_SCHEMA view per testscript - Separate tests of I_S view layout+functionality from content related to the all time existing databases "information_schema", "mysql" and "test" - Avoid storage engine related variants of tests which are not sensible to storage engines at all. 3. Reimplement or add some subtests + cleanup There is a some probability that even the reviewed changeset - does not fix all bugs from above or - contains new bugs which show up on some platforms <> Linux or on one of the various build types 4. The changeset contains fixes according to - one code review - minor bugs within testing code found after code review (accepted by reviewer) - problems found during tests with 5.0.56 in build environment mysql-test/suite/funcs_1/t/innodb_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/innodb_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/memory_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_02.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_03.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_06.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_07.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_08.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/t/myisam_storedproc_10.test: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_02.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_03.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_06.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_07.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_08.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/storedproc/storedproc_10.inc: Change mode to -rw-rw-r-- BitKeeper/deleted/.del-innodb__load.test: Delete: mysql-test/suite/funcs_1/t/innodb__load.test BitKeeper/deleted/.del-innodb__load.result: Delete: mysql-test/suite/funcs_1/r/innodb__load.result BitKeeper/deleted/.del-myisam__load.test: Delete: mysql-test/suite/funcs_1/t/myisam__load.test BitKeeper/deleted/.del-memory__load.test: Delete: mysql-test/suite/funcs_1/t/memory__load.test BitKeeper/deleted/.del-memory__load.result: Delete: mysql-test/suite/funcs_1/r/memory__load.result BitKeeper/deleted/.del-myisam__load.result: Delete: mysql-test/suite/funcs_1/r/myisam__load.result BitKeeper/deleted/.del-create_database.inc: Delete: mysql-test/suite/funcs_1/include/create_database.inc BitKeeper/deleted/.del-create_user_lowest_priv.inc: Delete: mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc BitKeeper/deleted/.del-create_user_no_super.inc: Delete: mysql-test/suite/funcs_1/include/create_user_no_super.inc BitKeeper/deleted/.del-datadict_help_tables_build.result: Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_build.result BitKeeper/deleted/.del-datadict_help_tables_build.test: Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_build.test BitKeeper/deleted/.del-datadict_help_tables_dev.result: Delete: mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result BitKeeper/deleted/.del-datadict_help_tables_dev.test: Delete: mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test BitKeeper/deleted/.del-datadict_master.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_master.inc BitKeeper/deleted/.del-datadict_show_schema.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc BitKeeper/deleted/.del-datadict_show_table_design.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc BitKeeper/deleted/.del-datadict_tables.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables.inc BitKeeper/deleted/.del-datadict_tables_error.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc BitKeeper/deleted/.del-datadict_tables_error_1.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc BitKeeper/deleted/.del-datadict_tables_error_1044.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc BitKeeper/deleted/.del-datadict_tables_error_1049.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc BitKeeper/deleted/.del-datadict_tables_error_1051.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc BitKeeper/deleted/.del-datadict_tables_error_1146.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc BitKeeper/deleted/.del-datadict_tables_error_1288.inc: Delete: mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc BitKeeper/deleted/.del-innodb__datadict.result: Delete: mysql-test/suite/funcs_1/r/innodb__datadict.result BitKeeper/deleted/.del-innodb__datadict.test: Delete: mysql-test/suite/funcs_1/t/innodb__datadict.test BitKeeper/deleted/.del-memory__datadict.test: Delete: mysql-test/suite/funcs_1/t/memory__datadict.test BitKeeper/deleted/.del-myisam__datadict.result: Delete: mysql-test/suite/funcs_1/r/myisam__datadict.result BitKeeper/deleted/.del-myisam__datadict.test: Delete: mysql-test/suite/funcs_1/t/myisam__datadict.test BitKeeper/deleted/.del-memory__datadict.result: Delete: mysql-test/suite/funcs_1/r/memory__datadict.result mysql-test/suite/funcs_1/README.txt: Cleanup in description mysql-test/suite/funcs_1/include/memory_tb1.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb2.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb3.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/memory_tb4.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/include/sp_tb.inc: Remove outdated comment mysql-test/suite/funcs_1/r/innodb_bitdata.result: Updated results mysql-test/suite/funcs_1/r/innodb_cursors.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_03.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_08.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_09.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/innodb_trig_frkey.result: Updated results mysql-test/suite/funcs_1/r/innodb_views.result: Updated results mysql-test/suite/funcs_1/r/memory_bitdata.result: Updated results mysql-test/suite/funcs_1/r/memory_cursors.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_03.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_08.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_09.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/memory_views.result: Updated results mysql-test/suite/funcs_1/r/myisam_bitdata.result: Updated results mysql-test/suite/funcs_1/r/myisam_cursors.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_06.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_03.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_08.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_09.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/myisam_views.result: Updated results mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc: Move setting of variables into the caller scripts mysql-test/suite/funcs_1/t/innodb_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/innodb_cursors.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/innodb_trig_frkey.test: Cleanup mysql-test/suite/funcs_1/t/innodb_views.test: Cleanup mysql-test/suite/funcs_1/t/memory_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/memory_cursors.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/memory_views.test: Cleanup mysql-test/suite/funcs_1/t/myisam_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/myisam_cursors.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/myisam_views.test: Cleanup mysql-test/suite/funcs_1/t/charset_collation_1.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 1 mysql-test/suite/funcs_1/t/charset_collation_2.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 2 mysql-test/suite/funcs_1/t/charset_collation_3.test: Check content of information_schema views character_sets, collations, collation_character_set_applicability Build variant 3 mysql-test/suite/funcs_1/t/is_basics_mixed.test: Test some basic properties which are independend of the storage engine used for the creation of tables. mysql-test/suite/funcs_1/t/is_character_sets.test: Tests related to functionality of information_schema.character_sets mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test: Tests related to functionality of information_schema.collation_character_set_applicability mysql-test/suite/funcs_1/t/is_collations.test: Tests related to functionality of information_schema.collations mysql-test/suite/funcs_1/t/is_column_privileges.test: Tests related to functionality of information_schema.column_privileges mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test: Check content of information_schema.column_privileges about databases mysql and test mysql-test/suite/funcs_1/t/is_columns.test: Tests related to functionality of information_schema.columns mysql-test/suite/funcs_1/t/is_columns_innodb.test: Check content of information_schema.columns when some tables are preloaded Variant for InnoDB mysql-test/suite/funcs_1/t/is_columns_is.test: Check content of information_schema.columns about schema information_schema mysql-test/suite/funcs_1/t/is_columns_memory.test: Check content of information_schema.columns when some tables are preloaded Variant for MEMORY mysql-test/suite/funcs_1/t/is_columns_myisam.test: Check content of information_schema.columns when some tables are preloaded Variant for MyISAM mysql-test/suite/funcs_1/t/is_columns_mysql.test: Check content of information_schema.columns about schema mysql mysql-test/suite/funcs_1/t/is_columns_ndb.test: Check content of information_schema.columns when some tables are preloaded Variant for NDB mysql-test/suite/funcs_1/t/is_key_column_usage.test: Tests related to functionality of information_schema.key_column_usage mysql-test/suite/funcs_1/t/is_routines.test: Tests related to functionality of information_schema.routines mysql-test/suite/funcs_1/t/is_schema_privileges.test: Tests related to functionality of information_schema.schema_privileges mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test: Check content of information_schema.schema_privileges about schemas information_schema, mysql and test mysql-test/suite/funcs_1/t/is_schemata.test: Tests related to functionality of information_schema.schemata mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test: Check content of information_schema.schemata about schemas information_schema, mysql and test mysql-test/suite/funcs_1/t/is_statistics.test: Tests related to functionality of information_schema.statistics mysql-test/suite/funcs_1/t/is_statistics_is.test: Check content of information_schema.statistics about schema information_schema mysql-test/suite/funcs_1/t/is_statistics_mysql.test: Check content of information_schema.statistics about schema mysql mysql-test/suite/funcs_1/t/is_table_constraints.test: Tests related to functionality of information_schema.table_constraints mysql-test/suite/funcs_1/t/is_table_constraints_is.test: Check content of information_schema.table_constraints about schema information_schema mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test: Check content of information_schema.table_constraints about schema mysql mysql-test/suite/funcs_1/t/is_table_privileges.test: Tests related to functionality of information_schema.table_privileges mysql-test/suite/funcs_1/datadict/basics_mixed1.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/basics_mixed2.inc: Auxiliary script mysql-test/suite/funcs_1/include/cleanup.inc: Auxiliary script mysql-test/suite/funcs_1/r/charset_collation_1.result: Expected result for new test mysql-test/suite/funcs_1/r/charset_collation_2.result: Expected result for new test mysql-test/suite/funcs_1/r/charset_collation_3.result: Expected result for new test mysql-test/suite/funcs_1/r/is_basics_mixed.result: Expected result for new test mysql-test/suite/funcs_1/r/is_character_sets.result: Expected result for new test mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result: Expected result for new test mysql-test/suite/funcs_1/r/is_collations.result: Expected result for new test mysql-test/suite/funcs_1/r/is_column_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_innodb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_memory.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_myisam.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_columns_ndb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_key_column_usage.result: Expected result for new test mysql-test/suite/funcs_1/r/is_routines.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schema_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schemata.result: Expected result for new test mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_statistics_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_table_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_innodb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_is.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_memory.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_myisam.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_mysql.result: Expected result for new test mysql-test/suite/funcs_1/r/is_tables_ndb.result: Expected result for new test mysql-test/suite/funcs_1/r/is_triggers.result: Expected result for new test mysql-test/suite/funcs_1/r/is_user_privileges.result: Expected result for new test mysql-test/suite/funcs_1/r/is_views.result: Expected result for new test mysql-test/suite/funcs_1/t/is_tables.test: Tests related to functionality of information_schema.tables mysql-test/suite/funcs_1/t/is_tables_innodb.test: Check content of information_schema.tables when some tables are preloaded Variant for InnoDB mysql-test/suite/funcs_1/t/is_tables_is.test: Check content of information_schema.tables about schema information_schema mysql-test/suite/funcs_1/t/is_tables_memory.test: Check content of information_schema.tables when some tables are preloaded Variant for MEMORY mysql-test/suite/funcs_1/t/is_tables_myisam.test: Check content of information_schema.tables when some tables are preloaded Variant for MyISAM mysql-test/suite/funcs_1/t/is_tables_mysql.test: Check content of information_schema.tables about schema mysql mysql-test/suite/funcs_1/t/is_tables_ndb.test: Check content of information_schema.tables when some tables are preloaded Variant for NDB mysql-test/suite/funcs_1/t/is_triggers.test: Tests related to functionality of information_schema.triggers mysql-test/suite/funcs_1/t/is_user_privileges.test: Tests related to functionality of information_schema.user_privileges mysql-test/suite/funcs_1/t/is_views.test: Tests related to functionality of information_schema.views mysql-test/suite/funcs_1/datadict/basics_mixed3.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/charset_collation.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/columns.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/datadict.pre: Auxiliary script mysql-test/suite/funcs_1/datadict/is_table_query.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/statistics.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/table_constraints.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/tables1.inc: Auxiliary script mysql-test/suite/funcs_1/datadict/tables2.inc: Auxiliary script --- mysql-test/suite/funcs_1/README.txt | 170 +- .../suite/funcs_1/datadict/basics_mixed1.inc | 53 + .../suite/funcs_1/datadict/basics_mixed2.inc | 55 + .../suite/funcs_1/datadict/basics_mixed3.inc | 42 + .../funcs_1/datadict/charset_collation.inc | 122 + mysql-test/suite/funcs_1/datadict/columns.inc | 87 + .../suite/funcs_1/datadict/datadict.pre | 54 + .../funcs_1/datadict/datadict_master.inc | 3955 ----- .../funcs_1/datadict/datadict_show_schema.inc | 57 - .../datadict/datadict_show_table_design.inc | 28 - .../funcs_1/datadict/datadict_tables.inc | 62 - .../datadict/datadict_tables_error.inc | 33 - .../datadict/datadict_tables_error_1.inc | 80 - .../datadict/datadict_tables_error_1044.inc | 51 - .../datadict/datadict_tables_error_1049.inc | 49 - .../datadict/datadict_tables_error_1051.inc | 49 - .../datadict/datadict_tables_error_1146.inc | 49 - .../datadict/datadict_tables_error_1288.inc | 49 - .../suite/funcs_1/datadict/is_table_query.inc | 42 + .../suite/funcs_1/datadict/statistics.inc | 55 + .../funcs_1/datadict/table_constraints.inc | 45 + mysql-test/suite/funcs_1/datadict/tables1.inc | 39 + mysql-test/suite/funcs_1/datadict/tables2.inc | 47 + mysql-test/suite/funcs_1/include/cleanup.inc | 21 + .../suite/funcs_1/include/create_database.inc | 6 - .../include/create_user_lowest_priv.inc | 10 - .../funcs_1/include/create_user_no_super.inc | 11 - .../suite/funcs_1/include/memory_tb1.inc | 3 - .../suite/funcs_1/include/memory_tb2.inc | 3 - .../suite/funcs_1/include/memory_tb3.inc | 3 - .../suite/funcs_1/include/memory_tb4.inc | 3 - mysql-test/suite/funcs_1/include/sp_tb.inc | 4 - .../funcs_1/r/charset_collation_1.result | 309 + .../funcs_1/r/charset_collation_2.result | 311 + .../funcs_1/r/charset_collation_3.result | 309 + .../r/datadict_help_tables_build.result | 22 - .../funcs_1/r/datadict_help_tables_dev.result | 18 - .../suite/funcs_1/r/innodb__datadict.result | 12916 --------------- .../suite/funcs_1/r/innodb__load.result | 1 - .../suite/funcs_1/r/innodb_bitdata.result | 64 - .../suite/funcs_1/r/innodb_cursors.result | 78 - .../funcs_1/r/innodb_storedproc_02.result | 2 - .../funcs_1/r/innodb_storedproc_03.result | 2 - .../funcs_1/r/innodb_storedproc_06.result | 2 - .../funcs_1/r/innodb_storedproc_07.result | 2 - .../funcs_1/r/innodb_storedproc_08.result | 2 - .../funcs_1/r/innodb_storedproc_10.result | 2 - .../suite/funcs_1/r/innodb_trig_0102.result | 2 +- .../suite/funcs_1/r/innodb_trig_03.result | 2 +- .../suite/funcs_1/r/innodb_trig_0407.result | 2 +- .../suite/funcs_1/r/innodb_trig_08.result | 2 +- .../suite/funcs_1/r/innodb_trig_09.result | 2 +- .../funcs_1/r/innodb_trig_1011ext.result | 2 +- .../suite/funcs_1/r/innodb_trig_frkey.result | 2 +- .../suite/funcs_1/r/innodb_views.result | 4 +- .../suite/funcs_1/r/is_basics_mixed.result | 602 + .../suite/funcs_1/r/is_character_sets.result | 78 + ...llation_character_set_applicability.result | 76 + .../suite/funcs_1/r/is_collations.result | 90 + .../funcs_1/r/is_column_privileges.result | 370 + .../is_column_privileges_is_mysql_test.result | 37 + mysql-test/suite/funcs_1/r/is_columns.result | 486 + .../suite/funcs_1/r/is_columns_innodb.result | 1130 ++ .../suite/funcs_1/r/is_columns_is.result | 380 + .../suite/funcs_1/r/is_columns_memory.result | 1076 ++ .../suite/funcs_1/r/is_columns_myisam.result | 1207 ++ .../suite/funcs_1/r/is_columns_mysql.result | 361 + .../suite/funcs_1/r/is_columns_ndb.result | 223 + .../funcs_1/r/is_key_column_usage.result | 370 + mysql-test/suite/funcs_1/r/is_routines.result | 605 + .../funcs_1/r/is_schema_privileges.result | 304 + .../is_schema_privileges_is_mysql_test.result | 51 + mysql-test/suite/funcs_1/r/is_schemata.result | 181 + .../r/is_schemata_is_mysql_test.result | 42 + .../suite/funcs_1/r/is_statistics.result | 352 + .../suite/funcs_1/r/is_statistics_is.result | 17 + .../funcs_1/r/is_statistics_mysql.result | 60 + .../funcs_1/r/is_table_constraints.result | 310 + .../funcs_1/r/is_table_constraints_is.result | 17 + .../r/is_table_constraints_mysql.result | 37 + .../funcs_1/r/is_table_privileges.result | 332 + mysql-test/suite/funcs_1/r/is_tables.result | 419 + .../suite/funcs_1/r/is_tables_innodb.result | 1063 ++ .../suite/funcs_1/r/is_tables_is.result | 771 + .../suite/funcs_1/r/is_tables_memory.result | 1052 ++ .../suite/funcs_1/r/is_tables_myisam.result | 1092 ++ .../suite/funcs_1/r/is_tables_mysql.result | 424 + .../suite/funcs_1/r/is_tables_ndb.result | 560 + mysql-test/suite/funcs_1/r/is_triggers.result | 212 + .../suite/funcs_1/r/is_user_privileges.result | 400 + mysql-test/suite/funcs_1/r/is_views.result | 238 + .../suite/funcs_1/r/memory__datadict.result | 12814 --------------- .../suite/funcs_1/r/memory__load.result | 1 - .../suite/funcs_1/r/memory_bitdata.result | 65 - .../suite/funcs_1/r/memory_cursors.result | 75 - .../funcs_1/r/memory_storedproc_02.result | 2 - .../funcs_1/r/memory_storedproc_03.result | 2 - .../funcs_1/r/memory_storedproc_06.result | 2 - .../funcs_1/r/memory_storedproc_07.result | 2 - .../funcs_1/r/memory_storedproc_08.result | 2 - .../funcs_1/r/memory_storedproc_10.result | 2 - .../suite/funcs_1/r/memory_trig_0102.result | 4 +- .../suite/funcs_1/r/memory_trig_03.result | 4 +- .../suite/funcs_1/r/memory_trig_0407.result | 4 +- .../suite/funcs_1/r/memory_trig_08.result | 4 +- .../suite/funcs_1/r/memory_trig_09.result | 4 +- .../funcs_1/r/memory_trig_1011ext.result | 4 +- .../suite/funcs_1/r/memory_views.result | 8 +- .../suite/funcs_1/r/myisam__datadict.result | 13068 ---------------- .../suite/funcs_1/r/myisam__load.result | 1 - .../suite/funcs_1/r/myisam_bitdata.result | 73 - .../suite/funcs_1/r/myisam_cursors.result | 81 - .../funcs_1/r/myisam_storedproc_02.result | 2 - .../funcs_1/r/myisam_storedproc_03.result | 2 - .../funcs_1/r/myisam_storedproc_06.result | 2 - .../funcs_1/r/myisam_storedproc_07.result | 2 - .../funcs_1/r/myisam_storedproc_08.result | 2 - .../funcs_1/r/myisam_storedproc_10.result | 2 - .../suite/funcs_1/r/myisam_trig_0102.result | 2 +- .../suite/funcs_1/r/myisam_trig_03.result | 2 +- .../suite/funcs_1/r/myisam_trig_0407.result | 2 +- .../suite/funcs_1/r/myisam_trig_08.result | 2 +- .../suite/funcs_1/r/myisam_trig_09.result | 2 +- .../funcs_1/r/myisam_trig_1011ext.result | 2 +- .../suite/funcs_1/r/myisam_views.result | 4 +- .../suite/funcs_1/storedproc/load_sp_tb.inc | 3 - .../funcs_1/storedproc/storedproc_02.inc | 0 .../funcs_1/storedproc/storedproc_03.inc | 0 .../funcs_1/storedproc/storedproc_06.inc | 0 .../funcs_1/storedproc/storedproc_07.inc | 0 .../funcs_1/storedproc/storedproc_08.inc | 0 .../funcs_1/storedproc/storedproc_08_show.inc | 0 .../funcs_1/storedproc/storedproc_10.inc | 0 .../suite/funcs_1/t/charset_collation_1.test | 30 + .../suite/funcs_1/t/charset_collation_2.test | 24 + .../suite/funcs_1/t/charset_collation_3.test | 24 + .../funcs_1/t/datadict_help_tables_build.test | 73 - .../funcs_1/t/datadict_help_tables_dev.test | 27 - .../suite/funcs_1/t/innodb__datadict.test | 11 - mysql-test/suite/funcs_1/t/innodb__load.test | 47 - .../suite/funcs_1/t/innodb_bitdata.test | 29 +- .../suite/funcs_1/t/innodb_cursors.test | 27 +- .../suite/funcs_1/t/innodb_storedproc_02.test | 0 .../suite/funcs_1/t/innodb_storedproc_03.test | 0 .../suite/funcs_1/t/innodb_storedproc_06.test | 0 .../suite/funcs_1/t/innodb_storedproc_07.test | 0 .../suite/funcs_1/t/innodb_storedproc_08.test | 0 .../suite/funcs_1/t/innodb_storedproc_10.test | 0 .../suite/funcs_1/t/innodb_trig_0102.test | 26 +- .../suite/funcs_1/t/innodb_trig_03.test | 26 +- .../suite/funcs_1/t/innodb_trig_0407.test | 26 +- .../suite/funcs_1/t/innodb_trig_08.test | 26 +- .../suite/funcs_1/t/innodb_trig_09.test | 26 +- .../suite/funcs_1/t/innodb_trig_1011ext.test | 26 +- .../suite/funcs_1/t/innodb_trig_frkey.test | 26 +- mysql-test/suite/funcs_1/t/innodb_views.test | 46 +- .../suite/funcs_1/t/is_basics_mixed.test | 503 + .../suite/funcs_1/t/is_character_sets.test | 107 + ...collation_character_set_applicability.test | 108 + mysql-test/suite/funcs_1/t/is_collations.test | 114 + .../suite/funcs_1/t/is_column_privileges.test | 351 + .../t/is_column_privileges_is_mysql_test.test | 58 + mysql-test/suite/funcs_1/t/is_columns.test | 444 + .../suite/funcs_1/t/is_columns_innodb.test | 21 + mysql-test/suite/funcs_1/t/is_columns_is.test | 19 + .../suite/funcs_1/t/is_columns_memory.test | 21 + .../suite/funcs_1/t/is_columns_myisam.test | 21 + .../suite/funcs_1/t/is_columns_mysql.test | 13 + .../suite/funcs_1/t/is_columns_ndb.test | 33 + .../suite/funcs_1/t/is_key_column_usage.test | 344 + mysql-test/suite/funcs_1/t/is_routines.test | 471 + .../suite/funcs_1/t/is_schema_privileges.test | 336 + .../t/is_schema_privileges_is_mysql_test.test | 58 + mysql-test/suite/funcs_1/t/is_schemata.test | 246 + .../funcs_1/t/is_schemata_is_mysql_test.test | 58 + mysql-test/suite/funcs_1/t/is_statistics.test | 379 + .../suite/funcs_1/t/is_statistics_is.test | 14 + .../suite/funcs_1/t/is_statistics_mysql.test | 15 + .../suite/funcs_1/t/is_table_constraints.test | 331 + .../funcs_1/t/is_table_constraints_is.test | 14 + .../funcs_1/t/is_table_constraints_mysql.test | 14 + .../suite/funcs_1/t/is_table_privileges.test | 349 + mysql-test/suite/funcs_1/t/is_tables.test | 474 + .../suite/funcs_1/t/is_tables_innodb.test | 22 + mysql-test/suite/funcs_1/t/is_tables_is.test | 18 + .../suite/funcs_1/t/is_tables_memory.test | 22 + .../suite/funcs_1/t/is_tables_myisam.test | 22 + .../suite/funcs_1/t/is_tables_mysql.test | 14 + mysql-test/suite/funcs_1/t/is_tables_ndb.test | 34 + mysql-test/suite/funcs_1/t/is_triggers.test | 253 + .../suite/funcs_1/t/is_user_privileges.test | 347 + mysql-test/suite/funcs_1/t/is_views.test | 305 + .../suite/funcs_1/t/memory__datadict.test | 9 - mysql-test/suite/funcs_1/t/memory__load.test | 45 - .../suite/funcs_1/t/memory_bitdata.test | 28 +- .../suite/funcs_1/t/memory_cursors.test | 27 +- .../suite/funcs_1/t/memory_storedproc_02.test | 0 .../suite/funcs_1/t/memory_storedproc_03.test | 0 .../suite/funcs_1/t/memory_storedproc_06.test | 0 .../suite/funcs_1/t/memory_storedproc_07.test | 0 .../suite/funcs_1/t/memory_storedproc_08.test | 0 .../suite/funcs_1/t/memory_storedproc_10.test | 0 .../suite/funcs_1/t/memory_trig_0102.test | 26 +- .../suite/funcs_1/t/memory_trig_03.test | 26 +- .../suite/funcs_1/t/memory_trig_0407.test | 26 +- .../suite/funcs_1/t/memory_trig_08.test | 26 +- .../suite/funcs_1/t/memory_trig_09.test | 26 +- .../suite/funcs_1/t/memory_trig_1011ext.test | 26 +- mysql-test/suite/funcs_1/t/memory_views.test | 46 +- .../suite/funcs_1/t/myisam__datadict.test | 10 - mysql-test/suite/funcs_1/t/myisam__load.test | 45 - .../suite/funcs_1/t/myisam_bitdata.test | 28 +- .../suite/funcs_1/t/myisam_cursors.test | 27 +- .../suite/funcs_1/t/myisam_storedproc_02.test | 0 .../suite/funcs_1/t/myisam_storedproc_03.test | 0 .../suite/funcs_1/t/myisam_storedproc_06.test | 0 .../suite/funcs_1/t/myisam_storedproc_07.test | 0 .../suite/funcs_1/t/myisam_storedproc_08.test | 0 .../suite/funcs_1/t/myisam_storedproc_10.test | 0 .../suite/funcs_1/t/myisam_trig_0102.test | 26 +- .../suite/funcs_1/t/myisam_trig_03.test | 26 +- .../suite/funcs_1/t/myisam_trig_0407.test | 26 +- .../suite/funcs_1/t/myisam_trig_08.test | 26 +- .../suite/funcs_1/t/myisam_trig_09.test | 26 +- .../suite/funcs_1/t/myisam_trig_1011ext.test | 17 +- mysql-test/suite/funcs_1/t/myisam_views.test | 45 +- 226 files changed, 22861 insertions(+), 44898 deletions(-) create mode 100644 mysql-test/suite/funcs_1/datadict/basics_mixed1.inc create mode 100644 mysql-test/suite/funcs_1/datadict/basics_mixed2.inc create mode 100644 mysql-test/suite/funcs_1/datadict/basics_mixed3.inc create mode 100644 mysql-test/suite/funcs_1/datadict/charset_collation.inc create mode 100644 mysql-test/suite/funcs_1/datadict/columns.inc create mode 100644 mysql-test/suite/funcs_1/datadict/datadict.pre delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_master.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc delete mode 100755 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc delete mode 100644 mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc create mode 100644 mysql-test/suite/funcs_1/datadict/is_table_query.inc create mode 100644 mysql-test/suite/funcs_1/datadict/statistics.inc create mode 100644 mysql-test/suite/funcs_1/datadict/table_constraints.inc create mode 100644 mysql-test/suite/funcs_1/datadict/tables1.inc create mode 100644 mysql-test/suite/funcs_1/datadict/tables2.inc create mode 100644 mysql-test/suite/funcs_1/include/cleanup.inc delete mode 100644 mysql-test/suite/funcs_1/include/create_database.inc delete mode 100644 mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc delete mode 100644 mysql-test/suite/funcs_1/include/create_user_no_super.inc create mode 100644 mysql-test/suite/funcs_1/r/charset_collation_1.result create mode 100644 mysql-test/suite/funcs_1/r/charset_collation_2.result create mode 100644 mysql-test/suite/funcs_1/r/charset_collation_3.result delete mode 100644 mysql-test/suite/funcs_1/r/datadict_help_tables_build.result delete mode 100644 mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result delete mode 100644 mysql-test/suite/funcs_1/r/innodb__datadict.result delete mode 100644 mysql-test/suite/funcs_1/r/innodb__load.result create mode 100644 mysql-test/suite/funcs_1/r/is_basics_mixed.result create mode 100644 mysql-test/suite/funcs_1/r/is_character_sets.result create mode 100644 mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result create mode 100644 mysql-test/suite/funcs_1/r/is_collations.result create mode 100644 mysql-test/suite/funcs_1/r/is_column_privileges.result create mode 100644 mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_innodb.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_is.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_memory.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_myisam.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_mysql.result create mode 100644 mysql-test/suite/funcs_1/r/is_columns_ndb.result create mode 100644 mysql-test/suite/funcs_1/r/is_key_column_usage.result create mode 100644 mysql-test/suite/funcs_1/r/is_routines.result create mode 100644 mysql-test/suite/funcs_1/r/is_schema_privileges.result create mode 100644 mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result create mode 100644 mysql-test/suite/funcs_1/r/is_schemata.result create mode 100644 mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result create mode 100644 mysql-test/suite/funcs_1/r/is_statistics.result create mode 100644 mysql-test/suite/funcs_1/r/is_statistics_is.result create mode 100644 mysql-test/suite/funcs_1/r/is_statistics_mysql.result create mode 100644 mysql-test/suite/funcs_1/r/is_table_constraints.result create mode 100644 mysql-test/suite/funcs_1/r/is_table_constraints_is.result create mode 100644 mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result create mode 100644 mysql-test/suite/funcs_1/r/is_table_privileges.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_innodb.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_is.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_memory.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_myisam.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_mysql.result create mode 100644 mysql-test/suite/funcs_1/r/is_tables_ndb.result create mode 100644 mysql-test/suite/funcs_1/r/is_triggers.result create mode 100644 mysql-test/suite/funcs_1/r/is_user_privileges.result create mode 100644 mysql-test/suite/funcs_1/r/is_views.result delete mode 100644 mysql-test/suite/funcs_1/r/memory__datadict.result delete mode 100644 mysql-test/suite/funcs_1/r/memory__load.result delete mode 100644 mysql-test/suite/funcs_1/r/myisam__datadict.result delete mode 100644 mysql-test/suite/funcs_1/r/myisam__load.result mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_02.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_03.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_06.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_07.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_08.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc mode change 100755 => 100644 mysql-test/suite/funcs_1/storedproc/storedproc_10.inc create mode 100644 mysql-test/suite/funcs_1/t/charset_collation_1.test create mode 100644 mysql-test/suite/funcs_1/t/charset_collation_2.test create mode 100644 mysql-test/suite/funcs_1/t/charset_collation_3.test delete mode 100644 mysql-test/suite/funcs_1/t/datadict_help_tables_build.test delete mode 100644 mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test delete mode 100644 mysql-test/suite/funcs_1/t/innodb__datadict.test delete mode 100644 mysql-test/suite/funcs_1/t/innodb__load.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_02.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_03.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_06.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_07.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_08.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/innodb_storedproc_10.test create mode 100644 mysql-test/suite/funcs_1/t/is_basics_mixed.test create mode 100644 mysql-test/suite/funcs_1/t/is_character_sets.test create mode 100644 mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test create mode 100644 mysql-test/suite/funcs_1/t/is_collations.test create mode 100644 mysql-test/suite/funcs_1/t/is_column_privileges.test create mode 100644 mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_innodb.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_is.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_memory.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_myisam.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_mysql.test create mode 100644 mysql-test/suite/funcs_1/t/is_columns_ndb.test create mode 100644 mysql-test/suite/funcs_1/t/is_key_column_usage.test create mode 100644 mysql-test/suite/funcs_1/t/is_routines.test create mode 100644 mysql-test/suite/funcs_1/t/is_schema_privileges.test create mode 100644 mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test create mode 100644 mysql-test/suite/funcs_1/t/is_schemata.test create mode 100644 mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test create mode 100644 mysql-test/suite/funcs_1/t/is_statistics.test create mode 100644 mysql-test/suite/funcs_1/t/is_statistics_is.test create mode 100644 mysql-test/suite/funcs_1/t/is_statistics_mysql.test create mode 100644 mysql-test/suite/funcs_1/t/is_table_constraints.test create mode 100644 mysql-test/suite/funcs_1/t/is_table_constraints_is.test create mode 100644 mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test create mode 100644 mysql-test/suite/funcs_1/t/is_table_privileges.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_innodb.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_is.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_memory.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_myisam.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_mysql.test create mode 100644 mysql-test/suite/funcs_1/t/is_tables_ndb.test create mode 100644 mysql-test/suite/funcs_1/t/is_triggers.test create mode 100644 mysql-test/suite/funcs_1/t/is_user_privileges.test create mode 100644 mysql-test/suite/funcs_1/t/is_views.test delete mode 100644 mysql-test/suite/funcs_1/t/memory__datadict.test delete mode 100644 mysql-test/suite/funcs_1/t/memory__load.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_02.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_03.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_06.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_07.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_08.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/memory_storedproc_10.test delete mode 100644 mysql-test/suite/funcs_1/t/myisam__datadict.test delete mode 100644 mysql-test/suite/funcs_1/t/myisam__load.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_02.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_03.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_06.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_07.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_08.test mode change 100755 => 100644 mysql-test/suite/funcs_1/t/myisam_storedproc_10.test diff --git a/mysql-test/suite/funcs_1/README.txt b/mysql-test/suite/funcs_1/README.txt index bf6ac945cb1..7e98d1bc117 100644 --- a/mysql-test/suite/funcs_1/README.txt +++ b/mysql-test/suite/funcs_1/README.txt @@ -1,134 +1,46 @@ -Matthias 17.06.2005 -------------------- -1. I changed the database test1 (dropped + created in SP test) - to test4. - Please adjust the SP test cases. -2. There is a difference between my definition of - innodb_tb4 + memory_tb4 - to the latest table definition used by disha. - Please adjust the table definition if needed. -3. The data load files are product of the Disha data generation script - (downloaded ~20 May ?) + modified by Omer - These load data fit fairly to the table definitions. +2008-02-29 Matthias Leich +========================= -4. How to execute the "small" test with 10 rows per table. - Do NOT set the environment variable NO_REFRESH to a - value <> ''. - Start the test for example by - ./mysql-test-run.pl --vardir=/dev/shm/var \ - --force --suite=funcs_1 --do-test=myisam - The "result" files fit mostly to this variant. +1. The testsuite "funcs_1" is mostly intended for additional (compared + to the common regression tests stored in mysql-test/t) checks + of features (VIEWS, INFORMATION_SCHEMA, STORED PROCEDURES,...) + introduced with MySQL 5.0. - Any database not in ('mysql','test') and any tables - needed within a testcase ( t/_.test ) - will be (re)created at the beginning of the test. +2. There were some extensions of this suite when new information_schema + views were introduced. But in most cases the tests for these views + were stored within the regression testsuite (mysql-test/t). -5. How to execute the "big" test with many rows per table. - Replace the directories - suite/funcs_1/data and - suite/funcs_1/r - with the appropriate ones for the "big" test. - Set the environment variable NO_REFRESH to a value <> ''. - Start the test for example by - ./mysql-test-run.pl --vardir=/dev/shm/var \ - --force --suite=funcs_1 --do-test=myisam + INFORMATION_SCHEMA views introduced with MySQL 5.1 + ================================================== + ENGINES (partially tested here) + EVENTS (partially tested here) + FILES + GLOBAL_STATUS + GLOBAL_VARIABLES + PARTITIONS + PLUGINS + PROCESSLIST (full tested here) + PROFILING + REFERENTIAL_CONSTRAINTS + SESSION_STATUS + SESSION_VARIABLES - All databases and tables will be (re)created by the script - __load.test . +3. Some hints: + - SHOW TABLES ... LIKE '' + does a case sensitive comparison between the tablename and + the pattern. + The names of the tables within the informationschema are in uppercase. + So please use something like + SHOW TABLES FOR information_schema LIKE 'TABLES' + when you intend to get the same non empty result set on OS with and + without case sensitive filesystems and default configuration. + - The name of the data dictionary is 'information_schema' (lowercase). + - Server on OS with filesystem with case sensitive filenames + (= The files 'abc' and 'Abc' can coexist.) + + default configuration + Example of behaviour: + DROP DATABASE information_schema; + ERROR 42000: Access denied for user ... to database 'information_schema' + DROP DATABASE INFORMATION_SCHEMA; + ERROR 42000: Access denied for user ... to database 'INFORMATION_SCHEMA' -6. I am not sure of the files - ./funcs_1/include/create_.inc - are in the moment needed. I included them, because I - guess my VIEW testcase example needs them. - -I guess the pushed files are far away from being perfect. -It is a 8 hours hack. -Please try them, create missing files and come up with improvements. - -Good luck ! - -Matthias 17.06.2005 -=================================================================== -Omer 19.06.2005 ---------------- -1. Changed the structure of the memory_tb3 table to include two - additional column f121, f122. These columns exist for the table in - the other storage engines as TEXT. Since memory does not support - TEXT, Disha did not include them. How ever I am using them in the - Trigger tests so added them to the memory definition as CHAR(50);. - Also modifyed the DataGen_modiy.pl file to account for these two - column when generating the data. - - checked in a new DataGen_modify.pl (create a 'lib' directory - under 'funcs_1'). - - checked in a new memory_tb3.txt -2. Added three _triggers.test files based on Matthias's - structure above. -3. Added three __triggers.result files -4. Added the Trigger_master.test file in the trigger dierctory - Note: This is not complete and is still under work -5. Created a 'lib' directory and added the DataGen*.pl scripts to it - (exists under the disha suite) but should be here as well). -Omer 19.06.2005 -=================================================================== -Matthias 12.09.2005 -------------------- - Replace the geometry data types by VARBINARY - The removal of the geometry data types was necessary, because the - execution of the funcs_1 testsuite should not depend on the - availability of the geometry feature. - Note: There are servers compiled without the geometry feature. - - The columns are not removed, but their data type was changed - VARBINARY. This allows us to omit any changes within the loader - input files or data generation scripts. - The replacement of geometry by VARCHAR allows us to use our - -Matthias 12.09.2005 -=================================================================== -Matthias 14.09.2005 -------------------- - The results of the _views testcases suffer when - executed in "--ps-protocol" mode from the open - Bug#11589: mysqltest, --ps-protocol, strange output, - float/double/real with zerofill . - Implementation of a workaround: - At the beginning of views_master.inc is a variable $have_bug_11589 . - If this varable is set to 1, the ps-protocol will be switched - of for the critical statements. -Matthias 14.09.2005 -=================================================================== -Carsten 16.09.2005 ------------------- -1. The results of the datadict_ testcases have been changed in nearly - all occurrencies of --error because now for the INFORMATION_SCHEMA only - the --error 1044 (ERROR 42000: Access denied for user '..' to database - 'information_schema') seems to be used. -2. To get identical results when using "--ps-protocol" some SELECTs FROM - information_schema has been wrapped to suppress using ps-protocol because - there are differences. -3. The test using SELECT .. OUTFILE has been disabled due to bug #13202. -4. Fixed datadict_.result files after the change that added 2 columns to - the VIEWS table (DEFINER varchar(77), SECURITY_TYPE varchar(7)). -=================================================================== -Matthias 25.08.2007 -------------------- -Fixes for Bugs 30418,30420,30438,30440 -1. Replace error numbers with error names -2. Replace static "InnoDB" (not all time available) used within an - "alter table" by $OTHER_ENGINE_TYPE (set to MEMORY or MyISAM). - Minor adjustment of column data type. -3. Use mysqltest result set sorting in several cases. -4. Avoid any statistics about help tables, because their content - depends on configuration: - developer release - help tables are empty - build release - help tables have content + growing with version -5. Add two help table related tests (one for build, one for developer) - to ensure that informations about help tables within - INFORMATION_SCHEMA.TABLES/STATISTICS are checked. -General note: - Most INFORMATION_SCHEMA properties (table layout, permissions etc.) - are not affected by our variation of the storage engines except - that some properties of our tables using a specific storage - engine become visible. So it makes sense to decompose - this test into a storage engine specific part and a non - storage engine specific part in future. diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc new file mode 100644 index 00000000000..2cb9cbc700b --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc @@ -0,0 +1,53 @@ +# suite/funcs_1/datadict/basics_mixed1.inc +# +# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test +# +# 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. +# + +# 1 Attempt to create tables and views when residing in information_schema +# 1.1 CREATE TABLE +USE information_schema; +let $message= root: create a table with a name of an IS table directly in IS; +let $dd_part1= CREATE TABLE; +let $dd_part2= ( c1 INT ); +--source suite/funcs_1/datadict/basics_mixed2.inc +# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading +--error ER_UNKNOWN_TABLE +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); +# +# 1.2 CREATE VIEW +# 1.2.1 Hit on existing INFORMATION_SCHEMA table +--error ER_DBACCESS_DENIED_ERROR +CREATE VIEW tables AS SELECT 'garbage'; +--error ER_DBACCESS_DENIED_ERROR +CREATE VIEW tables AS SELECT * FROM information_schema.tables; +# 1.2.2 New view +# ER_DBACCESS_DENIED_ERROR would be better. +--error ER_UNKNOWN_TABLE +CREATE VIEW v1 AS SELECT 'garbage'; + +# 2 Attempt to create tables and views when residing in information_schema +# 1.1 CREATE TABLE +USE test; +let $message= root: create a table with a name of an IS table from other db; +let $dd_part1= CREATE TABLE information_schema.; +let $dd_part2= ( c1 INT ); +--source suite/funcs_1/datadict/basics_mixed2.inc +# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading +--error ER_UNKNOWN_TABLE +CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT); +# +# Hit on existing INFORMATION_SCHEMA table +--error ER_DBACCESS_DENIED_ERROR +CREATE VIEW information_schema.tables AS SELECT 'garbage'; +--error ER_DBACCESS_DENIED_ERROR +CREATE VIEW information_schema.tables AS +SELECT * FROM information_schema.tables; +# New table +# ER_DBACCESS_DENIED_ERROR would be better. +--error ER_UNKNOWN_TABLE +CREATE VIEW information_schema.v1 AS SELECT 'garbage'; diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc new file mode 100644 index 00000000000..6b1f07798fb --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/basics_mixed2.inc @@ -0,0 +1,55 @@ +#### suite/funcs_1/datadict/basics_mixed2.inc +# +# Auxiliary script to be sourced by suite/funcs_1/datadict/is_basics_mixed1.inc +# +# contains all tables from INFORMATION_SCHEMA +# +# Usage example(snip of script): +# let $dd_part1= CREATE TABLE information_schema.; +# let $dd_part2= ( c1 INT ); +# --source suite/funcs_1/datadict/basics_mixed2.inc +# +# We expect to get +# ERROR 42000: Access denied for user 'root'@'localhost' +# to database 'information_schema' +# for every statement. +# +# 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. +# + +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 schemata $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 tables $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 columns $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 character_sets $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 collations $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 collation_character_set_applicability $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 routines $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 statistics $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 views $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 user_privileges $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 schema_privileges $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 table_privileges $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 column_privileges $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 table_constraints $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 key_column_usage $dd_part2; +--error ER_DBACCESS_DENIED_ERROR +eval $dd_part1 triggers $dd_part2; + diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc new file mode 100644 index 00000000000..f6a290636d9 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/basics_mixed3.inc @@ -0,0 +1,42 @@ +#### suite/funcs_1/datadict/basics_mixed3.inc +# +# Auxiliary routine to be sourced by suite/funcs_1/t/is_basics_mixed.test +# +# Check if INFORMATION_SCHEMA tables contain a schema_name like 'db_data%'. +# +# 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. +# + +# No column with the name of a database contained in: +# character_sets collations collation_character_set_applicability +# user_privileges +SELECT DISTINCT table_schema FROM information_schema.columns +WHERE table_schema LIKE 'db_data%'; +SELECT DISTINCT table_schema FROM information_schema.column_privileges +WHERE table_schema LIKE 'db_data%'; +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.key_column_usage +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +SELECT DISTINCT routine_schema FROM information_schema.routines +WHERE routine_schema LIKE 'db_data%'; +SELECT DISTINCT schema_name FROM information_schema.schemata +WHERE schema_name LIKE 'db_data%'; +SELECT DISTINCT table_schema FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_data%'; +SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics +WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%'; +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_schema LIKE 'db_data%'; +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.table_constraints +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +SELECT DISTINCT table_schema FROM information_schema.table_privileges +WHERE table_schema LIKE 'db_data%'; +SELECT DISTINCT trigger_schema,event_object_schema +FROM information_schema.triggers +WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%'; +SELECT DISTINCT table_schema FROM information_schema.views +WHERE table_schema LIKE 'db_data%'; diff --git a/mysql-test/suite/funcs_1/datadict/charset_collation.inc b/mysql-test/suite/funcs_1/datadict/charset_collation.inc new file mode 100644 index 00000000000..f8fc58b082b --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/charset_collation.inc @@ -0,0 +1,122 @@ +# suite/funcs_1/datadict/charset_collation.inc +# +# Tests checking the content of the information_schema tables +# character_sets +# collations +# collation_character_set_applicability +# +# +# The amount and properties of character_sets/collations depend on the +# build type +# 2007-12 MySQL 5.0 +# --------------------------------------------------------------------- +# +# Variant 1 fits to +# version_comment MySQL Enterprise Server (Commercial) +# version_comment MySQL Enterprise Server (GPL) +# version_comment MySQL Classic Server (Commercial) +# version_comment MySQL Pushbuild Edition, build +# (version_comment Source distribution +# and +# compile was without "max" - > no collation 'utf8_general_ci') +# +# Variant 2 fits to +# version_comment MySQL Enterprise Server (GPL) +# version_comment MySQL Classic Server (Commercial) +# version_comment MySQL Pushbuild Edition, build +# (version_comment Source distribution +# and +# compile was without "max" - > collation 'utf8_general_ci' exists) +# +# Difference between variant 1 and 2 is the collation 'utf8_general_ci'. +# +# Variant 3 fits to +# version_comment MySQL Community Server (GPL) +# version_comment MySQL Cluster Server (Commercial) +# +# Difference between variant 3 and 2 is within the collation properties +# IS_COMPILED and SORTLEN. +# +# Created: +# 2007-12-18 mleich - remove the unstable character_set/collation subtests +# from include/datadict-master.inc +# - create this new test +# + +# Create a low privileged user. +--error 0, ER_CANNOT_USER +DROP USER dbdict_test@localhost; +CREATE USER dbdict_test@localhost; + +--echo # Establish connection con (user=dbdict_test) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (con,localhost,dbdict_test,,); +################################################################################ +# +# The original requirements for the following tests were: +# +# 3.2.2.2: Ensure that the table (information_schema.character_sets) shows the +# relevant information on every character set for which the current +# user or PUBLIC have the USAGE privilege. +# +# 3.2.2.3: Ensure that the table (information_schema.character_sets) does not +# show any information on any character set for which the current user +# or PUBLIC have no USAGE privilege. +# +# +# 3.2.3.2: Ensure that the table (information_schema.collations) shows the +# relevant information on every collation for which the current user +# or PUBLIC have the USAGE privilege. +# +# 3.2.3.3: Ensure that the table (information_schema.collations) does not show +# any information on any collations for which the current user and +# PUBLIC have no USAGE privilege. +# +# +# 3.2.4.2: Ensure that the table +# information_schema.collation_character_set_applicability +# shows the relevant information on every collation/character set +# combination for which the current user or PUBLIC have the USAGE +# privilege. +# +# 3.2.4.3: Ensure that the table +# information_schema.collation_character_set_applicability +# does not show any information on any collation/character set +# combinations for which the current user and PUBLIC have no +# USAGE privilege. +# +# Notes (2007-12-19 mleich): +# - The requirements are outdated because grant/revoke privilege for using a +# characterset/collation were never implemented. +# Therefore the tests should simply check the content of these tables. +# +# - The amount of collations/character sets grows with new MySQL releases. +# +# - Even within the same release the amount of records within these tables +# can differ between different build types (community, enterprise, source,...) +# +# +################################################################################ +--echo +SELECT * +FROM information_schema.character_sets +ORDER BY character_set_name; + +--echo +SELECT * +FROM information_schema.collations +ORDER BY collation_name; + +echo; +--echo +SELECT * +FROM information_schema.collation_character_set_applicability +ORDER BY collation_name, character_set_name; + + +# Cleanup +--echo # Switch to connection default + disconnect con +connection default; +disconnect con; +DROP USER dbdict_test@localhost; + diff --git a/mysql-test/suite/funcs_1/datadict/columns.inc b/mysql-test/suite/funcs_1/datadict/columns.inc new file mode 100644 index 00000000000..86f8afeff73 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/columns.inc @@ -0,0 +1,87 @@ +# suite/funcs_1/datadict/is_columns.inc +# +# Auxiliary script to be sourced by +# is_columns_is +# is_columns_mysql +# is_columns_ +# +# Purpose: +# Check the content of information_schema.columns about tables within certain +# database/s. +# +# Usage: +# The variable $my_where has to +# - be set before sourcing this script. +# - contain the first part of the WHERE qualification +# Example: +# let $my_where = WHERE table_schema = 'information_schema' +# AND table_name <> 'profiling'; +# --source suite/funcs_1/datadict/is_columns.inc +# +# 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. +# + +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval +SELECT * FROM information_schema.columns +$my_where +ORDER BY table_schema, table_name, column_name; + +--echo ########################################################################## +--echo # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH +--echo ########################################################################## +eval +SELECT DISTINCT + CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, + DATA_TYPE, + CHARACTER_SET_NAME, + COLLATION_NAME +FROM information_schema.columns +$my_where +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; + +#FIXME 3.2.6.2: check the value 2.0079 tinytext ucs2 ucs2_general_ci +eval +SELECT DISTINCT + CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, + DATA_TYPE, + CHARACTER_SET_NAME, + COLLATION_NAME +FROM information_schema.columns +$my_where +AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; + +eval +SELECT DISTINCT + CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, + DATA_TYPE, + CHARACTER_SET_NAME, + COLLATION_NAME +FROM information_schema.columns +$my_where + AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL +ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; + +echo --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values; +echo --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval +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 +$my_where +ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; + diff --git a/mysql-test/suite/funcs_1/datadict/datadict.pre b/mysql-test/suite/funcs_1/datadict/datadict.pre new file mode 100644 index 00000000000..cedc24aad13 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/datadict.pre @@ -0,0 +1,54 @@ +#### suite/funcs_1/datadict/datadict.pre +# +# Auxiliary script which loads prerequisites +# (variables needed for --replace_result ...) +# in datadictionary tests. +# +# 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. +# +--disable_query_log + +# Bug#12777 Different size shown for VARCHAR(n) columns (with n> 64) +# in INFORMATION_SCHEMA +# This bug was unfortunately (for testers) declared to be no bug. +# So CHARACTER_MAXIMUM_LENGTH of several _CATALOG columns within +# the INFORMATION_SCHEMA depends on PATH_MAX of the operating system. +# Workaround for this problem: +# Get the size of ONE known colum and check the size against some values to +# be able to use the correct --replace_result statement. Using this only the +# one pair of 'wrong' values is replaced and not all occurrencies of all +# possible pairs of values. See bug #12777 for details. +SELECT character_maximum_length INTO @CML +FROM information_schema.columns +WHERE table_schema = 'information_schema' + AND table_name = 'columns' + AND column_name = 'table_catalog'; + +let $bug_12777_0512= `SELECT @CML = 512`; +let $bug_12777_1023= `SELECT @CML = 1023`; +let $bug_12777_1024= `SELECT @CML = 1024`; +let $bug_12777_2048= `SELECT @CML = 2048`; +# 4096 is the value used in the files with expected results. +let $bug_12777_4095= `SELECT @CML = 4095`; +if (0) +{ + # enable this for debugging only, but NOT in a pushed version, as then the + # result changes from OS to OS ... + eval SELECT @CML AS 'CML', + $bug_12777_0512 AS '512', + $bug_12777_1023 AS '1023', + $bug_12777_1024 AS '1024', + $bug_12777_2048 AS '2048', + $bug_12777_4095 AS '4095'; +} + + +# Prepare a variable to be able to suppress machine dependant diffs +# this can be used in: --replace_result $SERVER_NAME +let $SERVER_NAME= `SELECT DISTINCT host FROM mysql.user + WHERE host NOT In ("localhost", "127.0.0.1", "%")`; +--enable_query_log + diff --git a/mysql-test/suite/funcs_1/datadict/datadict_master.inc b/mysql-test/suite/funcs_1/datadict/datadict_master.inc deleted file mode 100644 index 0499d3945e2..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_master.inc +++ /dev/null @@ -1,3955 +0,0 @@ -#### suite/funcs_1/datadict/datadict_master.inc -# -# Checks of INFORMATION_SCHEMA table properties and content. -# (mostly only the features introduced with MySQL 5.1) -# -# Please set the variable $OTHER_ENGINE_TYPE before sourcing this script. -# $OTHER_ENGINE_TYPE must be -# - <> $engine_type -# - all time available like MyISAM or MEMORY -# -# Last change: -# 2007-08-24 mleich Fixes for the bugs -# #30438 "{memory,myisam,ndb}__datadict" tests fail: -# Use "InnoDB" without checking -# #30418 "datadict" tests (all engines) fail: -# Dependency on the host name for ordering -# #30420 "datadict" tests (all engines) fail: -# Release build has help tables loaded -# - ---disable_abort_on_error -let $message= -. -. It is intended that the 3 __datadict.test files are named this way to be -. sure they are - in a *full run* of the suite - the first tests done for each -. storage engine. Using two _ and the order of processing in mysql-test-run.pl -. ensures this in an easy way. -. -. If needed a restart could be implemented later between the storage engines if -. values changes in the result depending from the position where the -. *__datadict.test are started. This can be a result of showing e.g. maximum -. values of the number of rows of tables. -. -. This .result file has been checked OK with Linux 5.0.48, -. build tree ChangeSet@1.2477.6.3, 2007-07-30 -. except that the not fixed Bug#30020 causes a difference. -.; ---source include/show_msg80.inc - -################################################################################ -# - let $message= FIXME: There are subtests that are switched off due to known bugs:; - --source include/show_msg.inc - #set variable(s) here to be able to switch crashing sub tests with ONE change HERE. - #change the variable(s) to enable / disable the crashing parts. - - # different 'logics' are used because sometimes codelines needs to be switched off - # and otherwise some extra statements needs to be executed as long as the bug is not - # fixed: - let $have_bug_11589= 1; - - #seems not to work: --vertical_results - eval SELECT $have_bug_11589 AS "have_bug_11589"; - #seems not to work: --horizontal_results - - # As long as - # Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill - # is not fixed, we must switch the ps-protocol for some statements off. - # If this bug is fixed, please - # 1. set the following variable to 0 - # 2. check, if the test passes - # 3. remove the workarounds - if ($have_bug_11589) - { - let $message= There are some statements where the ps-protocol is switched off. - This may come from the bug listed below, ir from other problems. - Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill; - --source include/show_msg80.inc - } -# -################################################################################ - - -# loading the tables (data is not really needed in this test) is separated to -# make it easier in this file to show the message above. ---source suite/funcs_1/datadict/datadict_load.inc - -#FIXME: - check for remaining change of object names to standards: db_, tb_, v_, u_, ... -#FIXME: - check warnings when data is loaded (Data truncated for column ...) -#FIXME: - change connect() to use less users / connections -# -#FIXME: - check for additional 'FIXME' here in the script - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - - -################################################################################ -# -# Data Dictionary -# -################################################################################ - -let $message= Testcase 3.2.1.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.1: Ensure that every INFORMATION_SCHEMA table can be queried -# with a SELECT statement, just as if it were an ordinary -# user-defined table. -################################################################################ - -# create at least one object for all 'tables' to be checked ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; - -CREATE VIEW v1 AS SELECT * FROM information_schema.tables; - -# try to get the server's name to be able to clean-up the result from machine -# specific stuff. -CREATE OR REPLACE VIEW db_datadict.vu1 as -SELECT grantee AS u - FROM information_schema.user_privileges; -CREATE OR REPLACE VIEW db_datadict.vu as -SELECT DISTINCT u, - SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3 ) - AS server, - SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3, - LENGTH( SUBSTRING( u, - LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) - AS Server_Clean -FROM db_datadict.vu1; ---replace_result $SERVER_NAME ---sorted_result -SELECT * FROM db_datadict.vu order by u; - -delimiter //; -CREATE PROCEDURE db_datadict.sp_1() - BEGIN - SELECT * FROM db_datadict.v1; - END// -delimiter ;// - -#FIXME 3.2.1.1: add missing objects of each type to have something to select -#FIXME 3.2.1.1: - FUNCTION -#FIXME 3.2.1.1: - TRIGGER - -USE information_schema; -SHOW tables; - -select * from schemata ORDER BY 2 DESC, 1 ASC; - -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---vertical_results -#SELECT * FROM tables; -# -#FIXME 3.2.1.1: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.1.1: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.1.1: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.1.1: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME -# 20 CREATE_OPTIONS ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM tables -WHERE NOT( table_schema = 'information_schema') - AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); ---horizontal_results ---enable_ps_protocol - -select s.catalog_name, s.schema_name, s.default_character_set_name, - t.table_type, t.engine - from schemata s inner join tables t - ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -select * from columns; -select * from character_sets; -select sum(id) from collations where collation_name <> 'utf8_general_cs'; -select collation_name, character_set_name into @x,@y - from collation_character_set_applicability limit 1; - select @x, @y; - ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -select * from routines; - -select count(*) from routines; -select * from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -select * from views; ---replace_result $SERVER_NAME ---sorted_result -select * from user_privileges order by grantee, privilege_type; -select * from schema_privileges; -select * from table_privileges; -select * from column_privileges; -select * from table_constraints; -select * from key_column_usage; -select count(*) as max_recs from key_column_usage; - -select max(cardinality) from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); - -select concat("View '", - table_name, "' is associated with the database '", table_schema, "'.") - AS "Who is Who for the Views" - from views; - -select concat("Table or view '", table_name, - "' is associated with the database '", table_schema, "'.") as "Who is Who" - from tables; - ---replace_result $SERVER_NAME ---sorted_result -select grantee as "user's having select privilege", - substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) - from user_privileges where privilege_type = 'select' - order by grantee; - -select all table_schema from schema_privileges limit 0,5; - -select distinct(privilege_type) from table_privileges; - -select * from column_privileges - group by table_schema having table_schema = 'db_datadict'; - -select * from table_constraints limit 0,5; -select count(*) as max_recs from key_column_usage limit 0,5; - -select information_schema.tables.table_name as "table name", - count(distinct(column_name)) as "no of columns in the table" - from information_schema.tables left outer join information_schema.columns on - information_schema.tables.table_name = information_schema.columns.table_name - group by information_schema.tables.table_name; - -# Reference Manual 22.1.16 - we will add more ...: -# select * from parameters; -# select * from referential_constraints; -# select * from triggers; - -let $message= root: simple select to check all - and never forget some - tables; -let $dd_part1= SELECT * FROM; -let $dd_part2= LIMIT 1; ---source suite/funcs_1/datadict/datadict_tables.inc - -# check again, but from different database (will fail due to missing database name) -use db_datadict; - ---error ER_NO_SUCH_TABLE -select * from schemata; ---error ER_NO_SUCH_TABLE -select * from tables; ---error ER_NO_SUCH_TABLE -select s.catalog_name, s.schema_name, s.default_character_set_name, - t.table_type, t.engine - from schemata s inner join tables t - ORDER BY s.catalog_name, s.schema_name, s.default_character_set_name; ---error ER_NO_SUCH_TABLE -select * from columns limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from character_sets limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from collations limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from collation_character_set_applicability limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from routines limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from statistics limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from views limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from user_privileges limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from schema_privileges limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from table_privileges limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from column_privileges limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from table_constraints limit 0, 5; ---error ER_NO_SUCH_TABLE -select * from key_column_usage limit 0, 5; -# Reference Manual 22.1.16 - we will add more ...: -# --error ER_NO_SUCH_TABLE -# select * from parameters; -# --error ER_NO_SUCH_TABLE -# select * from referential_constraints; -# --error ER_NO_SUCH_TABLE -# select * from triggers; -let $message= will fail due to missing database name; -let $dd_part1= SELECT * FROM; -let $dd_part2=; ---source suite/funcs_1/datadict/datadict_tables_error_1146.inc - -# now check from "other" database, but with database name -select * from information_schema.schemata ORDER BY 2 DESC; - -#SELECT * FROM information_schema.tables; -# -#FIXME 3.2.1.1: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.1.1: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.1.1: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.1.1: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHRCK_TIME -# 20 CREATE_OPTIONS -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---vertical_results ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM information_schema.tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHRCK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') - AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); ---horizontal_results ---enable_ps_protocol - -select s.catalog_name, s.schema_name, s.default_character_set_name, - t.table_type, t.engine - from information_schema.schemata s inner join information_schema.tables t - ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; - ---source suite/funcs_1/datadict/datadict_bug_12777.inc -select * from information_schema.columns limit 0, 5; -select * from information_schema.character_sets limit 0, 5; -select * from information_schema.collations limit 0, 5; -select * from information_schema.collation_character_set_applicability limit 0, 5; ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -select * from information_schema.routines limit 0, 5; -select * from information_schema.statistics limit 0, 5; -select * from information_schema.views limit 0, 5; ---replace_result $SERVER_NAME -select * from information_schema.user_privileges limit 0, 5; -select * from information_schema.schema_privileges limit 0, 5; -select * from information_schema.table_privileges limit 0, 5; -select * from information_schema.column_privileges limit 0, 5; -select * from information_schema.table_constraints limit 0, 5; -select * from information_schema.key_column_usage limit 0, 5; -select count(*) as max_recs from information_schema.key_column_usage limit 0, 5; - -# Reference Manual 22.1.16 - we will add more ...: -# select * from information_schema.parameters; -# select * from information_schema.referential_constraints; -# select * from information_schema.triggers; - -let $message= root: check with db name; -let $dd_part1= SELECT COUNT(*) FROM information_schema.; -let $dd_part2=; ---source suite/funcs_1/datadict/datadict_tables.inc - -# cleanup -USE db_datadict; -DROP VIEW v1, vu1, vu; -DROP PROCEDURE db_datadict.sp_1; -USE information_schema; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.2:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.2: Ensure that queries on an INFORMATION_SCHEMA table can -# accept all SELECT statement options and are always -# correctly evaluated. -################################################################################ - -# currently here only a subset of select statement options is checked, it's still -# not possible to check here all possible options -select catalog_name, schema_name, default_character_set_name - from schemata where schema_name like '%s%'; - -select count(*) as tot_tabs from tables; -select count(*) as the_cols from columns; - -select max(maxlen) as the_max from character_sets; -select * from collations order by id asc limit 0, 5; -select * from collation_character_set_applicability - order by character_set_name desc, collation_name limit 0, 5; - -select routine_definition from routines; -select * from statistics where table_name not like 'help_%' -group by index_name asc limit 0, 5; -select concat(table_schema, ', ', table_name, ', ', view_definition) view_info - from views; -select concat(table_schema, ', ', table_name) "Table_info" - from tables ORDER BY 1; - ---replace_result $SERVER_NAME ---sorted_result -select distinct grantee from user_privileges order by grantee, privilege_type; -select * from schema_privileges where table_catalog is null limit 0, 5; -select * from table_privileges where grantee like '%r%' limit 0, 5; - -select * from column_privileges where table_catalog is not null limit 0, 5; -select HIGH_PRIORITY * from table_constraints - group by constraint_name desc limit 0, 5; -select sum(ordinal_position) from key_column_usage; - -select * from schemata limit 0,5; -select * from schemata limit 0,5; ---replace_result $SERVER_NAME ---sorted_result -select distinct grantee from user_privileges; ---replace_result $SERVER_NAME ---sorted_result -select all grantee from user_privileges order by grantee, privilege_type; - -select id , character_set_name from collations order by id asc limit 10; - -select table_catalog from columns - union all -select table_catalog from tables limit 0,5; -select table_catalog from columns - union -select table_catalog from tables limit 0,5; - -select all schema_name from information_schema.schemata; - -# the $ENGINE_TYPE variable is used here ONLY to have 3 different file names in -# the three datadict testcases innodb_*, memory_* and myisam_* -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; - -USE test; - -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata - WHERE schema_name LIKE 'db_%'; - -# check also with a 'simple' user -CREATE USER user_3212@localhost; -GRANT ALL ON db_datadict.* TO user_3212@localhost; -# OBN: The following line was added following the fix to bug 28181 -# where queries to information_schema will fail if exporting to -# a file without having the FILE attribute -GRANT FILE ON *.* TO user_3212@localhost; - - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u3212,localhost,user_3212,,db_datadict); ---source suite/funcs_1/include/show_connection.inc - -# no db given --> db_datadict.schema does not exist ---error ER_NO_SUCH_TABLE -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; ---error ER_NO_SUCH_TABLE -eval SELECT * - FROM schemata LIMIT 0, 5; - -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata - WHERE schema_name LIKE 'db_%'; - -eval SELECT * - FROM information_schema.schemata - WHERE schema_name LIKE 'db_%'; - -USE information_schema; - -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user_2.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; - -eval SELECT * - FROM schemata LIMIT 0, 5; - -eval SELECT * - INTO OUTFILE '../tmp/out.$ENGINE_TYPE.user_2.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata - WHERE schema_name LIKE 'db_%'; - -eval SELECT * - FROM information_schema.schemata - WHERE schema_name LIKE 'db_%'; - -disconnect u3212; -connection default; -USE information_schema; ---source suite/funcs_1/include/show_connection.inc - -use db_datadict; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from information_schema.columns -union -select table_catalog, table_schema, table_name, - concat( "*** type = ", table_type ) - from information_schema.tables - order by 3, 4 desc, 1, 2 limit 30; - -use information_schema; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from columns -union -select table_catalog, table_schema, table_name, - concat( "*** type = ", table_type ) - from tables - order by 3, 4 desc, 1, 2 limit 30; - -# cleanup -DROP USER user_3212@localhost; - -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.3: Ensure that no user may execute an INSERT statement on any -# INFORMATION_SCHEMA table. -################################################################################ - -#FIXME: in this block we had --error 1288 until Mid Sep05, check the change! ---error ER_DBACCESS_DENIED_ERROR -insert into schemata (catalog_name, schema_name, default_character_set_name, sql_path) - values ('null', 'db1', 'latin1', 'null'); ---error ER_DBACCESS_DENIED_ERROR -insert into tables (table_schema, table_name)values('db_datadict', 't1'); ---error ER_DBACCESS_DENIED_ERROR -insert into columns (table_name, column_name)values('t3', 'f2'); ---error ER_DBACCESS_DENIED_ERROR -insert into character_sets (character_set_name, default_collate_name, description, maxlen) - values('cp1251', 'cp1251_general_ci', 'windows cyrillic', 1); ---error ER_DBACCESS_DENIED_ERROR -insert into collations ( collation_name, character_set_name, id, is_default, is_compiled, sortlen) - values ('cp1251_bin', 'cp1251', 50, '', '', 0); ---error ER_DBACCESS_DENIED_ERROR -insert into collation_character_set_applicability (collation_name, character_set_name) - values (' big5_chinese_ci', 'big6'); ---error ER_DBACCESS_DENIED_ERROR -insert into routines(routine_name, routine_type ) values ('p2', 'procedure'); ---error ER_DBACCESS_DENIED_ERROR -insert into statistics(table_schema, table_name, index_name) - values ('mysql', 'db', 'primary'); ---error ER_DBACCESS_DENIED_ERROR -insert into views(table_schema, table_name) values ('db2', 'v2'); ---error ER_DBACCESS_DENIED_ERROR -insert into user_privileges (privilege_type, is_grantable) values ('select', 'yes'); ---error ER_DBACCESS_DENIED_ERROR -insert into schema_privileges (table_schema, privilege_type) values('db2', 'insert'); ---error ER_DBACCESS_DENIED_ERROR -insert into table_privileges (able_schema, table_name, privilege_type) - values('db2', 'v2', 'insert'); ---error ER_DBACCESS_DENIED_ERROR -insert into column_privileges (table_name, column_name, privilege_type) - values ('t3', 'f3', 'insert'); ---error ER_DBACCESS_DENIED_ERROR -insert into table_constraints ( constraint_schema, constraint_name, table_schema) - values ('primary', 'mysql', 'user'); ---error ER_DBACCESS_DENIED_ERROR -insert into key_column_usage (constraint_schema, constraint_name, table_name) - values ('mysql', 'primary', 'db'); - -# insert through a procedure ---disable_warnings -drop procedure if exists db_datadict.sp_4_1_3; ---enable_warnings - -delimiter //; -create procedure db_datadict.sp_4_1_3() -begin - insert into information_schema.schema_privileges (table_schema,privilege_type) - values('db2','insert'); -end// -delimiter ;// - -#FIXME: check for the diffs Win ./. Linux -SELECT table_schema, privilege_type FROM information_schema.schema_privileges - WHERE table_schema LIKE 'db%'; - ---error ER_DBACCESS_DENIED_ERROR -call db_datadict.sp_4_1_3(); - -#FIXME: check for the diffs Win ./. Linux -SELECT table_schema, privilege_type FROM information_schema.schema_privileges - WHERE table_schema LIKE 'db%'; - -# cleanup -drop procedure db_datadict.sp_4_1_3; - -# insert into information_schema as a limited user - -CREATE USER user_4_1_3@localhost; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u413,localhost,user_4_1_3,,test); ---source suite/funcs_1/include/show_connection.inc - -use information_schema; - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -insert into table_constraints ( constraint_schema, constraint_name, table_schema) - values ('primary', 'mysql', 'user'); - -connection default; ---source suite/funcs_1/include/show_connection.inc -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.4: Ensure that no user may execute an UPDATE statement on any -# INFORMATION_SCHEMA table. -################################################################################ - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) in the whole next block ---error ER_DBACCESS_DENIED_ERROR -update schemata set schema_name = 'db5' where default_character_set_name = 'latin1'; ---error ER_DBACCESS_DENIED_ERROR -update tables set table_schema = 'db_datadict1' where table_name = 't1'; ---error ER_DBACCESS_DENIED_ERROR -update columns set table_name = 't4' where column_name = 'f2'; ---error ER_DBACCESS_DENIED_ERROR -update character_sets set character_set_name = 'cp1252' where maxlen = 1; ---error ER_DBACCESS_DENIED_ERROR -update collations set collation_name = 'cp1253_bin' - where character_set_name = 'cp1251'; ---error ER_DBACCESS_DENIED_ERROR -update collation_character_set_applicability set collation_name = 'big6_chinese_ci' - where character_set_name = 'big6'; ---error ER_DBACCESS_DENIED_ERROR -update routines set routine_name = p2 where routine_body = 'sql'; ---error ER_DBACCESS_DENIED_ERROR -update statistics set table_schema = 'mysql1' where table_name = 'db'; ---error ER_DBACCESS_DENIED_ERROR -update views set table_schema = 'db3' where table_name = 'v1'; ---error ER_DBACCESS_DENIED_ERROR -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; ---error ER_DBACCESS_DENIED_ERROR -update schema_privileges set table_schema = 'db2' where privilege_type = 'select'; ---error ER_DBACCESS_DENIED_ERROR -update table_privileges set table_name = 'v3' where privilege_type = 'select'; ---error ER_DBACCESS_DENIED_ERROR -update column_privileges set table_name = 't4' where column_name = 'f3'; ---error ER_DBACCESS_DENIED_ERROR -update table_constraints set constraint_schema = 'primary' - where table_schema = 'proc'; ---error ER_DBACCESS_DENIED_ERROR -update key_column_usage set table_name = 'db1' where constraint_name = 'primary'; - -# update through a procedure ---disable_warnings -drop procedure if exists db_datadict.sp_4_1_4; ---enable_warnings - -delimiter //; -create procedure db_datadict.sp_4_1_4() -begin - update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end// -delimiter ;// - -#FIXME: check for the diffs Win ./. Linux ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -select * from information_schema.routines; - ---error ER_DBACCESS_DENIED_ERROR -call db_datadict.sp_4_1_4(); - -#FIXME: check for the diffs Win ./. Linux ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -select * from information_schema.routines; - -# cleanup -drop procedure db_datadict.sp_4_1_4; - -# update information_schema as a limited user - -connection u413; - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; - -connection default; ---source suite/funcs_1/include/show_connection.inc -# -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.5:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.5: Ensure that no user may execute a DELETE statement on any -# INFORMATION_SCHEMA table. -################################################################################ - -use information_schema; - -let $message= root: DELETE FROM any table in IS; -let $dd_part1= DELETE FROM; -let $dd_part2=; ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) in the whole next block ---error ER_DBACCESS_DENIED_ERROR -delete from schemata where schema_name = 'mysql'; ---error ER_DBACCESS_DENIED_ERROR -delete from tables where table_name = 'abc'; ---error ER_DBACCESS_DENIED_ERROR -delete from columns; ---error ER_DBACCESS_DENIED_ERROR -delete from character_sets; ---error ER_DBACCESS_DENIED_ERROR -delete from collations; ---error ER_DBACCESS_DENIED_ERROR -delete from collation_character_set_applicability; ---error ER_DBACCESS_DENIED_ERROR -delete from routines; ---error ER_DBACCESS_DENIED_ERROR -delete from statistics; ---error ER_DBACCESS_DENIED_ERROR -delete from views; ---error ER_DBACCESS_DENIED_ERROR -delete from user_privileges; ---error ER_DBACCESS_DENIED_ERROR -delete from schema_privileges; ---error ER_DBACCESS_DENIED_ERROR -delete from table_privileges; ---error ER_DBACCESS_DENIED_ERROR -delete from column_privileges; ---error ER_DBACCESS_DENIED_ERROR -delete from table_constraints; ---error ER_DBACCESS_DENIED_ERROR -delete from key_column_usage; - -# delete through a procedure ---disable_warnings -drop procedure if exists db_datadict.sp_4_1_5; ---enable_warnings - -delimiter //; -create procedure db_datadict.sp_4_1_5() -begin - delete from information_schema.column_privileges; -end// -delimiter ;// - ---error ER_DBACCESS_DENIED_ERROR -call db_datadict.sp_4_1_5(); - -# cleanup -drop procedure db_datadict.sp_4_1_5; - -# delete from information_schema as a limited user - -connection u413; - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -delete from tables where table_name = 'abc'; - -disconnect u413; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -# cleanup -DROP USER user_4_1_3@localhost; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.6:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.6: Ensure that no user may create an INFORMATION_SCHEMA base -# table. -################################################################################ - -use information_schema; - -let $message= root: create a table with a name of an IS table directly in IS; -let $dd_part1= CREATE TABLE; -let $dd_part2= ( c1 INT ); ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -#FIXME solved - 3.2.1.6: check for better error message - 42S02: Unknown table '' in ? ---error ER_UNKNOWN_TABLE -create table t1 (f1 int, f2 int, f3 int); - -use db_datadict; - -#FIXME: check correct error message - HY000 Can't create/write to file '.\information_schema\columns.frm' (Errcode: 2) -let $message= root: create a table with a name of an IS table from other db; -let $dd_part1= CREATE TABLE information_schema.; -let $dd_part2= ( c1 INT ); ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -#FIXME solved - 3.2.1.6: check for better error message - 42S02: Unknown table '' in ? ---error ER_UNKNOWN_TABLE -create table information_schema.t1 (f1 int, f2 int, f3 int); - -# create a table in information_schema as a limited user with sufficient permissions -CREATE USER user_4_1_6@localhost; - -grant all on *.* to user_4_1_6@localhost; - -FLUSH PRIVILEGES; - -SHOW GRANTS FOR user_4_1_6@localhost; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u2, localhost, user_4_1_6, , information_schema); ---source suite/funcs_1/include/show_connection.inc - -use information_schema; - -let $message= user: create a table with a name of an IS table directly in IS; -let $dd_part1= CREATE TABLE; -let $dd_part2= ( c1 INT ); ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -#FIXME solved - 3.2.1.6: check for better error message - 42S02: Unknown table '' in ? ---error ER_UNKNOWN_TABLE -create table t1 (f1 int, f2 int, f3 int); - -use test; - -#FIXME 3.2.1.6: check correct error message - HY000 Can't create/write to file '.\information_schema\columns.frm' (Errcode: 2) -let $message= user: create a table with a name of an IS table from other db; -let $dd_part1= CREATE TABLE information_schema.; -let $dd_part2= ( c1 INT ); ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -#FIXME solved - 3.2.1.6: check for better error message - 42S02: Unknown table '' in ? ---error ER_UNKNOWN_TABLE -create table information_schema.t1 (f1 int, f2 int, f3 int); - -#cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect u2; -DROP USER user_4_1_6@localhost; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.7:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.7: Ensure that no user may create an INFORMATION_SCHEMA view. -################################################################################ - -use information_schema; - -let $message= root: create a view with a name of an IS table directly in IS; -let $dd_part1= CREATE VIEW ; -let $dd_part2= AS SELECT * FROM mysql.time_zone; -#FIXME: check change from error 1 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc - ---error ER_UNKNOWN_TABLE -CREATE VIEW v1 AS SELECT * FROM information_schema.schemata; - -USE db_datadict; - -let $message= root: create a view with a name of an IS table from other db; -let $dd_part1= CREATE VIEW information_schema.; -let $dd_part2= AS SELECT * FROM mysql.time_zone; -#FIXME: check change from error 1 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc - -# ... but creating a view that 'uses' the information_schema is allowed: -CREATE VIEW v1 AS SELECT * FROM information_schema.columns; - -SELECT * FROM v1 LIMIT 5; - -# create a view in information_schema as a limited user with sufficient permissions -CREATE USER user_4_1_7@localhost; - -GRANT ALL ON db_datadict.* TO user_4_1_7@localhost; -#FIXME: check that GRANT ON i_s is no longer allowed ---error ER_DBACCESS_DENIED_ERROR -GRANT ALL ON information_schema.* TO user_4_1_7@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u3, localhost, user_4_1_7, , db_datadict); -use information_schema; ---source suite/funcs_1/include/show_connection.inc - -let $message= user: create a view with a name of an IS table directly in IS; -let $dd_part1= CREATE VIEW ; -let $dd_part2= AS SELECT * FROM db_datadict.v1; -#FIXME: check change from error 1 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc ---error ER_UNKNOWN_TABLE -create view v1 as select * from table_privileges; - -use db_datadict; - -let $message= user: create a view with a name of an IS table from other db; -let $dd_part1= CREATE VIEW information_schema.; -let $dd_part2= AS SELECT * FROM db_datadict.v1; -#FIXME: check change from error 1 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -disconnect u3; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER user_4_1_7@localhost; -DROP VIEW db_datadict.v1; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.8:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.8: Ensure that no user may create an index on an -# INFORMATION_SCHEMA table. -################################################################################ - -use information_schema; - -#FIXME: check later the change from 1288 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -create index i1 on schemata(schema_name); ---error ER_DBACCESS_DENIED_ERROR -create index i2 on tables(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i3 on columns(table_name); - ---error ER_DBACCESS_DENIED_ERROR -create index i4 on character_sets(character_set_name); ---error ER_DBACCESS_DENIED_ERROR -create index i5 on collations( collation_name); ---error ER_DBACCESS_DENIED_ERROR -create index i6 on collation_character_set_applicability(collation_name); - ---error ER_DBACCESS_DENIED_ERROR -create index i7 on routines(routine_name); ---error ER_DBACCESS_DENIED_ERROR -create index i8 on statistics(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i9 on views(table_schema); - ---error ER_DBACCESS_DENIED_ERROR -create index i10 on user_privileges(privilege_type); ---error ER_DBACCESS_DENIED_ERROR -create index i11 on schema_privileges(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i12 on table_privileges(able_schema); - ---error ER_DBACCESS_DENIED_ERROR -create index i13 on column_privileges(table_name); ---error ER_DBACCESS_DENIED_ERROR -create index i14 on table_constraints(constraint_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i15 on key_column_usage(constraint_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i16 on triggers(trigger_name); - -use db_datadict; ---error ER_DBACCESS_DENIED_ERROR -create index i15 on information_schema.key_column_usage(constraint_schema); - -use information_schema; - -# create an index on an information_schema table as a limited user with sufficient permissions -CREATE USER user_4_1_8@localhost; - -grant select, index on *.* to user_4_1_8@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u4, localhost, user_4_1_8, , test); ---source suite/funcs_1/include/show_connection.inc - -use information_schema; - ---error ER_DBACCESS_DENIED_ERROR -create index i1 on schemata(schema_name); ---error ER_DBACCESS_DENIED_ERROR -create index i2 on tables(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i3 on columns(table_name); - ---error ER_DBACCESS_DENIED_ERROR -create index i4 on character_sets(character_set_name); ---error ER_DBACCESS_DENIED_ERROR -create index i5 on collations( collation_name); ---error ER_DBACCESS_DENIED_ERROR -create index i6 on collation_character_set_applicability(collation_name); - ---error ER_DBACCESS_DENIED_ERROR -create index i7 on routines(routine_name); ---error ER_DBACCESS_DENIED_ERROR -create index i8 on statistics(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i9 on views(table_schema); - ---error ER_DBACCESS_DENIED_ERROR -create index i10 on user_privileges(privilege_type); ---error ER_DBACCESS_DENIED_ERROR -create index i11 on schema_privileges(table_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i12 on table_privileges(able_schema); - ---error ER_DBACCESS_DENIED_ERROR -create index i13 on column_privileges(table_name); ---error ER_DBACCESS_DENIED_ERROR -create index i14 on table_constraints(constraint_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i15 on key_column_usage(constraint_schema); ---error ER_DBACCESS_DENIED_ERROR -create index i16 on triggers(trigger_name); - -use db_datadict; ---error ER_DBACCESS_DENIED_ERROR -create index i15 on information_schema.key_column_usage(constraint_schema); - -disconnect u4; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -# cleanup -DROP USER user_4_1_8@localhost; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.9:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.9: Ensure that no user may alter the definition of an -# INFORMATION_SCHEMA table. -################################################################################ - -#FIXME: 3.2.1.9 check for better error message than ERROR 42S02: Table 'information_schema.schemata' doesn't exist - -# first simple check all known - so we never forget one ... -let $message= root: alter a table from other db; -let $dd_part1= ALTER TABLE information_schema.; -let $dd_part2= ADD f1 INT; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -use information_schema; -let $message= root: alter a table from directly; -let $dd_part1= ALTER TABLE ; -let $dd_part2= ADD f1 INT; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -# now more detailed checks ---error ER_DBACCESS_DENIED_ERROR -alter table schemata add f1 int; ---error ER_DBACCESS_DENIED_ERROR -alter table tables drop primary key; ---error ER_DBACCESS_DENIED_ERROR -alter table columns add f1 int; ---error ER_DBACCESS_DENIED_ERROR -alter table character_sets disable keys; ---error ER_DBACCESS_DENIED_ERROR -alter table collations enable keys; ---error ER_DBACCESS_DENIED_ERROR -alter table collation_character_set_applicability add f1 int; ---error ER_DBACCESS_DENIED_ERROR -alter table routines discard tablespace; ---error ER_DBACCESS_DENIED_ERROR -alter table statistics import tablespace; ---error ER_DBACCESS_DENIED_ERROR -alter table views drop column table_name; ---error ER_DBACCESS_DENIED_ERROR -alter table user_privileges drop index privilege_type; ---error ER_DBACCESS_DENIED_ERROR -alter table schema_privileges drop column is_grantable; ---error ER_DBACCESS_DENIED_ERROR -alter table table_privileges order by constraint_type; ---error ER_DBACCESS_DENIED_ERROR -alter table column_privileges rename to aaxyz; ---error ER_DBACCESS_DENIED_ERROR -alter table table_constraints order by schema_name; ---error ER_DBACCESS_DENIED_ERROR -alter table key_column_usage rename to information_schema.aabxyz; ---error ER_DBACCESS_DENIED_ERROR -alter table triggers rename to information_schema.sql_mode; -# Alter an information_schema table as a limited user with sufficient permissions - -CREATE USER user_4_1_9@localhost; - -grant select, alter, create, insert on *.* to user_4_1_9@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u5, localhost, user_4_1_9, , db_datadict); ---source suite/funcs_1/include/show_connection.inc - -use db_datadict; - -let $message= user: alter a table from other db; -let $dd_part1= ALTER TABLE information_schema.; -let $dd_part2= ADD f1 INT; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -use information_schema; -let $message= user: alter a table from directly; -let $dd_part1= ALTER TABLE ; -let $dd_part2= ADD f1 INT; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -disconnect u5; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER user_4_1_9@localhost; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.10:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. -################################################################################ - -use information_schema; - -let $message= root: drop a table from IS; -let $dd_part1= DROP TABLE ; -let $dd_part2=; -#FIXME: check change from error 1051 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -use db_datadict; - -let $message= root: drop a table from other db; -let $dd_part1= DROP TABLE information_schema.; -let $dd_part2=; -#FIXME: check change from error 1051 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -use information_schema; - -# drop an information_schema table as a limited user with sufficient permissions - -CREATE USER user_4_1_10@localhost; - -GRANT SELECT, DROP ON *.* TO user_4_1_10@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u6,localhost,user_4_1_10,,db_datadict); - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - -let $message= user: drop a table from IS; -let $dd_part1= DROP TABLE ; -let $dd_part2=; -#FIXME: check change from error 1051 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -use db_datadict; - -let $message= user: drop a table from other db; -let $dd_part1= DROP TABLE information_schema.; -let $dd_part2=; -#FIXME: check change from error 1051 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -disconnect u6; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -# cleanup -DROP USER user_4_1_10@localhost; - -# Try to carry out information_schema modification operations with a user other than root having SUPER privileges -CREATE USER user_4_1_11@localhost; - -GRANT SUPER ON *.* TO user_4_1_11@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u7,localhost,user_4_1_11, ,test); - -use information_schema; ---source suite/funcs_1/include/show_connection.inc - ---error ER_DBACCESS_DENIED_ERROR -drop table routines; - ---error ER_DBACCESS_DENIED_ERROR -alter table collations enable keys; - ---error ER_DBACCESS_DENIED_ERROR -create index i5 on collations( collation_name ); - ---error ER_UNKNOWN_TABLE -create view v1 as select * from schemata; - ---error ER_DBACCESS_DENIED_ERROR -delete from columns; - ---error ER_DBACCESS_DENIED_ERROR -update columns set table_name = 't4' where column_name = 'f2'; - ---error ER_DBACCESS_DENIED_ERROR -insert into collations ( collation_name, character_set_name, id, is_default, - is_compiled, sortlen) - values ('cp1251_bin', 'cp1251', 50, '', '', 0); - -disconnect u7; - -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER user_4_1_11@localhost; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.11:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table -# to any other database. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -CREATE DATABASE db_datadict; -CREATE USER 'u_6_401011'@'localhost'; - -#FIXME: check that GRANT ON i_s is no longer allowed ---error ER_DBACCESS_DENIED_ERROR -GRANT ALL ON information_schema.* TO 'u_6_401011'@'localhost'; -GRANT ALL ON db_datadict.* TO 'u_6_401011'@'localhost'; - -FLUSH PRIVILEGES; - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; - -let $message= root: move table to other DB; -let $dd_part1= ALTER TABLE information_schema.; -let $dd_part2= RENAME db_datadict.tb_01; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401011, localhost, u_6_401011, , db_datadict); - -USE information_schema; ---source suite/funcs_1/include/show_connection.inc - ---error ER_DBACCESS_DENIED_ERROR -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; - -let $message= user: move table to other DB; -let $dd_part1= ALTER TABLE information_schema.; -let $dd_part2= RENAME db_datadict.tb_01; -#FIXME: check change from error 1146 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -disconnect u_6_401011; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -#cleanup ---disable_warnings -#DROP DATABASE db_datadict; -DROP TABLE IF EXISTS db_datadict.schemata; -DROP USER 'u_6_401011'@'localhost'; ---enable_warnings -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.12:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.12: Ensure that no user may directly add to, alter, or delete -# any data in an INFORMATION_SCHEMA table. -################################################################################ - -# first as root a DELETE check on all tables -let $message= root: delete from IS tables; -let $dd_part1= DELETE FROM information_schema.; -let $dd_part2=; -#FIXME: check change from error 1288 to 1044 ---source suite/funcs_1/datadict/datadict_tables_error_1044.inc -# check UPDATE for all ... ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.tables SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.columns SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.statistics SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.views SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.table_privileges SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.column_privileges SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.table_constraints SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.key_column_usage SET table_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.schemata SET catalog_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.character_sets SET description = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.collations SET character_set_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.collation_character_set_applicability - SET character_set_name = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.routines SET routine_type = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.user_privileges SET grantee = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.schema_privileges SET grantee = 't_4711'; ---error ER_DBACCESS_DENIED_ERROR -UPDATE information_schema.triggers SET sql_mode = 't_4711'; - -CREATE USER 'u_6_401012'@'localhost'; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401012, localhost, u_6_401012, , test); - -use information_schema; - ---error ER_DBACCESS_DENIED_ERROR -insert into information_schema.schemata (catalog_name, schema_name, - default_character_set_name, sql_path) - values (null, information_schema1, utf16, null); -#FIXME: check later the change from 1142 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.schemata rename db_datadict1.schemata; -#FIXME: check later the change from 1146 to 1044 (since Mid Sep05) ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.tables drop column checksum; ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.statistics modify packed int; ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.routines modify created int not null; ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.key_column_usage drop column ordinal_position; ---error ER_DBACCESS_DENIED_ERROR -alter table information_schema.table_privileges - change privilege_type rights_approved varchar(32); ---error ER_DBACCESS_DENIED_ERROR -update columns set table_name = 't4' where column_name = 'f2'; ---error ER_DBACCESS_DENIED_ERROR -delete from information_schema.collations; - -disconnect u_6_401012; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc - ---disable_warnings -drop table if exists db_datadict1.schemata; -DROP USER 'u_6_401012'@'localhost'; ---enable_warnings -#------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.1.13:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.13: Ensure that the creation of any new database object -# (e.g. table or column) automatically inserts all relevant -# information on that object into every appropriate -# INFORMATION_SCHEMA table. -################################################################################ - -use information_schema; - -let $dbname=db_datadict; -let $message= first check status >before< creating the objects ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; - -eval create table res_t_401013(f1 char(10), f2 char(25), f3 int) - engine = $ENGINE_TYPE; -create view res_v_401013 as select * from res_t_401013; -CREATE USER u_6_401013@localhost; -create procedure sp_6_401013() select 'db_datadict'; -create function fn_6_401013() returns int return 0; -create index i_6_401013 on res_t_401013(f3); - -use information_schema; - -let $message= now check whether all new objects exists in IS ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc - -# cleanup objects -use db_datadict; -drop index i_6_401013 on res_t_401013; -drop table db_datadict.res_t_401013; -drop view db_datadict.res_v_401013; -DROP USER u_6_401013@localhost; -drop procedure sp_6_401013; -drop function fn_6_401013; -drop database db_datadict; - -use information_schema; - -let $message= and now check whether all objects are removed from IS ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.14:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.14: Ensure that the alteration of any existing database object -# automatically updates all relevant information on that -# object in every appropriate INFORMATION_SCHEMA table. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; - -create table res_t_401014(f1 char(10), f2 varchar(25), f3 int); -create view res_v_401014 as select * from res_t_401014; -create procedure sp_6_401014() select 'db_datadict'; -create function fn_6_401014() returns int return 0; - -# check current information in information_schema - -let $dbname=db_datadict; -let $message= show existing objects >before< changing them ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc - -# alter objects - -use db_datadict; - -alter table res_t_401014 change f1 ff1 int; -eval alter table res_t_401014 engine = $OTHER_ENGINE_TYPE; -alter table res_t_401014 change f3 f3_new bigint; -alter view res_v_401014 as select ff1 from res_t_401014; -alter procedure sp_6_401014 sql security invoker; -alter function fn_6_401014 comment 'updated comments'; -alter database db_datadict character set utf8; - -# check updated information in information_schema -let $message= now check whether the changes are visible in IS ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc - - -# cleanup - -use db_datadict; -drop table db_datadict.res_t_401014; -drop view db_datadict.res_v_401014; -drop procedure sp_6_401014; -drop function fn_6_401014; -drop database db_datadict; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.15:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.15: Ensure that the dropping of any existing database object -# automatically deletes all relevant information on that -# object from every appropriate INFORMATION_SCHEMA table. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; - -create table res_t_401015(f1 char(10), f2 text(25), f3 int); -create view res_v_401015 as select * from res_t_401015; -CREATE USER u_6_401015@localhost; -create procedure sp_6_401015() select 'test'; -create function fn_6_401015() returns int return 0; -create index i_6_401015 on res_t_401015(f3); - -let $dbname=db_datadict; -let $message= show existing objects >before< dropping them ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc - -use db_datadict; -drop index i_6_401015 on res_t_401015; -drop table db_datadict.res_t_401015; -drop view db_datadict.res_v_401015; -DROP USER u_6_401015@localhost; -drop procedure sp_6_401015; -drop function fn_6_401015; -#drop database db_datadict; - -let $message= now check they are really gone ...; ---source suite/funcs_1/datadict/datadict_show_schema.inc -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.16:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.16: Ensure that no user may use any INFORMATION_SCHEMA table to -# determine any information on a database and/or its -# structure unless authorized to get that information. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - -CREATE DATABASE db_hidden; -USE db_hidden; -CREATE TABLE tb_hidden ( c1 TEXT ); - -USE db_datadict; - -CREATE TABLE res_t_401016(f1 char(10),f2 text(25),f3 int); -CREATE TABLE res_t_401016_1(f1 char(10),f2 text(25),f3 int); - -CREATE USER 'u_6_401016'@'localhost'; -GRANT SELECT ON db_datadict.res_t_401016 TO 'u_6_401016'@'localhost'; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401016, localhost, u_6_401016, , test); - -USE information_schema; - -SELECT table_schema, table_name, engine - FROM TABLES; -# WHERE table_name LIKE 'res_t_401016%'; - -SHOW TABLES; -SELECT * FROM schemata; - -disconnect u_6_401016; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -#FIXME: check that GRANT ON i_s is no longer allowed ---error ER_DBACCESS_DENIED_ERROR -grant usage on information_schema.* to 'u_6_401016'@'localhost'; -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401016_1, localhost, u_6_401016, , db_datadict); - -USE information_schema; -SHOW TABLES; -SELECT * FROM schemata; - -disconnect u_6_401016_1; - -# all tables are checked again later with permission tests - -# cleanup -connection default; -use db_datadict; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'u_6_401016'@'localhost'; -drop table res_t_401016; -drop table res_t_401016_1; -DROP DATABASE db_hidden; -#drop database db_datadict; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.17:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.17: Ensure that the SELECT privilege is granted TO PUBLIC WITH -# GRANT OPTION on every INFORMATION_SCHEMA table. -################################################################################ - -CREATE USER 'u_6_401017'@'localhost'; - -#FIXME: check that GRANT ON i_s is no longer allowed ---error ER_DBACCESS_DENIED_ERROR -grant select on information_schema.* to u_6_401017@localhost; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401017, localhost, u_6_401017, , test); - -use information_schema; - -select * from collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -select * from schemata; -select table_name from tables; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -select table_name, column_name, column_type from columns; -select character_set_name from character_sets; -select collation_name from collations where collation_name <> 'utf8_general_cs'; -select routine_name, routine_type from routines; -select table_name, index_name from statistics; -select table_name from views; -select privilege_type from user_privileges; -select grantee, privilege_type from schema_privileges; -select * from table_privileges; -select column_name, privilege_type from column_privileges; -select table_name,constraint_type from table_constraints; -select table_schema, table_name, column_name from key_column_usage; - -disconnect u_6_401017; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'u_6_401017'@'localhost'; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.18:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.18: Ensure that the CREATE VIEW privilege on an -# INFORMATION_SCHEMA table may be granted to any user. -################################################################################ - -CREATE USER 'u_6_401018'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; -GRANT ALL ON db_datadict.* TO 'u_6_401018'@'localhost'; - -SHOW GRANTS FOR 'u_6_401018'@'localhost'; -FLUSH PRIVILEGES; - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401018, localhost, u_6_401018, , test); - -USE db_datadict; - -create view db_datadict.v_401018 as - select * from information_schema.schemata; -SELECT * FROM v_401018 ORDER BY 2 DESC; - -disconnect u_6_401018; - -#cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'u_6_401018'@'localhost'; -DROP DATABASE db_datadict; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.19:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.19: Ensure that no other privilege on an INFORMATION_SCHEMA -# table is granted, or may be granted, to any user. -################################################################################ - -CREATE USER 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant alter on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant alter routine on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant create on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant create routine on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant create temporary tables - on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant delete on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant drop on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant execute on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant index on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant insert on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant lock tables on information_schema.* to 'u_6_401019'@'localhost'; - -#FIXME: check GRANT on IS ---error ER_DBACCESS_DENIED_ERROR -grant update on information_schema.* to 'u_6_401019'@'localhost'; - -SELECT * FROM information_schema.table_privileges - WHERE table_schema = "information_schema"; -SELECT * FROM information_schema.column_privileges - WHERE table_schema = "information_schema"; - -# cleanup -DROP USER 'u_6_401019'@'localhost'; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.1.20:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.1.20: Ensure that USE INFORMATION_SCHEMA allows the user to -# switch to the INFORMATION_SCHEMA database, for query -# purposes only. -################################################################################ - -CREATE USER 'u_6_401020'@'localhost'; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401020, localhost, u_6_401020, , test); - -USE information_schema; -SELECT * FROM schemata; - ---error ER_UNKNOWN_TABLE -CREATE TABLE tb_not_allowed ( col TEXT ); -#FIXME 3.2.1.20: bad message: ERROR 42S02: Unknown table 'tb_not_allowed' in information_schema -#FIXME 3.2.1.20: better: ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' - ---error ER_UNKNOWN_TABLE -create view res_v1 as select * from information_schema.schemata; - ---error ER_DBACCESS_DENIED_ERROR -alter table schemata modify catalog_name varchar(255); - ---error ER_DBACCESS_DENIED_ERROR -update schemata set catalog_name = 'abc' - where schema_name = 'information_schema'; - -delimiter //; ---error ER_BAD_DB_ERROR -CREATE PROCEDURE sp_3_2_1_20() - BEGIN - INSERT INTO information_schema.schema_privileges (table_schema,privilege_type) - VALUES('db2','insert'); - END// -delimiter ;// - ---error ER_DBACCESS_DENIED_ERROR -DELETE FROM schemata WHERE schema_name = 'information_schema'; - -disconnect u_6_401020; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'u_6_401020'@'localhost'; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.2.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.2.1: Ensure that the INFORMATION_SCHEMA.CHARACTER_SETS -# table has the following columns, in the following order: -# -# CHARACTER_SET_NAME (shows a character set name), -# DEFAULT_COLLATE_NAME (shows the name of the default -# collation for that character set), -# DESCRIPTION (shows a descriptive name for that character -# set), -# MAXLEN (shows the number of bytes used to store each -# character supported by that character set). -################################################################################ - -let $is_table= character_sets; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.2.2:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.2.2: Ensure that the table shows the relevant information on -# every character set for which the current user or PUBLIC -# have the USAGE privilege. -################################################################################ - ---source suite/funcs_1/include/show_connection.inc -SELECT * FROM information_schema.character_sets; -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.2.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.2.3: Ensure that the table shows the relevant information on -# every character set for which the current user or PUBLIC -# have the USAGE privilege. -################################################################################ - -# Test requirement is erroneous... we cannot grant / revoke privilege for using -# a character set. -# ------------------------------------------------------------------------------ - -let $message= Testcase 3.2.3.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.3.1: Ensure that the INFORMATION_SCHEMA.COLLATIONS -# table has the following columns, in the following order: -# -# COLLATION_NAME (shows a collation name), -# CHARACTER_SET_NAME (shows the name of the character set to -# which the collation applies), -# ID (shows a numeric identifier for that collation/character -# set combination), -# IS_DEFAULT (shows whether the collation is the default -# collation for the character set shown), -# IS_COMPILED (indicates whether the collation is compiled -# into the MySQL server), -# SORTLEN (shows a value related to the amount of memory -# required to sort strings using this -# collation/character set combination). -################################################################################ - -let $is_table= collations; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.3.2:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.3.2: Ensure that the table shows the relevant information on -# every collation for which the current user or PUBLIC have -# the USAGE privilege. -################################################################################ - -SELECT * FROM collations where collation_name <> 'utf8_general_cs'; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.3.3:; ---source include/show_msg80.inc - -############################################################################### -# Testcase 3.2.3.3: Ensure that the table does not show any information on any -# collations for which the current user and PUBLIC have no -# USAGE privilege. -################################################################################ - -# Test requirement is erroneous... we cannot grant / revoke privilege for using -# a collation. -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.4.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.4.1: Ensure that the -# INFORMATION_SCHEMA.COLLATION_CHARACTER_SET_APPLICABILITY -# table has the following columns, in the following order: -# -# COLLATION_NAME (shows the name of a collation), -# CHARACTER_SET_NAME (shows the name of a character set to -# which that collation applies). -################################################################################ - -let $is_table= collation_character_set_applicability; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.4.2:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.4.2: Ensure that the table shows the relevant information on -# every collation/character set combination for which the -# current user or PUBLIC have the USAGE privilege. -# Note(2007-08-24 mleich): -# The amount of collations/character sets grows with new -# MySQL releases and is a reason why this test might -# fail with differences. Please check the new entries -# and update with expected results afterwards. -################################################################################ - -SELECT * FROM collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.4.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.4.3: Ensure that the table does not show any information on any -# collation/character set combinations for which the current -# user and PUBLIC have no USAGE privilege. -################################################################################ - -# Test requirement is erroneous... we cannot grant / revoke privilege for using a collation. -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.5.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.5.1: Ensure that the INFORMATION_SCHEMA.COLUMN_PRIVILEGES -# table has the following columns, in the following order: -# -# GRANTEE (shows the name of a user who has either granted, -# or been granted a column privilege), -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the schema, or database, -# in which the table for which a column privilege has -# been granted resides), -# TABLE_NAME (shows the name of the table), -# COLUMN_NAME (shows the name of the column on which a -# column privilege has been granted), -# PRIVILEGE_TYPE (shows the type of privilege that was -# granted; must be either SELECT, INSERT, UPDATE, or -# REFERENCES), -# IS_GRANTABLE (shows whether that privilege was granted -# WITH GRANT OPTION). -################################################################################ - -let $is_table= column_privileges; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.5.2 + 3.2.5.3 + 3.2.5.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.5.2: Ensure that the table shows the relevant information on -# every column privilege which has been granted to the -# current user or PUBLIC, or which was granted by the current -# user. -################################################################################ -# Testcase 3.2.5.3: Ensure that the table does not show any information on any -# column privilege which was granted to any user other than -# the current user or PUBLIC, or which was granted by any -# user other than the current user. -################################################################################ -# Testcase 3.2.5.4: Ensure that the table does not show any information on any -# privileges that are not column privileges for the current -# user. -################################################################################ - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; -USE db_datadict; - -CREATE TABLE db_datadict.res_t40502 (f1 INT, f2 DECIMAL, f3 TEXT); - -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT INSERT(f1) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT UPDATE(f2) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT SELECT(f2) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT SELECT(f3) ON db_datadict.res_t40502 TO 'user_3'@'localhost'; - -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost' WITH GRANT OPTION; -GRANT ALL ON db_datadict.* TO 'user_3'@'localhost'; - -let $select= SELECT * FROM information_schema.column_privileges - WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -eval $select; - -let $message= FIXME: Check it is correct that the following GRANT changes ALL privs that user_1 has; ---source include/show_msg.inc - -GRANT UPDATE(f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost' WITH GRANT OPTION; - -eval $select; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_5_1, localhost, user_1, , db_datadict); -eval $select; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_5_2, localhost, user_2, , db_datadict); -eval $select; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_5_3, localhost, user_3, , db_datadict); - -let $message= FIXME: check it is correct that granted TABLES doesn_t occur in COLUMN_PRIVILEGES; ---source include/show_msg.inc -SELECT * FROM information_schema.table_privileges WHERE grantee LIKE "'user%"; -SELECT * FROM information_schema.schema_privileges WHERE grantee LIKE "'user%"; -eval $select; -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; - -let $message= FIXME: check whether it is intended that *my* grants to others are *NOT* shown here; ---source include/show_msg.inc -eval $select; - -connection user_5_2; ---source suite/funcs_1/include/show_connection.inc -eval $select; - -disconnect user_5_1; -disconnect user_5_2; -disconnect user_5_3; - -#cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc ---disable_warnings -DROP TABLE IF EXISTS db_datadict.res_t40502; -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.6.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.6.1: Ensure that the INFORMATION_SCHEMA.COLUMNS table has the -# following columns, in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the database, or schema, -# in which an accessible table resides), -# TABLE_NAME (shows the name of an accessible table), -# COLUMN_NAME (shows the name of a column within that -# table), -# ORDINAL_POSITION (shows the ordinal position of that -# column in that table), -# COLUMN_DEFAULT (shows the column's default value), -# IS_NULLABLE (shows whether the column may accept NULL -# values), -# DATA_TYPE (shows the column's defined data type; keyword -# only), -# CHARACTER_MAXIMUM_LENGTH (shows, for a string column, the -# column's defined maximum length in characters; -# otherwise NULL), -# CHARACTER_OCTET_LENGTH (shows, for a string column, the -# column's defined maximum length in octets; -# otherwise NULL), -# NUMERIC_PRECISION (shows, for a numeric column, the -# column's or data type's defined precision; -# otherwise NULL), -# NUMERIC_SCALE (shows, for a numeric column, the column's -# or data type's defined scale; otherwise NULL), -# CHARACTER_SET_NAME (shows, for a character string column, -# the column's default character set; otherwise NULL), -# COLLATION_NAME (shows, for a character string column, the -# column's default collation; otherwise NULL), -# COLUMN_TYPE (shows the column's complete, defined data -# type), -# COLUMN_KEY (shows whether the column is indexed; possible -# values are PRI if the column is part of a PRIMARY -# KEY, UNI if the column is part of a UNIQUE key, MUL -# if the column is part of an index key that allows -# duplicates), -# EXTRA (shows any additional column definition information, -# e.g. whether the column was defined with the -# AUTO_INCREMENT attribute), -# PRIVILEGES (shows the privileges available to the user on -# the column), -# COLUMN_COMMENT (shows the comment, if any, defined for the -# comment; otherwise NULL). -################################################################################ - -let $is_table= columns; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.6.2 + 3.2.6.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.6.2: Ensure that the table shows the relevant information on the -# columns of every table that is accessible to the current -# user or to PUBLIC. -################################################################################ -# Testcase 3.2.6.3: Ensure that the table does not show any information on the -# columns of any table which is not accessible to the current -# user or PUBLIC. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; - -USE db_datadict; - -create table t_6_406001(f1 char(10), f2 text, f3 date, f4 int); -grant select(f1, f2) on db_datadict.t_6_406001 to 'user_1'@'localhost'; - -create table t_6_406002(f1 char(10), f2 text, f3 date, f4 int); -GRANT INSERT(f1, f2) ON db_datadict.t_6_406002 TO 'user_2'@'localhost'; - -FLUSH PRIVILEGES; - -let $select= SELECT * FROM information_schema.columns - ORDER BY table_schema, table_name, ordinal_position; - -# show view of user root ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval $select; - -# reconnect to mysql with user credential of user u_6_406002_1. ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_6_1, localhost, user_1, , db_datadict); ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval $select; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_6_2, localhost, user_2, , db_datadict); ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval $select; - -disconnect user_6_1; -disconnect user_6_2; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -let $message= Show the quotient of COL and CML for all COLUMNS; ---source include/show_msg.inc -SELECT DISTINCT - CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, - DATA_TYPE, - CHARACTER_SET_NAME, - COLLATION_NAME - FROM information_schema.columns - WHERE CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1 - ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; - -#FIXME 3.2.6.2: check the value 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 CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1 - ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; - -SELECT DISTINCT - CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, - DATA_TYPE, - CHARACTER_SET_NAME, - COLLATION_NAME - FROM information_schema.columns - WHERE CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH IS NULL - ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML; - -echo --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values; -echo --> are 0, which is intended behavior, and the result of 0 / 0 IS NULL; ---source suite/funcs_1/datadict/datadict_bug_12777.inc -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 - ORDER BY TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION; - -#cleanup -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE IF EXISTS t_6_406001; -DROP TABLE IF EXISTS t_6_406002; -DROP DATABASE IF EXISTS db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.7.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.7.1: Ensure that the INFORMATION_SCHEMA.KEY_COLUMN_USAGE -# table has the following columns, in the following order: -# -# CONSTRAINT_CATALOG (always shows NULL), -# CONSTRAINT_SCHEMA (shows the database, or schema, in which -# an accessible constraint, or index, resides), -# CONSTRAINT_NAME (shows the name of the accessible -# constraint), -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the database, or schema, in which the -# table constrained by that constraint resides), -# TABLE_NAME (shows the name of the table constrained by the -# constraint), -# COLUMN_NAME (shows the name of a column that is the index -# key, or part of the index key), -# ORDINAL_POSITION (shows the ordinal position of the column -# within the constraint index), -# POSITION_IN_UNIQUE_CONSTRAINT (shows, for a foreign key -# column, the ordinal position of the referenced -# column within the referenced unique index; -# otherwise NULL). -# added with 5.0.6: REFERENCED_TABLE_SCHEMA, -# REFERENCED_TABLE_NAME, -# REFERENCED_COLUMN_NAME -################################################################################ - -let $is_table= key_column_usage; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.7.2 + 3.2.7.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.7.2: Ensure that the table shows the relevant information on -# every column, defined to be part of an index key, which is -# accessible to the current user or to PUBLIC. -################################################################################ -# Testcase 3.2.7.3: Ensure that the table does not show any information on any -# indexed column that is not accessible to the current user -# or PUBLIC. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings -CREATE DATABASE db_datadict; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; - -USE db_datadict; - -CREATE TABLE t_40701 ( - f1 INT NOT NULL, PRIMARY KEY(f1), - f2 INT, INDEX f2_ind(f2) - ); -GRANT SELECT ON t_40701 to 'user_1'@'localhost'; - -CREATE TABLE t_40702 ( - f1 INT NOT NULL, PRIMARY KEY(f1), - f2 INT, INDEX f2_ind(f2) - ); -GRANT SELECT ON t_40702 to 'user_2'@'localhost'; -#FIXME: add foreign keys - -FLUSH PRIVILEGES; - -let $select= SELECT * FROM information_schema.key_column_usage - ORDER BY constraint_catalog, constraint_schema, constraint_name, - table_catalog, table_schema, table_name, ordinal_position; - -# show view of user root -eval $select; - -# reconnect to mysql with user credential of user u_6_406002_1. ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_7_1, localhost, user_1, , db_datadict); -eval $select; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_7_2, localhost, user_2, , db_datadict); -eval $select; - -disconnect user_7_1; -disconnect user_7_2; - -#cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE t_40701; -DROP TABLE t_40702; -DROP DATABASE IF EXISTS db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.8.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.8.1: Ensure that the INFORMATION_SCHEMA.ROUTINES -# table has the following columns, in the following order: -# -# SPECIFIC_NAME (shows the name of an accessible stored -# procedure, or routine), -# ROUTINE_CATALOG (always shows NULL), -# ROUTINE_SCHEMA (shows the database, or schema, in which -# the routine resides), -# ROUTINE_NAME (shows the same stored procedure name), -# ROUTINE_TYPE (shows whether the stored procedure is a -# procedure or a function), -# DTD_IDENTIFIER (shows, for a function, the complete -# data type definition of the value the function will -# return; otherwise NULL), -# ROUTINE_BODY (shows the language in which the stored -# procedure is written; currently always SQL), -# ROUTINE_DEFINITION (shows as much of the routine body as -# is possible in the allotted space), -# EXTERNAL_NAME (always shows NULL), -# EXTERNAL_LANGUAGE (always shows NULL), -# PARAMETER_STYLE (shows the routine's parameter style; -# always SQL), -# IS_DETERMINISTIC (shows whether the routine is -# deterministic), -# SQL_DATA_ACCESS (shows the routine's defined -# sql-data-access clause value), -# SQL_PATH (always shows NULL), -# SECURITY_TYPE (shows whether the routine's defined -# security_type is 'definer' or 'invoker'), -# CREATED (shows the timestamp of the time the routine was -# created), -# LAST_ALTERED (shows the timestamp of the time the routine -# was last altered), -# SQL_MODE (shows the sql_mode setting at the time the -# routine was created), -# ROUTINE_COMMENT (shows the comment, if any, defined for -# the routine; otherwise NULL), -# DEFINER (shows the user who created the routine). -################################################################################ - -let $is_table= routines; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.8.2 + 3.2.8.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.8.2: Ensure that the table shows the relevant information on -# every SQL-invoked routine (i.e. stored procedure) which is -# accessible to the current user or to PUBLIC. -################################################################################ -# Testcase 3.2.8.3: Ensure that the table does not show any information on any -# stored procedure that is not accessible to the current user -# or PUBLIC.; -############################################################################## - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -CREATE DATABASE db_datadict; -USE db_datadict; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - -CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); - -INSERT INTO res_6_408002_1(f1, f2, f3, f4) - VALUES('abc', 'xyz', '1989-11-09', 0815); - ---disable_warnings -DROP PROCEDURE IF EXISTS sp_6_408002_1; ---enable_warnings - -delimiter //; -CREATE PROCEDURE sp_6_408002_1() -BEGIN - SELECT * FROM db_datadict.res_6_408002_1; -END// -delimiter ;// - -CREATE DATABASE db_datadict_2; -USE db_datadict_2; - -CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); - -INSERT INTO res_6_408002_2(f1, f2, f3, f4) - VALUES('abc', 'xyz', '1990-10-03', 4711); - ---disable_warnings -DROP PROCEDURE IF EXISTS sp_6_408002_2; ---enable_warnings - -delimiter //; -CREATE PROCEDURE sp_6_408002_2() -BEGIN - SELECT * FROM db_datadict_2.res_6_408002_2; -END// -delimiter ;// - -GRANT SELECT ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_1'@'localhost'; - -GRANT EXECUTE ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_2'@'localhost'; - -GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_8_1, localhost, user_1, , db_datadict); - ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; -disconnect user_8_1; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_8_2, localhost, user_2, , db_datadict); - ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; -disconnect user_8_2; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_8_3, localhost, user_3, , test); - ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.routines; -disconnect user_8_3; - -# clean-up -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; - -use db_datadict; -DROP TABLE res_6_408002_1; -DROP PROCEDURE sp_6_408002_1; - -USE db_datadict_2; -DROP TABLE res_6_408002_2; -DROP PROCEDURE sp_6_408002_2; - -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.8.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.8.4: Ensure that a stored procedure with a routine body that is -# too large to fit into the -# INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION column -# correctly shows as much of the information as is possible -# within the allotted size. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -CREATE DATABASE db_datadict; -USE db_datadict; - -create table res_6_408004_1(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); - -insert into res_6_408004_1 values ('abc', 98765 , 99999999 , 98765, 10); - ---disable_warnings -drop procedure if exists sp_6_408004; ---enable_warnings - -create table res_6_408004_2(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); - -insert into res_6_408004_2 values ('abc', 98765 , 99999999 , 98765, 10); - -let $message= Checking the max. possible length of (currently) 4 GByte is not possible in this environment here.; ---source include/show_msg.inc - -delimiter //; -create procedure sp_6_408004 () -begin - declare done integer default 0; - declare variable_number_1 longtext; - declare variable_number_2 mediumint; - declare variable_number_3 longblob; - declare variable_number_4 real; - declare variable_number_5 year; - declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; - declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; - declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; - declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; - declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; - declare continue handler for sqlstate '02000' set done = 1; - begin - open cursor_number_1; - while done <> 1 do - fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; - if done <> 0 then - insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, - variable_number_4, variable_number_5); - end if; - end while; - begin - begin - set done = 0; - open cursor_number_2; - while done <> 1 do - fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; - if done <> 0 then - insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); - end if; - end while; - end; - set done = 0; - open cursor_number_3; - while done <> 1 do - fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; - if done <> 0 then - insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); - end if; - end while; - end; - end; - begin - set done = 0; - open cursor_number_4; - while done <> 1 do - fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; - if done <> 0 then - insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); - end if; - end while; - end; - begin - set @a='test row'; - select @a; - select @a; - select @a; - end; - begin - set done = 0; - open cursor_number_5; - while done <> 1 do - fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; - if done <> 0 then - insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); - end if; - end while; - end; - begin - set @a='test row'; - select @a; - select @a; - select @a; - end; -end// -delimiter ;// - -call sp_6_408004 (); -select * from res_6_408004_2; - ---vertical_results ---replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT *, LENGTH(routine_definition) - FROM information_schema.routines - WHERE routine_schema = 'db_datadict'; ---horizontal_results - -# clean-up -use db_datadict; -drop procedure sp_6_408004; -drop table res_6_408004_1; -drop table res_6_408004_2; -use test; -drop database db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.9.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.9.1: Ensure that the INFORMATION_SCHEMA.SCHEMATA -# table has the following columns, in the following order: -# -# CATALOG_NAME (always shows NULL), -# SCHEMA_NAME (shows the name of a database, or schema, on -# which the current user or PUBLIC has privileges), -# DEFAULT_CHARACTER_SET_NAME (shows the name of that -# database's default character set), -# DEFAULT_COLLATION_NAME (shows the database default -# collation) -# SQL_PATH (always shows NULL). -################################################################################ - -let $is_table= schemata; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.9.2 + 3.2.9.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.9.2: Ensure that the table shows the relevant information for -# every database on which the current user or PUBLIC have -# privileges. -################################################################################ -# Testcase 3.2.9.3: Ensure that the table does not show any information on any -# databases on which the current user and PUBLIC have no -# privileges. -################################################################################ - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -CREATE DATABASE db_datadict_1; -CREATE DATABASE db_datadict_2; - -GRANT SELECT ON db_datadict_1.* to 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.* to 'user_2'@'localhost'; - -FLUSH PRIVILEGES; - -# shows db_1 ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_9_1, localhost, user_1, , db_datadict_1); - -SELECT COUNT(*) FROM information_schema.schemata; -SELECT * FROM information_schema.schemata; -disconnect user_9_1; - - -# shows db_2 ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_9_2, localhost, user_2, , db_datadict_2); - -SELECT COUNT(*) FROM information_schema.schemata; -SELECT * FROM information_schema.schemata; -disconnect user_9_2; - - -# shows neither db_1 nor db_2 ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_9_3, localhost, user_3, , test); - -SELECT COUNT(*) FROM information_schema.schemata; -SELECT * FROM information_schema.schemata; -disconnect user_9_3; - - -# clean-up -connection default; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE db_datadict_1; -DROP DATABASE db_datadict_2; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.10.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.10.1: Ensure that the INFORMATION_SCHEMA.TABLE_CONSTRAINTS -# table has the following columns, in the following order: -# -# CONSTRAINT_CATALOG (always shows NULL), -# CONSTRAINT_SCHEMA (shows the database, or schema, in which -# a constraint an accessible table resides), -# CONSTRAINT_NAME (shows the name of a constraint defined on -# an accessible table), -# TABLE_SCHEMA (shows the database, or schema, in which the -# table resides), -# TABLE_NAME (shows the name of the table), -# CONSTRAINT_TYPE (shows the type of the constraint; either -# 'primary key', 'foreign key', 'unique', 'check'). -################################################################################ - -let $is_table= table_constraints; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.10.2 + 3.2.10.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.10.2: Ensure that the table shows the relevant information on all -# constraints defined on every table for which the current -# user or PUBLIC have privileges. -################################################################################ -# Testcase 3.2.10.3: Ensure that the table does not show any information on -# constraints defined on any table for which the current user -# and PUBLIC have no privileges. -################################################################################ - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; - -USE db_datadict; - -CREATE TABLE res_6_401003_1(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); - -USE db_datadict_2; - -CREATE TABLE res_6_401003_2(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); - -GRANT SELECT ON db_datadict.res_6_401003_1 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.res_6_401003_2 TO 'user_2'@'localhost'; - -FLUSH PRIVILEGES; - - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_10_1, localhost, user_1, , db_datadict); - -SELECT * FROM information_schema.table_constraints; -SELECT COUNT(*) FROM information_schema.table_constraints; -disconnect user_10_1; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_10_2, localhost, user_2, , db_datadict_2); - -SELECT * FROM information_schema.table_constraints; -SELECT COUNT(*) FROM information_schema.table_constraints; -disconnect user_10_2; - -# clean-up -connection default; -use db_datadict; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE res_6_401003_1; -USE db_datadict_2; -DROP TABLE res_6_401003_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.11.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.11.1: Ensure that the INFORMATION_SCHEMA.TABLE_PRIVILEGES -# table has the following columns, in the following order: -# -# GRANTEE (shows the name of a user who has either granted, -# or been granted a table privilege), -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the schema, or database, -# in which the table for which a privilege has been -# granted resides), -# TABLE_NAME (shows the name of the table), -# PRIVILEGE_TYPE (shows the type of privilege that was -# granted; must be either SELECT, INSERT, UPDATE, -# DELETE, REFERENCES, ALTER, INDEX, DROP, or CREATE -# VIEW), -# IS_GRANTABLE (shows whether that privilege was granted -# WITH GRANT OPTION). -################################################################################ - -let $is_table= table_privileges; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.11.2 + 3.2.11.3 + 3.2.11.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.11.2: Ensure that the table shows the relevant information on -# every table privilege which has been granted to the current -# user or PUBLIC, or which was granted by the current user. -################################################################################ -# Testcase 3.2.11.3: Ensure that the table does not show any information on any -# table privilege which was granted to any user other than -# the current user or PUBLIC, or which was granted by any -# user other than the current user. -################################################################################ -# Testcase 3.2.11.4: Ensure that the table does not show any information on any -# privileges that are not table privileges for the current -# user. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -create database db_datadict; - -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, SELECT ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - -use db_datadict; - -create table tb1(f1 int, f2 int, f3 int); - -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_11_1, localhost, user_1, , db_datadict); - -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; - -SELECT * FROM information_schema.table_privileges - WHERE table_name LIKE 'tb%'; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_11_2, localhost, user_2, , db_datadict); - -# we see only table privileges for this user, and not any other privileges -SELECT * FROM information_schema.table_privileges; - -SELECT USER(), COUNT(*) - FROM information_schema.table_privileges - WHERE grantee = USER(); - -SELECT USER(), COUNT(*) - FROM information_schema.table_privileges - WHERE grantee = "'user_2'@'localhost'"; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_11_3, localhost, user_3, , db_datadict); - -# we see only table privileges for this user, and not any other privileges -SELECT * FROM information_schema.table_privileges; - -connection default; ---source suite/funcs_1/include/show_connection.inc - -# we see only 'public' table privileges -SELECT * FROM information_schema.table_privileges; - -# clean-up -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect user_11_1; -disconnect user_11_2; -disconnect user_11_3; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -drop table db_datadict.tb1; -drop table db_datadict.tb3; -use test; -drop database db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.12.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.12.1: Ensure that the INFORMATION_SCHEMA.TABLES -# table has the following columns, in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the database, or schema, -# in which an accessible table resides), -# TABLE_NAME (shows the name of a table which the current -# user may access), -# TABLE_TYPE (shows whether the table is a BASE TABLE, a -# TEMPORARY table, or a VIEW), -# ENGINE (shows the storage engine used for the table), -# VERSION (shows the version number of the table's .frm -# file), -# ROW_FORMAT (shows the table's row storage format; either -# FIXED, DYNAMIC or COMPRESSED), -# TABLE_ROWS (shows the number of rows in the table), -# AVG_ROW_LENGTH (shows the average length of the table's -# rows), -# DATA_LENGTH (shows the length of the table's data file), -# MAX_DATA_LENGTH (shows the maximum length of the table's -# data file), -# INDEX_LENGTH (shows the length of the index file -# associated with the table), -# DATA_FREE (shows the number of allocated, unused bytes), -# AUTO_INCREMENT (shows the next AUTO_INCREMENT value, where -# applicable), -# CREATE_TIME (shows the timestamp of the time the table was -# created), -# UPDATE_TIME (shows the timestamp of the time the table's -# data file was last updated), -# CHECK_TIME (shows the timestamp of the time the table was -# last checked), -# TABLE_COLLATION (shows the table's default collation), -# CHECKSUM (shows the live checksum value for the table, if -# any; otherwise NULL), -# CREATE_OPTIONS (shows any additional options used in the -# table's definition; otherwise NULL), -# TABLE_COMMENT (shows the comment added to the table's -# definition; otherwise NULL). -################################################################################ - -let $is_table= tables; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.12.2 + 3.2.12.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.12.2: Ensure that the table shows the relevant information on -# every base table and view on which the current user or -# PUBLIC has privileges. -################################################################################ -# Testcase 3.2.12.3: Ensure that the table does not show any information on any -# tables on which the current user and public have no -# privileges. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -create database db_datadict; - -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* - TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - -use db_datadict; - -create table tb1(f1 int, f2 int, f3 int); - -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_12_1, localhost, user_1, , db_datadict); - -# tb2 is not granted to anyone -CREATE TABLE tb2 (f1 DECIMAL); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -GRANT INSERT ON db_datadict.tb3 to 'user_2'@'localhost'; - -CREATE VIEW v3 AS SELECT * FROM tb3; -GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; - -#FIXME 3.2.12: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.12: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.12: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.12: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME -# 20 CREATE_OPTIONS -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM information_schema.tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.tables - WHERE NOT( table_schema = 'information_schema'); ---enable_ps_protocol - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_12_2, localhost, user_2, , db_datadict); - -# we see only tables for this user, and not any other -#FIXME 3.2.12: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.12: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.12: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.12: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME -# 20 CREATE_OPTIONS -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM information_schema.tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.tables - WHERE NOT( table_schema = 'information_schema'); ---enable_ps_protocol - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_12_3, localhost, user_3, , db_datadict); - -# we see only tables for this user, and not any other -# -#FIXME 3.2.12: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.12: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.12: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.12: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME -# 20 CREATE_OPTIONS -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM information_schema.tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.tables - WHERE NOT( table_schema = 'information_schema'); ---enable_ps_protocol - -connection default; ---source suite/funcs_1/include/show_connection.inc - -# we see only 'public' tables -# -#FIXME 3.2.12: we split the "SELECT * FROM tables" in two parts until -#FIXME 3.2.12: Bug #12397: wrong values shown in column CREATE_OPTIONS of -#FIXME 3.2.12: INFORMATION_SCHEMA.TABLES is solved, one with 'more' and one -#FIXME 3.2.12: with 'less' replace -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME -# 20 CREATE_OPTIONS -if ($have_bug_11589) -{ ---disable_ps_protocol -} ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -SELECT * FROM information_schema.tables - WHERE table_schema = 'information_schema'; -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -# 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 17 CHECK_TIME ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM information_schema.tables - WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); ---enable_ps_protocol - -# clean-up -disconnect user_12_1; -disconnect user_12_2; -disconnect user_12_3; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP TABLE db_datadict.tb1; -DROP TABLE db_datadict.tb3; -DROP VIEW db_datadict.v3; -USE test; -DROP DATABASE db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.13.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.13.1: Ensure that the INFORMATION_SCHEMA.VIEWS -# table has the following columns, in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the database, or schema, in which an -# accessible view resides), -# TABLE_NAME (shows the name of a view accessible to the -# current user), -# VIEW_DEFINITION (shows the SELECT statement that makes -# up the view's definition), -# CHECK_OPTION (shows the value of the WITH CHECK OPTION -# clause used to define the view, either NONE, LOCAL -# or CASCADED), -# IS_UPDATABLE (shows whether the view is an updatable -# view), -# DEFINER (added with 5.0.14), -# SECURITY_TYPE (added with 5.0.14). -################################################################################ - -let $is_table= views; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.13.2 + 3.2.13.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.13.2: Ensure that the table shows the relevant information on -# every view for which the current user or PUBLIC has the -# SHOW CREATE VIEW privilege. -################################################################################ -# Testcase 3.2.13.3: Ensure that the table does not show any information on any -# views for which the current user and PUBLIC have no SHOW -# CREATE VIEW privilege. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -CREATE DATABASE db_datadict; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_no_views'@'localhost'; -USE db_datadict; - -CREATE TABLE tb_401302(f1 INT, f2 INT, f3 INT); -CREATE VIEW v_granted_to_1 AS SELECT * FROM tb_401302; -CREATE VIEW v_granted_glob AS SELECT f2, f3 FROM tb_401302; - -GRANT SELECT ON db_datadict.tb_401302 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.v_granted_to_1 TO 'user_1'@'localhost'; -GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'user_2'@'localhost'; - -FLUSH PRIVILEGES; - -SELECT * FROM information_schema.views; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_13_1, localhost, user_1, , test); - -SELECT * FROM information_schema.views; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_13_2, localhost, user_2, , test); - -SELECT * FROM information_schema.views; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_no_views, localhost, user_no_views, , test); - -SELECT * FROM information_schema.views; - -# clean-up -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect user_13_1; -disconnect user_13_2; -disconnect user_no_views; -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_no_views'@'localhost'; -DROP VIEW v_granted_to_1; -DROP TABLE tb_401302; -DROP VIEW v_granted_glob; -USE test; -DROP DATABASE db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.14.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.14.1: Ensure that the INFORMATION_SCHEMA.STATISTICS -# table has the following columns, in the following order: -# -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the database, or schema, in which a -# table indexed by an accessible index resides), -# TABLE_NAME (shows the name of the indexed table), -# NON_UNIQUE (shows whether the index may contain duplicate -# values; 0 if it cannot, 1 if it can), -# INDEX_SCHEMA (shows the database, or schema, in which an -# accessible index resides), -# INDEX_NAME (shows the name of an index which the current -# user may access), -# SEQ_IN_INDEX (shows the ordinal position of an indexed -# column within the index), -# COLUMN_NAME (shows the name of a column that comprises -# some, or all, of an index key), -# COLLATION (shows how the column is sorted in the index; -# either A for ascending or NULL for unsorted -# columns), -# CARDINALITY (shows the number of unique values in the -# index), -# SUB_PART (shows the number of indexed characters if the -# index is a prefix index), -# PACKED (shows how the index key is packed), -# NULLABLE (shows whether the index column may contain NULL -# values), -# INDEX_TYPE (shows the index type; either BTREE, FULLTEXT, -# HASH or RTREE), -# COMMENT (shows a comment on the index, if any). -################################################################################ - -let $is_table= statistics; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.14.2 + 3.2.14.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.14.2: Ensure that the table shows the relevant information on -# every index which the current user or PUBLIC may access -# (usually because privileges on the indexed table have been -# granted). -################################################################################ -# Testcase 3.2.14.3: Ensure that the table does not show any information on any -# indexes which the current user and PUBLIC may not access. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; - -create table tb_6_401402_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_6_401402_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict.tb_6_401402_1 to 'user_1'@'localhost' WITH GRANT OPTION; - -USE db_datadict_2; - -create table tb_2_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_2_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict_2.tb_2_1 to 'user_1'@'localhost'; - -FLUSH PRIVILEGES; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_14_1, localhost, user_1, , test); -SELECT * FROM information_schema.statistics; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_14_2, localhost, user_2, , test); -SELECT * FROM information_schema.statistics; - -connection default; ---source suite/funcs_1/include/show_connection.inc -REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.statistics -WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); - -# nothing visible for user_1 -connection user_14_1; ---source suite/funcs_1/include/show_connection.inc -SELECT * FROM information_schema.statistics; - -# no changes visible for user_2 -connection user_14_2; ---source suite/funcs_1/include/show_connection.inc -SELECT * FROM information_schema.statistics; - -# cleanup -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect user_14_1; -disconnect user_14_2; -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE tb_6_401402_1; -DROP TABLE tb_6_401402_2; -USE test; -DROP DATABASE db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.15.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.15.1: Ensure that the INFORMATION_SCHEMA.SCHEMA_PRIVILEGES -# table has the following columns, in the following order: -# -# GRANTEE (shows a user to whom a schema privilege has been -# granted), -# TABLE_CATALOG (always shows NULL), -# TABLE_SCHEMA (shows the name of the database, or schema, -# on which the privilege has been granted), -# PRIVILEGE_TYPE (shows the granted privilege), -# IS_GRANTABLE (shows whether the privilege was granted WITH -# GRANT OPTION). -################################################################################ - -let $is_table= schema_privileges; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.15.2:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.15.2: Ensure that the table shows the relevant information on -# every schema-level privilege which has been granted to the -# current user or to PUBLIC, or has been granted by the -# current user. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -create database db_datadict; -create database db_datadict_2; - -CREATE USER 'u_6_401502'@'localhost'; - -use db_datadict; - -create table res_6_401502(f1 int, f2 int, f3 int); -grant insert on db_datadict.* to 'u_6_401502'@'localhost'; - -FLUSH PRIVILEGES; - -SELECT * FROM information_schema.schema_privileges; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401502, localhost, u_6_401502, , test); - -SELECT * FROM information_schema.schema_privileges; - -disconnect u_6_401502; - -# clean-up - -connection default; -use db_datadict; ---source suite/funcs_1/include/show_connection.inc -DROP USER 'u_6_401502'@'localhost'; -drop table res_6_401502; -use test; -drop database db_datadict; -drop database db_datadict_2; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.15.3 + 3.2.15.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.15.3: Ensure that the table does not show any information on any -# schema-level privileges which have been granted to users -# other than the current user or to PUBLIC, or that have been -# granted by any user other than the current user. -################################################################################ -# Testcase 3.2.15.4: Ensure that the table does not show any information on any -# privileges that are not schema-level privileges for the -# current user. -################################################################################ - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings - -create database db_datadict; -create database db_datadict_2; - -CREATE USER 'u_6_401503_1'@'localhost'; -CREATE USER 'u_6_401503_2'@'localhost'; -CREATE USER 'u_6_401503_3'@'localhost'; - -use db_datadict; - -create table res_6_401503_1(f1 int, f2 int, f3 int); - -use db_datadict_2; - -create table res_6_401503_2(f1 int, f2 int, f3 int); - -grant update on db_datadict.* to 'u_6_401503_1'@'localhost'; -grant delete on db_datadict_2.* to 'u_6_401503_2'@'localhost'; - -FLUSH PRIVILEGES; - -SELECT * FROM information_schema.schema_privileges; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401503_1, localhost, u_6_401503_1, , test); - -SELECT * FROM information_schema.schema_privileges; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401503_2, localhost, u_6_401503_2, , test); - -SELECT * FROM information_schema.schema_privileges; - -# should not show anything ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (u_6_401503_3, localhost, u_6_401503_3, , test); - -SELECT * FROM information_schema.schema_privileges; - -# clean-up - -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect u_6_401503_1; -disconnect u_6_401503_2; -disconnect u_6_401503_3; -use db_datadict; -DROP USER 'u_6_401503_1'@'localhost'; -DROP USER 'u_6_401503_2'@'localhost'; -DROP USER 'u_6_401503_3'@'localhost'; -drop table res_6_401503_1; -use db_datadict_2; -drop table res_6_401503_2; -use test; -drop database db_datadict; -drop database db_datadict_2; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.16.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.16.1: Ensure that the INFORMATION_SCHEMA.USER_PRIVILEGES -# table has the following columns, in the following order: -# -# GRANTEE (shows a user to whom a user privilege has been -# granted), -# TABLE_CATALOG (always shows NULL), -# PRIVILEGE_TYPE (shows the granted privilege), -# IS_GRANTABLE (shows whether the privilege was granted WITH -# GRANT OPTION). -################################################################################ - -#----------- -# Bug #12063 column 'TABLE_SCHEMA' is missing in table -# INFORMATION_SCHEMA.USER_PRIVILEGE -# ... is not a bug, it has been added by mistake in the TP requirement document. -#----------- - -let $is_table= user_privileges; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.16.2 + 3.2.16.3 + 3.2.16.4:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.16.2: Ensure that the table shows the relevant information on -# every user privilege which has been granted to the current -# user or to PUBLIC, or has been granted by the current user. -################################################################################ -# Testcase 3.2.16.3: Ensure that the table does not show any information on any -# user privileges which have been granted to users other than -# the current user or have been granted by any user other -# than the current user. -################################################################################ -# Testcase 3.2.16.4: Ensure that the table does not show any information on any -# privileges that are not user privileges for the current -# user. -################################################################################ - -#FIXME 3.2.16: - when Bug #12269 is fixed a some of the outputs here may be -#FIXME 3.2.16: deleted as I added them for checking where / which information -#FIXME 3.2.16: is shown. - ---disable_warnings -DROP DATABASE IF EXISTS db_datadict; ---enable_warnings - -let $cmd1= SELECT * FROM information_schema.user_privileges - WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -let $cmd2= SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -let $cmd3= SHOW GRANTS; - -CREATE DATABASE db_datadict; - -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; - -GRANT SELECT ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; - -GRANT INSERT ON *.* TO 'user_2'@'localhost'; -GRANT UPDATE ON *.* TO 'user_2'@'localhost'; - -FLUSH PRIVILEGES; - -let $message= FIXME (see Bug 12269) Here we expect more than only for user_1; ---source include/show_msg.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; - -let $message= add GRANT OPTION db_datadict.* to user_1; ---source include/show_msg.inc -GRANT UPDATE ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; - -let $message= FIXME (see Bug 12269) Here the is missing for the GRANT OPTION for user_1; ---source include/show_msg.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; - -FLUSH PRIVILEGES; - - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_16_1, localhost, user_1, , db_datadict); -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# add SELECT on *.* to user_1 -let $message= Now add SELECT on *.* to user_1; ---source include/show_msg.inc - -connection default; ---source suite/funcs_1/include/show_connection.inc -GRANT SELECT ON *.* TO 'user_1'@'localhost'; -let $message= Here is shown correctly for user_1; ---source include/show_msg.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; - -FLUSH PRIVILEGES; -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# check that this appears -connection user_16_1; ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_16_2, localhost, user_2, , db_datadict); -eval $cmd1; ---error ER_TABLEACCESS_DENIED_ERROR -eval $cmd2; -eval $cmd3; - ---replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK -connect (user_16_3, localhost, user_3, , test); -eval $cmd1; ---error ER_TABLEACCESS_DENIED_ERROR -eval $cmd2; -eval $cmd3; - -let $message= revoke privileges from user_1; ---source include/show_msg.inc - -connection default; ---source suite/funcs_1/include/show_connection.inc -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# check for changes -connection user_16_1; ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; ---error ER_TABLEACCESS_DENIED_ERROR -eval $cmd2; -eval $cmd3; - ---source suite/funcs_1/include/show_connection.inc -# checks entered before bug #12269 was reported -# OK, user_1 has no privs here ---error ER_TABLEACCESS_DENIED_ERROR -CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; ---error ER_TABLEACCESS_DENIED_ERROR -eval $cmd2; -eval $cmd3; -# OK, user_1 has no privs here ---error ER_TABLEACCESS_DENIED_ERROR -CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); - -let $message= add ALL on db_datadict.* (and select on mysql.user) to user_1; ---source include/show_msg.inc - -connection default; ---source suite/funcs_1/include/show_connection.inc - -GRANT ALL ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# check for changes -connection user_16_1; ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# OK, user_1 has no privs here ---error ER_TABLEACCESS_DENIED_ERROR -CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); - -# using 'USE' lets the server read the privileges new, so now the CREATE works -USE db_datadict; ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; -eval $cmd2; -eval $cmd3; -CREATE TABLE tb_57 ( c1 TEXT ); - -let $message= revoke privileges from user_1; ---source include/show_msg.inc - -connection default; ---source suite/funcs_1/include/show_connection.inc -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -FLUSH PRIVILEGES; -eval $cmd1; -eval $cmd2; -eval $cmd3; - -# check for changes -connection user_16_1; ---source suite/funcs_1/include/show_connection.inc -eval $cmd1; ---error ER_TABLEACCESS_DENIED_ERROR -eval $cmd2; -eval $cmd3; -# WORKS, as the existing old privileges are used! -CREATE TABLE db_datadict.tb_58 ( c1 TEXT ); -# existing privileges are "read" new when USE is called, user has no priviliges ---error ER_DBACCESS_DENIED_ERROR -USE db_datadict; -#FIXME 3.2.16: check that it is correct that this now 'works': --error 1142 -CREATE TABLE db_datadict.tb_59 ( c1 TEXT ); - - -# clean-up -connection default; ---source suite/funcs_1/include/show_connection.inc -disconnect user_16_1; -disconnect user_16_2; -disconnect user_16_3; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.17: Checks on Performance - not here in this script!; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.17.1: Ensure that every INFORMATION_SCHEMA table shows all the -# correct information, and no incorrect information, for a -# database to which 100 different users, each of which has a -# randomly issued set of privileges and access to a -# randomly chosen set of database objects, have access. -# The database should contain a mixture of all types of -# database objects (i.e. tables, views, stored procedures, -# triggers). -################################################################################ - -################################################################################ -# Testcase 3.2.17.2: Ensure that every INFORMATION_SCHEMA table shows all the -# correct information, and no incorrect information, for 10 -# different databases to which 50 different users, each of -# which has a randomly issued set of privileges and access -# to a randomly chosen set of database objects in two or -# more of the databases, have access. The databases should -# each contain a mixture of all types of database objects -# (i.e. tables, views, stored procedures, triggers). -################################################################################ - -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.18.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.18.1: Ensure that the INFORMATION_SCHEMA.TRIGGERS -# table has the following columns, in the following order: -# -# -# (FIXME - list copied from WL#1996) -# -# TRIGGER_CATALOG NULL -# TRIGGER_SCHEMA -# TRIGGER_NAME -# EVENT_MANIPULATION -# EVENT_OBJECT_CATALOG NULL -# EVENT_OBJECT_SCHEMA -# EVENT_OBJECT_TABLE -# ACTION_ORDER NULL -# ACTION_CONDITION NULL -# ACTION_STATEMENT -# ACTION_ORIENTATION -# ACTION_TIMING -# ACTION_REFERENCE_OLD_TABLE NULL -# ACTION_REFERENCE_NEW_TABLE NULL -# ACTION_REFERENCE_OLD_ROW -# ACTION_REFERENCE_NEW_ROW -# CREATED -# SQL_MODE -# -################################################################################ - -let $is_table= triggers; ---source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.18.2 + 3.2.18.3:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.18.2: Ensure that the table shows the relevant information on -# every trigger on which the current user or PUBLIC has -# privileges. -################################################################################ -# Testcase 3.2.18.3: Ensure that the table does not show any information on any -# trigger on which the current user and public have no -# privileges. -################################################################################ - -#FIXME 3.2.18.2: to be added. -#FIXME 3.2.18.2: don't forget to add the test description to QATestPlanV50func - -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.19.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.19.1: Ensure that the INFORMATION_SCHEMA.PARAMETERS -# table has the following columns, in the following order: -# -################################################################################ - -let $is_table= parameters; -# when table is implemented remove this and the next 4 lines and "enable" 5th line: -# and don't forget to add the test description to QATestPlanV50func -let $message= checking a table that will be implemented later; ---source include/show_msg.inc ---error ER_UNKNOWN_TABLE -eval DESC $is_table; -#--source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - -let $message= Testcase 3.2.20.1:; ---source include/show_msg80.inc - -################################################################################ -# Testcase 3.2.20.1: Ensure that the INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS -# table has the following columns, in the following order: -# -################################################################################ - -let $is_table= referential_constraints; -# when table is implemented remove this and the next 4 lines and "enable" 5th line: -# and don't forget to add the test description to QATestPlanV50func -let $message= checking a table that will be implemented later; ---source include/show_msg.inc ---error ER_UNKNOWN_TABLE -eval DESC $is_table; -#--source suite/funcs_1/datadict/datadict_show_table_design.inc -# ------------------------------------------------------------------------------------------------------- - - -################################################################################ -# -let $message= *** End of Data Dictionary Tests ***; ---source include/show_msg80.inc -# -################################################################################ - - -# some cleanup to be sure nothing remains ---disable_warnings -DROP TABLE IF EXISTS test.tb1; -DROP TABLE IF EXISTS test.tb2; -DROP TABLE IF EXISTS test.tb3; -DROP TABLE IF EXISTS test.tb4; -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.t7; -DROP TABLE IF EXISTS test.t8; -DROP TABLE IF EXISTS test.t9; -DROP TABLE IF EXISTS test.t10; -DROP TABLE IF EXISTS test.t11; -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test4; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; ---enable_warnings diff --git a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc b/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc deleted file mode 100644 index 35060cefbf8..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_show_schema.inc +++ /dev/null @@ -1,57 +0,0 @@ -#### suite/funcs_1/datadict/datadict_show_schema.test - -# shows content of tables from INFORMATION_SCHEMA - -# usage: - -# let $message= ; -# let $dbname= ; -# --source suite/funcs_1/datadict/datadict_show_schema.test - ---source include/show_msg.inc - -eval select * - from information_schema.schemata - where schema_name like '$dbname%'; - -eval select table_catalog, table_schema, engine - from information_schema.tables - where table_schema like '$dbname%'; - -eval select * - from information_schema.columns - where table_schema like '$dbname%'; - -eval select table_schema, table_name, is_updatable - from information_schema.views - where table_schema like '$dbname%'; - -eval select routine_name, routine_type, security_type, sql_mode - from information_schema.routines - where routine_schema like '$dbname%'; - -eval select table_name, index_schema, index_name, index_type - from information_schema.statistics - where table_schema like '$dbname%'; - ---replace_result $SERVER_NAME ---sorted_result -eval select * - from information_schema.user_privileges; -# where grantee="'u_6_401013'@'%'"; - -eval select * - from information_schema.column_privileges - where table_schema like '$dbname%'; - -eval select * - from information_schema.table_privileges - where table_schema like '$dbname%'; - -eval select * - from information_schema.key_column_usage - where table_schema like '$dbname%'; - -eval SELECT * - FROM information_schema.triggers - WHERE trigger_schema LIKE '$dbname%'; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc b/mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc deleted file mode 100644 index e406d80f7f5..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_show_table_design.inc +++ /dev/null @@ -1,28 +0,0 @@ -#### suite/funcs_1/datadict/datadict_show_table_design.test -# -# - shows design of *one* table from INFORMATION_SCHEMA -# - used to have identical 'view' on all tested tables -# -# Usage: -# -# let $is_table= ; -# --source suite/funcs_1/datadict/datadict_show_table_design.test - -USE information_schema; - ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval DESC $is_table; - ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SHOW CREATE TABLE $is_table; - -eval SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = '$is_table' -ORDER BY ordinal_position; - ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = '$is_table' -ORDER BY ordinal_position; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables.inc deleted file mode 100644 index 00ec93095ea..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables.inc +++ /dev/null @@ -1,62 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables.inc - ---source include/show_msg.inc - -eval $dd_part1 schemata $dd_part2; - -#FIXME: splitting the "SELECT * FROM tables" in two parts until -#FIXME: Bug #12397: wrong values shown in column CREATE_OPTIONS of INFORMATION_SCHEMA.TABLES -#FIXME: is solved, like done in the _master.test, cannot be done here, so we replace here -#FIXME: the result for ALL rows. -# 9 AVG_ROW_LENGTH -# 10 DATA_LENGTH -# 11 MAX_DATA_LENGTH -## 12 INDEX_LENGTH -# 13 DATA_FREE -# 15 CREATE_TIME -# 16 UPDATE_TIME -# 20 CREATE_OPTIONS ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 20 "#CO#" -eval $dd_part1 tables $dd_part2; - ---source suite/funcs_1/datadict/datadict_bug_12777.inc -eval $dd_part1 columns $dd_part2; -eval $dd_part1 character_sets $dd_part2; -eval $dd_part1 collations where collation_name <> 'utf8_general_cs' $dd_part2; -eval $dd_part1 collation_character_set_applicability where collation_name <> 'utf8_general_cs' $dd_part2; ---replace_column 16 17 -eval $dd_part1 routines $dd_part2; -eval $dd_part1 statistics $dd_part2; -eval $dd_part1 views $dd_part2; -eval $dd_part1 user_privileges $dd_part2; -eval $dd_part1 schema_privileges $dd_part2; -eval $dd_part1 table_privileges $dd_part2; -eval $dd_part1 column_privileges $dd_part2; -eval $dd_part1 table_constraints $dd_part2; -eval $dd_part1 key_column_usage $dd_part2; -eval $dd_part1 triggers $dd_part2; - -# later planned new tables for INFORMATION_SCHEMA (not before version 5.0.11) -# -# (see Reference Manual: 22.1.16. Other INFORMATION_SCHEMA Tables): -# -# parameters -# referential_constraints -# -# check them here although they currently does not exist, but using this we -# immedeatly get notice when they are implemented - -#### DON'T FORGET TO ADD THE NEW TABLES TO THE CORRESPONDING FILES -#### datadict_tables_error_.test ! - ---error 1109 -eval $dd_part1 parameters $dd_part2; - ---error 1109 -eval $dd_part1 referential_constraints $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc deleted file mode 100644 index a551266c447..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error.inc +++ /dev/null @@ -1,33 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables.inc - - -#--disable_query_log -#eval SET @aux= 'This testcase shows the error number $error_no'; -#let $message= `SELECT @aux`; -#--enable_query_log ---source include/show_msg.inc - ---disable_abort_on_error -eval $dd_part1 schemata $dd_part2; -eval $dd_part1 tables $dd_part2; -eval $dd_part1 columns $dd_part2; -eval $dd_part1 character_sets $dd_part2; -eval $dd_part1 collations $dd_part2; -eval $dd_part1 collation_character_set_applicability $dd_part2; -eval $dd_part1 routines $dd_part2; -eval $dd_part1 statistics $dd_part2; -eval $dd_part1 views $dd_part2; -eval $dd_part1 user_privileges $dd_part2; -eval $dd_part1 schema_privileges $dd_part2; -eval $dd_part1 table_privileges $dd_part2; -eval $dd_part1 column_privileges $dd_part2; -eval $dd_part1 table_constraints $dd_part2; -eval $dd_part1 key_column_usage $dd_part2; -eval $dd_part1 triggers $dd_part2; ---enable_abort_on_error diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc deleted file mode 100644 index d04459991cc..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1.inc +++ /dev/null @@ -1,80 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -let $message= known error 1 (Can_t create/write to file ...):; ---source include/show_msg.inc - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 schemata $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 tables $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 columns $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 character_sets $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 collations $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 collation_character_set_applicability $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 routines $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 statistics $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 views $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 user_privileges $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 schema_privileges $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 table_privileges $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 column_privileges $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 table_constraints $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 key_column_usage $dd_part2; - ---replace_result '\\' '/' ---error 1 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc deleted file mode 100755 index a8876ee7db6..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1044.inc +++ /dev/null @@ -1,51 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables_error_1044.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -# e.g.: ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' - -let $message= known error 1044 (ERROR 42000: Access denied for user ... to database ...):; ---source include/show_msg.inc - ---error 1044 -eval $dd_part1 schemata $dd_part2; ---error 1044 -eval $dd_part1 tables $dd_part2; ---error 1044 -eval $dd_part1 columns $dd_part2; ---error 1044 -eval $dd_part1 character_sets $dd_part2; ---error 1044 -eval $dd_part1 collations $dd_part2; ---error 1044 -eval $dd_part1 collation_character_set_applicability $dd_part2; ---error 1044 -eval $dd_part1 routines $dd_part2; ---error 1044 -eval $dd_part1 statistics $dd_part2; ---error 1044 -eval $dd_part1 views $dd_part2; ---error 1044 -eval $dd_part1 user_privileges $dd_part2; ---error 1044 -eval $dd_part1 schema_privileges $dd_part2; ---error 1044 -eval $dd_part1 table_privileges $dd_part2; ---error 1044 -eval $dd_part1 column_privileges $dd_part2; ---error 1044 -eval $dd_part1 table_constraints $dd_part2; ---error 1044 -eval $dd_part1 key_column_usage $dd_part2; ---error 1044 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc deleted file mode 100644 index 4b12c836e92..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1049.inc +++ /dev/null @@ -1,49 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -let $message= known error 1049 (ERROR 42000: Unknown database ...):; ---source include/show_msg.inc - ---error 1049 -eval $dd_part1 schemata $dd_part2; ---error 1049 -eval $dd_part1 tables $dd_part2; ---error 1049 -eval $dd_part1 columns $dd_part2; ---error 1049 -eval $dd_part1 character_sets $dd_part2; ---error 1049 -eval $dd_part1 collations $dd_part2; ---error 1049 -eval $dd_part1 collation_character_set_applicability $dd_part2; ---error 1049 -eval $dd_part1 routines $dd_part2; ---error 1049 -eval $dd_part1 statistics $dd_part2; ---error 1049 -eval $dd_part1 views $dd_part2; ---error 1049 -eval $dd_part1 user_privileges $dd_part2; ---error 1049 -eval $dd_part1 schema_privileges $dd_part2; ---error 1049 -eval $dd_part1 table_privileges $dd_part2; ---error 1049 -eval $dd_part1 column_privileges $dd_part2; ---error 1049 -eval $dd_part1 table_constraints $dd_part2; ---error 1049 -eval $dd_part1 key_column_usage $dd_part2; ---error 1049 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc deleted file mode 100644 index 109b2ecd7da..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1051.inc +++ /dev/null @@ -1,49 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -let $message= known error 1051:; ---source include/show_msg.inc - ---error 1051 -eval $dd_part1 schemata $dd_part2; ---error 1051 -eval $dd_part1 tables $dd_part2; ---error 1051 -eval $dd_part1 columns $dd_part2; ---error 1051 -eval $dd_part1 character_sets $dd_part2; ---error 1051 -eval $dd_part1 collations $dd_part2; ---error 1051 -eval $dd_part1 collation_character_set_applicability $dd_part2; ---error 1051 -eval $dd_part1 routines $dd_part2; ---error 1051 -eval $dd_part1 statistics $dd_part2; ---error 1051 -eval $dd_part1 views $dd_part2; ---error 1051 -eval $dd_part1 user_privileges $dd_part2; ---error 1051 -eval $dd_part1 schema_privileges $dd_part2; ---error 1051 -eval $dd_part1 table_privileges $dd_part2; ---error 1051 -eval $dd_part1 column_privileges $dd_part2; ---error 1051 -eval $dd_part1 table_constraints $dd_part2; ---error 1051 -eval $dd_part1 key_column_usage $dd_part2; ---error 1051 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc deleted file mode 100644 index 5fa6d705b26..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1146.inc +++ /dev/null @@ -1,49 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -let $message= known error 1146:; ---source include/show_msg.inc - ---error 1146 -eval $dd_part1 schemata $dd_part2; ---error 1146 -eval $dd_part1 tables $dd_part2; ---error 1146 -eval $dd_part1 columns $dd_part2; ---error 1146 -eval $dd_part1 character_sets $dd_part2; ---error 1146 -eval $dd_part1 collations $dd_part2; ---error 1146 -eval $dd_part1 collation_character_set_applicability $dd_part2; ---error 1146 -eval $dd_part1 routines $dd_part2; ---error 1146 -eval $dd_part1 statistics $dd_part2; ---error 1146 -eval $dd_part1 views $dd_part2; ---error 1146 -eval $dd_part1 user_privileges $dd_part2; ---error 1146 -eval $dd_part1 schema_privileges $dd_part2; ---error 1146 -eval $dd_part1 table_privileges $dd_part2; ---error 1146 -eval $dd_part1 column_privileges $dd_part2; ---error 1146 -eval $dd_part1 table_constraints $dd_part2; ---error 1146 -eval $dd_part1 key_column_usage $dd_part2; ---error 1146 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc b/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc deleted file mode 100644 index e64226f0d35..00000000000 --- a/mysql-test/suite/funcs_1/datadict/datadict_tables_error_1288.inc +++ /dev/null @@ -1,49 +0,0 @@ -#### suite/funcs_1/datadict/datadict_tables.inc - -# contains all tables from INFORMATION_SCHEMA - -# usage: - -# --source suite/funcs_1/datadict/datadict_tables_err_.inc -# -# up to a change of "mysqltest", which makes lines like "eval --error $err_no" -# possible we will have some different files with the same content except the -# error numbers. - ---source include/show_msg.inc - -let $message= known error 1288:; ---source include/show_msg.inc - ---error 1288 -eval $dd_part1 schemata $dd_part2; ---error 1288 -eval $dd_part1 tables $dd_part2; ---error 1288 -eval $dd_part1 columns $dd_part2; ---error 1288 -eval $dd_part1 character_sets $dd_part2; ---error 1288 -eval $dd_part1 collations $dd_part2; ---error 1288 -eval $dd_part1 collation_character_set_applicability $dd_part2; ---error 1288 -eval $dd_part1 routines $dd_part2; ---error 1288 -eval $dd_part1 statistics $dd_part2; ---error 1288 -eval $dd_part1 views $dd_part2; ---error 1288 -eval $dd_part1 user_privileges $dd_part2; ---error 1288 -eval $dd_part1 schema_privileges $dd_part2; ---error 1288 -eval $dd_part1 table_privileges $dd_part2; ---error 1288 -eval $dd_part1 column_privileges $dd_part2; ---error 1288 -eval $dd_part1 table_constraints $dd_part2; ---error 1288 -eval $dd_part1 key_column_usage $dd_part2; ---error 1288 -eval $dd_part1 triggers $dd_part2; diff --git a/mysql-test/suite/funcs_1/datadict/is_table_query.inc b/mysql-test/suite/funcs_1/datadict/is_table_query.inc new file mode 100644 index 00000000000..3ed7413167a --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/is_table_query.inc @@ -0,0 +1,42 @@ +# suite/funcs_1/datadict/is_table_query.inc +# +# Check that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# (Requirement 3.2.1.1) +# +# The variable $is_table must be set before sourcing this script. +# +# 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. +# +--disable_warnings +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +--enable_warnings +eval CREATE VIEW test.v1 AS SELECT * FROM information_schema.$is_table; +eval CREATE PROCEDURE test.p1() SELECT * FROM information_schema.$is_table; +delimiter //; +eval CREATE FUNCTION test.f1() returns BIGINT +BEGIN + DECLARE counter BIGINT DEFAULT NULL; + SELECT COUNT(*) INTO counter FROM information_schema.$is_table; + RETURN counter; +END// +delimiter ;// + + +# We are not interested to check the content here. +--echo # Attention: The printing of the next result sets is disabled. +--disable_result_log +eval SELECT * FROM information_schema.$is_table; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +--enable_result_log + +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; diff --git a/mysql-test/suite/funcs_1/datadict/statistics.inc b/mysql-test/suite/funcs_1/datadict/statistics.inc new file mode 100644 index 00000000000..00fd7a1b06b --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/statistics.inc @@ -0,0 +1,55 @@ +# suite/funcs_1/datadict/statistics.inc +# +# Auxiliary script to be sourced by +# is_statistics_is +# is_statistics_mysql +# is_statistics_ +# +# Purpose: +# Check the content of information_schema.statistics about tables within the +# database '$database'. +# +# Usage: +# The variable $database has to be set before sourcing this script. +# Example: +# let $database = db_data; +# +# 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. +# + +--source suite/funcs_1/datadict/datadict.pre + +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; + +let $my_select = SELECT * FROM information_schema.statistics +$my_where +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +--replace_column 10 #CARD# +eval $my_select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1,localhost,testuser1,,db_datadict); +--replace_column 10 #CARD# +eval $my_select; + +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/table_constraints.inc b/mysql-test/suite/funcs_1/datadict/table_constraints.inc new file mode 100644 index 00000000000..9e57976862b --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/table_constraints.inc @@ -0,0 +1,45 @@ +# suite/funcs_1/datadict/table_constraints.inc +# +# Auxiliary script to be sourced by +# suite/funcs_1/t/is_table_constraints_mysql.test +# suite/funcs_1/t/is_table_constraints_is.test +# +# The variable +# $table_schema database to be inspected +# has to be set before sourcing this script. +# +# 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. +# + +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; + +let $my_select = SELECT * FROM information_schema.table_constraints +WHERE table_schema = '$table_schema' +ORDER BY table_schema,table_name,constraint_name; +eval $my_select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1,localhost,testuser1,,db_datadict); +eval $my_select; + +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/tables1.inc b/mysql-test/suite/funcs_1/datadict/tables1.inc new file mode 100644 index 00000000000..a03304028f6 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/tables1.inc @@ -0,0 +1,39 @@ +# suite/funcs_1/datadict/tables1.inc +# +# Auxiliary script to be sourced by +# is_tables_mysql.test +# is_tables_is.test +# is_tables_.test +# +# 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. +# + +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--source suite/funcs_1/datadict/tables2.inc + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1,localhost,testuser1,,db_datadict); +--source suite/funcs_1/datadict/tables2.inc + +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/datadict/tables2.inc b/mysql-test/suite/funcs_1/datadict/tables2.inc new file mode 100644 index 00000000000..1066e52f8f0 --- /dev/null +++ b/mysql-test/suite/funcs_1/datadict/tables2.inc @@ -0,0 +1,47 @@ +# suite/funcs_1/datadict/tables2.inc +# +# Auxiliary script to be sourced by suite/funcs_1/datadict/tables1.inc. +# +# 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. +# +################################################################################ + +# 8 TABLE_ROWS +# 9 AVG_ROW_LENGTH +# 10 DATA_LENGTH +# 11 MAX_DATA_LENGTH +# 12 INDEX_LENGTH +# 13 DATA_FREE +# 15 CREATE_TIME +# 16 UPDATE_TIME +# 17 CHECK_TIME +# 20 CREATE_OPTIONS +# 21 TABLE_COMMENT User defined comment +# + InnoDB +# + NDB: "number_of_replicas: " appended +# + InnoDB: "InnoDB free: kB" appended +# depends on tablespace history! +# The LEFT/INSTR/IF/LENGTH stuff should remove these +# storage engine specific part. +let $innodb_pattern = 'InnoDB free'; +let $ndb_pattern = 'number_of_replicas'; +--vertical_results +--replace_column 8 "#TBLR#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT#" 16 "#UT#" 17 "#CT#" 20 "#CO#" 21 "#TC#" +eval +SELECT *, + LEFT( table_comment, + IF(INSTR(table_comment,$innodb_pattern) = 0 + AND INSTR(table_comment,$ndb_pattern) = 0, + LENGTH(table_comment), + INSTR(table_comment,$innodb_pattern) + + INSTR(table_comment,$ndb_pattern) - 1)) + AS "user_comment", + '-----------------------------------------------------' AS "Separator" +FROM information_schema.tables +$my_where +ORDER BY table_schema,table_name; +--horizontal_results + diff --git a/mysql-test/suite/funcs_1/include/cleanup.inc b/mysql-test/suite/funcs_1/include/cleanup.inc new file mode 100644 index 00000000000..ef8b8f01cfa --- /dev/null +++ b/mysql-test/suite/funcs_1/include/cleanup.inc @@ -0,0 +1,21 @@ +# suite/funcs_1/include/cleanup.inc +# +# Remove all objects created by sourcing +# suite/funcs_1/datadict/datadict_load.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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; + diff --git a/mysql-test/suite/funcs_1/include/create_database.inc b/mysql-test/suite/funcs_1/include/create_database.inc deleted file mode 100644 index aa11d936aa3..00000000000 --- a/mysql-test/suite/funcs_1/include/create_database.inc +++ /dev/null @@ -1,6 +0,0 @@ -##### suite/funcs_1/include/create_database.inc - ---disable_warnings -eval DROP DATABASE IF EXISTS $new_database; ---enable_warnings -eval CREATE DATABASE $new_database; diff --git a/mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc b/mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc deleted file mode 100644 index d9ec367b524..00000000000 --- a/mysql-test/suite/funcs_1/include/create_user_lowest_priv.inc +++ /dev/null @@ -1,10 +0,0 @@ -##### suite/funcs_1/include/create_user_no_priv.inc -# -# $new_user must contain the name (with @ if necessary) -# - ---error 0,1396 -eval DROP USER $new_user; -eval CREATE USER $new_user identified by 'PWD'; -# Just to be sure -eval REVOKE ALL PRIVILEGES, GRANT OPTION FROM $new_user; diff --git a/mysql-test/suite/funcs_1/include/create_user_no_super.inc b/mysql-test/suite/funcs_1/include/create_user_no_super.inc deleted file mode 100644 index 0de923bf98b..00000000000 --- a/mysql-test/suite/funcs_1/include/create_user_no_super.inc +++ /dev/null @@ -1,11 +0,0 @@ -##### suite/funcs_1/include/create_user_no_super.inc -# -# $new_user must contain the name (with @ if necessary) -# of the user to be created - ---error 0,1396 -eval DROP USER $new_user; -eval CREATE USER $new_user identified by 'PWD'; - -eval GRANT ALL ON *.* TO $new_user WITH GRANT OPTION; -eval REVOKE SUPER ON *.* FROM $new_user; diff --git a/mysql-test/suite/funcs_1/include/memory_tb1.inc b/mysql-test/suite/funcs_1/include/memory_tb1.inc index 93cc91a4b17..7d66443c62f 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb1.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb1.inc @@ -1,8 +1,5 @@ ##### suite/funcs_1/include/memory_tb1.inc -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; - --disable_warnings drop table if exists tb1 ; --enable_warnings diff --git a/mysql-test/suite/funcs_1/include/memory_tb2.inc b/mysql-test/suite/funcs_1/include/memory_tb2.inc index 6ee0f064e68..869a4904ce0 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb2.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb2.inc @@ -1,8 +1,5 @@ ##### suite/funcs_1/include/memory_tb2.inc -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; - --disable_warnings drop table if exists tb2 ; --enable_warnings diff --git a/mysql-test/suite/funcs_1/include/memory_tb3.inc b/mysql-test/suite/funcs_1/include/memory_tb3.inc index 75dd7d98eee..5aa56d06ede 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb3.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb3.inc @@ -1,8 +1,5 @@ ##### suite/funcs_1/include/memory_tb3.inc -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; - --disable_warnings drop table if exists tb3; --enable_warnings diff --git a/mysql-test/suite/funcs_1/include/memory_tb4.inc b/mysql-test/suite/funcs_1/include/memory_tb4.inc index c3187d8d4a3..97bc04118bd 100644 --- a/mysql-test/suite/funcs_1/include/memory_tb4.inc +++ b/mysql-test/suite/funcs_1/include/memory_tb4.inc @@ -1,8 +1,5 @@ ##### suite/funcs_1/include/memory_tb4.inc -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; - --disable_warnings drop table if exists tb4 ; --enable_warnings diff --git a/mysql-test/suite/funcs_1/include/sp_tb.inc b/mysql-test/suite/funcs_1/include/sp_tb.inc index ef209afc0cf..b37f2cc7ffe 100644 --- a/mysql-test/suite/funcs_1/include/sp_tb.inc +++ b/mysql-test/suite/funcs_1/include/sp_tb.inc @@ -1,9 +1,5 @@ --disable_abort_on_error -# ML: Should be set outside when memory -# set @@global.max_heap_table_size=4294967295; -# set @@session.max_heap_table_size=4294967295; - USE test; --disable_warnings diff --git a/mysql-test/suite/funcs_1/r/charset_collation_1.result b/mysql-test/suite/funcs_1/r/charset_collation_1.result new file mode 100644 index 00000000000..d397c671321 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/charset_collation_1.result @@ -0,0 +1,309 @@ +DROP USER dbdict_test@localhost; +CREATE USER dbdict_test@localhost; +# Establish connection con (user=dbdict_test) + +SELECT * +FROM information_schema.character_sets +ORDER BY character_set_name; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 +ascii ascii_general_ci US ASCII 1 +big5 big5_chinese_ci Big5 Traditional Chinese 2 +binary binary Binary pseudo charset 1 +cp1250 cp1250_general_ci Windows Central European 1 +cp1251 cp1251_general_ci Windows Cyrillic 1 +cp1256 cp1256_general_ci Windows Arabic 1 +cp1257 cp1257_general_ci Windows Baltic 1 +cp850 cp850_general_ci DOS West European 1 +cp852 cp852_general_ci DOS Central European 1 +cp866 cp866_general_ci DOS Russian 1 +cp932 cp932_japanese_ci SJIS for Windows Japanese 2 +dec8 dec8_swedish_ci DEC West European 1 +eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 +euckr euckr_korean_ci EUC-KR Korean 2 +gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 +gbk gbk_chinese_ci GBK Simplified Chinese 2 +geostd8 geostd8_general_ci GEOSTD8 Georgian 1 +greek greek_general_ci ISO 8859-7 Greek 1 +hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 +hp8 hp8_english_ci HP West European 1 +keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 +koi8r koi8r_general_ci KOI8-R Relcom Russian 1 +koi8u koi8u_general_ci KOI8-U Ukrainian 1 +latin1 latin1_swedish_ci cp1252 West European 1 +latin2 latin2_general_ci ISO 8859-2 Central European 1 +latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 +latin7 latin7_general_ci ISO 8859-13 Baltic 1 +macce macce_general_ci Mac Central European 1 +macroman macroman_general_ci Mac West European 1 +sjis sjis_japanese_ci Shift-JIS Japanese 2 +swe7 swe7_swedish_ci 7bit Swedish 1 +tis620 tis620_thai_ci TIS620 Thai 1 +ucs2 ucs2_general_ci UCS-2 Unicode 2 +ujis ujis_japanese_ci EUC-JP Japanese 3 +utf8 utf8_general_ci UTF-8 Unicode 3 + +SELECT * +FROM information_schema.collations +ORDER BY collation_name; +COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN +armscii8_bin armscii8 64 0 +armscii8_general_ci armscii8 32 Yes 0 +ascii_bin ascii 65 0 +ascii_general_ci ascii 11 Yes 0 +big5_bin big5 84 Yes 1 +big5_chinese_ci big5 1 Yes Yes 1 +binary binary 63 Yes Yes 1 +cp1250_bin cp1250 66 Yes 1 +cp1250_croatian_ci cp1250 44 Yes 1 +cp1250_czech_cs cp1250 34 Yes 2 +cp1250_general_ci cp1250 26 Yes Yes 1 +cp1251_bin cp1251 50 0 +cp1251_bulgarian_ci cp1251 14 0 +cp1251_general_ci cp1251 51 Yes 0 +cp1251_general_cs cp1251 52 0 +cp1251_ukrainian_ci cp1251 23 0 +cp1256_bin cp1256 67 0 +cp1256_general_ci cp1256 57 Yes 0 +cp1257_bin cp1257 58 0 +cp1257_general_ci cp1257 59 Yes 0 +cp1257_lithuanian_ci cp1257 29 0 +cp850_bin cp850 80 0 +cp850_general_ci cp850 4 Yes 0 +cp852_bin cp852 81 0 +cp852_general_ci cp852 40 Yes 0 +cp866_bin cp866 68 0 +cp866_general_ci cp866 36 Yes 0 +cp932_bin cp932 96 Yes 1 +cp932_japanese_ci cp932 95 Yes Yes 1 +dec8_bin dec8 69 0 +dec8_swedish_ci dec8 3 Yes 0 +eucjpms_bin eucjpms 98 Yes 1 +eucjpms_japanese_ci eucjpms 97 Yes Yes 1 +euckr_bin euckr 85 Yes 1 +euckr_korean_ci euckr 19 Yes Yes 1 +gb2312_bin gb2312 86 Yes 1 +gb2312_chinese_ci gb2312 24 Yes Yes 1 +gbk_bin gbk 87 Yes 1 +gbk_chinese_ci gbk 28 Yes Yes 1 +geostd8_bin geostd8 93 0 +geostd8_general_ci geostd8 92 Yes 0 +greek_bin greek 70 0 +greek_general_ci greek 25 Yes 0 +hebrew_bin hebrew 71 0 +hebrew_general_ci hebrew 16 Yes 0 +hp8_bin hp8 72 0 +hp8_english_ci hp8 6 Yes 0 +keybcs2_bin keybcs2 73 0 +keybcs2_general_ci keybcs2 37 Yes 0 +koi8r_bin koi8r 74 0 +koi8r_general_ci koi8r 7 Yes 0 +koi8u_bin koi8u 75 0 +koi8u_general_ci koi8u 22 Yes 0 +latin1_bin latin1 47 Yes 1 +latin1_danish_ci latin1 15 Yes 1 +latin1_general_ci latin1 48 Yes 1 +latin1_general_cs latin1 49 Yes 1 +latin1_german1_ci latin1 5 Yes 1 +latin1_german2_ci latin1 31 Yes 2 +latin1_spanish_ci latin1 94 Yes 1 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin2_bin latin2 77 Yes 1 +latin2_croatian_ci latin2 27 Yes 1 +latin2_czech_cs latin2 2 Yes 4 +latin2_general_ci latin2 9 Yes Yes 1 +latin2_hungarian_ci latin2 21 Yes 1 +latin5_bin latin5 78 0 +latin5_turkish_ci latin5 30 Yes 0 +latin7_bin latin7 79 0 +latin7_estonian_cs latin7 20 0 +latin7_general_ci latin7 41 Yes 0 +latin7_general_cs latin7 42 0 +macce_bin macce 43 0 +macce_general_ci macce 38 Yes 0 +macroman_bin macroman 53 0 +macroman_general_ci macroman 39 Yes 0 +sjis_bin sjis 88 Yes 1 +sjis_japanese_ci sjis 13 Yes Yes 1 +swe7_bin swe7 82 0 +swe7_swedish_ci swe7 10 Yes 0 +tis620_bin tis620 89 Yes 1 +tis620_thai_ci tis620 18 Yes Yes 4 +ucs2_bin ucs2 90 Yes 1 +ucs2_czech_ci ucs2 138 Yes 8 +ucs2_danish_ci ucs2 139 Yes 8 +ucs2_esperanto_ci ucs2 145 Yes 8 +ucs2_estonian_ci ucs2 134 Yes 8 +ucs2_general_ci ucs2 35 Yes Yes 1 +ucs2_hungarian_ci ucs2 146 Yes 8 +ucs2_icelandic_ci ucs2 129 Yes 8 +ucs2_latvian_ci ucs2 130 Yes 8 +ucs2_lithuanian_ci ucs2 140 Yes 8 +ucs2_persian_ci ucs2 144 Yes 8 +ucs2_polish_ci ucs2 133 Yes 8 +ucs2_romanian_ci ucs2 131 Yes 8 +ucs2_roman_ci ucs2 143 Yes 8 +ucs2_slovak_ci ucs2 141 Yes 8 +ucs2_slovenian_ci ucs2 132 Yes 8 +ucs2_spanish2_ci ucs2 142 Yes 8 +ucs2_spanish_ci ucs2 135 Yes 8 +ucs2_swedish_ci ucs2 136 Yes 8 +ucs2_turkish_ci ucs2 137 Yes 8 +ucs2_unicode_ci ucs2 128 Yes 8 +ujis_bin ujis 91 Yes 1 +ujis_japanese_ci ujis 12 Yes Yes 1 +utf8_bin utf8 83 Yes 1 +utf8_czech_ci utf8 202 Yes 8 +utf8_danish_ci utf8 203 Yes 8 +utf8_esperanto_ci utf8 209 Yes 8 +utf8_estonian_ci utf8 198 Yes 8 +utf8_general_ci utf8 33 Yes Yes 1 +utf8_hungarian_ci utf8 210 Yes 8 +utf8_icelandic_ci utf8 193 Yes 8 +utf8_latvian_ci utf8 194 Yes 8 +utf8_lithuanian_ci utf8 204 Yes 8 +utf8_persian_ci utf8 208 Yes 8 +utf8_polish_ci utf8 197 Yes 8 +utf8_romanian_ci utf8 195 Yes 8 +utf8_roman_ci utf8 207 Yes 8 +utf8_slovak_ci utf8 205 Yes 8 +utf8_slovenian_ci utf8 196 Yes 8 +utf8_spanish2_ci utf8 206 Yes 8 +utf8_spanish_ci utf8 199 Yes 8 +utf8_swedish_ci utf8 200 Yes 8 +utf8_turkish_ci utf8 201 Yes 8 +utf8_unicode_ci utf8 192 Yes 8 + + +SELECT * +FROM information_schema.collation_character_set_applicability +ORDER BY collation_name, character_set_name; +COLLATION_NAME CHARACTER_SET_NAME +armscii8_bin armscii8 +armscii8_general_ci armscii8 +ascii_bin ascii +ascii_general_ci ascii +big5_bin big5 +big5_chinese_ci big5 +binary binary +cp1250_bin cp1250 +cp1250_croatian_ci cp1250 +cp1250_czech_cs cp1250 +cp1250_general_ci cp1250 +cp1251_bin cp1251 +cp1251_bulgarian_ci cp1251 +cp1251_general_ci cp1251 +cp1251_general_cs cp1251 +cp1251_ukrainian_ci cp1251 +cp1256_bin cp1256 +cp1256_general_ci cp1256 +cp1257_bin cp1257 +cp1257_general_ci cp1257 +cp1257_lithuanian_ci cp1257 +cp850_bin cp850 +cp850_general_ci cp850 +cp852_bin cp852 +cp852_general_ci cp852 +cp866_bin cp866 +cp866_general_ci cp866 +cp932_bin cp932 +cp932_japanese_ci cp932 +dec8_bin dec8 +dec8_swedish_ci dec8 +eucjpms_bin eucjpms +eucjpms_japanese_ci eucjpms +euckr_bin euckr +euckr_korean_ci euckr +gb2312_bin gb2312 +gb2312_chinese_ci gb2312 +gbk_bin gbk +gbk_chinese_ci gbk +geostd8_bin geostd8 +geostd8_general_ci geostd8 +greek_bin greek +greek_general_ci greek +hebrew_bin hebrew +hebrew_general_ci hebrew +hp8_bin hp8 +hp8_english_ci hp8 +keybcs2_bin keybcs2 +keybcs2_general_ci keybcs2 +koi8r_bin koi8r +koi8r_general_ci koi8r +koi8u_bin koi8u +koi8u_general_ci koi8u +latin1_bin latin1 +latin1_danish_ci latin1 +latin1_general_ci latin1 +latin1_general_cs latin1 +latin1_german1_ci latin1 +latin1_german2_ci latin1 +latin1_spanish_ci latin1 +latin1_swedish_ci latin1 +latin2_bin latin2 +latin2_croatian_ci latin2 +latin2_czech_cs latin2 +latin2_general_ci latin2 +latin2_hungarian_ci latin2 +latin5_bin latin5 +latin5_turkish_ci latin5 +latin7_bin latin7 +latin7_estonian_cs latin7 +latin7_general_ci latin7 +latin7_general_cs latin7 +macce_bin macce +macce_general_ci macce +macroman_bin macroman +macroman_general_ci macroman +sjis_bin sjis +sjis_japanese_ci sjis +swe7_bin swe7 +swe7_swedish_ci swe7 +tis620_bin tis620 +tis620_thai_ci tis620 +ucs2_bin ucs2 +ucs2_czech_ci ucs2 +ucs2_danish_ci ucs2 +ucs2_esperanto_ci ucs2 +ucs2_estonian_ci ucs2 +ucs2_general_ci ucs2 +ucs2_hungarian_ci ucs2 +ucs2_icelandic_ci ucs2 +ucs2_latvian_ci ucs2 +ucs2_lithuanian_ci ucs2 +ucs2_persian_ci ucs2 +ucs2_polish_ci ucs2 +ucs2_romanian_ci ucs2 +ucs2_roman_ci ucs2 +ucs2_slovak_ci ucs2 +ucs2_slovenian_ci ucs2 +ucs2_spanish2_ci ucs2 +ucs2_spanish_ci ucs2 +ucs2_swedish_ci ucs2 +ucs2_turkish_ci ucs2 +ucs2_unicode_ci ucs2 +ujis_bin ujis +ujis_japanese_ci ujis +utf8_bin utf8 +utf8_czech_ci utf8 +utf8_danish_ci utf8 +utf8_esperanto_ci utf8 +utf8_estonian_ci utf8 +utf8_general_ci utf8 +utf8_hungarian_ci utf8 +utf8_icelandic_ci utf8 +utf8_latvian_ci utf8 +utf8_lithuanian_ci utf8 +utf8_persian_ci utf8 +utf8_polish_ci utf8 +utf8_romanian_ci utf8 +utf8_roman_ci utf8 +utf8_slovak_ci utf8 +utf8_slovenian_ci utf8 +utf8_spanish2_ci utf8 +utf8_spanish_ci utf8 +utf8_swedish_ci utf8 +utf8_turkish_ci utf8 +utf8_unicode_ci utf8 +# Switch to connection default + disconnect con +DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_2.result b/mysql-test/suite/funcs_1/r/charset_collation_2.result new file mode 100644 index 00000000000..0035da13c56 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/charset_collation_2.result @@ -0,0 +1,311 @@ +DROP USER dbdict_test@localhost; +CREATE USER dbdict_test@localhost; +# Establish connection con (user=dbdict_test) + +SELECT * +FROM information_schema.character_sets +ORDER BY character_set_name; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 +ascii ascii_general_ci US ASCII 1 +big5 big5_chinese_ci Big5 Traditional Chinese 2 +binary binary Binary pseudo charset 1 +cp1250 cp1250_general_ci Windows Central European 1 +cp1251 cp1251_general_ci Windows Cyrillic 1 +cp1256 cp1256_general_ci Windows Arabic 1 +cp1257 cp1257_general_ci Windows Baltic 1 +cp850 cp850_general_ci DOS West European 1 +cp852 cp852_general_ci DOS Central European 1 +cp866 cp866_general_ci DOS Russian 1 +cp932 cp932_japanese_ci SJIS for Windows Japanese 2 +dec8 dec8_swedish_ci DEC West European 1 +eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 +euckr euckr_korean_ci EUC-KR Korean 2 +gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 +gbk gbk_chinese_ci GBK Simplified Chinese 2 +geostd8 geostd8_general_ci GEOSTD8 Georgian 1 +greek greek_general_ci ISO 8859-7 Greek 1 +hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 +hp8 hp8_english_ci HP West European 1 +keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 +koi8r koi8r_general_ci KOI8-R Relcom Russian 1 +koi8u koi8u_general_ci KOI8-U Ukrainian 1 +latin1 latin1_swedish_ci cp1252 West European 1 +latin2 latin2_general_ci ISO 8859-2 Central European 1 +latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 +latin7 latin7_general_ci ISO 8859-13 Baltic 1 +macce macce_general_ci Mac Central European 1 +macroman macroman_general_ci Mac West European 1 +sjis sjis_japanese_ci Shift-JIS Japanese 2 +swe7 swe7_swedish_ci 7bit Swedish 1 +tis620 tis620_thai_ci TIS620 Thai 1 +ucs2 ucs2_general_ci UCS-2 Unicode 2 +ujis ujis_japanese_ci EUC-JP Japanese 3 +utf8 utf8_general_ci UTF-8 Unicode 3 + +SELECT * +FROM information_schema.collations +ORDER BY collation_name; +COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN +armscii8_bin armscii8 64 0 +armscii8_general_ci armscii8 32 Yes 0 +ascii_bin ascii 65 0 +ascii_general_ci ascii 11 Yes 0 +big5_bin big5 84 Yes 1 +big5_chinese_ci big5 1 Yes Yes 1 +binary binary 63 Yes Yes 1 +cp1250_bin cp1250 66 Yes 1 +cp1250_croatian_ci cp1250 44 Yes 1 +cp1250_czech_cs cp1250 34 Yes 2 +cp1250_general_ci cp1250 26 Yes Yes 1 +cp1251_bin cp1251 50 0 +cp1251_bulgarian_ci cp1251 14 0 +cp1251_general_ci cp1251 51 Yes 0 +cp1251_general_cs cp1251 52 0 +cp1251_ukrainian_ci cp1251 23 0 +cp1256_bin cp1256 67 0 +cp1256_general_ci cp1256 57 Yes 0 +cp1257_bin cp1257 58 0 +cp1257_general_ci cp1257 59 Yes 0 +cp1257_lithuanian_ci cp1257 29 0 +cp850_bin cp850 80 0 +cp850_general_ci cp850 4 Yes 0 +cp852_bin cp852 81 0 +cp852_general_ci cp852 40 Yes 0 +cp866_bin cp866 68 0 +cp866_general_ci cp866 36 Yes 0 +cp932_bin cp932 96 Yes 1 +cp932_japanese_ci cp932 95 Yes Yes 1 +dec8_bin dec8 69 0 +dec8_swedish_ci dec8 3 Yes 0 +eucjpms_bin eucjpms 98 Yes 1 +eucjpms_japanese_ci eucjpms 97 Yes Yes 1 +euckr_bin euckr 85 Yes 1 +euckr_korean_ci euckr 19 Yes Yes 1 +gb2312_bin gb2312 86 Yes 1 +gb2312_chinese_ci gb2312 24 Yes Yes 1 +gbk_bin gbk 87 Yes 1 +gbk_chinese_ci gbk 28 Yes Yes 1 +geostd8_bin geostd8 93 0 +geostd8_general_ci geostd8 92 Yes 0 +greek_bin greek 70 0 +greek_general_ci greek 25 Yes 0 +hebrew_bin hebrew 71 0 +hebrew_general_ci hebrew 16 Yes 0 +hp8_bin hp8 72 0 +hp8_english_ci hp8 6 Yes 0 +keybcs2_bin keybcs2 73 0 +keybcs2_general_ci keybcs2 37 Yes 0 +koi8r_bin koi8r 74 0 +koi8r_general_ci koi8r 7 Yes 0 +koi8u_bin koi8u 75 0 +koi8u_general_ci koi8u 22 Yes 0 +latin1_bin latin1 47 Yes 1 +latin1_danish_ci latin1 15 Yes 1 +latin1_general_ci latin1 48 Yes 1 +latin1_general_cs latin1 49 Yes 1 +latin1_german1_ci latin1 5 Yes 1 +latin1_german2_ci latin1 31 Yes 2 +latin1_spanish_ci latin1 94 Yes 1 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin2_bin latin2 77 Yes 1 +latin2_croatian_ci latin2 27 Yes 1 +latin2_czech_cs latin2 2 Yes 4 +latin2_general_ci latin2 9 Yes Yes 1 +latin2_hungarian_ci latin2 21 Yes 1 +latin5_bin latin5 78 0 +latin5_turkish_ci latin5 30 Yes 0 +latin7_bin latin7 79 0 +latin7_estonian_cs latin7 20 0 +latin7_general_ci latin7 41 Yes 0 +latin7_general_cs latin7 42 0 +macce_bin macce 43 0 +macce_general_ci macce 38 Yes 0 +macroman_bin macroman 53 0 +macroman_general_ci macroman 39 Yes 0 +sjis_bin sjis 88 Yes 1 +sjis_japanese_ci sjis 13 Yes Yes 1 +swe7_bin swe7 82 0 +swe7_swedish_ci swe7 10 Yes 0 +tis620_bin tis620 89 Yes 1 +tis620_thai_ci tis620 18 Yes Yes 4 +ucs2_bin ucs2 90 Yes 1 +ucs2_czech_ci ucs2 138 Yes 8 +ucs2_danish_ci ucs2 139 Yes 8 +ucs2_esperanto_ci ucs2 145 Yes 8 +ucs2_estonian_ci ucs2 134 Yes 8 +ucs2_general_ci ucs2 35 Yes Yes 1 +ucs2_hungarian_ci ucs2 146 Yes 8 +ucs2_icelandic_ci ucs2 129 Yes 8 +ucs2_latvian_ci ucs2 130 Yes 8 +ucs2_lithuanian_ci ucs2 140 Yes 8 +ucs2_persian_ci ucs2 144 Yes 8 +ucs2_polish_ci ucs2 133 Yes 8 +ucs2_romanian_ci ucs2 131 Yes 8 +ucs2_roman_ci ucs2 143 Yes 8 +ucs2_slovak_ci ucs2 141 Yes 8 +ucs2_slovenian_ci ucs2 132 Yes 8 +ucs2_spanish2_ci ucs2 142 Yes 8 +ucs2_spanish_ci ucs2 135 Yes 8 +ucs2_swedish_ci ucs2 136 Yes 8 +ucs2_turkish_ci ucs2 137 Yes 8 +ucs2_unicode_ci ucs2 128 Yes 8 +ujis_bin ujis 91 Yes 1 +ujis_japanese_ci ujis 12 Yes Yes 1 +utf8_bin utf8 83 Yes 1 +utf8_czech_ci utf8 202 Yes 8 +utf8_danish_ci utf8 203 Yes 8 +utf8_esperanto_ci utf8 209 Yes 8 +utf8_estonian_ci utf8 198 Yes 8 +utf8_general_ci utf8 33 Yes Yes 1 +utf8_general_cs utf8 254 Yes 1 +utf8_hungarian_ci utf8 210 Yes 8 +utf8_icelandic_ci utf8 193 Yes 8 +utf8_latvian_ci utf8 194 Yes 8 +utf8_lithuanian_ci utf8 204 Yes 8 +utf8_persian_ci utf8 208 Yes 8 +utf8_polish_ci utf8 197 Yes 8 +utf8_romanian_ci utf8 195 Yes 8 +utf8_roman_ci utf8 207 Yes 8 +utf8_slovak_ci utf8 205 Yes 8 +utf8_slovenian_ci utf8 196 Yes 8 +utf8_spanish2_ci utf8 206 Yes 8 +utf8_spanish_ci utf8 199 Yes 8 +utf8_swedish_ci utf8 200 Yes 8 +utf8_turkish_ci utf8 201 Yes 8 +utf8_unicode_ci utf8 192 Yes 8 + + +SELECT * +FROM information_schema.collation_character_set_applicability +ORDER BY collation_name, character_set_name; +COLLATION_NAME CHARACTER_SET_NAME +armscii8_bin armscii8 +armscii8_general_ci armscii8 +ascii_bin ascii +ascii_general_ci ascii +big5_bin big5 +big5_chinese_ci big5 +binary binary +cp1250_bin cp1250 +cp1250_croatian_ci cp1250 +cp1250_czech_cs cp1250 +cp1250_general_ci cp1250 +cp1251_bin cp1251 +cp1251_bulgarian_ci cp1251 +cp1251_general_ci cp1251 +cp1251_general_cs cp1251 +cp1251_ukrainian_ci cp1251 +cp1256_bin cp1256 +cp1256_general_ci cp1256 +cp1257_bin cp1257 +cp1257_general_ci cp1257 +cp1257_lithuanian_ci cp1257 +cp850_bin cp850 +cp850_general_ci cp850 +cp852_bin cp852 +cp852_general_ci cp852 +cp866_bin cp866 +cp866_general_ci cp866 +cp932_bin cp932 +cp932_japanese_ci cp932 +dec8_bin dec8 +dec8_swedish_ci dec8 +eucjpms_bin eucjpms +eucjpms_japanese_ci eucjpms +euckr_bin euckr +euckr_korean_ci euckr +gb2312_bin gb2312 +gb2312_chinese_ci gb2312 +gbk_bin gbk +gbk_chinese_ci gbk +geostd8_bin geostd8 +geostd8_general_ci geostd8 +greek_bin greek +greek_general_ci greek +hebrew_bin hebrew +hebrew_general_ci hebrew +hp8_bin hp8 +hp8_english_ci hp8 +keybcs2_bin keybcs2 +keybcs2_general_ci keybcs2 +koi8r_bin koi8r +koi8r_general_ci koi8r +koi8u_bin koi8u +koi8u_general_ci koi8u +latin1_bin latin1 +latin1_danish_ci latin1 +latin1_general_ci latin1 +latin1_general_cs latin1 +latin1_german1_ci latin1 +latin1_german2_ci latin1 +latin1_spanish_ci latin1 +latin1_swedish_ci latin1 +latin2_bin latin2 +latin2_croatian_ci latin2 +latin2_czech_cs latin2 +latin2_general_ci latin2 +latin2_hungarian_ci latin2 +latin5_bin latin5 +latin5_turkish_ci latin5 +latin7_bin latin7 +latin7_estonian_cs latin7 +latin7_general_ci latin7 +latin7_general_cs latin7 +macce_bin macce +macce_general_ci macce +macroman_bin macroman +macroman_general_ci macroman +sjis_bin sjis +sjis_japanese_ci sjis +swe7_bin swe7 +swe7_swedish_ci swe7 +tis620_bin tis620 +tis620_thai_ci tis620 +ucs2_bin ucs2 +ucs2_czech_ci ucs2 +ucs2_danish_ci ucs2 +ucs2_esperanto_ci ucs2 +ucs2_estonian_ci ucs2 +ucs2_general_ci ucs2 +ucs2_hungarian_ci ucs2 +ucs2_icelandic_ci ucs2 +ucs2_latvian_ci ucs2 +ucs2_lithuanian_ci ucs2 +ucs2_persian_ci ucs2 +ucs2_polish_ci ucs2 +ucs2_romanian_ci ucs2 +ucs2_roman_ci ucs2 +ucs2_slovak_ci ucs2 +ucs2_slovenian_ci ucs2 +ucs2_spanish2_ci ucs2 +ucs2_spanish_ci ucs2 +ucs2_swedish_ci ucs2 +ucs2_turkish_ci ucs2 +ucs2_unicode_ci ucs2 +ujis_bin ujis +ujis_japanese_ci ujis +utf8_bin utf8 +utf8_czech_ci utf8 +utf8_danish_ci utf8 +utf8_esperanto_ci utf8 +utf8_estonian_ci utf8 +utf8_general_ci utf8 +utf8_general_cs utf8 +utf8_hungarian_ci utf8 +utf8_icelandic_ci utf8 +utf8_latvian_ci utf8 +utf8_lithuanian_ci utf8 +utf8_persian_ci utf8 +utf8_polish_ci utf8 +utf8_romanian_ci utf8 +utf8_roman_ci utf8 +utf8_slovak_ci utf8 +utf8_slovenian_ci utf8 +utf8_spanish2_ci utf8 +utf8_spanish_ci utf8 +utf8_swedish_ci utf8 +utf8_turkish_ci utf8 +utf8_unicode_ci utf8 +# Switch to connection default + disconnect con +DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_3.result b/mysql-test/suite/funcs_1/r/charset_collation_3.result new file mode 100644 index 00000000000..b9a2dbe8a98 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/charset_collation_3.result @@ -0,0 +1,309 @@ +DROP USER dbdict_test@localhost; +CREATE USER dbdict_test@localhost; +# Establish connection con (user=dbdict_test) + +SELECT * +FROM information_schema.character_sets +ORDER BY character_set_name; +CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 +ascii ascii_general_ci US ASCII 1 +big5 big5_chinese_ci Big5 Traditional Chinese 2 +binary binary Binary pseudo charset 1 +cp1250 cp1250_general_ci Windows Central European 1 +cp1251 cp1251_general_ci Windows Cyrillic 1 +cp1256 cp1256_general_ci Windows Arabic 1 +cp1257 cp1257_general_ci Windows Baltic 1 +cp850 cp850_general_ci DOS West European 1 +cp852 cp852_general_ci DOS Central European 1 +cp866 cp866_general_ci DOS Russian 1 +cp932 cp932_japanese_ci SJIS for Windows Japanese 2 +dec8 dec8_swedish_ci DEC West European 1 +eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 +euckr euckr_korean_ci EUC-KR Korean 2 +gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 +gbk gbk_chinese_ci GBK Simplified Chinese 2 +geostd8 geostd8_general_ci GEOSTD8 Georgian 1 +greek greek_general_ci ISO 8859-7 Greek 1 +hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 +hp8 hp8_english_ci HP West European 1 +keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 +koi8r koi8r_general_ci KOI8-R Relcom Russian 1 +koi8u koi8u_general_ci KOI8-U Ukrainian 1 +latin1 latin1_swedish_ci cp1252 West European 1 +latin2 latin2_general_ci ISO 8859-2 Central European 1 +latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 +latin7 latin7_general_ci ISO 8859-13 Baltic 1 +macce macce_general_ci Mac Central European 1 +macroman macroman_general_ci Mac West European 1 +sjis sjis_japanese_ci Shift-JIS Japanese 2 +swe7 swe7_swedish_ci 7bit Swedish 1 +tis620 tis620_thai_ci TIS620 Thai 1 +ucs2 ucs2_general_ci UCS-2 Unicode 2 +ujis ujis_japanese_ci EUC-JP Japanese 3 +utf8 utf8_general_ci UTF-8 Unicode 3 + +SELECT * +FROM information_schema.collations +ORDER BY collation_name; +COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN +armscii8_bin armscii8 64 Yes 1 +armscii8_general_ci armscii8 32 Yes Yes 1 +ascii_bin ascii 65 Yes 1 +ascii_general_ci ascii 11 Yes Yes 1 +big5_bin big5 84 Yes 1 +big5_chinese_ci big5 1 Yes Yes 1 +binary binary 63 Yes Yes 1 +cp1250_bin cp1250 66 Yes 1 +cp1250_croatian_ci cp1250 44 Yes 1 +cp1250_czech_cs cp1250 34 Yes 2 +cp1250_general_ci cp1250 26 Yes Yes 1 +cp1251_bin cp1251 50 Yes 1 +cp1251_bulgarian_ci cp1251 14 Yes 1 +cp1251_general_ci cp1251 51 Yes Yes 1 +cp1251_general_cs cp1251 52 Yes 1 +cp1251_ukrainian_ci cp1251 23 Yes 1 +cp1256_bin cp1256 67 Yes 1 +cp1256_general_ci cp1256 57 Yes Yes 1 +cp1257_bin cp1257 58 Yes 1 +cp1257_general_ci cp1257 59 Yes Yes 1 +cp1257_lithuanian_ci cp1257 29 Yes 1 +cp850_bin cp850 80 Yes 1 +cp850_general_ci cp850 4 Yes Yes 1 +cp852_bin cp852 81 Yes 1 +cp852_general_ci cp852 40 Yes Yes 1 +cp866_bin cp866 68 Yes 1 +cp866_general_ci cp866 36 Yes Yes 1 +cp932_bin cp932 96 Yes 1 +cp932_japanese_ci cp932 95 Yes Yes 1 +dec8_bin dec8 69 Yes 1 +dec8_swedish_ci dec8 3 Yes Yes 1 +eucjpms_bin eucjpms 98 Yes 1 +eucjpms_japanese_ci eucjpms 97 Yes Yes 1 +euckr_bin euckr 85 Yes 1 +euckr_korean_ci euckr 19 Yes Yes 1 +gb2312_bin gb2312 86 Yes 1 +gb2312_chinese_ci gb2312 24 Yes Yes 1 +gbk_bin gbk 87 Yes 1 +gbk_chinese_ci gbk 28 Yes Yes 1 +geostd8_bin geostd8 93 Yes 1 +geostd8_general_ci geostd8 92 Yes Yes 1 +greek_bin greek 70 Yes 1 +greek_general_ci greek 25 Yes Yes 1 +hebrew_bin hebrew 71 Yes 1 +hebrew_general_ci hebrew 16 Yes Yes 1 +hp8_bin hp8 72 Yes 1 +hp8_english_ci hp8 6 Yes Yes 1 +keybcs2_bin keybcs2 73 Yes 1 +keybcs2_general_ci keybcs2 37 Yes Yes 1 +koi8r_bin koi8r 74 Yes 1 +koi8r_general_ci koi8r 7 Yes Yes 1 +koi8u_bin koi8u 75 Yes 1 +koi8u_general_ci koi8u 22 Yes Yes 1 +latin1_bin latin1 47 Yes 1 +latin1_danish_ci latin1 15 Yes 1 +latin1_general_ci latin1 48 Yes 1 +latin1_general_cs latin1 49 Yes 1 +latin1_german1_ci latin1 5 Yes 1 +latin1_german2_ci latin1 31 Yes 2 +latin1_spanish_ci latin1 94 Yes 1 +latin1_swedish_ci latin1 8 Yes Yes 1 +latin2_bin latin2 77 Yes 1 +latin2_croatian_ci latin2 27 Yes 1 +latin2_czech_cs latin2 2 Yes 4 +latin2_general_ci latin2 9 Yes Yes 1 +latin2_hungarian_ci latin2 21 Yes 1 +latin5_bin latin5 78 Yes 1 +latin5_turkish_ci latin5 30 Yes Yes 1 +latin7_bin latin7 79 Yes 1 +latin7_estonian_cs latin7 20 Yes 1 +latin7_general_ci latin7 41 Yes Yes 1 +latin7_general_cs latin7 42 Yes 1 +macce_bin macce 43 Yes 1 +macce_general_ci macce 38 Yes Yes 1 +macroman_bin macroman 53 Yes 1 +macroman_general_ci macroman 39 Yes Yes 1 +sjis_bin sjis 88 Yes 1 +sjis_japanese_ci sjis 13 Yes Yes 1 +swe7_bin swe7 82 Yes 1 +swe7_swedish_ci swe7 10 Yes Yes 1 +tis620_bin tis620 89 Yes 1 +tis620_thai_ci tis620 18 Yes Yes 4 +ucs2_bin ucs2 90 Yes 1 +ucs2_czech_ci ucs2 138 Yes 8 +ucs2_danish_ci ucs2 139 Yes 8 +ucs2_esperanto_ci ucs2 145 Yes 8 +ucs2_estonian_ci ucs2 134 Yes 8 +ucs2_general_ci ucs2 35 Yes Yes 1 +ucs2_hungarian_ci ucs2 146 Yes 8 +ucs2_icelandic_ci ucs2 129 Yes 8 +ucs2_latvian_ci ucs2 130 Yes 8 +ucs2_lithuanian_ci ucs2 140 Yes 8 +ucs2_persian_ci ucs2 144 Yes 8 +ucs2_polish_ci ucs2 133 Yes 8 +ucs2_romanian_ci ucs2 131 Yes 8 +ucs2_roman_ci ucs2 143 Yes 8 +ucs2_slovak_ci ucs2 141 Yes 8 +ucs2_slovenian_ci ucs2 132 Yes 8 +ucs2_spanish2_ci ucs2 142 Yes 8 +ucs2_spanish_ci ucs2 135 Yes 8 +ucs2_swedish_ci ucs2 136 Yes 8 +ucs2_turkish_ci ucs2 137 Yes 8 +ucs2_unicode_ci ucs2 128 Yes 8 +ujis_bin ujis 91 Yes 1 +ujis_japanese_ci ujis 12 Yes Yes 1 +utf8_bin utf8 83 Yes 1 +utf8_czech_ci utf8 202 Yes 8 +utf8_danish_ci utf8 203 Yes 8 +utf8_esperanto_ci utf8 209 Yes 8 +utf8_estonian_ci utf8 198 Yes 8 +utf8_general_ci utf8 33 Yes Yes 1 +utf8_hungarian_ci utf8 210 Yes 8 +utf8_icelandic_ci utf8 193 Yes 8 +utf8_latvian_ci utf8 194 Yes 8 +utf8_lithuanian_ci utf8 204 Yes 8 +utf8_persian_ci utf8 208 Yes 8 +utf8_polish_ci utf8 197 Yes 8 +utf8_romanian_ci utf8 195 Yes 8 +utf8_roman_ci utf8 207 Yes 8 +utf8_slovak_ci utf8 205 Yes 8 +utf8_slovenian_ci utf8 196 Yes 8 +utf8_spanish2_ci utf8 206 Yes 8 +utf8_spanish_ci utf8 199 Yes 8 +utf8_swedish_ci utf8 200 Yes 8 +utf8_turkish_ci utf8 201 Yes 8 +utf8_unicode_ci utf8 192 Yes 8 + + +SELECT * +FROM information_schema.collation_character_set_applicability +ORDER BY collation_name, character_set_name; +COLLATION_NAME CHARACTER_SET_NAME +armscii8_bin armscii8 +armscii8_general_ci armscii8 +ascii_bin ascii +ascii_general_ci ascii +big5_bin big5 +big5_chinese_ci big5 +binary binary +cp1250_bin cp1250 +cp1250_croatian_ci cp1250 +cp1250_czech_cs cp1250 +cp1250_general_ci cp1250 +cp1251_bin cp1251 +cp1251_bulgarian_ci cp1251 +cp1251_general_ci cp1251 +cp1251_general_cs cp1251 +cp1251_ukrainian_ci cp1251 +cp1256_bin cp1256 +cp1256_general_ci cp1256 +cp1257_bin cp1257 +cp1257_general_ci cp1257 +cp1257_lithuanian_ci cp1257 +cp850_bin cp850 +cp850_general_ci cp850 +cp852_bin cp852 +cp852_general_ci cp852 +cp866_bin cp866 +cp866_general_ci cp866 +cp932_bin cp932 +cp932_japanese_ci cp932 +dec8_bin dec8 +dec8_swedish_ci dec8 +eucjpms_bin eucjpms +eucjpms_japanese_ci eucjpms +euckr_bin euckr +euckr_korean_ci euckr +gb2312_bin gb2312 +gb2312_chinese_ci gb2312 +gbk_bin gbk +gbk_chinese_ci gbk +geostd8_bin geostd8 +geostd8_general_ci geostd8 +greek_bin greek +greek_general_ci greek +hebrew_bin hebrew +hebrew_general_ci hebrew +hp8_bin hp8 +hp8_english_ci hp8 +keybcs2_bin keybcs2 +keybcs2_general_ci keybcs2 +koi8r_bin koi8r +koi8r_general_ci koi8r +koi8u_bin koi8u +koi8u_general_ci koi8u +latin1_bin latin1 +latin1_danish_ci latin1 +latin1_general_ci latin1 +latin1_general_cs latin1 +latin1_german1_ci latin1 +latin1_german2_ci latin1 +latin1_spanish_ci latin1 +latin1_swedish_ci latin1 +latin2_bin latin2 +latin2_croatian_ci latin2 +latin2_czech_cs latin2 +latin2_general_ci latin2 +latin2_hungarian_ci latin2 +latin5_bin latin5 +latin5_turkish_ci latin5 +latin7_bin latin7 +latin7_estonian_cs latin7 +latin7_general_ci latin7 +latin7_general_cs latin7 +macce_bin macce +macce_general_ci macce +macroman_bin macroman +macroman_general_ci macroman +sjis_bin sjis +sjis_japanese_ci sjis +swe7_bin swe7 +swe7_swedish_ci swe7 +tis620_bin tis620 +tis620_thai_ci tis620 +ucs2_bin ucs2 +ucs2_czech_ci ucs2 +ucs2_danish_ci ucs2 +ucs2_esperanto_ci ucs2 +ucs2_estonian_ci ucs2 +ucs2_general_ci ucs2 +ucs2_hungarian_ci ucs2 +ucs2_icelandic_ci ucs2 +ucs2_latvian_ci ucs2 +ucs2_lithuanian_ci ucs2 +ucs2_persian_ci ucs2 +ucs2_polish_ci ucs2 +ucs2_romanian_ci ucs2 +ucs2_roman_ci ucs2 +ucs2_slovak_ci ucs2 +ucs2_slovenian_ci ucs2 +ucs2_spanish2_ci ucs2 +ucs2_spanish_ci ucs2 +ucs2_swedish_ci ucs2 +ucs2_turkish_ci ucs2 +ucs2_unicode_ci ucs2 +ujis_bin ujis +ujis_japanese_ci ujis +utf8_bin utf8 +utf8_czech_ci utf8 +utf8_danish_ci utf8 +utf8_esperanto_ci utf8 +utf8_estonian_ci utf8 +utf8_general_ci utf8 +utf8_hungarian_ci utf8 +utf8_icelandic_ci utf8 +utf8_latvian_ci utf8 +utf8_lithuanian_ci utf8 +utf8_persian_ci utf8 +utf8_polish_ci utf8 +utf8_romanian_ci utf8 +utf8_roman_ci utf8 +utf8_slovak_ci utf8 +utf8_slovenian_ci utf8 +utf8_spanish2_ci utf8 +utf8_spanish_ci utf8 +utf8_swedish_ci utf8 +utf8_turkish_ci utf8 +utf8_unicode_ci utf8 +# Switch to connection default + disconnect con +DROP USER dbdict_test@localhost; diff --git a/mysql-test/suite/funcs_1/r/datadict_help_tables_build.result b/mysql-test/suite/funcs_1/r/datadict_help_tables_build.result deleted file mode 100644 index c81063b6bb2..00000000000 --- a/mysql-test/suite/funcs_1/r/datadict_help_tables_build.result +++ /dev/null @@ -1,22 +0,0 @@ -DELETE FROM mysql.help_category LIMIT ; -DELETE FROM mysql.help_keyword LIMIT ; -DELETE FROM mysql.help_relation LIMIT ; -DELETE FROM mysql.help_topic LIMIT ; -SELECT * FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 30 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 320 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 640 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 380 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics -SELECT * FROM INFORMATION_SCHEMA.STATISTICS -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 30 NULL NULL BTREE -NULL mysql help_category 0 mysql name 1 name A 30 NULL NULL BTREE -NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 320 NULL NULL BTREE -NULL mysql help_keyword 0 mysql name 1 name A 320 NULL NULL BTREE -NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE -NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 640 NULL NULL BTREE -NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 380 NULL NULL BTREE -NULL mysql help_topic 0 mysql name 1 name A 380 NULL NULL BTREE diff --git a/mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result b/mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result deleted file mode 100644 index 5a7381e9592..00000000000 --- a/mysql-test/suite/funcs_1/r/datadict_help_tables_dev.result +++ /dev/null @@ -1,18 +0,0 @@ -SELECT * FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL mysql help_category BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help categories -NULL mysql help_keyword BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help keywords -NULL mysql help_relation BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL keyword-topic relation -NULL mysql help_topic BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL help topics -SELECT * FROM INFORMATION_SCHEMA.STATISTICS -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A 0 NULL NULL BTREE -NULL mysql help_category 0 mysql name 1 name A 0 NULL NULL BTREE -NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A 0 NULL NULL BTREE -NULL mysql help_keyword 0 mysql name 1 name A 0 NULL NULL BTREE -NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A NULL NULL NULL BTREE -NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A 0 NULL NULL BTREE -NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A 0 NULL NULL BTREE -NULL mysql help_topic 0 mysql name 1 name A 0 NULL NULL BTREE diff --git a/mysql-test/suite/funcs_1/r/innodb__datadict.result b/mysql-test/suite/funcs_1/r/innodb__datadict.result deleted file mode 100644 index 9fa268b37e3..00000000000 --- a/mysql-test/suite/funcs_1/r/innodb__datadict.result +++ /dev/null @@ -1,12916 +0,0 @@ - -. -. It is intended that the 3 __datadict.test files are named this way to be -. sure they are - in a *full run* of the suite - the first tests done for each -. storage engine. Using two _ and the order of processing in mysql-test-run.pl -. ensures this in an easy way. -. -. If needed a restart could be implemented later between the storage engines if -. values changes in the result depending from the position where the -. *__datadict.test are started. This can be a result of showing e.g. maximum -. values of the number of rows of tables. -. -. This .result file has been checked OK with Linux 5.0.48, -. build tree ChangeSet@1.2477.6.3, 2007-07-30 -. except that the not fixed Bug#30020 causes a difference. -. --------------------------------------------------------------------------------- - -FIXME: There are subtests that are switched off due to known bugs: ------------------------------------------------------------------- -SELECT 1 AS "have_bug_11589"; -have_bug_11589 -1 - -There are some statements where the ps-protocol is switched off. -This may come from the bug listed below, ir from other problems. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -SET @NO_REFRESH = IF( '' = '', 0, 1); -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char(0), -f2 char(0) binary, -f3 char(0) ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal, -f34 decimal unsigned, -f35 decimal zerofill, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = innodb; -Warnings: -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; -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 = innodb; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; -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 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, -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 = innodb; -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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; -drop table if exists tb4; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f235 char(0) unicode, -f236 char(90), -f237 char(255) ascii, -f238 varchar(0), -f239 varchar(20000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode -) engine = innodb; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; -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 = innodb; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; -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 = innodb; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = innodb; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = innodb; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = innodb; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = innodb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = innodb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = innodb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = innodb; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = innodb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = innodb; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; -use information_schema; - -root@localhost information_schema - -Testcase 3.2.1.1: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE VIEW v1 AS SELECT * FROM information_schema.tables; -CREATE OR REPLACE VIEW db_datadict.vu1 as -SELECT grantee AS u -FROM information_schema.user_privileges; -CREATE OR REPLACE VIEW db_datadict.vu as -SELECT DISTINCT u, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3 ) -AS server, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3, -LENGTH( SUBSTRING( u, -LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) -AS Server_Clean -FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu order by u; -u server Server_Clean -'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -'root'@'' ' -'root'@'localhost' localhost' localhost -CREATE PROCEDURE db_datadict.sp_1() -BEGIN -SELECT * FROM db_datadict.v1; -END// -USE information_schema; -SHOW tables; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -select * from schemata ORDER BY 2 DESC, 1 ASC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from columns; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL db_datadict v1 TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references -NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references -NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references -NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL db_datadict vu server 2 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu Server_Clean 3 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu1 u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 0 0 NULL NULL latin1 latin1_bin char(0) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references -NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references -NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select * from character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -select sum(id) from collations where collation_name <> 'utf8_general_cs'; -sum(id) -10741 -select collation_name, character_set_name into @x,@y -from collation_character_set_applicability limit 1; -select @x, @y; -@x @y -big5_chinese_ci big5 -select * from routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select count(*) from routines; -count(*) -1 -select * from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 1 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 0 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE -select * from views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges order by grantee, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * from schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -NULL mysql PRIMARY mysql help_keyword PRIMARY KEY -NULL mysql name mysql help_keyword UNIQUE -NULL mysql PRIMARY mysql help_relation PRIMARY KEY -NULL mysql PRIMARY mysql help_topic PRIMARY KEY -NULL mysql name mysql help_topic UNIQUE -NULL mysql PRIMARY mysql host PRIMARY KEY -NULL mysql PRIMARY mysql proc PRIMARY KEY -NULL mysql PRIMARY mysql procs_priv PRIMARY KEY -NULL mysql PRIMARY mysql tables_priv PRIMARY KEY -NULL mysql PRIMARY mysql time_zone PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY -NULL mysql PRIMARY mysql user PRIMARY KEY -select * from key_column_usage; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -select count(*) as max_recs from key_column_usage; -max_recs -40 -select max(cardinality) from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -max(cardinality) -393 -select concat("View '", -table_name, "' is associated with the database '", table_schema, "'.") -AS "Who is Who for the Views" - from views; -Who is Who for the Views -View 'v1' is associated with the database 'db_datadict'. -View 'vu' is associated with the database 'db_datadict'. -View 'vu1' is associated with the database 'db_datadict'. -select concat("Table or view '", table_name, -"' is associated with the database '", table_schema, "'.") as "Who is Who" - from tables; -Who is Who -Table or view 'CHARACTER_SETS' is associated with the database 'information_schema'. -Table or view 'COLLATIONS' is associated with the database 'information_schema'. -Table or view 'COLLATION_CHARACTER_SET_APPLICABILITY' is associated with the database 'information_schema'. -Table or view 'COLUMNS' is associated with the database 'information_schema'. -Table or view 'COLUMN_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'KEY_COLUMN_USAGE' is associated with the database 'information_schema'. -Table or view 'ROUTINES' is associated with the database 'information_schema'. -Table or view 'SCHEMATA' is associated with the database 'information_schema'. -Table or view 'SCHEMA_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'STATISTICS' is associated with the database 'information_schema'. -Table or view 'TABLES' is associated with the database 'information_schema'. -Table or view 'TABLE_CONSTRAINTS' is associated with the database 'information_schema'. -Table or view 'TABLE_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'TRIGGERS' is associated with the database 'information_schema'. -Table or view 'USER_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'VIEWS' is associated with the database 'information_schema'. -Table or view 'v1' is associated with the database 'db_datadict'. -Table or view 'vu' is associated with the database 'db_datadict'. -Table or view 'vu1' is associated with the database 'db_datadict'. -Table or view 'columns_priv' is associated with the database 'mysql'. -Table or view 'db' is associated with the database 'mysql'. -Table or view 'func' is associated with the database 'mysql'. -Table or view 'help_category' is associated with the database 'mysql'. -Table or view 'help_keyword' is associated with the database 'mysql'. -Table or view 'help_relation' is associated with the database 'mysql'. -Table or view 'help_topic' is associated with the database 'mysql'. -Table or view 'host' is associated with the database 'mysql'. -Table or view 'proc' is associated with the database 'mysql'. -Table or view 'procs_priv' is associated with the database 'mysql'. -Table or view 'tables_priv' is associated with the database 'mysql'. -Table or view 'time_zone' is associated with the database 'mysql'. -Table or view 'time_zone_leap_second' is associated with the database 'mysql'. -Table or view 'time_zone_name' is associated with the database 'mysql'. -Table or view 'time_zone_transition' is associated with the database 'mysql'. -Table or view 'time_zone_transition_type' is associated with the database 'mysql'. -Table or view 'user' is associated with the database 'mysql'. -Table or view 't1' is associated with the database 'test'. -Table or view 't10' is associated with the database 'test'. -Table or view 't11' is associated with the database 'test'. -Table or view 't2' is associated with the database 'test'. -Table or view 't3' is associated with the database 'test'. -Table or view 't4' is associated with the database 'test'. -Table or view 't7' is associated with the database 'test'. -Table or view 't8' is associated with the database 'test'. -Table or view 't9' is associated with the database 'test'. -Table or view 'tb1' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test'. -Table or view 'tb3' is associated with the database 'test'. -Table or view 'tb4' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test1'. -Table or view 't6' is associated with the database 'test4'. -select grantee as "user's having select privilege", -substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select' - order by grantee; -user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'127.0.0.1' '127.0.0.1' -'root'@'' '' -'root'@'localhost' 'localhost' -select all table_schema from schema_privileges limit 0,5; -table_schema -test -test -test -test -test -select distinct(privilege_type) from table_privileges; -privilege_type -select * from column_privileges -group by table_schema having table_schema = 'db_datadict'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints limit 0,5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select count(*) as max_recs from key_column_usage limit 0,5; -max_recs -40 -select information_schema.tables.table_name as "table name", -count(distinct(column_name)) as "no of columns in the table" - from information_schema.tables left outer join information_schema.columns on -information_schema.tables.table_name = information_schema.columns.table_name -group by information_schema.tables.table_name; -table name no of columns in the table -CHARACTER_SETS 4 -COLLATIONS 6 -COLLATION_CHARACTER_SET_APPLICABILITY 2 -COLUMNS 19 -columns_priv 7 -COLUMN_PRIVILEGES 7 -db 20 -func 4 -help_category 4 -help_keyword 2 -help_relation 2 -help_topic 6 -host 19 -KEY_COLUMN_USAGE 12 -proc 16 -procs_priv 8 -ROUTINES 20 -SCHEMATA 5 -SCHEMA_PRIVILEGES 5 -STATISTICS 15 -t1 6 -t10 6 -t11 6 -t2 6 -t3 3 -t4 6 -t6 6 -t7 4 -t8 4 -t9 3 -TABLES 21 -tables_priv 8 -TABLE_CONSTRAINTS 6 -TABLE_PRIVILEGES 6 -tb1 58 -tb2 51 -tb3 58 -tb4 58 -time_zone 2 -time_zone_leap_second 2 -time_zone_name 2 -time_zone_transition 3 -time_zone_transition_type 5 -TRIGGERS 19 -user 37 -USER_PRIVILEGES 4 -v1 21 -VIEWS 8 -vu 3 -vu1 1 - -root: simple select to check all - and never forget some - tables ------------------------------------------------------------------ -SELECT * FROM schemata LIMIT 1; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -SELECT * FROM tables LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -SELECT * FROM columns LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -SELECT * FROM character_sets LIMIT 1; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -SELECT * FROM routines LIMIT 1; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost -SELECT * FROM statistics LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -SELECT * FROM views LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -SELECT * FROM user_privileges LIMIT 1; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -SELECT * FROM schema_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -SELECT * FROM table_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM column_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM table_constraints LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -SELECT * FROM key_column_usage LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -SELECT * FROM triggers LIMIT 1; -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 -SELECT * FROM parameters LIMIT 1; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT * FROM referential_constraints LIMIT 1; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -use db_datadict; -select * from schemata; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from tables; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.catalog_name, s.schema_name, s.default_character_set_name; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from columns limit 0, 5; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -select * from character_sets limit 0, 5; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -select * from collations limit 0, 5; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -select * from collation_character_set_applicability limit 0, 5; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -select * from routines limit 0, 5; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -select * from statistics limit 0, 5; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -select * from views limit 0, 5; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -select * from user_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -select * from schema_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -select * from table_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -select * from column_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -select * from table_constraints limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -select * from key_column_usage limit 0, 5; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist - -will fail due to missing database name --------------------------------------- - -known error 1146: ------------------ -SELECT * FROM schemata ; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * FROM tables ; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -SELECT * FROM columns ; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -SELECT * FROM character_sets ; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -SELECT * FROM collations ; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -SELECT * FROM collation_character_set_applicability ; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -SELECT * FROM routines ; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -SELECT * FROM statistics ; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -SELECT * FROM views ; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -SELECT * FROM user_privileges ; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -SELECT * FROM schema_privileges ; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -SELECT * FROM table_privileges ; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -SELECT * FROM column_privileges ; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -SELECT * FROM table_constraints ; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -SELECT * FROM key_column_usage ; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist -SELECT * FROM triggers ; -ERROR 42S02: Table 'db_datadict.triggers' doesn't exist -select * from information_schema.schemata ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE InnoDB -VERSION 10 -ROW_FORMAT Compact -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT InnoDB free: 3072 kB -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from information_schema.schemata s inner join information_schema.tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE InnoDB -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE InnoDB -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE InnoDB -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE InnoDB -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE InnoDB -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE InnoDB -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from information_schema.columns limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -select * from information_schema.character_sets limit 0, 5; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -select * from information_schema.collations limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -select * from information_schema.collation_character_set_applicability limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -select * from information_schema.routines limit 0, 5; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select * from information_schema.statistics limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -select * from information_schema.views limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from information_schema.user_privileges limit 0, 5; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -select * from information_schema.schema_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from information_schema.table_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.column_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.table_constraints limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select * from information_schema.key_column_usage limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -select count(*) as max_recs from information_schema.key_column_usage limit 0, 5; -max_recs -40 - -root: check with db name ------------------------- -SELECT COUNT(*) FROM information_schema. schemata ; -COUNT(*) -6 -SELECT COUNT(*) FROM information_schema. tables ; -COUNT(*) -51 -SELECT COUNT(*) FROM information_schema. columns ; -COUNT(*) -657 -SELECT COUNT(*) FROM information_schema. character_sets ; -COUNT(*) -36 -SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. routines ; -COUNT(*) -1 -SELECT COUNT(*) FROM information_schema. statistics ; -COUNT(*) -43 -SELECT COUNT(*) FROM information_schema. views ; -COUNT(*) -3 -SELECT COUNT(*) FROM information_schema. user_privileges ; -COUNT(*) -75 -SELECT COUNT(*) FROM information_schema. schema_privileges ; -COUNT(*) -28 -SELECT COUNT(*) FROM information_schema. table_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. column_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. table_constraints ; -COUNT(*) -20 -SELECT COUNT(*) FROM information_schema. key_column_usage ; -COUNT(*) -40 -SELECT COUNT(*) FROM information_schema. triggers ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. parameters ; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT COUNT(*) FROM information_schema. referential_constraints ; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -USE db_datadict; -DROP VIEW v1, vu1, vu; -DROP PROCEDURE db_datadict.sp_1; -USE information_schema; - -Testcase 3.2.1.2: --------------------------------------------------------------------------------- -select catalog_name, schema_name, default_character_set_name -from schemata where schema_name like '%s%'; -catalog_name schema_name default_character_set_name -NULL information_schema utf8 -NULL mysql latin1 -NULL test latin1 -NULL test1 latin1 -NULL test4 latin1 -select count(*) as tot_tabs from tables; -tot_tabs -48 -select count(*) as the_cols from columns; -the_cols -632 -select max(maxlen) as the_max from character_sets; -the_max -3 -select * from collations order by id asc limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -latin2_czech_cs latin2 2 Yes 4 -dec8_swedish_ci dec8 3 Yes 0 -cp850_general_ci cp850 4 Yes 0 -latin1_german1_ci latin1 5 Yes 1 -select * from collation_character_set_applicability -order by character_set_name desc, collation_name limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -select routine_definition from routines; -routine_definition -select * from statistics where table_name not like 'help_%' -group by index_name asc limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -select concat(table_schema, ', ', table_name, ', ', view_definition) view_info -from views; -view_info -select concat(table_schema, ', ', table_name) "Table_info" - from tables ORDER BY 1; -Table_info -information_schema, CHARACTER_SETS -information_schema, COLLATIONS -information_schema, COLLATION_CHARACTER_SET_APPLICABILITY -information_schema, COLUMNS -information_schema, COLUMN_PRIVILEGES -information_schema, KEY_COLUMN_USAGE -information_schema, ROUTINES -information_schema, SCHEMATA -information_schema, SCHEMA_PRIVILEGES -information_schema, STATISTICS -information_schema, TABLES -information_schema, TABLE_CONSTRAINTS -information_schema, TABLE_PRIVILEGES -information_schema, TRIGGERS -information_schema, USER_PRIVILEGES -information_schema, VIEWS -mysql, columns_priv -mysql, db -mysql, func -mysql, help_category -mysql, help_keyword -mysql, help_relation -mysql, help_topic -mysql, host -mysql, proc -mysql, procs_priv -mysql, tables_priv -mysql, time_zone -mysql, time_zone_leap_second -mysql, time_zone_name -mysql, time_zone_transition -mysql, time_zone_transition_type -mysql, user -test, t1 -test, t10 -test, t11 -test, t2 -test, t3 -test, t4 -test, t7 -test, t8 -test, t9 -test, tb1 -test, tb2 -test, tb3 -test, tb4 -test1, tb2 -test4, t6 -select distinct grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select * from schema_privileges where table_catalog is null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from table_privileges where grantee like '%r%' limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges where table_catalog is not null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select HIGH_PRIORITY * from table_constraints -group by constraint_name desc limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select sum(ordinal_position) from key_column_usage; -sum(ordinal_position) -77 -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select distinct grantee from user_privileges; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select all grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -select id , character_set_name from collations order by id asc limit 10; -id character_set_name -1 big5 -2 latin2 -3 dec8 -4 cp850 -5 latin1 -6 hp8 -7 koi8r -8 latin1 -9 latin2 -10 swe7 -select table_catalog from columns -union all -select table_catalog from tables limit 0,5; -table_catalog -NULL -NULL -NULL -NULL -NULL -select table_catalog from columns -union -select table_catalog from tables limit 0,5; -table_catalog -NULL -select all schema_name from information_schema.schemata; -schema_name -information_schema -db_datadict -mysql -test -test1 -test4 -SELECT * -INTO OUTFILE '../tmp/out.innodb.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -USE test; -SELECT * -INTO OUTFILE '../tmp/out.innodb.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CREATE USER user_3212@localhost; -GRANT ALL ON db_datadict.* TO user_3212@localhost; -GRANT FILE ON *.* TO user_3212@localhost; -connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_3212@localhost db_datadict -SELECT * -INTO OUTFILE '../tmp/out.innodb.user.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -INTO OUTFILE '../tmp/out.innodb.user.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; -SELECT * -INTO OUTFILE '../tmp/out.innodb.user_2.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -SELECT * -FROM schemata LIMIT 0, 5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -SELECT * -INTO OUTFILE '../tmp/out.innodb.user_2.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; - -root@localhost information_schema -use db_datadict; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from information_schema.columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from information_schema.tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -use information_schema; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -DROP USER user_3212@localhost; - -Testcase 3.2.1.3: --------------------------------------------------------------------------------- -insert into schemata (catalog_name, schema_name, default_character_set_name, sql_path) -values ('null', 'db1', 'latin1', 'null'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into tables (table_schema, table_name)values('db_datadict', 't1'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into columns (table_name, column_name)values('t3', 'f2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into character_sets (character_set_name, default_collate_name, description, maxlen) -values('cp1251', 'cp1251_general_ci', 'windows cyrillic', 1); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collation_character_set_applicability (collation_name, character_set_name) -values (' big5_chinese_ci', 'big6'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into routines(routine_name, routine_type ) values ('p2', 'procedure'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into statistics(table_schema, table_name, index_name) -values ('mysql', 'db', 'primary'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into views(table_schema, table_name) values ('db2', 'v2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into user_privileges (privilege_type, is_grantable) values ('select', 'yes'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into schema_privileges (table_schema, privilege_type) values('db2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_privileges (able_schema, table_name, privilege_type) -values('db2', 'v2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into column_privileges (table_name, column_name, privilege_type) -values ('t3', 'f3', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into key_column_usage (constraint_schema, constraint_name, table_name) -values ('mysql', 'primary', 'db'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_3; -create procedure db_datadict.sp_4_1_3() -begin -insert into information_schema.schema_privileges (table_schema,privilege_type) -values('db2','insert'); -end// -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -call db_datadict.sp_4_1_3(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -drop procedure db_datadict.sp_4_1_3; -CREATE USER user_4_1_3@localhost; -connect(localhost,user_4_1_3,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_3@localhost test -use information_schema; -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.4: --------------------------------------------------------------------------------- -use information_schema; - -root@localhost information_schema -update schemata set schema_name = 'db5' where default_character_set_name = 'latin1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update tables set table_schema = 'db_datadict1' where table_name = 't1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update character_sets set character_set_name = 'cp1252' where maxlen = 1; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collations set collation_name = 'cp1253_bin' - where character_set_name = 'cp1251'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collation_character_set_applicability set collation_name = 'big6_chinese_ci' - where character_set_name = 'big6'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update routines set routine_name = p2 where routine_body = 'sql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update statistics set table_schema = 'mysql1' where table_name = 'db'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update views set table_schema = 'db3' where table_name = 'v1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update schema_privileges set table_schema = 'db2' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_privileges set table_name = 'v3' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update column_privileges set table_name = 't4' where column_name = 'f3'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_constraints set constraint_schema = 'primary' - where table_schema = 'proc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update key_column_usage set table_name = 'db1' where constraint_name = 'primary'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_4; -create procedure db_datadict.sp_4_1_4() -begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end// -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -call db_datadict.sp_4_1_4(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -drop procedure db_datadict.sp_4_1_4; -use information_schema; - -user_4_1_3@localhost information_schema -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.5: --------------------------------------------------------------------------------- -use information_schema; - -root: DELETE FROM any table in IS ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schemata where schema_name = 'mysql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from columns; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from character_sets; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collations; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collation_character_set_applicability; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from routines; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from statistics; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from views; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from user_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schema_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from column_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_constraints; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from key_column_usage; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_5; -create procedure db_datadict.sp_4_1_5() -begin -delete from information_schema.column_privileges; -end// -call db_datadict.sp_4_1_5(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure db_datadict.sp_4_1_5; -use information_schema; - -user_4_1_3@localhost information_schema -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_3@localhost; - -Testcase 3.2.1.6: --------------------------------------------------------------------------------- -use information_schema; - -root: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use db_datadict; - -root: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -CREATE USER user_4_1_6@localhost; -grant all on *.* to user_4_1_6@localhost; -FLUSH PRIVILEGES; -SHOW GRANTS FOR user_4_1_6@localhost; -Grants for user_4_1_6@localhost -GRANT ALL PRIVILEGES ON *.* TO 'user_4_1_6'@'localhost' -connect(localhost,user_4_1_6,,information_schema,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_6@localhost information_schema -use information_schema; - -user: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use test; - -user: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema - -root@localhost db_datadict -DROP USER user_4_1_6@localhost; - -Testcase 3.2.1.7: --------------------------------------------------------------------------------- -use information_schema; - -root: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -USE db_datadict; - -root: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.columns; -SELECT * FROM v1 LIMIT 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -CREATE USER user_4_1_7@localhost; -GRANT ALL ON db_datadict.* TO user_4_1_7@localhost; -GRANT ALL ON information_schema.* TO user_4_1_7@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,user_4_1_7,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_7@localhost information_schema - -user: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -create view v1 as select * from table_privileges; -ERROR 42S02: Unknown table 'v1' in information_schema -use db_datadict; - -user: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' - -root@localhost db_datadict -DROP USER user_4_1_7@localhost; -DROP VIEW db_datadict.v1; - -Testcase 3.2.1.8: --------------------------------------------------------------------------------- -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_8@localhost; -grant select, index on *.* to user_4_1_8@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_8,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_8@localhost test -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_8@localhost; - -Testcase 3.2.1.9: --------------------------------------------------------------------------------- - -root: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; - -root: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schemata add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table tables drop primary key; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table columns add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table character_sets disable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collation_character_set_applicability add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table routines discard tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table statistics import tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table views drop column table_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table user_privileges drop index privilege_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schema_privileges drop column is_grantable; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_privileges order by constraint_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table column_privileges rename to aaxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_constraints order by schema_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table key_column_usage rename to information_schema.aabxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table triggers rename to information_schema.sql_mode; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER user_4_1_9@localhost; -grant select, alter, create, insert on *.* to user_4_1_9@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_9,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_9@localhost db_datadict -use db_datadict; - -user: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -use information_schema; - -user: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_9@localhost; - -Testcase 3.2.1.10: --------------------------------------------------------------------------------- -use information_schema; - -root: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; - -root: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_10@localhost; -GRANT SELECT, DROP ON *.* TO user_4_1_10@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_10,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_10@localhost information_schema - -user: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -use db_datadict; - -user: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_10@localhost; -CREATE USER user_4_1_11@localhost; -GRANT SUPER ON *.* TO user_4_1_11@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_11,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_11@localhost information_schema -drop table routines; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name ); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create view v1 as select * from schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -delete from columns; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, -is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_11@localhost; - -Testcase 3.2.1.11: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'u_6_401011'@'localhost'; -GRANT ALL ON information_schema.* TO 'u_6_401011'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401011'@'localhost'; -FLUSH PRIVILEGES; -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' - -root: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -connect(localhost,u_6_401011,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; - -u_6_401011@localhost information_schema -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -user: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP TABLE IF EXISTS db_datadict.schemata; -DROP USER 'u_6_401011'@'localhost'; - -Testcase 3.2.1.12: --------------------------------------------------------------------------------- - -root: delete from IS tables ---------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.tables SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.columns SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.statistics SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.views SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.column_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_constraints SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.key_column_usage SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schemata SET catalog_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.character_sets SET description = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collations SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collation_character_set_applicability -SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.routines SET routine_type = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.user_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schema_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.triggers SET sql_mode = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER 'u_6_401012'@'localhost'; -connect(localhost,u_6_401012,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -insert into information_schema.schemata (catalog_name, schema_name, -default_character_set_name, sql_path) -values (null, information_schema1, utf16, null); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.schemata rename db_datadict1.schemata; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.tables drop column checksum; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.statistics modify packed int; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.routines modify created int not null; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.key_column_usage drop column ordinal_position; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.table_privileges -change privilege_type rights_approved varchar(32); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -delete from information_schema.collations; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' - -root@localhost information_schema -drop table if exists db_datadict1.schemata; -DROP USER 'u_6_401012'@'localhost'; - -Testcase 3.2.1.13: --------------------------------------------------------------------------------- -use information_schema; - -first check status >before< creating the objects ... ----------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401013(f1 char(10), f2 char(25), f3 int) -engine = innodb; -create view res_v_401013 as select * from res_t_401013; -CREATE USER u_6_401013@localhost; -create procedure sp_6_401013() select 'db_datadict'; -create function fn_6_401013() returns int return 0; -create index i_6_401013 on res_t_401013(f3); -use information_schema; - -now check whether all new objects exists in IS ... --------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict InnoDB -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_t_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_v_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401013 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401013 FUNCTION DEFINER -sp_6_401013 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401013 db_datadict i_6_401013 BTREE -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401013'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401013 on res_t_401013; -drop table db_datadict.res_t_401013; -drop view db_datadict.res_v_401013; -DROP USER u_6_401013@localhost; -drop procedure sp_6_401013; -drop function fn_6_401013; -drop database db_datadict; -use information_schema; - -and now check whether all objects are removed from IS ... ---------------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.14: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401014(f1 char(10), f2 varchar(25), f3 int); -create view res_v_401014 as select * from res_t_401014; -create procedure sp_6_401014() select 'db_datadict'; -create function fn_6_401014() returns int return 0; - -show existing objects >before< changing them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -alter table res_t_401014 change f1 ff1 int; -alter table res_t_401014 engine = MEMORY; -alter table res_t_401014 change f3 f3_new bigint; -alter view res_v_401014 as select ff1 from res_t_401014; -alter procedure sp_6_401014 sql security invoker; -alter function fn_6_401014 comment 'updated comments'; -alter database db_datadict character set utf8; - -now check whether the changes are visible in IS ... ---------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict utf8 utf8_general_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MEMORY -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE INVOKER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop table db_datadict.res_t_401014; -drop view db_datadict.res_v_401014; -drop procedure sp_6_401014; -drop function fn_6_401014; -drop database db_datadict; - -Testcase 3.2.1.15: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401015(f1 char(10), f2 text(25), f3 int); -create view res_v_401015 as select * from res_t_401015; -CREATE USER u_6_401015@localhost; -create procedure sp_6_401015() select 'test'; -create function fn_6_401015() returns int return 0; -create index i_6_401015 on res_t_401015(f3); - -show existing objects >before< dropping them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_t_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_v_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401015 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401015 FUNCTION DEFINER -sp_6_401015 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401015 db_datadict i_6_401015 BTREE -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401015'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401015 on res_t_401015; -drop table db_datadict.res_t_401015; -drop view db_datadict.res_v_401015; -DROP USER u_6_401015@localhost; -drop procedure sp_6_401015; -drop function fn_6_401015; - -now check they are really gone ... ----------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.16: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE DATABASE db_hidden; -USE db_hidden; -CREATE TABLE tb_hidden ( c1 TEXT ); -USE db_datadict; -CREATE TABLE res_t_401016(f1 char(10),f2 text(25),f3 int); -CREATE TABLE res_t_401016_1(f1 char(10),f2 text(25),f3 int); -CREATE USER 'u_6_401016'@'localhost'; -GRANT SELECT ON db_datadict.res_t_401016 TO 'u_6_401016'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT table_schema, table_name, engine -FROM TABLES; -table_schema table_name engine -information_schema CHARACTER_SETS MEMORY -information_schema COLLATIONS MEMORY -information_schema COLLATION_CHARACTER_SET_APPLICABILITY MEMORY -information_schema COLUMNS MyISAM -information_schema COLUMN_PRIVILEGES MEMORY -information_schema KEY_COLUMN_USAGE MEMORY -information_schema ROUTINES MyISAM -information_schema SCHEMATA MEMORY -information_schema SCHEMA_PRIVILEGES MEMORY -information_schema STATISTICS MEMORY -information_schema TABLES MEMORY -information_schema TABLE_CONSTRAINTS MEMORY -information_schema TABLE_PRIVILEGES MEMORY -information_schema TRIGGERS MyISAM -information_schema USER_PRIVILEGES MEMORY -information_schema VIEWS MyISAM -db_datadict res_t_401016 MyISAM -test t1 InnoDB -test t10 InnoDB -test t11 InnoDB -test t2 InnoDB -test t3 InnoDB -test t4 InnoDB -test t7 InnoDB -test t8 InnoDB -test t9 InnoDB -test tb1 InnoDB -test tb2 InnoDB -test tb3 InnoDB -test tb4 InnoDB -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost db_datadict -grant usage on information_schema.* to 'u_6_401016'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401016'@'localhost'; -drop table res_t_401016; -drop table res_t_401016_1; -DROP DATABASE db_hidden; - -Testcase 3.2.1.17: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401017'@'localhost'; -grant select on information_schema.* to u_6_401017@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -select * from collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms -select * from schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -select table_name from tables; -table_name -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -t1 -t10 -t11 -t2 -t3 -t4 -t7 -t8 -t9 -tb1 -tb2 -tb3 -tb4 -select table_name, column_name, column_type from columns; -table_name column_name column_type -CHARACTER_SETS CHARACTER_SET_NAME varchar(64) -CHARACTER_SETS DEFAULT_COLLATE_NAME varchar(64) -CHARACTER_SETS DESCRIPTION varchar(60) -CHARACTER_SETS MAXLEN bigint(3) -COLLATIONS COLLATION_NAME varchar(64) -COLLATIONS CHARACTER_SET_NAME varchar(64) -COLLATIONS ID bigint(11) -COLLATIONS IS_DEFAULT varchar(3) -COLLATIONS IS_COMPILED varchar(3) -COLLATIONS SORTLEN bigint(3) -COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar(64) -COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar(64) -COLUMNS TABLE_CATALOG varchar(4096) -COLUMNS TABLE_SCHEMA varchar(64) -COLUMNS TABLE_NAME varchar(64) -COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) -COLUMNS COLUMN_DEFAULT longtext -COLUMNS IS_NULLABLE varchar(3) -COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) -COLUMNS CHARACTER_SET_NAME varchar(64) -COLUMNS COLLATION_NAME varchar(64) -COLUMNS COLUMN_TYPE longtext -COLUMNS COLUMN_KEY varchar(3) -COLUMNS EXTRA varchar(20) -COLUMNS PRIVILEGES varchar(80) -COLUMNS COLUMN_COMMENT varchar(255) -COLUMN_PRIVILEGES GRANTEE varchar(81) -COLUMN_PRIVILEGES TABLE_CATALOG varchar(4096) -COLUMN_PRIVILEGES TABLE_SCHEMA varchar(64) -COLUMN_PRIVILEGES TABLE_NAME varchar(64) -COLUMN_PRIVILEGES COLUMN_NAME varchar(64) -COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar(64) -COLUMN_PRIVILEGES IS_GRANTABLE varchar(3) -KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar(4096) -KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar(64) -KEY_COLUMN_USAGE CONSTRAINT_NAME varchar(64) -KEY_COLUMN_USAGE TABLE_CATALOG varchar(4096) -KEY_COLUMN_USAGE TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE TABLE_NAME varchar(64) -KEY_COLUMN_USAGE COLUMN_NAME varchar(64) -KEY_COLUMN_USAGE ORDINAL_POSITION bigint(10) -KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint(10) -KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar(64) -KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar(64) -ROUTINES SPECIFIC_NAME varchar(64) -ROUTINES ROUTINE_CATALOG varchar(4096) -ROUTINES ROUTINE_SCHEMA varchar(64) -ROUTINES ROUTINE_NAME varchar(64) -ROUTINES ROUTINE_TYPE varchar(9) -ROUTINES DTD_IDENTIFIER varchar(64) -ROUTINES ROUTINE_BODY varchar(8) -ROUTINES ROUTINE_DEFINITION longtext -ROUTINES EXTERNAL_NAME varchar(64) -ROUTINES EXTERNAL_LANGUAGE varchar(64) -ROUTINES PARAMETER_STYLE varchar(8) -ROUTINES IS_DETERMINISTIC varchar(3) -ROUTINES SQL_DATA_ACCESS varchar(64) -ROUTINES SQL_PATH varchar(64) -ROUTINES SECURITY_TYPE varchar(7) -ROUTINES CREATED datetime -ROUTINES LAST_ALTERED datetime -ROUTINES SQL_MODE longtext -ROUTINES ROUTINE_COMMENT varchar(64) -ROUTINES DEFINER varchar(77) -SCHEMATA CATALOG_NAME varchar(4096) -SCHEMATA SCHEMA_NAME varchar(64) -SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar(64) -SCHEMATA DEFAULT_COLLATION_NAME varchar(64) -SCHEMATA SQL_PATH varchar(4096) -SCHEMA_PRIVILEGES GRANTEE varchar(81) -SCHEMA_PRIVILEGES TABLE_CATALOG varchar(4096) -SCHEMA_PRIVILEGES TABLE_SCHEMA varchar(64) -SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar(64) -SCHEMA_PRIVILEGES IS_GRANTABLE varchar(3) -STATISTICS TABLE_CATALOG varchar(4096) -STATISTICS TABLE_SCHEMA varchar(64) -STATISTICS TABLE_NAME varchar(64) -STATISTICS NON_UNIQUE bigint(1) -STATISTICS INDEX_SCHEMA varchar(64) -STATISTICS INDEX_NAME varchar(64) -STATISTICS SEQ_IN_INDEX bigint(2) -STATISTICS COLUMN_NAME varchar(64) -STATISTICS COLLATION varchar(1) -STATISTICS CARDINALITY bigint(21) -STATISTICS SUB_PART bigint(3) -STATISTICS PACKED varchar(10) -STATISTICS NULLABLE varchar(3) -STATISTICS INDEX_TYPE varchar(16) -STATISTICS COMMENT varchar(16) -TABLES TABLE_CATALOG varchar(4096) -TABLES TABLE_SCHEMA varchar(64) -TABLES TABLE_NAME varchar(64) -TABLES TABLE_TYPE varchar(64) -TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) -TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) -TABLES CREATE_TIME datetime -TABLES UPDATE_TIME datetime -TABLES CHECK_TIME datetime -TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) -TABLES CREATE_OPTIONS varchar(255) -TABLES TABLE_COMMENT varchar(80) -TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) -TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_NAME varchar(64) -TABLE_CONSTRAINTS TABLE_SCHEMA varchar(64) -TABLE_CONSTRAINTS TABLE_NAME varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar(64) -TABLE_PRIVILEGES GRANTEE varchar(81) -TABLE_PRIVILEGES TABLE_CATALOG varchar(4096) -TABLE_PRIVILEGES TABLE_SCHEMA varchar(64) -TABLE_PRIVILEGES TABLE_NAME varchar(64) -TABLE_PRIVILEGES PRIVILEGE_TYPE varchar(64) -TABLE_PRIVILEGES IS_GRANTABLE varchar(3) -TRIGGERS TRIGGER_CATALOG varchar(4096) -TRIGGERS TRIGGER_SCHEMA varchar(64) -TRIGGERS TRIGGER_NAME varchar(64) -TRIGGERS EVENT_MANIPULATION varchar(6) -TRIGGERS EVENT_OBJECT_CATALOG varchar(4096) -TRIGGERS EVENT_OBJECT_SCHEMA varchar(64) -TRIGGERS EVENT_OBJECT_TABLE varchar(64) -TRIGGERS ACTION_ORDER bigint(4) -TRIGGERS ACTION_CONDITION longtext -TRIGGERS ACTION_STATEMENT longtext -TRIGGERS ACTION_ORIENTATION varchar(9) -TRIGGERS ACTION_TIMING varchar(6) -TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_OLD_ROW varchar(3) -TRIGGERS ACTION_REFERENCE_NEW_ROW varchar(3) -TRIGGERS CREATED datetime -TRIGGERS SQL_MODE longtext -TRIGGERS DEFINER longtext -USER_PRIVILEGES GRANTEE varchar(81) -USER_PRIVILEGES TABLE_CATALOG varchar(4096) -USER_PRIVILEGES PRIVILEGE_TYPE varchar(64) -USER_PRIVILEGES IS_GRANTABLE varchar(3) -VIEWS TABLE_CATALOG varchar(4096) -VIEWS TABLE_SCHEMA varchar(64) -VIEWS TABLE_NAME varchar(64) -VIEWS VIEW_DEFINITION longtext -VIEWS CHECK_OPTION varchar(8) -VIEWS IS_UPDATABLE varchar(3) -VIEWS DEFINER varchar(77) -VIEWS SECURITY_TYPE varchar(7) -t1 f1 char(20) -t1 f2 char(25) -t1 f3 date -t1 f4 int(11) -t1 f5 char(25) -t1 f6 int(11) -t10 f1 char(20) -t10 f2 char(25) -t10 f3 date -t10 f4 int(11) -t10 f5 char(25) -t10 f6 int(11) -t11 f1 char(20) -t11 f2 char(25) -t11 f3 date -t11 f4 int(11) -t11 f5 char(25) -t11 f6 int(11) -t2 f1 char(20) -t2 f2 char(25) -t2 f3 date -t2 f4 int(11) -t2 f5 char(25) -t2 f6 int(11) -t3 f1 char(20) -t3 f2 char(20) -t3 f3 int(11) -t4 f1 char(20) -t4 f2 char(25) -t4 f3 date -t4 f4 int(11) -t4 f5 char(25) -t4 f6 int(11) -t7 f1 char(20) -t7 f2 char(25) -t7 f3 date -t7 f4 int(11) -t8 f1 char(20) -t8 f2 char(25) -t8 f3 date -t8 f4 int(11) -t9 f1 int(11) -t9 f2 char(25) -t9 f3 int(11) -tb1 f1 char(0) -tb1 f2 char(0) -tb1 f3 char(0) -tb1 f4 tinytext -tb1 f5 text -tb1 f6 mediumtext -tb1 f7 longtext -tb1 f8 tinyblob -tb1 f9 blob -tb1 f10 mediumblob -tb1 f11 longblob -tb1 f12 binary(1) -tb1 f13 tinyint(4) -tb1 f14 tinyint(3) unsigned -tb1 f15 tinyint(3) unsigned zerofill -tb1 f16 tinyint(3) unsigned zerofill -tb1 f17 smallint(6) -tb1 f18 smallint(5) unsigned -tb1 f19 smallint(5) unsigned zerofill -tb1 f20 smallint(5) unsigned zerofill -tb1 f21 mediumint(9) -tb1 f22 mediumint(8) unsigned -tb1 f23 mediumint(8) unsigned zerofill -tb1 f24 mediumint(8) unsigned zerofill -tb1 f25 int(11) -tb1 f26 int(10) unsigned -tb1 f27 int(10) unsigned zerofill -tb1 f28 int(10) unsigned zerofill -tb1 f29 bigint(20) -tb1 f30 bigint(20) unsigned -tb1 f31 bigint(20) unsigned zerofill -tb1 f32 bigint(20) unsigned zerofill -tb1 f33 decimal(10,0) -tb1 f34 decimal(10,0) unsigned -tb1 f35 decimal(10,0) unsigned zerofill -tb1 f36 decimal(10,0) unsigned zerofill -tb1 f37 decimal(10,0) -tb1 f38 decimal(64,0) -tb1 f39 decimal(10,0) unsigned -tb1 f40 decimal(64,0) unsigned -tb1 f41 decimal(10,0) unsigned zerofill -tb1 f42 decimal(64,0) unsigned zerofill -tb1 f43 decimal(10,0) unsigned zerofill -tb1 f44 decimal(64,0) unsigned zerofill -tb1 f45 decimal(10,0) -tb1 f46 decimal(63,30) -tb1 f47 decimal(10,0) unsigned -tb1 f48 decimal(63,30) unsigned -tb1 f49 decimal(10,0) unsigned zerofill -tb1 f50 decimal(63,30) unsigned zerofill -tb1 f51 decimal(10,0) unsigned zerofill -tb1 f52 decimal(63,30) unsigned zerofill -tb1 f53 decimal(10,0) -tb1 f54 decimal(10,0) unsigned -tb1 f55 decimal(10,0) unsigned zerofill -tb1 f56 decimal(10,0) unsigned zerofill -tb1 f57 decimal(10,0) -tb1 f58 decimal(64,0) -tb2 f59 decimal(10,0) unsigned -tb2 f60 decimal(64,0) unsigned -tb2 f61 decimal(10,0) unsigned zerofill -tb2 f62 decimal(64,0) unsigned zerofill -tb2 f63 decimal(10,0) unsigned zerofill -tb2 f64 decimal(64,0) unsigned zerofill -tb2 f65 decimal(10,0) -tb2 f66 decimal(63,30) -tb2 f67 decimal(10,0) unsigned -tb2 f68 decimal(63,30) unsigned -tb2 f69 decimal(10,0) unsigned zerofill -tb2 f70 decimal(63,30) unsigned zerofill -tb2 f71 decimal(10,0) unsigned zerofill -tb2 f72 decimal(63,30) unsigned zerofill -tb2 f73 double -tb2 f74 double unsigned -tb2 f75 double unsigned zerofill -tb2 f76 double unsigned zerofill -tb2 f77 double -tb2 f78 double unsigned -tb2 f79 double unsigned zerofill -tb2 f80 double unsigned zerofill -tb2 f81 float -tb2 f82 float unsigned -tb2 f83 float unsigned zerofill -tb2 f84 float unsigned zerofill -tb2 f85 float -tb2 f86 float -tb2 f87 float unsigned -tb2 f88 float unsigned -tb2 f89 float unsigned zerofill -tb2 f90 float unsigned zerofill -tb2 f91 float unsigned zerofill -tb2 f92 float unsigned zerofill -tb2 f93 float -tb2 f94 double -tb2 f95 float unsigned -tb2 f96 double unsigned -tb2 f97 float unsigned zerofill -tb2 f98 double unsigned zerofill -tb2 f99 float unsigned zerofill -tb2 f100 double unsigned zerofill -tb2 f101 date -tb2 f102 time -tb2 f103 datetime -tb2 f104 timestamp -tb2 f105 year(4) -tb2 f106 year(4) -tb2 f107 year(4) -tb2 f108 enum('1enum','2enum') -tb2 f109 set('1set','2set') -tb3 f118 char(1) -tb3 f119 char(1) -tb3 f120 char(1) -tb3 f121 tinytext -tb3 f122 text -tb3 f123 mediumtext -tb3 f124 longtext -tb3 f125 tinyblob -tb3 f126 blob -tb3 f127 mediumblob -tb3 f128 longblob -tb3 f129 binary(1) -tb3 f130 tinyint(4) -tb3 f131 tinyint(3) unsigned -tb3 f132 tinyint(3) unsigned zerofill -tb3 f133 tinyint(3) unsigned zerofill -tb3 f134 smallint(6) -tb3 f135 smallint(5) unsigned -tb3 f136 smallint(5) unsigned zerofill -tb3 f137 smallint(5) unsigned zerofill -tb3 f138 mediumint(9) -tb3 f139 mediumint(8) unsigned -tb3 f140 mediumint(8) unsigned zerofill -tb3 f141 mediumint(8) unsigned zerofill -tb3 f142 int(11) -tb3 f143 int(10) unsigned -tb3 f144 int(10) unsigned zerofill -tb3 f145 int(10) unsigned zerofill -tb3 f146 bigint(20) -tb3 f147 bigint(20) unsigned -tb3 f148 bigint(20) unsigned zerofill -tb3 f149 bigint(20) unsigned zerofill -tb3 f150 decimal(10,0) -tb3 f151 decimal(10,0) unsigned -tb3 f152 decimal(10,0) unsigned zerofill -tb3 f153 decimal(10,0) unsigned zerofill -tb3 f154 decimal(10,0) -tb3 f155 decimal(64,0) -tb3 f156 decimal(10,0) unsigned -tb3 f157 decimal(64,0) unsigned -tb3 f158 decimal(10,0) unsigned zerofill -tb3 f159 decimal(64,0) unsigned zerofill -tb3 f160 decimal(10,0) unsigned zerofill -tb3 f161 decimal(64,0) unsigned zerofill -tb3 f162 decimal(10,0) -tb3 f163 decimal(63,30) -tb3 f164 decimal(10,0) unsigned -tb3 f165 decimal(63,30) unsigned -tb3 f166 decimal(10,0) unsigned zerofill -tb3 f167 decimal(63,30) unsigned zerofill -tb3 f168 decimal(10,0) unsigned zerofill -tb3 f169 decimal(63,30) unsigned zerofill -tb3 f170 decimal(10,0) -tb3 f171 decimal(10,0) unsigned -tb3 f172 decimal(10,0) unsigned zerofill -tb3 f173 decimal(10,0) unsigned zerofill -tb3 f174 decimal(10,0) -tb3 f175 decimal(64,0) -tb4 f176 decimal(10,0) unsigned -tb4 f177 decimal(64,0) unsigned -tb4 f178 decimal(10,0) unsigned zerofill -tb4 f179 decimal(64,0) unsigned zerofill -tb4 f180 decimal(10,0) unsigned zerofill -tb4 f181 decimal(64,0) unsigned zerofill -tb4 f182 decimal(10,0) -tb4 f183 decimal(63,30) -tb4 f184 decimal(10,0) unsigned -tb4 f185 decimal(63,30) unsigned -tb4 f186 decimal(10,0) unsigned zerofill -tb4 f187 decimal(63,30) unsigned zerofill -tb4 f188 decimal(10,0) unsigned zerofill -tb4 f189 decimal(63,30) unsigned zerofill -tb4 f190 double -tb4 f191 double unsigned -tb4 f192 double unsigned zerofill -tb4 f193 double unsigned zerofill -tb4 f194 double -tb4 f195 double unsigned -tb4 f196 double unsigned zerofill -tb4 f197 double unsigned zerofill -tb4 f198 float -tb4 f199 float unsigned -tb4 f200 float unsigned zerofill -tb4 f201 float unsigned zerofill -tb4 f202 float -tb4 f203 float -tb4 f204 float unsigned -tb4 f205 float unsigned -tb4 f206 float unsigned zerofill -tb4 f207 float unsigned zerofill -tb4 f208 float unsigned zerofill -tb4 f209 float unsigned zerofill -tb4 f210 float -tb4 f211 double -tb4 f212 float unsigned -tb4 f213 double unsigned -tb4 f214 float unsigned zerofill -tb4 f215 double unsigned zerofill -tb4 f216 float unsigned zerofill -tb4 f217 double unsigned zerofill -tb4 f218 date -tb4 f219 time -tb4 f220 datetime -tb4 f221 timestamp -tb4 f222 year(4) -tb4 f223 year(4) -tb4 f224 year(4) -tb4 f225 enum('1enum','2enum') -tb4 f226 set('1set','2set') -tb4 f235 char(0) -tb4 f236 char(90) -tb4 f237 char(255) -tb4 f238 varchar(0) -tb4 f239 varchar(20000) -tb4 f240 varchar(2000) -tb4 f241 char(100) -select character_set_name from character_sets; -character_set_name -big5 -dec8 -cp850 -hp8 -koi8r -latin1 -latin2 -swe7 -ascii -ujis -sjis -hebrew -tis620 -euckr -koi8u -gb2312 -greek -cp1250 -gbk -latin5 -armscii8 -utf8 -ucs2 -cp866 -keybcs2 -macce -macroman -cp852 -latin7 -cp1251 -cp1256 -cp1257 -binary -geostd8 -cp932 -eucjpms -select collation_name from collations where collation_name <> 'utf8_general_cs'; -collation_name -big5_chinese_ci -big5_bin -dec8_swedish_ci -dec8_bin -cp850_general_ci -cp850_bin -hp8_english_ci -hp8_bin -koi8r_general_ci -koi8r_bin -latin1_german1_ci -latin1_swedish_ci -latin1_danish_ci -latin1_german2_ci -latin1_bin -latin1_general_ci -latin1_general_cs -latin1_spanish_ci -latin2_czech_cs -latin2_general_ci -latin2_hungarian_ci -latin2_croatian_ci -latin2_bin -swe7_swedish_ci -swe7_bin -ascii_general_ci -ascii_bin -ujis_japanese_ci -ujis_bin -sjis_japanese_ci -sjis_bin -hebrew_general_ci -hebrew_bin -tis620_thai_ci -tis620_bin -euckr_korean_ci -euckr_bin -koi8u_general_ci -koi8u_bin -gb2312_chinese_ci -gb2312_bin -greek_general_ci -greek_bin -cp1250_general_ci -cp1250_czech_cs -cp1250_croatian_ci -cp1250_bin -gbk_chinese_ci -gbk_bin -latin5_turkish_ci -latin5_bin -armscii8_general_ci -armscii8_bin -utf8_general_ci -utf8_bin -utf8_unicode_ci -utf8_icelandic_ci -utf8_latvian_ci -utf8_romanian_ci -utf8_slovenian_ci -utf8_polish_ci -utf8_estonian_ci -utf8_spanish_ci -utf8_swedish_ci -utf8_turkish_ci -utf8_czech_ci -utf8_danish_ci -utf8_lithuanian_ci -utf8_slovak_ci -utf8_spanish2_ci -utf8_roman_ci -utf8_persian_ci -utf8_esperanto_ci -utf8_hungarian_ci -ucs2_general_ci -ucs2_bin -ucs2_unicode_ci -ucs2_icelandic_ci -ucs2_latvian_ci -ucs2_romanian_ci -ucs2_slovenian_ci -ucs2_polish_ci -ucs2_estonian_ci -ucs2_spanish_ci -ucs2_swedish_ci -ucs2_turkish_ci -ucs2_czech_ci -ucs2_danish_ci -ucs2_lithuanian_ci -ucs2_slovak_ci -ucs2_spanish2_ci -ucs2_roman_ci -ucs2_persian_ci -ucs2_esperanto_ci -ucs2_hungarian_ci -cp866_general_ci -cp866_bin -keybcs2_general_ci -keybcs2_bin -macce_general_ci -macce_bin -macroman_general_ci -macroman_bin -cp852_general_ci -cp852_bin -latin7_estonian_cs -latin7_general_ci -latin7_general_cs -latin7_bin -cp1251_bulgarian_ci -cp1251_ukrainian_ci -cp1251_bin -cp1251_general_ci -cp1251_general_cs -cp1256_general_ci -cp1256_bin -cp1257_lithuanian_ci -cp1257_bin -cp1257_general_ci -binary -geostd8_general_ci -geostd8_bin -cp932_japanese_ci -cp932_bin -eucjpms_japanese_ci -eucjpms_bin -select routine_name, routine_type from routines; -routine_name routine_type -select table_name, index_name from statistics; -table_name index_name -select table_name from views; -table_name -select privilege_type from user_privileges; -privilege_type -USAGE -select grantee, privilege_type from schema_privileges; -grantee privilege_type -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select column_name, privilege_type from column_privileges; -column_name privilege_type -select table_name,constraint_type from table_constraints; -table_name constraint_type -select table_schema, table_name, column_name from key_column_usage; -table_schema table_name column_name - -root@localhost db_datadict -DROP USER 'u_6_401017'@'localhost'; - -Testcase 3.2.1.18: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401018'@'localhost'; -GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401018'@'localhost'; -SHOW GRANTS FOR 'u_6_401018'@'localhost'; -Grants for u_6_401018@localhost -GRANT USAGE ON *.* TO 'u_6_401018'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'u_6_401018'@'localhost' -FLUSH PRIVILEGES; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -connect(localhost,u_6_401018,,test,MYSQL_PORT,MYSQL_SOCK); -USE db_datadict; -create view db_datadict.v_401018 as -select * from information_schema.schemata; -SELECT * FROM v_401018 ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL - -root@localhost NULL -DROP USER 'u_6_401018'@'localhost'; -DROP DATABASE db_datadict; - -Testcase 3.2.1.19: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401019'@'localhost'; -grant alter on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant alter routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create temporary tables -on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant delete on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant drop on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant execute on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant index on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant insert on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant lock tables on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant update on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT * FROM information_schema.table_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM information_schema.column_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -DROP USER 'u_6_401019'@'localhost'; - -Testcase 3.2.1.20: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401020'@'localhost'; -connect(localhost,u_6_401020,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -CREATE TABLE tb_not_allowed ( col TEXT ); -ERROR 42S02: Unknown table 'tb_not_allowed' in information_schema -create view res_v1 as select * from information_schema.schemata; -ERROR 42S02: Unknown table 'res_v1' in information_schema -alter table schemata modify catalog_name varchar(255); -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -update schemata set catalog_name = 'abc' - where schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -CREATE PROCEDURE sp_3_2_1_20() -BEGIN -INSERT INTO information_schema.schema_privileges (table_schema,privilege_type) -VALUES('db2','insert'); -END// -ERROR 42000: Unknown database 'information_schema' -DELETE FROM schemata WHERE schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' - -root@localhost NULL -DROP USER 'u_6_401020'@'localhost'; - -Testcase 3.2.2.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC character_sets; -Field Type Null Key Default Extra -CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATE_NAME varchar(64) NO -DESCRIPTION varchar(60) NO -MAXLEN bigint(3) NO 0 -SHOW CREATE TABLE character_sets; -Table Create Table -CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.2.2: --------------------------------------------------------------------------------- - -root@localhost information_schema -SELECT * FROM information_schema.character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 - -Testcase 3.2.2.3: --------------------------------------------------------------------------------- - -Testcase 3.2.3.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collations; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -ID bigint(11) NO 0 -IS_DEFAULT varchar(3) NO -IS_COMPILED varchar(3) NO -SORTLEN bigint(3) NO 0 -SHOW CREATE TABLE collations; -Table Create Table -COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `ID` bigint(11) NOT NULL default '0', - `IS_DEFAULT` varchar(3) NOT NULL default '', - `IS_COMPILED` varchar(3) NOT NULL default '', - `SORTLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.3.2: --------------------------------------------------------------------------------- -SELECT * FROM collations where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -cp850_bin cp850 80 0 -hp8_english_ci hp8 6 Yes 0 -hp8_bin hp8 72 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8r_bin koi8r 74 0 -latin1_german1_ci latin1 5 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_bin latin1 47 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_spanish_ci latin1 94 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_bin latin2 77 Yes 1 -swe7_swedish_ci swe7 10 Yes 0 -swe7_bin swe7 82 0 -ascii_general_ci ascii 11 Yes 0 -ascii_bin ascii 65 0 -ujis_japanese_ci ujis 12 Yes Yes 1 -ujis_bin ujis 91 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -sjis_bin sjis 88 Yes 1 -hebrew_general_ci hebrew 16 Yes 0 -hebrew_bin hebrew 71 0 -tis620_thai_ci tis620 18 Yes Yes 4 -tis620_bin tis620 89 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -koi8u_general_ci koi8u 22 Yes 0 -koi8u_bin koi8u 75 0 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -greek_general_ci greek 25 Yes 0 -greek_bin greek 70 0 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_bin cp1250 66 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -latin5_turkish_ci latin5 30 Yes 0 -latin5_bin latin5 78 0 -armscii8_general_ci armscii8 32 Yes 0 -armscii8_bin armscii8 64 0 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_unicode_ci utf8 192 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_hungarian_ci utf8 210 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_bin ucs2 90 Yes 1 -ucs2_unicode_ci ucs2 128 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_hungarian_ci ucs2 146 Yes 8 -cp866_general_ci cp866 36 Yes 0 -cp866_bin cp866 68 0 -keybcs2_general_ci keybcs2 37 Yes 0 -keybcs2_bin keybcs2 73 0 -macce_general_ci macce 38 Yes 0 -macce_bin macce 43 0 -macroman_general_ci macroman 39 Yes 0 -macroman_bin macroman 53 0 -cp852_general_ci cp852 40 Yes 0 -cp852_bin cp852 81 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -latin7_bin latin7 79 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1251_bin cp1251 50 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1256_bin cp1256 67 0 -cp1257_lithuanian_ci cp1257 29 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -binary binary 63 Yes Yes 1 -geostd8_general_ci geostd8 92 Yes 0 -geostd8_bin geostd8 93 0 -cp932_japanese_ci cp932 95 Yes Yes 1 -cp932_bin cp932 96 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -eucjpms_bin eucjpms 98 Yes 1 - -Testcase 3.2.3.3: --------------------------------------------------------------------------------- - -Testcase 3.2.4.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collation_character_set_applicability; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -SHOW CREATE TABLE collation_character_set_applicability; -Table Create Table -COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -COUNT(*) -2 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.4.2: --------------------------------------------------------------------------------- -SELECT * FROM collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms - -Testcase 3.2.4.3: --------------------------------------------------------------------------------- - -Testcase 3.2.5.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC column_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE column_privileges; -Table Create Table -COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -COUNT(*) -7 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.5.2 + 3.2.5.3 + 3.2.5.4: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE TABLE db_datadict.res_t40502 (f1 INT, f2 DECIMAL, f3 TEXT); -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT INSERT(f1) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT UPDATE(f2) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT SELECT(f2) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT SELECT(f3) ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost' WITH GRANT OPTION; -GRANT ALL ON db_datadict.* TO 'user_3'@'localhost'; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE NO -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -FIXME: Check it is correct that the following GRANT changes ALL privs that user_1 has -------------------------------------------------------------------------------------- -GRANT UPDATE(f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost' WITH GRANT OPTION; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -FIXME: check it is correct that granted TABLES doesn_t occur in COLUMN_PRIVILEGES ---------------------------------------------------------------------------------- -SELECT * FROM information_schema.table_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 SELECT YES -'user_3'@'localhost' NULL db_datadict res_t40502 INSERT YES -SELECT * FROM information_schema.schema_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict SELECT NO -'user_3'@'localhost' NULL db_datadict INSERT NO -'user_3'@'localhost' NULL db_datadict UPDATE NO -'user_3'@'localhost' NULL db_datadict DELETE NO -'user_3'@'localhost' NULL db_datadict CREATE NO -'user_3'@'localhost' NULL db_datadict DROP NO -'user_3'@'localhost' NULL db_datadict REFERENCES NO -'user_3'@'localhost' NULL db_datadict INDEX NO -'user_3'@'localhost' NULL db_datadict ALTER NO -'user_3'@'localhost' NULL db_datadict CREATE TEMPORARY TABLES NO -'user_3'@'localhost' NULL db_datadict LOCK TABLES NO -'user_3'@'localhost' NULL db_datadict EXECUTE NO -'user_3'@'localhost' NULL db_datadict CREATE VIEW NO -'user_3'@'localhost' NULL db_datadict SHOW VIEW NO -'user_3'@'localhost' NULL db_datadict CREATE ROUTINE NO -'user_3'@'localhost' NULL db_datadict ALTER ROUTINE NO -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; - -FIXME: check whether it is intended that *my* grants to others are *NOT* shown here ------------------------------------------------------------------------------------ -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -user_2@localhost db_datadict -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO - -root@localhost db_datadict -DROP TABLE IF EXISTS db_datadict.res_t40502; -DROP DATABASE IF EXISTS db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; - -Testcase 3.2.6.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC columns; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 -COLUMN_DEFAULT longtext YES NULL -IS_NULLABLE varchar(3) NO -DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL -CHARACTER_SET_NAME varchar(64) YES NULL -COLLATION_NAME varchar(64) YES NULL -COLUMN_TYPE longtext NO NULL -COLUMN_KEY varchar(3) NO -EXTRA varchar(20) NO -PRIVILEGES varchar(80) NO -COLUMN_COMMENT varchar(255) NO -SHOW CREATE TABLE columns; -Table Create Table -COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(21) NOT NULL default '0', - `COLUMN_DEFAULT` longtext, - `IS_NULLABLE` varchar(3) NOT NULL default '', - `DATA_TYPE` varchar(64) NOT NULL default '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) default NULL, - `NUMERIC_PRECISION` bigint(21) default NULL, - `NUMERIC_SCALE` bigint(21) default NULL, - `CHARACTER_SET_NAME` varchar(64) default NULL, - `COLLATION_NAME` varchar(64) default NULL, - `COLUMN_TYPE` longtext NOT NULL, - `COLUMN_KEY` varchar(3) NOT NULL default '', - `EXTRA` varchar(20) NOT NULL default '', - `PRIVILEGES` varchar(80) NOT NULL default '', - `COLUMN_COMMENT` varchar(255) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select - -Testcase 3.2.6.2 + 3.2.6.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table t_6_406001(f1 char(10), f2 text, f3 date, f4 int); -grant select(f1, f2) on db_datadict.t_6_406001 to 'user_1'@'localhost'; -create table t_6_406002(f1 char(10), f2 text, f3 date, f4 int); -GRANT INSERT(f1, f2) ON db_datadict.t_6_406002 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406001 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406001 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406002 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406002 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 0 0 NULL NULL latin1 latin1_bin char(0) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references -NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references -NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 0 0 NULL NULL latin1 latin1_bin char(0) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references -NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references -NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) insert -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text insert -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 0 0 NULL NULL latin1 latin1_bin char(0) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references -NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references -NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references -NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references - -root@localhost db_datadict - -Show the quotient of COL and CML for all COLUMNS ------------------------------------------------- -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE 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 binary NULL NULL -1.0000 blob NULL NULL -1.0000 longblob NULL NULL -1.0000 mediumblob NULL NULL -1.0000 tinyblob NULL NULL -1.0000 char latin1 latin1_bin -1.0000 varchar latin1 latin1_bin -1.0000 char latin1 latin1_swedish_ci -1.0000 enum latin1 latin1_swedish_ci -1.0000 longtext latin1 latin1_swedish_ci -1.0000 mediumtext latin1 latin1_swedish_ci -1.0000 set latin1 latin1_swedish_ci -1.0000 text latin1 latin1_swedish_ci -1.0000 tinytext latin1 latin1_swedish_ci -1.0000 longtext utf8 utf8_general_ci -1.0000 text utf8 utf8_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 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 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci -3.0000 char utf8 utf8_bin -3.0000 enum utf8 utf8_bin -3.0000 char utf8 utf8_general_ci -3.0000 enum utf8 utf8_general_ci -3.0000 set utf8 utf8_general_ci -3.0000 varchar utf8 utf8_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 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 bigint NULL NULL -NULL date NULL NULL -NULL datetime NULL NULL -NULL decimal NULL NULL -NULL double NULL NULL -NULL double unsigned NULL NULL -NULL double unsigned zerofill NULL NULL -NULL float NULL NULL -NULL float unsigned NULL NULL -NULL float unsigned zerofill NULL NULL -NULL int NULL NULL -NULL mediumint NULL NULL -NULL smallint NULL NULL -NULL time NULL NULL -NULL timestamp NULL NULL -NULL tinyint NULL NULL -NULL year NULL NULL -NULL char latin1 latin1_bin -NULL char latin1 latin1_swedish_ci -NULL varchar latin1 latin1_swedish_ci -NULL char 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 -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 db_datadict t_6_406001 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406001 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406001 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406001 f4 int NULL NULL NULL NULL int(11) -1.0000 db_datadict t_6_406002 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406002 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406002 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406002 f4 int NULL NULL NULL NULL int(11) -3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) -NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11) -3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) -3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10) -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) -1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime -NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime -1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema SCHEMATA CATALOG_NAME varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA SQL_PATH varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1) -3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2) -3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1) -NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21) -NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10) -3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema TABLES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime -3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4) -1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime -1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) -NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) -NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) -3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) -3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') -NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) -NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text -1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) -3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') -3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL') -3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') -3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') -3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') -1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob -3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) -1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) -NULL mysql proc created timestamp NULL NULL NULL NULL timestamp -NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp -3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') -3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') -3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) -3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') -NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) -NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') -3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') -NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11) -3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) -NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned -3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) -3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql user User char 16 48 utf8 utf8_bin char(16) -1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) -3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') -1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob -NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned -1.0000 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) -NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0) -NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0) -NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0) -2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext -1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text -1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext -1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob -1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob -1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob -1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob -1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) -NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) -NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f25 int NULL NULL NULL NULL int(11) -NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned -NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) -NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f73 double NULL NULL NULL NULL double -NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f77 double NULL NULL NULL NULL double -NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f81 float NULL NULL NULL NULL float -NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f85 float NULL NULL NULL NULL float -NULL test tb2 f86 float NULL NULL NULL NULL float -NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f93 float NULL NULL NULL NULL float -NULL test tb2 f94 double NULL NULL NULL NULL double -NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f101 date NULL NULL NULL NULL date -NULL test tb2 f102 time NULL NULL NULL NULL time -NULL test tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test tb2 f105 year NULL NULL NULL NULL year(4) -NULL test tb2 f106 year NULL NULL NULL NULL year(4) -NULL test tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) -1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext -1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text -1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext -1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob -1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob -1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob -1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob -1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) -NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) -NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f142 int NULL NULL NULL NULL int(11) -NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned -NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) -NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f190 double NULL NULL NULL NULL double -NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f194 double NULL NULL NULL NULL double -NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f198 float NULL NULL NULL NULL float -NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f202 float NULL NULL NULL NULL float -NULL test tb4 f203 float NULL NULL NULL NULL float -NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f210 float NULL NULL NULL NULL float -NULL test tb4 f211 double NULL NULL NULL NULL double -NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f218 date NULL NULL NULL NULL date -NULL test tb4 f219 time NULL NULL NULL NULL time -NULL test tb4 f220 datetime NULL NULL NULL NULL datetime -NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp -NULL test tb4 f222 year NULL NULL NULL NULL year(4) -NULL test tb4 f223 year NULL NULL NULL NULL year(4) -NULL test tb4 f224 year NULL NULL NULL NULL year(4) -1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -NULL test tb4 f235 char 0 0 ucs2 ucs2_general_ci char(0) -1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90) -1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255) -NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0) -1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000) -2.0000 test tb4 f240 varchar 2000 4000 ucs2 ucs2_general_ci varchar(2000) -2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) -NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f73 double NULL NULL NULL NULL double -NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f77 double NULL NULL NULL NULL double -NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f81 float NULL NULL NULL NULL float -NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f85 float NULL NULL NULL NULL float -NULL test1 tb2 f86 float NULL NULL NULL NULL float -NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f93 float NULL NULL NULL NULL float -NULL test1 tb2 f94 double NULL NULL NULL NULL double -NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f101 date NULL NULL NULL NULL date -NULL test1 tb2 f102 time NULL NULL NULL NULL time -NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -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 USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE IF EXISTS t_6_406001; -DROP TABLE IF EXISTS t_6_406002; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.7.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC key_column_usage; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 -POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL -REFERENCED_TABLE_SCHEMA varchar(64) YES NULL -REFERENCED_TABLE_NAME varchar(64) YES NULL -REFERENCED_COLUMN_NAME varchar(64) YES NULL -SHOW CREATE TABLE key_column_usage; -Table Create Table -KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(10) NOT NULL default '0', - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, - `REFERENCED_TABLE_NAME` varchar(64) default NULL, - `REFERENCED_COLUMN_NAME` varchar(64) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -COUNT(*) -12 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.7.2 + 3.2.7.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -CREATE TABLE t_40701 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40701 to 'user_1'@'localhost'; -CREATE TABLE t_40702 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40702 to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE t_40701; -DROP TABLE t_40702; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.8.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC routines; -Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(4096) YES NULL -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(9) NO -DTD_IDENTIFIER varchar(64) YES NULL -ROUTINE_BODY varchar(8) NO -ROUTINE_DEFINITION longtext YES NULL -EXTERNAL_NAME varchar(64) YES NULL -EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO -SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE longtext NO NULL -ROUTINE_COMMENT varchar(64) NO -DEFINER varchar(77) NO -SHOW CREATE TABLE routines; -Table Create Table -ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL default '', - `ROUTINE_CATALOG` varchar(4096) default NULL, - `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', - `ROUTINE_NAME` varchar(64) NOT NULL default '', - `ROUTINE_TYPE` varchar(9) NOT NULL default '', - `DTD_IDENTIFIER` varchar(64) default NULL, - `ROUTINE_BODY` varchar(8) NOT NULL default '', - `ROUTINE_DEFINITION` longtext, - `EXTERNAL_NAME` varchar(64) default NULL, - `EXTERNAL_LANGUAGE` varchar(64) default NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL default '', - `IS_DETERMINISTIC` varchar(3) NOT NULL default '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(64) default NULL, - `SECURITY_TYPE` varchar(7) NOT NULL default '', - `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', - `SQL_MODE` longtext NOT NULL, - `ROUTINE_COMMENT` varchar(64) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -COUNT(*) -20 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select - -Testcase 3.2.8.2 + 3.2.8.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_1(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1989-11-09', 0815); -DROP PROCEDURE IF EXISTS sp_6_408002_1; -CREATE PROCEDURE sp_6_408002_1() -BEGIN -SELECT * FROM db_datadict.res_6_408002_1; -END// -CREATE DATABASE db_datadict_2; -USE db_datadict_2; -CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_2(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1990-10-03', 4711); -DROP PROCEDURE IF EXISTS sp_6_408002_2; -CREATE PROCEDURE sp_6_408002_2() -BEGIN -SELECT * FROM db_datadict_2.res_6_408002_2; -END// -GRANT SELECT ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_2'@'localhost'; -GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER - -root@localhost db_datadict_2 -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -use db_datadict; -DROP TABLE res_6_408002_1; -DROP PROCEDURE sp_6_408002_1; -USE db_datadict_2; -DROP TABLE res_6_408002_2; -DROP PROCEDURE sp_6_408002_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.8.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_6_408004_1(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_1 values ('abc', 98765 , 99999999 , 98765, 10); -drop procedure if exists sp_6_408004; -create table res_6_408004_2(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_2 values ('abc', 98765 , 99999999 , 98765, 10); - -Checking the max. possible length of (currently) 4 GByte is not possible in this environment here. --------------------------------------------------------------------------------------------------- -create procedure sp_6_408004 () -begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -end// -call sp_6_408004 (); -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -select * from res_6_408004_2; -f1 f2 f3 f4 f5 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -SELECT *, LENGTH(routine_definition) -FROM information_schema.routines -WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME sp_6_408004 -ROUTINE_CATALOG NULL -ROUTINE_SCHEMA db_datadict -ROUTINE_NAME sp_6_408004 -ROUTINE_TYPE PROCEDURE -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -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 YYYY-MM-DD hh:mm:ss -LAST_ALTERED YYYY-MM-DD hh:mm:ss -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -LENGTH(routine_definition) 2549 -use db_datadict; -drop procedure sp_6_408004; -drop table res_6_408004_1; -drop table res_6_408004_2; -use test; -drop database db_datadict; - -Testcase 3.2.9.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schemata; -Field Type Null Key Default Extra -CATALOG_NAME varchar(4096) YES NULL -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATION_NAME varchar(64) NO -SQL_PATH varchar(4096) YES NULL -SHOW CREATE TABLE schemata; -Table Create Table -SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(4096) default NULL, - `SCHEMA_NAME` varchar(64) NOT NULL default '', - `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(4096) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select - -Testcase 3.2.9.2 + 3.2.9.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict_1; -CREATE DATABASE db_datadict_2; -GRANT SELECT ON db_datadict_1.* to 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.* to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict_1,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_2 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -2 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE db_datadict_1; -DROP DATABASE db_datadict_2; - -Testcase 3.2.10.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_constraints; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -CONSTRAINT_TYPE varchar(64) NO -SHOW CREATE TABLE table_constraints; -Table Create Table -TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `CONSTRAINT_TYPE` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.10.2 + 3.2.10.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -USE db_datadict; -CREATE TABLE res_6_401003_1(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -USE db_datadict_2; -CREATE TABLE res_6_401003_2(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -GRANT SELECT ON db_datadict.res_6_401003_1 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.res_6_401003_2 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict PRIMARY db_datadict res_6_401003_1 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict_2 PRIMARY db_datadict_2 res_6_401003_2 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -use db_datadict; - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE res_6_401003_1; -USE db_datadict_2; -DROP TABLE res_6_401003_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.11.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE table_privileges; -Table Create Table -TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.11.2 + 3.2.11.3 + 3.2.11.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, SELECT ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.table_privileges -WHERE table_name LIKE 'tb%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = USER(); -USER() COUNT(*) -user_2@localhost 0 -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = "'user_2'@'localhost'"; -USER() COUNT(*) -user_2@localhost 11 -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -drop table db_datadict.tb1; -drop table db_datadict.tb3; -use test; -drop database db_datadict; - -Testcase 3.2.12.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC tables; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO -ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL -ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL -CREATE_TIME datetime YES NULL -UPDATE_TIME datetime YES NULL -CHECK_TIME datetime YES NULL -TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL -CREATE_OPTIONS varchar(255) YES NULL -TABLE_COMMENT varchar(80) NO -SHOW CREATE TABLE tables; -Table Create Table -TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `TABLE_TYPE` varchar(64) NOT NULL default '', - `ENGINE` varchar(64) default NULL, - `VERSION` bigint(21) default NULL, - `ROW_FORMAT` varchar(10) default NULL, - `TABLE_ROWS` bigint(21) default NULL, - `AVG_ROW_LENGTH` bigint(21) default NULL, - `DATA_LENGTH` bigint(21) default NULL, - `MAX_DATA_LENGTH` bigint(21) default NULL, - `INDEX_LENGTH` bigint(21) default NULL, - `DATA_FREE` bigint(21) default NULL, - `AUTO_INCREMENT` bigint(21) default NULL, - `CREATE_TIME` datetime default NULL, - `UPDATE_TIME` datetime default NULL, - `CHECK_TIME` datetime default NULL, - `TABLE_COLLATION` varchar(64) default NULL, - `CHECKSUM` bigint(21) default NULL, - `CREATE_OPTIONS` varchar(255) default NULL, - `TABLE_COMMENT` varchar(80) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -COUNT(*) -21 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select - -Testcase 3.2.12.2 + 3.2.12.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* -TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb2 (f1 DECIMAL); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -GRANT INSERT ON db_datadict.tb3 to 'user_2'@'localhost'; -CREATE VIEW v3 AS SELECT * FROM tb3; -GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB - -root@localhost db_datadict -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t10 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t11 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t7 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t8 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test t9 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb1 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb3 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test tb4 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test1 tb2 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -NULL test4 t6 BASE TABLE InnoDB 10 Compact 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL InnoDB free: 3072 kB -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP TABLE db_datadict.tb1; -DROP TABLE db_datadict.tb3; -DROP VIEW db_datadict.v3; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.13.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC views; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO NULL -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(77) NO -SECURITY_TYPE varchar(7) NO -SHOW CREATE TABLE views; -Table Create Table -VIEWS CREATE TEMPORARY TABLE `VIEWS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `VIEW_DEFINITION` longtext NOT NULL, - `CHECK_OPTION` varchar(8) NOT NULL default '', - `IS_UPDATABLE` varchar(3) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '', - `SECURITY_TYPE` varchar(7) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -COUNT(*) -8 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select - -Testcase 3.2.13.2 + 3.2.13.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_no_views'@'localhost'; -USE db_datadict; -CREATE TABLE tb_401302(f1 INT, f2 INT, f3 INT); -CREATE VIEW v_granted_to_1 AS SELECT * FROM tb_401302; -CREATE VIEW v_granted_glob AS SELECT f2, f3 FROM tb_401302; -GRANT SELECT ON db_datadict.tb_401302 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.v_granted_to_1 TO 'user_1'@'localhost'; -GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f1` AS `f1`,`db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_no_views,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE - -root@localhost db_datadict -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_no_views'@'localhost'; -DROP VIEW v_granted_to_1; -DROP TABLE tb_401302; -DROP VIEW v_granted_glob; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.14.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC statistics; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -NON_UNIQUE bigint(1) NO 0 -INDEX_SCHEMA varchar(64) NO -INDEX_NAME varchar(64) NO -SEQ_IN_INDEX bigint(2) NO 0 -COLUMN_NAME varchar(64) NO -COLLATION varchar(1) YES NULL -CARDINALITY bigint(21) YES NULL -SUB_PART bigint(3) YES NULL -PACKED varchar(10) YES NULL -NULLABLE varchar(3) NO -INDEX_TYPE varchar(16) NO -COMMENT varchar(16) YES NULL -SHOW CREATE TABLE statistics; -Table Create Table -STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `NON_UNIQUE` bigint(1) NOT NULL default '0', - `INDEX_SCHEMA` varchar(64) NOT NULL default '', - `INDEX_NAME` varchar(64) NOT NULL default '', - `SEQ_IN_INDEX` bigint(2) NOT NULL default '0', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `COLLATION` varchar(1) default NULL, - `CARDINALITY` bigint(21) default NULL, - `SUB_PART` bigint(3) default NULL, - `PACKED` varchar(10) default NULL, - `NULLABLE` varchar(3) NOT NULL default '', - `INDEX_TYPE` varchar(16) NOT NULL default '', - `COMMENT` varchar(16) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -COUNT(*) -15 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select - -Testcase 3.2.14.2 + 3.2.14.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table tb_6_401402_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_6_401402_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict.tb_6_401402_1 to 'user_1'@'localhost' WITH GRANT OPTION; -USE db_datadict_2; -create table tb_2_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_2_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict_2.tb_2_1 to 'user_1'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.statistics -WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict tb_6_401402_2 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_2 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_2 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_2 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 0 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 2 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE - -user_1@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE - -user_2@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE tb_6_401402_1; -DROP TABLE tb_6_401402_2; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.15.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schema_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE schema_privileges; -Table Create Table -SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.15.2: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401502'@'localhost'; -use db_datadict; -create table res_6_401502(f1 int, f2 int, f3 int); -grant insert on db_datadict.* to 'u_6_401502'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401502,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401502'@'localhost'; -drop table res_6_401502; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.15.3 + 3.2.15.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401503_1'@'localhost'; -CREATE USER 'u_6_401503_2'@'localhost'; -CREATE USER 'u_6_401503_3'@'localhost'; -use db_datadict; -create table res_6_401503_1(f1 int, f2 int, f3 int); -use db_datadict_2; -create table res_6_401503_2(f1 int, f2 int, f3 int); -grant update on db_datadict.* to 'u_6_401503_1'@'localhost'; -grant delete on db_datadict_2.* to 'u_6_401503_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401503_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -connect(localhost,u_6_401503_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -connect(localhost,u_6_401503_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE - -root@localhost db_datadict_2 -use db_datadict; -DROP USER 'u_6_401503_1'@'localhost'; -DROP USER 'u_6_401503_2'@'localhost'; -DROP USER 'u_6_401503_3'@'localhost'; -drop table res_6_401503_1; -use db_datadict_2; -drop table res_6_401503_2; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.16.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC user_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE user_privileges; -Table Create Table -USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.16.2 + 3.2.16.3 + 3.2.16.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -GRANT INSERT ON *.* TO 'user_2'@'localhost'; -GRANT UPDATE ON *.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -FIXME (see Bug 12269) Here we expect more than only for user_1 ----------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -add GRANT OPTION db_datadict.* to user_1 ----------------------------------------- -GRANT UPDATE ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; - -FIXME (see Bug 12269) Here the is missing for the GRANT OPTION for user_1 -------------------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' - -Now add SELECT on *.* to user_1 -------------------------------- - -root@localhost information_schema -GRANT SELECT ON *.* TO 'user_1'@'localhost'; - -Here is shown correctly for user_1 ------------------------------------------------ -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT SELECT ON *.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_2@localhost -GRANT INSERT, UPDATE ON *.* TO 'user_2'@'localhost' -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_3'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_3@localhost -GRANT USAGE ON *.* TO 'user_3'@'localhost' - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' - -user_1@localhost db_datadict -CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_55' - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_66' - -add ALL on db_datadict.* (and select on mysql.user) to user_1 -------------------------------------------------------------- - -root@localhost information_schema -GRANT ALL ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_56' -USE db_datadict; - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE tb_57 ( c1 TEXT ); - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_58 ( c1 TEXT ); -USE db_datadict; -ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_datadict' -CREATE TABLE db_datadict.tb_59 ( c1 TEXT ); - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.17: Checks on Performance - not here in this script! --------------------------------------------------------------------------------- - -Testcase 3.2.18.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC triggers; -Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(4096) YES NULL -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(4096) YES NULL -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 -ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO NULL -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO -ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL -ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO -CREATED datetime YES NULL -SQL_MODE longtext NO NULL -DEFINER longtext NO NULL -SHOW CREATE TABLE triggers; -Table Create Table -TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(4096) default NULL, - `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', - `TRIGGER_NAME` varchar(64) NOT NULL default '', - `EVENT_MANIPULATION` varchar(6) NOT NULL default '', - `EVENT_OBJECT_CATALOG` varchar(4096) default NULL, - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', - `ACTION_ORDER` bigint(4) NOT NULL default '0', - `ACTION_CONDITION` longtext, - `ACTION_STATEMENT` longtext NOT NULL, - `ACTION_ORIENTATION` varchar(9) NOT NULL default '', - `ACTION_TIMING` varchar(6) NOT NULL default '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', - `CREATED` datetime default NULL, - `SQL_MODE` longtext NOT NULL, - `DEFINER` longtext NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select - -Testcase 3.2.18.2 + 3.2.18.3: --------------------------------------------------------------------------------- - -Testcase 3.2.19.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC parameters; -ERROR 42S02: Unknown table 'parameters' in information_schema - -Testcase 3.2.20.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC referential_constraints; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema - -*** End of Data Dictionary Tests *** --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.tb1; -DROP TABLE IF EXISTS test.tb2; -DROP TABLE IF EXISTS test.tb3; -DROP TABLE IF EXISTS test.tb4; -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.t7; -DROP TABLE IF EXISTS test.t8; -DROP TABLE IF EXISTS test.t9; -DROP TABLE IF EXISTS test.t10; -DROP TABLE IF EXISTS test.t11; -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test4; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; diff --git a/mysql-test/suite/funcs_1/r/innodb__load.result b/mysql-test/suite/funcs_1/r/innodb__load.result deleted file mode 100644 index c1b9c89b257..00000000000 --- a/mysql-test/suite/funcs_1/r/innodb__load.result +++ /dev/null @@ -1 +0,0 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); diff --git a/mysql-test/suite/funcs_1/r/innodb_bitdata.result b/mysql-test/suite/funcs_1/r/innodb_bitdata.result index 57f7b017e69..917157fcdae 100644 --- a/mysql-test/suite/funcs_1/r/innodb_bitdata.result +++ b/mysql-test/suite/funcs_1/r/innodb_bitdata.result @@ -1,67 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb4; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f235 char(0) unicode, -f236 char(90), -f237 char(255) ascii, -f238 varchar(0), -f239 varchar(20000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode -) engine = innodb; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; NOT YET IMPLEMENTED: bitdata tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_cursors.result b/mysql-test/suite/funcs_1/r/innodb_cursors.result index bcb692c30d7..9f20e51204b 100644 --- a/mysql-test/suite/funcs_1/r/innodb_cursors.result +++ b/mysql-test/suite/funcs_1/r/innodb_cursors.result @@ -1,81 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char(0), -f2 char(0) binary, -f3 char(0) ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal, -f34 decimal unsigned, -f35 decimal zerofill, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = innodb; -Warnings: -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; NOT YET IMPLEMENTED: cursor tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result index 5560fb1fd73..9081c6da3f7 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result index fe400ceeb6d..faf598b090b 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result index ce3a882000b..639e8cdb48b 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result index cbe20882ec2..d0b9d8ae806 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result index 91a3a954f57..68e32626425 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result index ec2b4850d30..f2c47342019 100755 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result index 56f20781995..9c2c2a38a4d 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0102.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -362,3 +361,4 @@ select @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/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index 18300c6fc6b..4e6b4523f1d 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -749,3 +748,4 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result index ce7c51ec630..e7f2b374845 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_0407.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -478,3 +477,4 @@ 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/innodb_trig_08.result b/mysql-test/suite/funcs_1/r/innodb_trig_08.result index bb087d5882e..a13116df9b4 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_08.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -497,3 +496,4 @@ Testcase 3.5.8.7: (Disabled as a result of bug _____) 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/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result index 685de95db51..34a430ba052 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -269,3 +268,4 @@ 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/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result index 182747e3153..8976787420d 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -397,3 +396,4 @@ 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/innodb_trig_frkey.result b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result index 56dd5d6740e..debbec1dde3 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_frkey.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -138,3 +137,4 @@ drop table t2, t1, t0; Foreign Key tests disabled (bug 11472 - stored in trig_frkey2.test) ------------------------------------------------------------------- +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 7f94f266102..f091e49c96b 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb2 ; create table tb2 ( @@ -11452,4 +11451,5 @@ DROP VIEW IF EXISTS v1_secondview; DROP VIEW IF EXISTS v2; DROP DATABASE IF EXISTS test2; DROP DATABASE IF EXISTS test3; -DROP DATABASE IF EXISTS test1; +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/r/is_basics_mixed.result b/mysql-test/suite/funcs_1/r/is_basics_mixed.result new file mode 100644 index 00000000000..d20e5750403 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_basics_mixed.result @@ -0,0 +1,602 @@ +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +####################################################################### +# Testcase 3.2.1.20: USE INFORMATION_SCHEMA is supported +####################################################################### +# Switch to connection default +USE test; +SELECT DATABASE(); +DATABASE() +test +USE information_schema; +SELECT DATABASE(); +DATABASE() +information_schema +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +# Establish connection testuser1 (user=testuser1) +SELECT DATABASE(); +DATABASE() +test +USE information_schema; +SELECT DATABASE(); +DATABASE() +information_schema +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +####################################################################### +# Testcase TBD1: The INFORMATION_SCHEMA cannot be dropped. +####################################################################### +DROP DATABASE information_schema; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +####################################################################### +# Testcase TBD2: There cannot be a second database INFORMATION_SCHEMA. +####################################################################### +CREATE DATABASE information_schema; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +################################################################################## +# Testcase 3.2.1.6+3.2.1.7: No user may create an INFORMATION_SCHEMA table or view +################################################################################## +# Switch to connection default (user=root) +USE information_schema; +CREATE TABLE schemata ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE tables ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE columns ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE character_sets ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE collations ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE collation_character_set_applicability ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE routines ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE statistics ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE views ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE user_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE schema_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE table_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE column_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE table_constraints ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE key_column_usage ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE triggers ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); +ERROR 42S02: Unknown table 't1' in information_schema +CREATE VIEW tables AS SELECT 'garbage'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE VIEW tables AS SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE VIEW v1 AS SELECT 'garbage'; +ERROR 42S02: Unknown table 'v1' in information_schema +USE test; +CREATE TABLE information_schema. schemata ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. tables ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. columns ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. character_sets ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. collations ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. routines ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. statistics ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. views ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. user_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. schema_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. table_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. column_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. table_constraints ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. key_column_usage ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. triggers ( c1 INT ); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT); +ERROR 42S02: Unknown table 't1' in information_schema +CREATE VIEW information_schema.tables AS SELECT 'garbage'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE VIEW information_schema.tables AS +SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE VIEW information_schema.v1 AS SELECT 'garbage'; +ERROR 42S02: Unknown table 'v1' in information_schema +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON *.* TO testuser1@localhost; +SHOW GRANTS FOR testuser1@localhost; +Grants for testuser1@localhost +GRANT ALL PRIVILEGES ON *.* TO 'testuser1'@'localhost' +# Establish connection testuser1 (user=testuser1) +USE information_schema; +CREATE TABLE schemata ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE tables ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE columns ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE character_sets ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE collations ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE collation_character_set_applicability ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE routines ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE statistics ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE views ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE user_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE schema_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE table_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE column_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE table_constraints ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE key_column_usage ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE triggers ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE t1 (f1 INT, f2 INT, f3 INT); +ERROR 42S02: Unknown table 't1' in information_schema +CREATE VIEW tables AS SELECT 'garbage'; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE VIEW tables AS SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE VIEW v1 AS SELECT 'garbage'; +ERROR 42S02: Unknown table 'v1' in information_schema +USE test; +CREATE TABLE information_schema. schemata ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. tables ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. columns ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. character_sets ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. collations ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. routines ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. statistics ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. views ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. user_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. schema_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. table_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. column_privileges ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. table_constraints ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. key_column_usage ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema. triggers ( c1 INT ); +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT); +ERROR 42S02: Unknown table 't1' in information_schema +CREATE VIEW information_schema.tables AS SELECT 'garbage'; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE VIEW information_schema.tables AS +SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'information_schema' +CREATE VIEW information_schema.v1 AS SELECT 'garbage'; +ERROR 42S02: Unknown table 'v1' in information_schema +# Switch to connection default (user=root) and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +############################################################################### +# Testcase 3.2.1.1+3.2.1.2: INFORMATION_SCHEMA tables can be queried via SELECT +############################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1_first (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = ; +CREATE TABLE db_datadict.t1_second (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = ; +# Attention: The protocolling of the next result set is disabled. +SELECT * FROM information_schema.tables; +SELECT table_name FROM information_schema.tables +WHERE table_schema = 'db_datadict'; +table_name +t1_first +t1_second +SELECT LENGTH(table_name) FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +LENGTH(table_name) +8 +9 +SELECT count(table_name) FROM information_schema.tables +WHERE table_schema LIKE 'db_datadic%'; +count(table_name) +2 +SELECT CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1)) +FROM information_schema.tables +WHERE table_schema = 'db_datadict'; +CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1)) +19.0 +20.0 +SELECT table_name FROM information_schema.tables +WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1; +table_name +t1_first +SELECT table_name FROM information_schema.tables +WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1,1; +table_name +t1_second +SELECT table_name,table_schema AS my_col FROM information_schema.tables +WHERE table_name = 't1_first' AND table_schema = 'db_datadict'; +table_name my_col +t1_first db_datadict +SELECT HIGH_PRIORITY table_name AS my_col FROM information_schema.tables +WHERE table_name = 't1_first' OR table_name = 't1_second'; +my_col +t1_first +t1_second +SELECT 1 AS my_col FROM information_schema.tables +WHERE table_name = 't1_third'; +my_col +SELECT table_name,table_schema INTO @table_name,@table_schema +FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1; +SELECT @table_name,@table_schema; +@table_name @table_schema +t1_first db_datadict +SELECT table_name,table_schema +INTO OUTFILE '' +FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' +LINES TERMINATED BY '\n' +FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +"t1_first","db_datadict" +"t1_second","db_datadict" +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_first' +UNION ALL +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_second'; +table_name +t1_first +t1_second +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_name IN (SELECT table_name FROM information_schema.tables +WHERE table_schema = 'db_datadict') +ORDER BY table_name; +table_schema +db_datadict +SELECT table_name FROM information_schema.tables t1 +LEFT JOIN information_schema.tables t2 USING(table_name,table_schema) +WHERE t2.table_schema = 'db_datadict' +ORDER BY table_name; +table_name +t1_first +t1_second +USE test; +SELECT * FROM tables; +ERROR 42S02: Table 'test.tables' doesn't exist +######################################################################### +# Testcase 3.2.1.17+3.2.1.18 +######################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = ; +SELECT * FROM db_datadict.t1; +f1 f2 +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +GRANT CREATE VIEW,SELECT ON db_datadict.* TO testuser1@localhost +WITH GRANT OPTION; +GRANT USAGE ON db_datadict.* TO testuser2@localhost; +FLUSH PRIVILEGES; +GRANT SELECT on information_schema.* TO testuser1@localhost; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +# Establish connection testuser1 (user=testuser1) +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_schema = 'information_schema' AND table_name = 'tables'; +table_schema table_name +information_schema TABLES +SELECT * FROM information_schema.table_privileges +WHERE table_schema = 'information_schema'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'information_schema'; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +CREATE VIEW db_datadict.v2 AS +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM db_datadict.v2; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE +db_datadict t1 BASE TABLE +db_datadict v2 VIEW +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE +db_datadict t1 BASE TABLE +db_datadict v2 VIEW +GRANT SELECT ON db_datadict.v2 to testuser2@localhost; +# Establish connection testuser2 (user=testuser2) +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM db_datadict.v2; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE +db_datadict v2 VIEW +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; +TABLE_SCHEMA TABLE_NAME TABLE_TYPE +db_datadict v2 VIEW +# Switch to connection default and close connections testuser1 and testuser2 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# Testcase 3.2.1.19 +######################################################################### +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +SELECT 'empty result set was expected' AS my_col +FROM information_schema.schema_privileges +WHERE table_schema = 'information_schema'; +my_col +SELECT 'empty result set was expected' AS my_col +FROM information_schema.table_privileges +WHERE table_schema = 'information_schema'; +my_col +SELECT 'empty result set was expected' AS my_col +FROM information_schema.column_privileges +WHERE table_schema = 'information_schema'; +my_col +GRANT ALTER ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT ALTER ROUTINE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT CREATE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT CREATE ROUTINE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT CREATE TEMPORARY TABLES ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT DELETE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT DROP ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT EXECUTE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT INDEX ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT INSERT ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT LOCK TABLES ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +GRANT UPDATE ON information_schema.* +TO 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +SELECT 'empty result set was expected' AS my_col +FROM information_schema.schema_privileges +WHERE table_schema = 'information_schema'; +my_col +SELECT 'empty result set was expected' AS my_col +FROM information_schema.table_privileges +WHERE table_schema = 'information_schema'; +my_col +SELECT 'empty result set was expected' AS my_col +FROM information_schema.column_privileges +WHERE table_schema = 'information_schema'; +my_col +DROP USER 'testuser1'@'localhost'; +######################################################################### +# Testcase 3.2.1.16 +######################################################################### +SELECT DISTINCT table_schema FROM information_schema.columns +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT table_schema FROM information_schema.column_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.key_column_usage +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +SELECT DISTINCT routine_schema FROM information_schema.routines +WHERE routine_schema LIKE 'db_data%'; +routine_schema +SELECT DISTINCT schema_name FROM information_schema.schemata +WHERE schema_name LIKE 'db_data%'; +schema_name +SELECT DISTINCT table_schema FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics +WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%'; +table_schema index_schema +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.table_constraints +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +SELECT DISTINCT table_schema FROM information_schema.table_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT trigger_schema,event_object_schema +FROM information_schema.triggers +WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%'; +trigger_schema event_object_schema +SELECT DISTINCT table_schema FROM information_schema.views +WHERE table_schema LIKE 'db_data%'; +table_schema +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT NOT NULL, f3 BIGINT, +PRIMARY KEY(f1)) +ENGINE = ; +CREATE UNIQUE INDEX UIDX ON db_datadict.t1(f3); +CREATE PROCEDURE db_datadict.sproc1() SELECT 'db_datadict'; +CREATE FUNCTION db_datadict.func1() RETURNS INT RETURN 0; +CREATE TRIGGER db_datadict.trig1 BEFORE INSERT ON db_datadict.t1 +FOR EACH ROW SET @aux = 1; +CREATE VIEW db_datadict.v1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v2 AS SELECT * FROM information_schema.tables; +SELECT DISTINCT table_schema FROM information_schema.columns +WHERE table_schema LIKE 'db_data%'; +table_schema +db_datadict +SELECT DISTINCT table_schema FROM information_schema.column_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.key_column_usage +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +db_datadict db_datadict +SELECT DISTINCT routine_schema FROM information_schema.routines +WHERE routine_schema LIKE 'db_data%'; +routine_schema +db_datadict +SELECT DISTINCT schema_name FROM information_schema.schemata +WHERE schema_name LIKE 'db_data%'; +schema_name +db_datadict +SELECT DISTINCT table_schema FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics +WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%'; +table_schema index_schema +db_datadict db_datadict +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_schema LIKE 'db_data%'; +table_schema +db_datadict +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.table_constraints +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +db_datadict db_datadict +SELECT DISTINCT table_schema FROM information_schema.table_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT trigger_schema,event_object_schema +FROM information_schema.triggers +WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%'; +trigger_schema event_object_schema +db_datadict db_datadict +SELECT DISTINCT table_schema FROM information_schema.views +WHERE table_schema LIKE 'db_data%'; +table_schema +db_datadict +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON test.* TO 'testuser1'@'localhost'; +# Establish connection testuser1 (user=testuser1) +SELECT DISTINCT table_schema FROM information_schema.columns +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT table_schema FROM information_schema.column_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.key_column_usage +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +SELECT DISTINCT routine_schema FROM information_schema.routines +WHERE routine_schema LIKE 'db_data%'; +routine_schema +SELECT DISTINCT schema_name FROM information_schema.schemata +WHERE schema_name LIKE 'db_data%'; +schema_name +SELECT DISTINCT table_schema FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT table_schema,index_schema FROM information_schema.statistics +WHERE table_schema LIKE 'db_data%' OR index_schema LIKE 'db_data%'; +table_schema index_schema +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT constraint_schema,table_schema +FROM information_schema.table_constraints +WHERE constraint_schema LIKE 'db_data%' OR table_schema LIKE 'db_data%'; +constraint_schema table_schema +SELECT DISTINCT table_schema FROM information_schema.table_privileges +WHERE table_schema LIKE 'db_data%'; +table_schema +SELECT DISTINCT trigger_schema,event_object_schema +FROM information_schema.triggers +WHERE trigger_schema LIKE 'db_data%' OR event_object_schema LIKE 'db_data%'; +trigger_schema event_object_schema +SELECT DISTINCT table_schema FROM information_schema.views +WHERE table_schema LIKE 'db_data%'; +table_schema +# Switch to connection default and close connections testuser1 and testuser2 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP PROCEDURE IF EXISTS test.p1; +CREATE PROCEDURE test.p1() +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables LIMIT 1; +CALL test.p1(); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP PROCEDURE test.p1; +CREATE PROCEDURE test.p1() +UPDATE information_schema.columns SET table_schema = 'garbage'; +CALL test.p1(); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP PROCEDURE test.p1; +CREATE PROCEDURE test.p1() +DELETE FROM information_schema.schemata; +CALL test.p1(); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP PROCEDURE test.p1; +######################################################################### +# Testcase 3.2.17.1+3.2.17.2: To be implemented outside of this script +######################################################################### diff --git a/mysql-test/suite/funcs_1/r/is_character_sets.result b/mysql-test/suite/funcs_1/r/is_character_sets.result new file mode 100644 index 00000000000..b6fee4444b9 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_character_sets.result @@ -0,0 +1,78 @@ +SHOW TABLES FROM information_schema LIKE 'CHARACTER_SETS'; +Tables_in_information_schema (CHARACTER_SETS) +CHARACTER_SETS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.CHARACTER_SETS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.CHARACTER_SETS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.CHARACTER_SETS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.CHARACTER_SETS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout +######################################################################### +DESCRIBE information_schema.CHARACTER_SETS; +Field Type Null Key Default Extra +CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATE_NAME varchar(64) NO +DESCRIPTION varchar(60) NO +MAXLEN bigint(3) NO 0 +SHOW CREATE TABLE information_schema.CHARACTER_SETS; +Table Create Table +CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', + `DESCRIPTION` varchar(60) NOT NULL default '', + `MAXLEN` bigint(3) NOT NULL default '0' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.CHARACTER_SETS; +Field Type Null Key Default Extra +CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATE_NAME varchar(64) NO +DESCRIPTION varchar(60) NO +MAXLEN bigint(3) NO 0 +# Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +INSERT INTO information_schema.character_sets +SELECT * FROM information_schema.character_sets; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.character_sets SET description = 'just updated'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.character_sets WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.character_sets; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx ON information_schema.character_sets(character_set_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.character_sets DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.character_sets ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.character_sets; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.character_sets +RENAME information_schema.xcharacter_sets; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result b/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result new file mode 100644 index 00000000000..b85ba039478 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result @@ -0,0 +1,76 @@ +SHOW TABLES FROM information_schema LIKE 'COLLATION_CHARACTER_SET_APPLICABILITY'; +Tables_in_information_schema (COLLATION_CHARACTER_SET_APPLICABILITY) +COLLATION_CHARACTER_SET_APPLICABILITY +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.4.1: INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY layout +######################################################################### +DESCRIBE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +Field Type Null Key Default Extra +COLLATION_NAME varchar(64) NO +CHARACTER_SET_NAME varchar(64) NO +SHOW CREATE TABLE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +Table Create Table +COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( + `COLLATION_NAME` varchar(64) NOT NULL default '', + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; +Field Type Null Key Default Extra +COLLATION_NAME varchar(64) NO +CHARACTER_SET_NAME varchar(64) NO +# Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +INSERT INTO information_schema.collation_character_set_applicability +SELECT * FROM information_schema.collation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.collation_character_set_applicability +SET collation_name = 'big6_chinese_ci' WHERE character_set_name = 'big6'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.collation_character_set_applicability +SET character_set_name = 't_4711'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.collation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.collation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx +ON information_schema.collation_character_set_applicability(collation_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collation_character_set_applicability ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.collation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collation_character_set_applicability +RENAME db_datadict.collation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collation_character_set_applicability +RENAME information_schema.xcollation_character_set_applicability; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_collations.result b/mysql-test/suite/funcs_1/r/is_collations.result new file mode 100644 index 00000000000..64e9c41eaa8 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_collations.result @@ -0,0 +1,90 @@ +SHOW TABLES FROM information_schema LIKE 'COLLATIONS'; +Tables_in_information_schema (COLLATIONS) +COLLATIONS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLLATIONS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLLATIONS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.COLLATIONS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.COLLATIONS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.3.1: INFORMATION_SCHEMA.COLLATIONS layout +######################################################################### +DESCRIBE information_schema.COLLATIONS; +Field Type Null Key Default Extra +COLLATION_NAME varchar(64) NO +CHARACTER_SET_NAME varchar(64) NO +ID bigint(11) NO 0 +IS_DEFAULT varchar(3) NO +IS_COMPILED varchar(3) NO +SORTLEN bigint(3) NO 0 +SHOW CREATE TABLE information_schema.COLLATIONS; +Table Create Table +COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( + `COLLATION_NAME` varchar(64) NOT NULL default '', + `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `ID` bigint(11) NOT NULL default '0', + `IS_DEFAULT` varchar(3) NOT NULL default '', + `IS_COMPILED` varchar(3) NOT NULL default '', + `SORTLEN` bigint(3) NOT NULL default '0' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.COLLATIONS; +Field Type Null Key Default Extra +COLLATION_NAME varchar(64) NO +CHARACTER_SET_NAME varchar(64) NO +ID bigint(11) NO 0 +IS_DEFAULT varchar(3) NO +IS_COMPILED varchar(3) NO +SORTLEN bigint(3) NO 0 +# Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +INSERT INTO information_schema.collations +SELECT * FROM information_schema.collations; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.collations +(collation_name,character_set_name,id,is_default,is_compiled,sortlen) +VALUES ( 'cp1251_bin', 'cp1251',50, '', '',0); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.collations SET description = 'just updated'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.collations WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.collations; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx ON information_schema.collations(character_set_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collations DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collations ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collations ENABLE KEYS; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.collations; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collations RENAME db_datadict.collations; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.collations +RENAME information_schema.xcollations; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result new file mode 100644 index 00000000000..56ddbaf02c7 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -0,0 +1,370 @@ +SHOW TABLES FROM information_schema LIKE 'COLUMN_PRIVILEGES'; +Tables_in_information_schema (COLUMN_PRIVILEGES) +COLUMN_PRIVILEGES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMN_PRIVILEGES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMN_PRIVILEGES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.COLUMN_PRIVILEGES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.COLUMN_PRIVILEGES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.5.1: INFORMATION_SCHEMA.COLUMN_PRIVILEGES layout +######################################################################### +DESCRIBE information_schema.COLUMN_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES; +Table Create Table +COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( + `GRANTEE` varchar(81) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `COLUMN_NAME` varchar(64) NOT NULL default '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', + `IS_GRANTABLE` varchar(3) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SELECT table_catalog, table_schema, table_name, column_name, privilege_type +FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name column_name privilege_type +###################################################################### +# Testcase 3.2.5.2+3.2.5.3+3.2.5.4: +# INFORMATION_SCHEMA.COLUMN_PRIVILEGES accessible information +###################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 INT, f2 DECIMAL, f3 TEXT) +ENGINE = ; +USE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT INSERT(f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT UPDATE(f2) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT(f2) ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +GRANT SELECT(f3) ON db_datadict.t1 TO 'testuser3'@'localhost'; +GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost' +WITH GRANT OPTION; +GRANT ALL ON db_datadict.* TO 'testuser3'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT NO +'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE NO +'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT NO +'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO +'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES +GRANT UPDATE(f3) ON db_datadict.t1 TO 'testuser1'@'localhost' +WITH GRANT OPTION; +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT YES +'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT YES +'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE YES +'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT YES +'testuser1'@'localhost' NULL db_datadict t1 f3 UPDATE YES +'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO +'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict t1 f1 INSERT YES +'testuser1'@'localhost' NULL db_datadict t1 f1 SELECT YES +'testuser1'@'localhost' NULL db_datadict t1 f2 UPDATE YES +'testuser1'@'localhost' NULL db_datadict t1 f3 SELECT YES +'testuser1'@'localhost' NULL db_datadict t1 f3 UPDATE YES +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO +# Establish connection testuser3 (user=testuser3) +# FIXME: Is it correct that granted TABLES do not occur in COLUMN_PRIVILEGES? +SELECT * FROM information_schema.table_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee,table_schema,table_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL db_datadict t1 INSERT YES +'testuser3'@'localhost' NULL db_datadict t1 SELECT YES +SELECT * FROM information_schema.schema_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL db_datadict ALTER NO +'testuser3'@'localhost' NULL db_datadict ALTER ROUTINE NO +'testuser3'@'localhost' NULL db_datadict CREATE NO +'testuser3'@'localhost' NULL db_datadict CREATE ROUTINE NO +'testuser3'@'localhost' NULL db_datadict CREATE TEMPORARY TABLES NO +'testuser3'@'localhost' NULL db_datadict CREATE VIEW NO +'testuser3'@'localhost' NULL db_datadict DELETE NO +'testuser3'@'localhost' NULL db_datadict DROP NO +'testuser3'@'localhost' NULL db_datadict EXECUTE NO +'testuser3'@'localhost' NULL db_datadict INDEX NO +'testuser3'@'localhost' NULL db_datadict INSERT NO +'testuser3'@'localhost' NULL db_datadict LOCK TABLES NO +'testuser3'@'localhost' NULL db_datadict REFERENCES NO +'testuser3'@'localhost' NULL db_datadict SELECT NO +'testuser3'@'localhost' NULL db_datadict SHOW VIEW NO +'testuser3'@'localhost' NULL db_datadict UPDATE NO +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES +GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser2'@'localhost'; +# FIXME: Is it intended that *my* grants to others are *NOT* shown here? +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL db_datadict t1 f3 SELECT YES +# Switch to connection testuser2 (user=testuser2) +SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser2'@'localhost' NULL db_datadict t1 f1 SELECT NO +'testuser2'@'localhost' NULL db_datadict t1 f2 SELECT NO +'testuser2'@'localhost' NULL db_datadict t1 f3 SELECT NO +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +################################################################################ +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMN_PRIVILEGES modifications +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.my_table (f1 BIGINT, f2 CHAR(10), f3 DATE) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON test.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +# Switch to connection default +GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection default +ALTER TABLE db_datadict.my_table DROP COLUMN f3; +GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +SELECT f1, f3 FROM db_datadict.my_table; +ERROR 42S22: Unknown column 'f3' in 'field list' +# Switch to connection default +ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection default +DROP TABLE db_datadict.my_table; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict my_table f1 SELECT NO +'testuser1'@'localhost' NULL db_datadict my_table f1 UPDATE NO +'testuser1'@'localhost' NULL db_datadict my_table f3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +GRANT SELECT (f3, f1), UPDATE (f1) ON `db_datadict`.`my_table` TO 'testuser1'@'localhost' +# Switch to connection default +REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `test`.* TO 'testuser1'@'localhost' +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; +INSERT INTO information_schema.column_privileges +SELECT * FROM information_schema.column_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.column_privileges SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.column_privileges WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.column_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_tables +ON information_schema.column_privileges(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.column_privileges ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.column_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.column_privileges +RENAME db_datadict.column_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.column_privileges +RENAME information_schema.xcolumn_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result new file mode 100644 index 00000000000..acf26587004 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_column_privileges_is_mysql_test.result @@ -0,0 +1,37 @@ +############################################################################## +# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information +############################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.column_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY table_schema, table_name, column_name; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +mysql +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.column_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY table_schema, table_name, column_name; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result new file mode 100644 index 00000000000..4b0ee86a81b --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns.result @@ -0,0 +1,486 @@ +SHOW TABLES FROM information_schema LIKE 'COLUMNS'; +Tables_in_information_schema (COLUMNS) +COLUMNS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.COLUMNS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.COLUMNS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.COLUMNS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.COLUMNS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.6.1: INFORMATION_SCHEMA.COLUMNS layout +######################################################################### +DESCRIBE information_schema.COLUMNS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(21) NO 0 +COLUMN_DEFAULT longtext YES NULL +IS_NULLABLE varchar(3) NO +DATA_TYPE varchar(64) NO +CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL +CHARACTER_OCTET_LENGTH bigint(21) YES NULL +NUMERIC_PRECISION bigint(21) YES NULL +NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_SET_NAME varchar(64) YES NULL +COLLATION_NAME varchar(64) YES NULL +COLUMN_TYPE longtext NO NULL +COLUMN_KEY varchar(3) NO +EXTRA varchar(20) NO +PRIVILEGES varchar(80) NO +COLUMN_COMMENT varchar(255) NO +SHOW CREATE TABLE information_schema.COLUMNS; +Table Create Table +COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `COLUMN_NAME` varchar(64) NOT NULL default '', + `ORDINAL_POSITION` bigint(21) NOT NULL default '0', + `COLUMN_DEFAULT` longtext, + `IS_NULLABLE` varchar(3) NOT NULL default '', + `DATA_TYPE` varchar(64) NOT NULL default '', + `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) default NULL, + `NUMERIC_PRECISION` bigint(21) default NULL, + `NUMERIC_SCALE` bigint(21) default NULL, + `CHARACTER_SET_NAME` varchar(64) default NULL, + `COLLATION_NAME` varchar(64) default NULL, + `COLUMN_TYPE` longtext NOT NULL, + `COLUMN_KEY` varchar(3) NOT NULL default '', + `EXTRA` varchar(20) NOT NULL default '', + `PRIVILEGES` varchar(80) NOT NULL default '', + `COLUMN_COMMENT` varchar(255) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.COLUMNS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(21) NO 0 +COLUMN_DEFAULT longtext YES NULL +IS_NULLABLE varchar(3) NO +DATA_TYPE varchar(64) NO +CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL +CHARACTER_OCTET_LENGTH bigint(21) YES NULL +NUMERIC_PRECISION bigint(21) YES NULL +NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_SET_NAME varchar(64) YES NULL +COLLATION_NAME varchar(64) YES NULL +COLUMN_TYPE longtext NO NULL +COLUMN_KEY varchar(3) NO +EXTRA varchar(20) NO +PRIVILEGES varchar(80) NO +COLUMN_COMMENT varchar(255) NO +SELECT table_catalog, table_schema, table_name, column_name +FROM information_schema.columns WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name column_name +############################################################################### +# Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information +############################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +CREATE TABLE db_datadict.t1 +(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT AUTO_INCREMENT, +UNIQUE INDEX MUL_IDX(f1,f3), PRIMARY KEY (f4)) +ENGINE = ; +CREATE VIEW db_datadict.v1 AS SELECT 1 AS f1, 1 AS f2; +GRANT SELECT(f1, f2) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT(f2) ON db_datadict.v1 TO 'testuser1'@'localhost'; +CREATE TABLE db_datadict.t2 +(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT, PRIMARY KEY (f1,f4)) +ENGINE = ; +GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost'; +SELECT * FROM information_schema.columns +WHERE table_schema = 'db_datadict' +ORDER BY table_schema, table_name, ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) MUL select,insert,update,references +NULL db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL db_datadict t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL db_datadict t1 f4 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) PRI auto_increment select,insert,update,references +NULL db_datadict t2 f1 1 NO char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) PRI select,insert,update,references +NULL db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL db_datadict t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL db_datadict t2 f4 4 0 NO int NULL NULL 10 0 NULL NULL int(11) PRI select,insert,update,references +NULL db_datadict v1 f1 1 0 NO int NULL NULL 10 0 NULL NULL int(1) select,insert,update,references +NULL db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL int(1) select,insert,update,references +SHOW COLUMNS FROM db_datadict.t1; +Field Type Null Key Default Extra +f1 char(10) YES MUL NULL +f2 text YES NULL +f3 date YES NULL +f4 int(11) NO PRI NULL auto_increment +SHOW COLUMNS FROM db_datadict.t2; +Field Type Null Key Default Extra +f1 char(10) NO PRI +f2 text YES NULL +f3 date YES NULL +f4 int(11) NO PRI 0 +SHOW COLUMNS FROM db_datadict.v1; +Field Type Null Key Default Extra +f1 int(1) NO 0 +f2 int(1) NO 0 +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.columns +WHERE table_schema = 'db_datadict' +ORDER BY table_schema, table_name, ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL db_datadict t1 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) MUL select +NULL db_datadict t1 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select +NULL db_datadict v1 f2 2 0 NO int NULL NULL 10 0 NULL NULL int(1) select +SHOW COLUMNS FROM db_datadict.t1; +Field Type Null Key Default Extra +f1 char(10) YES MUL NULL +f2 text YES NULL +SHOW COLUMNS FROM db_datadict.t2; +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2' +SHOW COLUMNS FROM db_datadict.v1; +Field Type Null Key Default Extra +f2 int(1) NO 0 +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.columns +WHERE table_schema = 'db_datadict' +ORDER BY table_schema, table_name, ordinal_position; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT +NULL db_datadict t2 f1 1 NO char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) PRI insert +NULL db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text insert +SHOW COLUMNS FROM db_datadict.t1; +ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 't1' +SHOW COLUMNS FROM db_datadict.t2; +Field Type Null Key Default Extra +f1 char(10) NO PRI +f2 text YES NULL +SHOW COLUMNS FROM db_datadict.v1; +ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'v1' +# Switch to connection default and close connections testuser1, testuser2 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE IF EXISTS db_datadict; +############################################################################### +# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMNS modifications +############################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table (f1 CHAR(12)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +SELECT * FROM information_schema.columns +WHERE table_name = 't1_my_table'; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +COLUMN_NAME f1 +ORDINAL_POSITION 1 +COLUMN_DEFAULT NULL +IS_NULLABLE YES +DATA_TYPE char +CHARACTER_MAXIMUM_LENGTH 12 +CHARACTER_OCTET_LENGTH 12 +NUMERIC_PRECISION NULL +NUMERIC_SCALE NULL +CHARACTER_SET_NAME latin1 +COLLATION_NAME latin1_swedish_ci +COLUMN_TYPE char(12) +COLUMN_KEY +EXTRA +PRIVILEGES select,insert,update,references +COLUMN_COMMENT +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT table_schema,table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT table_name, column_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex f1 +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT table_name, column_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex first_col +SELECT table_name, column_name, character_maximum_length, +character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length column_type +t1_my_tablex first_col 12 12 char(12) +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(20); +SELECT table_name, column_name, character_maximum_length, +character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length column_type +t1_my_tablex first_col 20 20 char(20) +SELECT table_name, column_name, character_maximum_length, +character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length column_type +t1_my_tablex first_col 20 20 char(20) +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col VARCHAR(20); +SELECT table_name, column_name, character_maximum_length, +character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length column_type +t1_my_tablex first_col 20 20 varchar(20) +SELECT table_name, column_name, column_default +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_default +t1_my_tablex first_col NULL +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) DEFAULT 'hello'; +SELECT table_name, column_name, column_default +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_default +t1_my_tablex first_col hello +SELECT table_name, column_name, is_nullable +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name is_nullable +t1_my_tablex first_col YES +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) NOT NULL; +SELECT table_name, column_name, is_nullable +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name is_nullable +t1_my_tablex first_col NO +SELECT table_name, column_name, collation_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name collation_name +t1_my_tablex first_col latin1_swedish_ci +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) COLLATE 'latin1_general_cs'; +SELECT table_name, column_name, collation_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name collation_name +t1_my_tablex first_col latin1_general_cs +SELECT table_name, column_name, character_maximum_length, +character_octet_length, character_set_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length character_set_name +t1_my_tablex first_col 10 10 latin1 +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) CHARACTER SET utf8; +SELECT table_name, column_name, character_maximum_length, +character_octet_length, character_set_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name character_maximum_length character_octet_length character_set_name +t1_my_tablex first_col 10 30 utf8 +SELECT table_name, column_name, column_comment +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_comment +t1_my_tablex first_col +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) COMMENT 'Hello'; +SELECT table_name, column_name, column_comment +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_comment +t1_my_tablex first_col Hello +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex first_col +ALTER TABLE db_datadict.t1_my_tablex +ADD COLUMN second_col CHAR(10); +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex first_col +t1_my_tablex second_col +SELECT table_name, column_name, ordinal_position +FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name ordinal_position +t1_my_tablex first_col 1 +t1_my_tablex second_col 2 +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN second_col CHAR(10) FIRST; +SELECT table_name, column_name, ordinal_position +FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name ordinal_position +t1_my_tablex first_col 2 +t1_my_tablex second_col 1 +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex second_col +t1_my_tablex first_col +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex second_col +SELECT table_name, column_name, column_key +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_key +t1_my_tablex second_col +ALTER TABLE db_datadict.t1_my_tablex +ADD UNIQUE INDEX IDX(second_col); +SELECT table_name, column_name, column_key +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name column_key +t1_my_tablex second_col UNI +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +t1_my_tablex second_col +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name column_name +CREATE VIEW test.t1_my_tablex +AS SELECT 1 AS "col1", 'A' collate latin1_german1_ci AS "col2"; +SELECT * FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_tablex +COLUMN_NAME col1 +ORDINAL_POSITION 1 +COLUMN_DEFAULT 0 +IS_NULLABLE NO +DATA_TYPE int +CHARACTER_MAXIMUM_LENGTH NULL +CHARACTER_OCTET_LENGTH NULL +NUMERIC_PRECISION 10 +NUMERIC_SCALE 0 +CHARACTER_SET_NAME NULL +COLLATION_NAME NULL +COLUMN_TYPE int(1) +COLUMN_KEY +EXTRA +PRIVILEGES select,insert,update,references +COLUMN_COMMENT +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_tablex +COLUMN_NAME col2 +ORDINAL_POSITION 2 +COLUMN_DEFAULT +IS_NULLABLE NO +DATA_TYPE varchar +CHARACTER_MAXIMUM_LENGTH 1 +CHARACTER_OCTET_LENGTH 1 +NUMERIC_PRECISION NULL +NUMERIC_SCALE NULL +CHARACTER_SET_NAME latin1 +COLLATION_NAME latin1_german1_ci +COLUMN_TYPE varchar(1) +COLUMN_KEY +EXTRA +PRIVILEGES select,insert,update,references +COLUMN_COMMENT +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1; +CREATE DATABASE db_datadict; +CREATE TABLE test.t1 (f1 BIGINT); +INSERT INTO information_schema.columns (table_schema,table_name,column_name) +VALUES('test','t1', 'f2'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.columns (table_schema,table_name,column_name) +VALUES('test','t2', 'f1'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.columns SET table_name = 't4' WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.columns WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.columns; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i3 ON information_schema.columns(table_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.columns ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.columns; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.columns RENAME db_datadict.columns; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.columns RENAME information_schema.xcolumns; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE test.t1; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result new file mode 100644 index 00000000000..d7f801f2dcd --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -0,0 +1,1130 @@ +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char(0), +f2 char(0) binary, +f3 char(0) ascii, +f4 tinytext unicode, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal, +f34 decimal unsigned, +f35 decimal zerofill, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = innodb; +Warnings: +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; +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 = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +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 tinytext, +f122 text, +f123 mediumtext, +f124 longtext unicode, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +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 = innodb; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; +drop table if exists tb4; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f235 char(0) unicode, +f236 char(90), +f237 char(255) ascii, +f238 varchar(0), +f239 varchar(20000) binary, +f240 varchar(2000) unicode, +f241 char(100) unicode +) engine = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; +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 = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +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 = InnoDB; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 +NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f1 1 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references +NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references +NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f2 2 NULL YES char 0 0 NULL NULL latin1 latin1_bin char(0) select,insert,update,references +NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb1 f3 3 NULL YES char 0 0 NULL NULL latin1 latin1_swedish_ci char(0) select,insert,update,references +NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f33 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f34 34 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f35 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references +NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references +NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references +NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references +NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references +NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references +NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references +NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references +NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb4 f235 52 NULL YES char 0 0 NULL NULL ucs2 ucs2_general_ci char(0) select,insert,update,references +NULL test tb4 f236 53 NULL YES char 90 90 NULL NULL latin1 latin1_swedish_ci char(90) select,insert,update,references +NULL test tb4 f237 54 NULL YES char 255 255 NULL NULL latin1 latin1_swedish_ci char(255) select,insert,update,references +NULL test tb4 f238 55 NULL YES varchar 0 0 NULL NULL latin1 latin1_swedish_ci varchar(0) select,insert,update,references +NULL test tb4 f239 56 NULL YES varchar 20000 20000 NULL NULL latin1 latin1_bin varchar(20000) select,insert,update,references +NULL test tb4 f240 57 NULL YES varchar 2000 4000 NULL NULL ucs2 ucs2_general_ci varchar(2000) select,insert,update,references +NULL test tb4 f241 58 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references +NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL 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 binary NULL NULL +1.0000 blob NULL NULL +1.0000 longblob NULL NULL +1.0000 mediumblob NULL NULL +1.0000 tinyblob NULL NULL +1.0000 char latin1 latin1_bin +1.0000 varchar latin1 latin1_bin +1.0000 char latin1 latin1_swedish_ci +1.0000 enum latin1 latin1_swedish_ci +1.0000 longtext latin1 latin1_swedish_ci +1.0000 mediumtext latin1 latin1_swedish_ci +1.0000 set latin1 latin1_swedish_ci +1.0000 text latin1 latin1_swedish_ci +1.0000 tinytext 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 +2.0000 char ucs2 ucs2_general_ci +2.0000 longtext 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 bigint NULL NULL +NULL date NULL NULL +NULL datetime NULL NULL +NULL decimal NULL NULL +NULL double NULL NULL +NULL double unsigned NULL NULL +NULL double unsigned zerofill NULL NULL +NULL float NULL NULL +NULL float unsigned NULL NULL +NULL float unsigned zerofill NULL NULL +NULL int NULL NULL +NULL mediumint NULL NULL +NULL smallint NULL NULL +NULL time NULL NULL +NULL timestamp NULL NULL +NULL tinyint NULL NULL +NULL year NULL NULL +NULL char latin1 latin1_bin +NULL char latin1 latin1_swedish_ci +NULL varchar latin1 latin1_swedish_ci +NULL char 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 +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) +NULL test tb1 f1 char 0 0 latin1 latin1_swedish_ci char(0) +NULL test tb1 f2 char 0 0 latin1 latin1_bin char(0) +NULL test tb1 f3 char 0 0 latin1 latin1_swedish_ci char(0) +2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext +1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext +1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob +1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) +NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) +NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f25 int NULL NULL NULL NULL int(11) +NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned +NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) +NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f73 double NULL NULL NULL NULL double +NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f77 double NULL NULL NULL NULL double +NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f81 float NULL NULL NULL NULL float +NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f85 float NULL NULL NULL NULL float +NULL test tb2 f86 float NULL NULL NULL NULL float +NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f93 float NULL NULL NULL NULL float +NULL test tb2 f94 double NULL NULL NULL NULL double +NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f101 date NULL NULL NULL NULL date +NULL test tb2 f102 time NULL NULL NULL NULL time +NULL test tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test tb2 f105 year NULL NULL NULL NULL year(4) +NULL test tb2 f106 year NULL NULL NULL NULL year(4) +NULL test tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext +1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob +1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) +NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) +NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f142 int NULL NULL NULL NULL int(11) +NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned +NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) +NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f190 double NULL NULL NULL NULL double +NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f194 double NULL NULL NULL NULL double +NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f198 float NULL NULL NULL NULL float +NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f202 float NULL NULL NULL NULL float +NULL test tb4 f203 float NULL NULL NULL NULL float +NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f210 float NULL NULL NULL NULL float +NULL test tb4 f211 double NULL NULL NULL NULL double +NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f218 date NULL NULL NULL NULL date +NULL test tb4 f219 time NULL NULL NULL NULL time +NULL test tb4 f220 datetime NULL NULL NULL NULL datetime +NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp +NULL test tb4 f222 year NULL NULL NULL NULL year(4) +NULL test tb4 f223 year NULL NULL NULL NULL year(4) +NULL test tb4 f224 year NULL NULL NULL NULL year(4) +1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +NULL test tb4 f235 char 0 0 ucs2 ucs2_general_ci char(0) +1.0000 test tb4 f236 char 90 90 latin1 latin1_swedish_ci char(90) +1.0000 test tb4 f237 char 255 255 latin1 latin1_swedish_ci char(255) +NULL test tb4 f238 varchar 0 0 latin1 latin1_swedish_ci varchar(0) +1.0000 test tb4 f239 varchar 20000 20000 latin1 latin1_bin varchar(20000) +2.0000 test tb4 f240 varchar 2000 4000 ucs2 ucs2_general_ci varchar(2000) +2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) +NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f73 double NULL NULL NULL NULL double +NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f77 double NULL NULL NULL NULL double +NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f81 float NULL NULL NULL NULL float +NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f85 float NULL NULL NULL NULL float +NULL test1 tb2 f86 float NULL NULL NULL NULL float +NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f93 float NULL NULL NULL NULL float +NULL test1 tb2 f94 double NULL NULL NULL NULL double +NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f101 date NULL NULL NULL NULL date +NULL test1 tb2 f102 time NULL NULL NULL NULL time +NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result new file mode 100644 index 00000000000..52566152f54 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -0,0 +1,380 @@ +SELECT * FROM information_schema.columns +WHERE table_schema = 'information_schema' +AND table_name <> 'profiling' +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 +NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select +NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select +NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select +NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select +NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select +NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select +NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select +NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select +NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select +NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select +NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select +NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select +NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select +NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select +NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select +NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select +NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select +NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select +NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select +NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select +NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select +NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select +NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select +NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select +NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select +NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +########################################################################## +# 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 = 'information_schema' +AND table_name <> 'profiling' +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 longtext utf8 utf8_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 = 'information_schema' +AND table_name <> 'profiling' +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 +3.0000 varchar utf8 utf8_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 = 'information_schema' +AND table_name <> 'profiling' +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 bigint NULL NULL +NULL datetime 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 = 'information_schema' +AND table_name <> 'profiling' +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 +3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) +NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11) +3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3) +NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) +3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10) +NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) +3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) +1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) +NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime +NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime +1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMATA SQL_PATH varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1) +3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2) +3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1) +NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21) +NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) +3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10) +3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16) +3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16) +3.0000 information_schema TABLES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime +3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) +3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6) +3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4) +1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9) +3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) +NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime +1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) +3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema VIEWS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result new file mode 100644 index 00000000000..154ad27e403 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -0,0 +1,1076 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = memory; +Warnings: +Note 1265 Data truncated for column 'f33' at row 1 +Note 1265 Data truncated for column 'f34' at row 1 +Note 1265 Data truncated for column 'f35' at row 1 +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; +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 = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +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 = memory; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; +drop table if exists tb4 ; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f236 char(95) unicode, +f241 char(255) unicode, +f237 char(130) binary, +f238 varchar(25000) binary, +f239 varbinary(0), +f240 varchar(1200) unicode +) engine = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; +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 = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +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 = MEMORY; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 +NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references +NULL test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb1 f22 14 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb1 f23 15 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f24 16 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb1 f30 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb1 f31 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f32 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references +NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f121 4 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references +NULL test tb3 f122 5 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references +NULL test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb3 f139 16 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb3 f140 17 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f141 18 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb3 f147 24 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references +NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references +NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references +NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references +NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references +NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references +NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL 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 binary NULL NULL +1.0000 char latin1 latin1_bin +1.0000 varchar latin1 latin1_bin +1.0000 char latin1 latin1_swedish_ci +1.0000 enum latin1 latin1_swedish_ci +1.0000 set 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 +2.0000 char ucs2 ucs2_general_ci +2.0000 varchar 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 bigint NULL NULL +NULL date NULL NULL +NULL datetime NULL NULL +NULL decimal NULL NULL +NULL double NULL NULL +NULL double unsigned NULL NULL +NULL double unsigned zerofill NULL NULL +NULL float NULL NULL +NULL float unsigned NULL NULL +NULL float unsigned zerofill NULL NULL +NULL int NULL NULL +NULL mediumint NULL NULL +NULL smallint NULL NULL +NULL time NULL NULL +NULL timestamp NULL NULL +NULL tinyint NULL NULL +NULL varbinary NULL NULL +NULL year 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 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) +NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) +NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f25 int NULL NULL NULL NULL int(11) +NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned +NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) +NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f73 double NULL NULL NULL NULL double +NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f77 double NULL NULL NULL NULL double +NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f81 float NULL NULL NULL NULL float +NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f85 float NULL NULL NULL NULL float +NULL test tb2 f86 float NULL NULL NULL NULL float +NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f93 float NULL NULL NULL NULL float +NULL test tb2 f94 double NULL NULL NULL NULL double +NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f101 date NULL NULL NULL NULL date +NULL test tb2 f102 time NULL NULL NULL NULL time +NULL test tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test tb2 f105 year NULL NULL NULL NULL year(4) +NULL test tb2 f106 year NULL NULL NULL NULL year(4) +NULL test tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f121 char 50 50 latin1 latin1_swedish_ci char(50) +1.0000 test tb3 f122 char 50 50 latin1 latin1_swedish_ci char(50) +1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) +NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) +NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f142 int NULL NULL NULL NULL int(11) +NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned +NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) +NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f190 double NULL NULL NULL NULL double +NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f194 double NULL NULL NULL NULL double +NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f198 float NULL NULL NULL NULL float +NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f202 float NULL NULL NULL NULL float +NULL test tb4 f203 float NULL NULL NULL NULL float +NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f210 float NULL NULL NULL NULL float +NULL test tb4 f211 double NULL NULL NULL NULL double +NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f218 date NULL NULL NULL NULL date +NULL test tb4 f219 time NULL NULL NULL NULL time +NULL test tb4 f220 datetime NULL NULL NULL NULL datetime +NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp +NULL test tb4 f222 year NULL NULL NULL NULL year(4) +NULL test tb4 f223 year NULL NULL NULL NULL year(4) +NULL test tb4 f224 year NULL NULL NULL NULL year(4) +1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +2.0000 test tb4 f236 char 95 190 ucs2 ucs2_general_ci char(95) +2.0000 test tb4 f241 char 255 510 ucs2 ucs2_general_ci char(255) +1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130) +1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000) +NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0) +2.0000 test tb4 f240 varchar 1200 2400 ucs2 ucs2_general_ci varchar(1200) +NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f73 double NULL NULL NULL NULL double +NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f77 double NULL NULL NULL NULL double +NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f81 float NULL NULL NULL NULL float +NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f85 float NULL NULL NULL NULL float +NULL test1 tb2 f86 float NULL NULL NULL NULL float +NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f93 float NULL NULL NULL NULL float +NULL test1 tb2 f94 double NULL NULL NULL NULL double +NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f101 date NULL NULL NULL NULL date +NULL test1 tb2 f102 time NULL NULL NULL NULL time +NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result new file mode 100644 index 00000000000..2365dda1b24 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -0,0 +1,1207 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f4 tinytext unicode, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = myisam; +Warnings: +Note 1265 Data truncated for column 'f33' at row 1 +Note 1265 Data truncated for column 'f34' at row 1 +Note 1265 Data truncated for column 'f35' at row 1 +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; +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", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +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 tinytext, +f122 text, +f123 mediumtext, +f124 longtext unicode, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +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 = myisam; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; +drop table if exists tb4 ; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f227 VARBINARY(64), +f228 VARBINARY(27), +f229 VARBINARY(64), +f230 VARBINARY(192), +f231 VARBINARY(192), +f232 VARBINARY(27), +f233 VARBINARY(64), +f234 VARBINARY(192), +f235 char(255) unicode, +f236 char(60) ascii, +f237 char(255) binary, +f238 varchar(0) binary, +f239 varbinary(1000), +f240 varchar(120) unicode, +f241 char(100) unicode, +f242 bit(30) +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; +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", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +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 = MyISAM; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 +NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references +NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references +NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references +NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references +NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references +NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references +NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references +NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references +NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references +NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references +NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references +NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references +NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references +NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references +NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references +NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references +NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references +NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references +NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references +NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references +NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references +NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references +NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references +NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references +NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references +NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references +NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references +NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references +NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references +NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references +NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references +NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references +NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references +NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references +NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references +NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references +NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references +NULL test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references +NULL test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references +NULL test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references +NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references +NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references +NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references +NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references +NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references +NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references +NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references +NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references +NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references +NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references +NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references +NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references +NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references +NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL 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 binary NULL NULL +1.0000 blob NULL NULL +1.0000 longblob NULL NULL +1.0000 mediumblob NULL NULL +1.0000 tinyblob NULL NULL +1.0000 varbinary NULL NULL +1.0000 char latin1 latin1_bin +1.0000 char latin1 latin1_swedish_ci +1.0000 enum latin1 latin1_swedish_ci +1.0000 longtext latin1 latin1_swedish_ci +1.0000 mediumtext latin1 latin1_swedish_ci +1.0000 set latin1 latin1_swedish_ci +1.0000 text latin1 latin1_swedish_ci +1.0000 tinytext 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 +2.0000 char ucs2 ucs2_general_ci +2.0000 longtext 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 bigint NULL NULL +NULL bit NULL NULL +NULL date NULL NULL +NULL datetime NULL NULL +NULL decimal NULL NULL +NULL double NULL NULL +NULL double unsigned NULL NULL +NULL double unsigned zerofill NULL NULL +NULL float NULL NULL +NULL float unsigned NULL NULL +NULL float unsigned zerofill NULL NULL +NULL int NULL NULL +NULL mediumint NULL NULL +NULL smallint NULL NULL +NULL time NULL NULL +NULL timestamp NULL NULL +NULL tinyint NULL NULL +NULL year NULL NULL +NULL varchar latin1 latin1_bin +--> 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 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) +2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext +1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext +1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob +1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) +NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) +NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb1 f25 int NULL NULL NULL NULL int(11) +NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned +NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) +NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb2 f73 double NULL NULL NULL NULL double +NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f77 double NULL NULL NULL NULL double +NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f81 float NULL NULL NULL NULL float +NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f85 float NULL NULL NULL NULL float +NULL test tb2 f86 float NULL NULL NULL NULL float +NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f93 float NULL NULL NULL NULL float +NULL test tb2 f94 double NULL NULL NULL NULL double +NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb2 f101 date NULL NULL NULL NULL date +NULL test tb2 f102 time NULL NULL NULL NULL time +NULL test tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test tb2 f105 year NULL NULL NULL NULL year(4) +NULL test tb2 f106 year NULL NULL NULL NULL year(4) +NULL test tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb2 f110 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f111 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb2 f112 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f113 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb2 f114 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb2 f115 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb2 f116 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb2 f117 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) +1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) +1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext +1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text +1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext +2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext +1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob +1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob +1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob +1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob +1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) +NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) +NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned +NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill +NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) +NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned +NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill +NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) +NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned +NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill +NULL test tb3 f142 int NULL NULL NULL NULL int(11) +NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned +NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill +NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) +NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned +NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill +NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) +NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) +NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) +NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test tb4 f190 double NULL NULL NULL NULL double +NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f194 double NULL NULL NULL NULL double +NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f198 float NULL NULL NULL NULL float +NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f202 float NULL NULL NULL NULL float +NULL test tb4 f203 float NULL NULL NULL NULL float +NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f210 float NULL NULL NULL NULL float +NULL test tb4 f211 double NULL NULL NULL NULL double +NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned +NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned +NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test tb4 f218 date NULL NULL NULL NULL date +NULL test tb4 f219 time NULL NULL NULL NULL time +NULL test tb4 f220 datetime NULL NULL NULL NULL datetime +NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp +NULL test tb4 f222 year NULL NULL NULL NULL year(4) +NULL test tb4 f223 year NULL NULL NULL NULL year(4) +NULL test tb4 f224 year NULL NULL NULL NULL year(4) +1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test tb4 f227 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f228 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb4 f229 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f230 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb4 f231 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192) +2.0000 test tb4 f235 char 255 510 ucs2 ucs2_general_ci char(255) +1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60) +1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255) +NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0) +1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000) +2.0000 test tb4 f240 varchar 120 240 ucs2 ucs2_general_ci varchar(120) +2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) +NULL test tb4 f242 bit NULL NULL NULL NULL bit(30) +NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned +NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill +NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) +NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) +NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned +NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned +NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill +NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill +NULL test1 tb2 f73 double NULL NULL NULL NULL double +NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f77 double NULL NULL NULL NULL double +NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f81 float NULL NULL NULL NULL float +NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f85 float NULL NULL NULL NULL float +NULL test1 tb2 f86 float NULL NULL NULL NULL float +NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f93 float NULL NULL NULL NULL float +NULL test1 tb2 f94 double NULL NULL NULL NULL double +NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned +NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned +NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill +NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill +NULL test1 tb2 f101 date NULL NULL NULL NULL date +NULL test1 tb2 f102 time NULL NULL NULL NULL time +NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime +NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp +NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) +NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) +1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') +1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') +1.0000 test1 tb2 f110 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f111 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test1 tb2 f112 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f113 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test1 tb2 f114 varbinary 192 192 NULL NULL varbinary(192) +1.0000 test1 tb2 f115 varbinary 27 27 NULL NULL varbinary(27) +1.0000 test1 tb2 f116 varbinary 64 64 NULL NULL varbinary(64) +1.0000 test1 tb2 f117 varbinary 192 192 NULL NULL varbinary(192) +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result new file mode 100644 index 00000000000..75960091e90 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -0,0 +1,361 @@ +SELECT * FROM information_schema.columns +WHERE table_schema = 'mysql' +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 +NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references +NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references +NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references +NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references +NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references +NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references +NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references +NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references +NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references +NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references +NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references +NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references +NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references +NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references +NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references +NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references +NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references +NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references +NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references +NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references +NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references +NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references +NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references +NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references +NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references +NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references +NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references +NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references +NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references +NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references +NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references +NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references +NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references +NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references +NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references +NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references +NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references +NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references +NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references +NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob 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 = 'mysql' +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 blob NULL NULL +1.0000 longblob NULL NULL +1.0000 char latin1 latin1_bin +1.0000 text utf8 utf8_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 = 'mysql' +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 +3.0000 char utf8 utf8_bin +3.0000 enum utf8 utf8_bin +3.0000 char utf8 utf8_general_ci +3.0000 enum utf8 utf8_general_ci +3.0000 set utf8 utf8_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 = 'mysql' +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 bigint NULL NULL +NULL int NULL NULL +NULL smallint NULL NULL +NULL timestamp NULL NULL +NULL tinyint 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 = 'mysql' +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 +3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) +NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') +3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) +NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) +3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) +3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') +NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) +NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned +1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text +1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text +3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) +3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') +3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL') +3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') +3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') +3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') +1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob +3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) +1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob +3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) +NULL mysql proc created timestamp NULL NULL NULL NULL timestamp +NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp +3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') +3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') +3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) +3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') +NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) +3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) +NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') +3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') +NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned +3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') +NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) +NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11) +3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64) +NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20) +NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned +NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) +NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned +3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) +3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) +3.0000 mysql user User char 16 48 utf8 utf8_bin char(16) +1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) +3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') +1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob +1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob +1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob +NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned +NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned diff --git a/mysql-test/suite/funcs_1/r/is_columns_ndb.result b/mysql-test/suite/funcs_1/r/is_columns_ndb.result new file mode 100644 index 00000000000..a1a1e076271 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_columns_ndb.result @@ -0,0 +1,223 @@ +SET @NO_REFRESH = IF( '' = '', 0, 1); +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 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 +NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references +NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references +NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references +NULL 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_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result new file mode 100644 index 00000000000..b4f222ff396 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result @@ -0,0 +1,370 @@ +SHOW TABLES FROM information_schema LIKE 'KEY_COLUMN_USAGE'; +Tables_in_information_schema (KEY_COLUMN_USAGE) +KEY_COLUMN_USAGE +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.KEY_COLUMN_USAGE; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.KEY_COLUMN_USAGE; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.KEY_COLUMN_USAGE; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.KEY_COLUMN_USAGE; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout +######################################################################### +DESCRIBE information_schema.KEY_COLUMN_USAGE; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(10) NO 0 +POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL +REFERENCED_TABLE_SCHEMA varchar(64) YES NULL +REFERENCED_TABLE_NAME varchar(64) YES NULL +REFERENCED_COLUMN_NAME varchar(64) YES NULL +SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE; +Table Create Table +KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( + `CONSTRAINT_CATALOG` varchar(512) default NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', + `CONSTRAINT_NAME` varchar(64) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `COLUMN_NAME` varchar(64) NOT NULL default '', + `ORDINAL_POSITION` bigint(10) NOT NULL default '0', + `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, + `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, + `REFERENCED_TABLE_NAME` varchar(64) default NULL, + `REFERENCED_COLUMN_NAME` varchar(64) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +COLUMN_NAME varchar(64) NO +ORDINAL_POSITION bigint(10) NO 0 +POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL +REFERENCED_TABLE_SCHEMA varchar(64) YES NULL +REFERENCED_TABLE_NAME varchar(64) YES NULL +REFERENCED_COLUMN_NAME varchar(64) YES NULL +SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, +table_schema, table_name, column_name +FROM information_schema.key_column_usage +WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; +constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name +######################################################################################## +# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information +######################################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +USE db_datadict; +CREATE TABLE t1_1 +(f1 INT NOT NULL, PRIMARY KEY(f1), +f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +GRANT SELECT ON t1_1 to 'testuser1'@'localhost'; +CREATE TABLE t1_2 +(f1 INT NOT NULL, PRIMARY KEY(f1), +f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +GRANT SELECT ON t1_2 to 'testuser2'@'localhost'; +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL +NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_1 f1 1 NULL NULL NULL NULL +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, +table_catalog, table_schema, table_name, ordinal_position; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME +NULL db_datadict PRIMARY NULL db_datadict t1_2 f1 1 NULL NULL NULL NULL +# Switch to connection default and close connections testuser1, testuser2 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP TABLE t1_1; +DROP TABLE t1_2; +DROP DATABASE IF EXISTS db_datadict; +######################################################################################## +# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications +######################################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table +(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +SELECT * FROM information_schema.key_column_usage +WHERE table_name = 't1_my_table'; +CONSTRAINT_CATALOG NULL +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME PRIMARY +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +COLUMN_NAME f1 +ORDINAL_POSITION 1 +POSITION_IN_UNIQUE_CONSTRAINT NULL +REFERENCED_TABLE_SCHEMA NULL +REFERENCED_TABLE_NAME NULL +REFERENCED_COLUMN_NAME NULL +CONSTRAINT_CATALOG NULL +CONSTRAINT_SCHEMA test +CONSTRAINT_NAME PRIMARY +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +COLUMN_NAME f2 +ORDINAL_POSITION 2 +POSITION_IN_UNIQUE_CONSTRAINT NULL +REFERENCED_TABLE_SCHEMA NULL +REFERENCED_TABLE_NAME NULL +REFERENCED_COLUMN_NAME NULL +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f1 +t1_my_tablex f2 +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f2 +t1_my_tablex first_col +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict f2 db_datadict t1_my_tablex f2 1 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f2 1 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col); +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict my_idx db_datadict t1_my_tablex first_col 2 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict my_idx db_datadict t1_my_tablex first_col 2 +db_datadict PRIMARY db_datadict t1_my_tablex first_col 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 2 +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, +table_name, ordinal_position; +constraint_schema constraint_name table_schema table_name column_name ordinal_position +db_datadict my_idx db_datadict t1_my_tablex f4 1 +db_datadict PRIMARY db_datadict t1_my_tablex f2 1 +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +table_name column_name +t1_my_tablex f2 +t1_my_tablex f4 +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name column_name +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.key_column_usage +(constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.key_column_usage +SELECT * FROM information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.key_column_usage +SET table_name = 'db1' WHERE constraint_name = 'primary'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.key_column_usage WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i3 ON information_schema.key_column_usage(table_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage +RENAME db_datadict.key_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.key_column_usage +RENAME information_schema.xkey_column_usage; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_routines.result b/mysql-test/suite/funcs_1/r/is_routines.result new file mode 100644 index 00000000000..497ebf946c0 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_routines.result @@ -0,0 +1,605 @@ +SHOW TABLES FROM information_schema LIKE 'ROUTINES'; +Tables_in_information_schema (ROUTINES) +ROUTINES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.ROUTINES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ROUTINES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.ROUTINES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.ROUTINES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout +######################################################################### +DESCRIBE information_schema.ROUTINES; +Field Type Null Key Default Extra +SPECIFIC_NAME varchar(64) NO +ROUTINE_CATALOG varchar(512) YES NULL +ROUTINE_SCHEMA varchar(64) NO +ROUTINE_NAME varchar(64) NO +ROUTINE_TYPE varchar(9) NO +DTD_IDENTIFIER varchar(64) YES NULL +ROUTINE_BODY varchar(8) NO +ROUTINE_DEFINITION longtext YES NULL +EXTERNAL_NAME varchar(64) YES NULL +EXTERNAL_LANGUAGE varchar(64) YES NULL +PARAMETER_STYLE varchar(8) NO +IS_DETERMINISTIC varchar(3) NO +SQL_DATA_ACCESS varchar(64) NO +SQL_PATH varchar(64) YES NULL +SECURITY_TYPE varchar(7) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +SQL_MODE longtext NO NULL +ROUTINE_COMMENT varchar(64) NO +DEFINER varchar(77) NO +SHOW CREATE TABLE information_schema.ROUTINES; +Table Create Table +ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( + `SPECIFIC_NAME` varchar(64) NOT NULL default '', + `ROUTINE_CATALOG` varchar(512) default NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', + `ROUTINE_NAME` varchar(64) NOT NULL default '', + `ROUTINE_TYPE` varchar(9) NOT NULL default '', + `DTD_IDENTIFIER` varchar(64) default NULL, + `ROUTINE_BODY` varchar(8) NOT NULL default '', + `ROUTINE_DEFINITION` longtext, + `EXTERNAL_NAME` varchar(64) default NULL, + `EXTERNAL_LANGUAGE` varchar(64) default NULL, + `PARAMETER_STYLE` varchar(8) NOT NULL default '', + `IS_DETERMINISTIC` varchar(3) NOT NULL default '', + `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', + `SQL_PATH` varchar(64) default NULL, + `SECURITY_TYPE` varchar(7) NOT NULL default '', + `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', + `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', + `SQL_MODE` longtext NOT NULL, + `ROUTINE_COMMENT` varchar(64) NOT NULL default '', + `DEFINER` varchar(77) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.ROUTINES; +Field Type Null Key Default Extra +SPECIFIC_NAME varchar(64) NO +ROUTINE_CATALOG varchar(512) YES NULL +ROUTINE_SCHEMA varchar(64) NO +ROUTINE_NAME varchar(64) NO +ROUTINE_TYPE varchar(9) NO +DTD_IDENTIFIER varchar(64) YES NULL +ROUTINE_BODY varchar(8) NO +ROUTINE_DEFINITION longtext YES NULL +EXTERNAL_NAME varchar(64) YES NULL +EXTERNAL_LANGUAGE varchar(64) YES NULL +PARAMETER_STYLE varchar(8) NO +IS_DETERMINISTIC varchar(3) NO +SQL_DATA_ACCESS varchar(64) NO +SQL_PATH varchar(64) YES NULL +SECURITY_TYPE varchar(7) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +SQL_MODE longtext NO NULL +ROUTINE_COMMENT varchar(64) NO +DEFINER varchar(77) NO +USE test; +DROP PROCEDURE IF EXISTS sp_for_routines; +DROP FUNCTION IF EXISTS function_for_routines; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type, +routine_body,external_name,external_language,parameter_style,sql_path +FROM information_schema.routines +WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL +OR external_language IS NOT NULL OR sql_path IS NOT NULL +OR routine_body <> 'SQL' OR parameter_style <> 'SQL' + OR specific_name <> routine_name; +specific_name routine_catalog routine_schema routine_name routine_type routine_body external_name external_language parameter_style sql_path +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +################################################################################ +# Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = ; +INSERT INTO res_6_408002_1(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1989-11-09', 0815); +DROP PROCEDURE IF EXISTS sp_6_408002_1; +CREATE PROCEDURE sp_6_408002_1() +BEGIN +SELECT * FROM db_datadict.res_6_408002_1; +END// +CREATE DATABASE db_datadict_2; +USE db_datadict_2; +CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = ; +INSERT INTO res_6_408002_2(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1990-10-03', 4711); +DROP PROCEDURE IF EXISTS sp_6_408002_2; +CREATE PROCEDURE sp_6_408002_2() +BEGIN +SELECT * FROM db_datadict_2.res_6_408002_2; +END// +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost'; +GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 +TO 'testuser2'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; +FLUSH PRIVILEGES; +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.routines; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +USE test; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications +######################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +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 +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +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 +ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; +ALTER FUNCTION function_for_routines COMMENT 'updated comments'; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +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 updated comments +DEFINER root@localhost +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +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 +DEFINER root@localhost +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +SPECIFIC_NAME function_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME function_for_routines +ROUTINE_TYPE FUNCTION +DTD_IDENTIFIER int(11) +ROUTINE_BODY SQL +ROUTINE_DEFINITION RETURN 0 +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 +SPECIFIC_NAME sp_for_routines +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_for_routines +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION SELECT 'db_datadict' +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 +use test; +DROP DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +######################################################################### +# 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for +# ROUTINE_DEFINITION column +######################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE TABLE db_datadict.res_6_408004_1 +(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = ; +INSERT INTO db_datadict.res_6_408004_1 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +CREATE TABLE db_datadict.res_6_408004_2 +(f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = ; +INSERT INTO db_datadict.res_6_408004_2 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +# Checking the max. possible length of (currently) 4 GByte is not +# in this environment here. +CREATE PROCEDURE sp_6_408004 () +BEGIN +DECLARE done INTEGER DEFAULt 0; +DECLARE variable_number_1 LONGTEXT; +DECLARE variable_number_2 MEDIUMINT; +DECLARE variable_number_3 LONGBLOB; +DECLARE variable_number_4 REAL; +DECLARE variable_number_5 YEAR; +DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +BEGIN +OPEN cursor_number_1; +WHILE done <> 1 DO +FETCH cursor_number_1 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +BEGIN +BEGIN +SET done = 0; +OPEN cursor_number_2; +WHILE done <> 1 DO +FETCH cursor_number_2 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +SET done = 0; +OPEN cursor_number_3; +WHILE done <> 1 DO +FETCH cursor_number_3 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +END; +BEGIN +SET done = 0; +OPEN cursor_number_4; +WHILE done <> 1 DO +FETCH cursor_number_4 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +BEGIN +SET done = 0; +OPEN cursor_number_5; +WHILE done <> 1 DO +FETCH cursor_number_5 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +END// +CALL db_datadict.sp_6_408004 (); +@a +test row +@a +test row +@a +test row +@a +test row +@a +test row +@a +test row +SELECT * FROM db_datadict.res_6_408004_2; +f1 f2 f3 f4 f5 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +abc 98765 99999999 98765 2010 +SELECT *, LENGTH(routine_definition) FROM information_schema.routines +WHERE routine_schema = 'db_datadict'; +SPECIFIC_NAME sp_6_408004 +ROUTINE_CATALOG NULL +ROUTINE_SCHEMA db_datadict +ROUTINE_NAME sp_6_408004 +ROUTINE_TYPE PROCEDURE +DTD_IDENTIFIER NULL +ROUTINE_BODY SQL +ROUTINE_DEFINITION BEGIN +DECLARE done INTEGER DEFAULt 0; +DECLARE variable_number_1 LONGTEXT; +DECLARE variable_number_2 MEDIUMINT; +DECLARE variable_number_3 LONGBLOB; +DECLARE variable_number_4 REAL; +DECLARE variable_number_5 YEAR; +DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; +DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; +BEGIN +OPEN cursor_number_1; +WHILE done <> 1 DO +FETCH cursor_number_1 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +BEGIN +BEGIN +SET done = 0; +OPEN cursor_number_2; +WHILE done <> 1 DO +FETCH cursor_number_2 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +SET done = 0; +OPEN cursor_number_3; +WHILE done <> 1 DO +FETCH cursor_number_3 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES(variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +END; +BEGIN +SET done = 0; +OPEN cursor_number_4; +WHILE done <> 1 DO +FETCH cursor_number_4 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +BEGIN +SET done = 0; +OPEN cursor_number_5; +WHILE done <> 1 DO +FETCH cursor_number_5 +INTO variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5; +IF done <> 0 THEN +INSERT INTO res_6_408004_2 +VALUES (variable_number_1, variable_number_2, variable_number_3, +variable_number_4, variable_number_5); +END IF; +END WHILE; +END; +BEGIN +SET @a='test row'; +SELECT @a; +SELECT @a; +SELECT @a; +END; +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 YYYY-MM-DD hh:mm:ss +LAST_ALTERED YYYY-MM-DD hh:mm:ss +SQL_MODE +ROUTINE_COMMENT +DEFINER root@localhost +LENGTH(routine_definition) 2549 +DROP DATABASE db_datadict; +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +USE test; +INSERT INTO information_schema.routines (routine_name, routine_type ) +VALUES ('p2', 'procedure'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.routines SET routine_name = 'p2' +WHERE routine_body = 'sql'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i7 ON information_schema.routines (routine_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines DISCARD TABLESPACE; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.routines ; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines RENAME db_datadict.routines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.routines RENAME information_schema.xroutines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result new file mode 100644 index 00000000000..b99ef8dd684 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result @@ -0,0 +1,304 @@ +SHOW TABLES FROM information_schema LIKE 'SCHEMA_PRIVILEGES'; +Tables_in_information_schema (SCHEMA_PRIVILEGES) +SCHEMA_PRIVILEGES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMA_PRIVILEGES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMA_PRIVILEGES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.SCHEMA_PRIVILEGES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.SCHEMA_PRIVILEGES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.15.1: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES layout +######################################################################### +DESCRIBE information_schema.SCHEMA_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SHOW CREATE TABLE information_schema.SCHEMA_PRIVILEGES; +Table Create Table +SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( + `GRANTEE` varchar(81) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', + `IS_GRANTABLE` varchar(3) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.SCHEMA_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SELECT GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, PRIVILEGE_TYPE +FROM information_schema.schema_privileges WHERE table_catalog IS NOT NULL; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE +############################################################################### +# Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility +############################################################################### +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +DROP DATABASE IF EXISTS db_datadict_3; +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; +CREATE DATABASE db_datadict_3; +CREATE TABLE db_datadict_2.t1(f1 INT, f2 INT, f3 INT) +ENGINE = MEMORY; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +GRANT INSERT ON db_datadict_1.* TO 'testuser1'@'localhost'; +GRANT INSERT ON db_datadict_2.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_4.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON db_datadict_3.* TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_1.* TO 'testuser2'@'localhost'; +# Establish connection testuser1 (user=testuser1) +GRANT SELECT ON db_datadict_4.* TO 'testuser2'@'localhost'; +# Root granted INSERT db_datadict_1 to me -> visible +# Root granted SELECT db_datadict_1 to testuser2 -> invisible +# Root granted INSERT db_datadict_2.t1 (no schema-level priv!) +# but not db_datadict_2 to me -> invisible +# Root granted SELECT db_datadict_3. to testuser2 but not to me -> invisible +# Root granted SELECT db_datadict_4. to me -> visible +# I granted SELECT db_datadict_4. to testuser2 -> invisible (reality), visible(requirement) +# FIXME +SELECT * FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_datadict%' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict_1 INSERT NO +'testuser1'@'localhost' NULL db_datadict_4 SELECT YES +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT INSERT ON `db_datadict_1`.* TO 'testuser1'@'localhost' +GRANT SELECT ON `db_datadict_4`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT INSERT ON `db_datadict_2`.`t1` TO 'testuser1'@'localhost' +SHOW GRANTS FOR 'testuser2'@'localhost'; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' +# Establish connection testuser2 (user=testuser2) +# Root granted SELECT db_datadict_1 to me -> visible +# Root granted INSERT db_datadict_1 to testuser1 -> invisible +# Root granted INSERT db_datadict_2.t1 but not db_datadict_1 to testuser1 -> invisible +# Root granted SELECT db_datadict_3. to me -> visible +# testuser1 granted SELECT db_datadict_4. to me -> visible +SELECT * FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_datadict%' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser2'@'localhost' NULL db_datadict_1 SELECT NO +'testuser2'@'localhost' NULL db_datadict_3 SELECT NO +'testuser2'@'localhost' NULL db_datadict_4 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_3`.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_1`.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_4`.* TO 'testuser2'@'localhost' +# Switch to connection default and close connections testuser1 and testuser2 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_datadict%' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict_1 INSERT NO +'testuser1'@'localhost' NULL db_datadict_4 SELECT YES +'testuser2'@'localhost' NULL db_datadict_1 SELECT NO +'testuser2'@'localhost' NULL db_datadict_3 SELECT NO +'testuser2'@'localhost' NULL db_datadict_4 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT INSERT ON `db_datadict_1`.* TO 'testuser1'@'localhost' +GRANT SELECT ON `db_datadict_4`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT INSERT ON `db_datadict_2`.`t1` TO 'testuser1'@'localhost' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_3`.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_1`.* TO 'testuser2'@'localhost' +GRANT SELECT ON `db_datadict_4`.* TO 'testuser2'@'localhost' +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; +DROP DATABASE db_datadict_3; +################################################################################ +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES modifications +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'the_user'@'localhost'; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON test.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +# Switch to connection default +GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict UPDATE NO +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict UPDATE NO +# Switch to connection default +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT NO +'testuser1'@'localhost' NULL db_datadict UPDATE NO +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT NO +'testuser1'@'localhost' NULL db_datadict UPDATE NO +# Switch to connection default +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +'testuser1'@'localhost' NULL db_datadict UPDATE YES +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +'testuser1'@'localhost' NULL db_datadict UPDATE YES +# Switch to connection default +DROP SCHEMA db_datadict; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +'testuser1'@'localhost' NULL db_datadict UPDATE YES +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +'testuser1'@'localhost' NULL db_datadict UPDATE YES +# Switch to connection default +REVOKE UPDATE ON db_datadict.* FROM 'testuser1'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict SELECT YES +# Switch to connection default +RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'the_user'@'localhost' NULL db_datadict SELECT YES +# Switch to connection testuser1 +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'the_user'@'localhost' NULL db_datadict SELECT YES +# Close connection testuser1 +# Establish connection the_user (user=the_user) +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'the_user'@'localhost' NULL db_datadict SELECT YES +# Close connection the_user +# Switch to connection default +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +'the_user'@'localhost' NULL db_datadict SELECT YES +DROP USER 'the_user'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +INSERT INTO information_schema.schema_privileges +SELECT * FROM information_schema.schema_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.schema_privileges SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.schema_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_tables +ON information_schema.schema_privileges(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schema_privileges ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.schema_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schema_privileges +RENAME db_datadict.schema_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schema_privileges +RENAME information_schema.xschema_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result new file mode 100644 index 00000000000..36f365a6054 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result @@ -0,0 +1,51 @@ +############################################################################## +# Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information +############################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY grantee, table_schema, privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +''@'%' NULL test ALTER NO +''@'%' NULL test CREATE NO +''@'%' NULL test CREATE ROUTINE NO +''@'%' NULL test CREATE TEMPORARY TABLES NO +''@'%' NULL test CREATE VIEW NO +''@'%' NULL test DELETE NO +''@'%' NULL test DROP NO +''@'%' NULL test INDEX NO +''@'%' NULL test INSERT NO +''@'%' NULL test LOCK TABLES NO +''@'%' NULL test REFERENCES NO +''@'%' NULL test SELECT NO +''@'%' NULL test SHOW VIEW NO +''@'%' NULL test UPDATE NO +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +mysql +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.schema_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY grantee, table_schema, privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_schemata.result b/mysql-test/suite/funcs_1/r/is_schemata.result new file mode 100644 index 00000000000..7230e967cf0 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_schemata.result @@ -0,0 +1,181 @@ +SHOW TABLES FROM information_schema LIKE 'SCHEMATA'; +Tables_in_information_schema (SCHEMATA) +SCHEMATA +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.SCHEMATA; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.SCHEMATA; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.SCHEMATA; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.SCHEMATA; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout; +######################################################################### +DESCRIBE information_schema.SCHEMATA; +Field Type Null Key Default Extra +CATALOG_NAME varchar(512) YES NULL +SCHEMA_NAME varchar(64) NO +DEFAULT_CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATION_NAME varchar(64) NO +SQL_PATH varchar(512) YES NULL +SHOW CREATE TABLE information_schema.SCHEMATA; +Table Create Table +SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( + `CATALOG_NAME` varchar(512) default NULL, + `SCHEMA_NAME` varchar(64) NOT NULL default '', + `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', + `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', + `SQL_PATH` varchar(512) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.SCHEMATA; +Field Type Null Key Default Extra +CATALOG_NAME varchar(512) YES NULL +SCHEMA_NAME varchar(64) NO +DEFAULT_CHARACTER_SET_NAME varchar(64) NO +DEFAULT_COLLATION_NAME varchar(64) NO +SQL_PATH varchar(512) YES NULL +SELECT catalog_name, schema_name, sql_path +FROM information_schema.schemata +WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL; +catalog_name schema_name sql_path +############################################################################### +# Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +############################################################################### +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost'; +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict_1 latin1 latin1_swedish_ci NULL +NULL db_datadict_2 latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +db_datadict_1 +db_datadict_2 +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +SHOW DATABASES LIKE 'db_datadict_%'; +Database (db_datadict_%) +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; +################################################################################# +# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications +################################################################################# +DROP DATABASE IF EXISTS db_datadict; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL db_datadict latin1 latin1_swedish_ci NULL +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name default_character_set_name +db_datadict latin1 +ALTER SCHEMA db_datadict CHARACTER SET 'utf8'; +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name default_character_set_name +db_datadict utf8 +ALTER SCHEMA db_datadict CHARACTER SET 'latin1'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +schema_name default_collation_name +db_datadict latin1_swedish_ci +ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +schema_name default_collation_name +db_datadict latin1_general_cs +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name +db_datadict +DROP DATABASE db_datadict; +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +schema_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +INSERT INTO information_schema.schemata +(catalog_name, schema_name, default_character_set_name, sql_path) +VALUES (NULL, 'db1', 'latin1', NULL); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.schemata +SELECT * FROM information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.schemata +SET default_character_set_name = 'utf8' +WHERE schema_name = 'db_datadict'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.schemata SET catalog_name = 't_4711'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i1 ON information_schema.schemata(schema_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.schemata RENAME information_schema.xschemata; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result new file mode 100644 index 00000000000..05ea3a79aa3 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_schemata_is_mysql_test.result @@ -0,0 +1,42 @@ +################################################################################# +# Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +################################################################################# +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.schemata +WHERE schema_name IN ('information_schema','mysql','test') +ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL information_schema utf8 utf8_general_ci NULL +NULL mysql latin1 latin1_swedish_ci NULL +NULL test latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +mysql +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.schemata +WHERE schema_name IN ('information_schema','mysql','test') +ORDER BY schema_name; +CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH +NULL information_schema utf8 utf8_general_ci NULL +NULL test latin1 latin1_swedish_ci NULL +SHOW DATABASES LIKE 'information_schema'; +Database (information_schema) +information_schema +SHOW DATABASES LIKE 'mysql'; +Database (mysql) +SHOW DATABASES LIKE 'test'; +Database (test) +test +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result new file mode 100644 index 00000000000..b2ca2fb2cb7 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -0,0 +1,352 @@ +SHOW TABLES FROM information_schema LIKE 'STATISTICS'; +Tables_in_information_schema (STATISTICS) +STATISTICS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.STATISTICS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.STATISTICS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.STATISTICS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.STATISTICS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.14.1: INFORMATION_SCHEMA.STATISTICS layout +######################################################################### +DESCRIBE information_schema.STATISTICS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +NON_UNIQUE bigint(1) NO 0 +INDEX_SCHEMA varchar(64) NO +INDEX_NAME varchar(64) NO +SEQ_IN_INDEX bigint(2) NO 0 +COLUMN_NAME varchar(64) NO +COLLATION varchar(1) YES NULL +CARDINALITY bigint(21) YES NULL +SUB_PART bigint(3) YES NULL +PACKED varchar(10) YES NULL +NULLABLE varchar(3) NO +INDEX_TYPE varchar(16) NO +COMMENT varchar(16) YES NULL +SHOW CREATE TABLE information_schema.STATISTICS; +Table Create Table +STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `NON_UNIQUE` bigint(1) NOT NULL default '0', + `INDEX_SCHEMA` varchar(64) NOT NULL default '', + `INDEX_NAME` varchar(64) NOT NULL default '', + `SEQ_IN_INDEX` bigint(2) NOT NULL default '0', + `COLUMN_NAME` varchar(64) NOT NULL default '', + `COLLATION` varchar(1) default NULL, + `CARDINALITY` bigint(21) default NULL, + `SUB_PART` bigint(3) default NULL, + `PACKED` varchar(10) default NULL, + `NULLABLE` varchar(3) NOT NULL default '', + `INDEX_TYPE` varchar(16) NOT NULL default '', + `COMMENT` varchar(16) default NULL +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.STATISTICS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +NON_UNIQUE bigint(1) NO 0 +INDEX_SCHEMA varchar(64) NO +INDEX_NAME varchar(64) NO +SEQ_IN_INDEX bigint(2) NO 0 +COLUMN_NAME varchar(64) NO +COLLATION varchar(1) YES NULL +CARDINALITY bigint(21) YES NULL +SUB_PART bigint(3) YES NULL +PACKED varchar(10) YES NULL +NULLABLE varchar(3) NO +INDEX_TYPE varchar(16) NO +COMMENT varchar(16) YES NULL +SELECT table_catalog, table_schema, table_name, index_schema, index_name +FROM information_schema.statistics WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name index_schema index_name +#################################################################################### +# Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information +#################################################################################### +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +CREATE DATABASE db_datadict; +CREATE DATABASE db_datadict_2; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +CREATE TABLE db_datadict.t1 +(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +CREATE TABLE db_datadict.t2 +(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = ; +CREATE TABLE db_datadict_2.t3 +(f1 INT NOT NULL, f2 INT, f5 DATE, +PRIMARY KEY(f1), INDEX f2f1_ind(f2,f1), UNIQUE(f5)) +ENGINE = MEMORY; +CREATE TABLE db_datadict_2.t4 +(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = MEMORY; +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict t2 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict t2 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +SHOW GRANTS FOR 'testuser2'@'localhost'; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +# Switch to connection default +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT(f1,f5) ON db_datadict_2.t3 TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict t2 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict t2 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t4 1 db_datadict_2 f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT SELECT ON `db_datadict`.`t1` TO 'testuser1'@'localhost' WITH GRANT OPTION +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL db_datadict t1 1 db_datadict f2_ind 1 f2 NULL 0 NULL NULL YES HASH +NULL db_datadict t1 0 db_datadict PRIMARY 1 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +GRANT SELECT ON `db_datadict`.`t1` TO 'testuser1'@'localhost' WITH GRANT OPTION +SHOW GRANTS FOR 'testuser2'@'localhost'; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' +# Switch to connection testuser2 +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: Access denied for user 'testuser2'@'localhost' to database 'mysql' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +# Switch to connection default +REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost'; +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +# Switch to connection testuser1 +SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 1 f2 NULL NULL NULL NULL YES HASH +NULL db_datadict_2 t3 1 db_datadict_2 f2f1_ind 2 f1 NULL 0 NULL NULL HASH +NULL db_datadict_2 t3 0 db_datadict_2 f5 1 f5 NULL 0 NULL NULL YES HASH +NULL db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO 'testuser1'@'localhost' +# Switch to connection default and close connections testuser1, testuser2 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.STATISTICS modifications +######################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE test.t1_1 (f1 BIGINT, +f2 TEXT, f2x TEXT, f3 CHAR(10), f3x CHAR(10), f4 BIGINT, f4x BIGINT, +f5 POINT, f5x POINT NOT NULL) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +CREATE TABLE test.t1_2 (f1 BIGINT, f2 BIGINT) +ENGINE = ; +SELECT table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +table_name +ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1,f3); +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL test t1_1 0 test PRIMARY 1 f1 A NULL NULL NULL BTREE +NULL test t1_1 0 test PRIMARY 2 f3 A 0 NULL NULL BTREE +ALTER TABLE test.t1_1 DROP PRIMARY KEY; +SELECT table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +table_name +ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1); +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL test t1_1 0 test PRIMARY 1 f1 A 0 NULL NULL BTREE +ALTER TABLE test.t1_1 ADD INDEX (f4); +CREATE INDEX f3_f1 ON test.t1_1 (f3,f1); +CREATE UNIQUE INDEX f4x_uni ON test.t1_1 (f4x); +CREATE INDEX f2_hash USING HASH ON test.t1_2 (f2); +CREATE INDEX f1_idx ON test.t1_2 (f1) COMMENT = '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 'COMMENT = 'COMMENT'' at line 1 +CREATE INDEX not_null ON test.t1_1 (f3x); +CREATE INDEX f2_prefix ON test.t1_1 (f2(20)); +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%' AND index_name <> 'PRIMARY' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL test t1_1 1 test f2_prefix 1 f2 A NULL 20 NULL YES BTREE +NULL test t1_1 1 test f3_f1 1 f3 A NULL NULL NULL BTREE +NULL test t1_1 1 test f3_f1 2 f1 A NULL NULL NULL BTREE +NULL test t1_1 1 test f4 1 f4 A NULL NULL NULL YES BTREE +NULL test t1_1 0 test f4x_uni 1 f4x A NULL NULL NULL YES BTREE +NULL test t1_1 1 test not_null 1 f3x A NULL NULL NULL YES BTREE +NULL test t1_2 1 test f2_hash 1 f2 NULL 0 NULL NULL YES HASH +DROP TABLE test.t1_2; +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1'; +table_name +t1_1 +RENAME TABLE test.t1_1 TO test.t1_1x; +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +table_name +t1_1x +SELECT DISTINCT table_schema,table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_1%'; +table_schema table_name +test t1_1x +RENAME TABLE test.t1_1x TO db_datadict.t1_1x; +SELECT DISTINCT table_schema,table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_1%'; +table_schema table_name +db_datadict t1_1x +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +table_name +t1_1x +DROP TABLE db_datadict.t1_1x; +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +table_name +CREATE TEMPORARY TABLE test.t1_1x (PRIMARY KEY(f1,f2)) +ENGINE = +AS SELECT 1 AS f1, 2 AS f2; +SELECT * FROM information_schema.statistics +WHERE table_name = 't1_1x'; +DROP TEMPORARY TABLE test.t1_1x; +CREATE TABLE db_datadict.t1_1x (PRIMARY KEY(f1)) +ENGINE = +AS SELECT 1 AS f1, 2 AS f2; +SELECT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +table_name +t1_1x +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +table_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.statistics +SELECT * FROM information_schema.statistics; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.statistics SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.statistics WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.statistics; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_statistics +ON information_schema.statistics(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.statistics DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.statistics ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.statistics; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.statistics RENAME db_datadict.statistics; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.statistics RENAME information_schema.xstatistics; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_statistics_is.result b/mysql-test/suite/funcs_1/r/is_statistics_is.result new file mode 100644 index 00000000000..165c1ee08e2 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_statistics_is.result @@ -0,0 +1,17 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.statistics +WHERE table_schema = 'information_schema' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.statistics +WHERE table_schema = 'information_schema' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result new file mode 100644 index 00000000000..83425b4dd4e --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result @@ -0,0 +1,60 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.statistics +WHERE table_schema = 'mysql' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +NULL mysql columns_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE +NULL mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_keyword 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 1 help_keyword_id A #CARD# NULL NULL BTREE +NULL mysql help_relation 0 mysql PRIMARY 2 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE +NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE +NULL mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE +NULL mysql procs_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE +NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE +NULL mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE +NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE +NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE +NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE +NULL mysql user 0 mysql PRIMARY 2 User A #CARD# NULL NULL BTREE +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.statistics +WHERE table_schema = 'mysql' +ORDER BY table_schema, table_name, index_name, seq_in_index, column_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result new file mode 100644 index 00000000000..d2ca58aade6 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -0,0 +1,310 @@ +SHOW TABLES FROM information_schema LIKE 'TABLE_CONSTRAINTS'; +Tables_in_information_schema (TABLE_CONSTRAINTS) +TABLE_CONSTRAINTS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLE_CONSTRAINTS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLE_CONSTRAINTS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TABLE_CONSTRAINTS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TABLE_CONSTRAINTS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout +######################################################################### +DESCRIBE information_schema.TABLE_CONSTRAINTS; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +CONSTRAINT_TYPE varchar(64) NO +SHOW CREATE TABLE information_schema.TABLE_CONSTRAINTS; +Table Create Table +TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( + `CONSTRAINT_CATALOG` varchar(512) default NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', + `CONSTRAINT_NAME` varchar(64) NOT NULL default '', + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `CONSTRAINT_TYPE` varchar(64) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TABLE_CONSTRAINTS; +Field Type Null Key Default Extra +CONSTRAINT_CATALOG varchar(512) YES NULL +CONSTRAINT_SCHEMA varchar(64) NO +CONSTRAINT_NAME varchar(64) NO +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +CONSTRAINT_TYPE varchar(64) NO +SELECT constraint_catalog, constraint_schema, constraint_name, +table_schema, table_name +FROM information_schema.table_constraints +WHERE constraint_catalog IS NOT NULL; +constraint_catalog constraint_schema constraint_name table_schema table_name +######################################################################################### +# Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information +######################################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, +f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) +ENGINE = ; +CREATE UNIQUE INDEX my_idx1 ON db_datadict.t1(f6,f1); +CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3); +CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, +f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5) ON `db_datadict`.`t1` TO 'testuser1'@'localhost' +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'db_datadict' +ORDER BY table_schema,table_name, constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL db_datadict my_idx1 db_datadict t1 UNIQUE +NULL db_datadict my_idx2 db_datadict t1 UNIQUE +NULL db_datadict PRIMARY db_datadict t1 PRIMARY KEY +NULL db_datadict PRIMARY db_datadict t2 PRIMARY KEY +SHOW INDEXES FROM db_datadict.t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 f1 ### ### ### ### ### ### ### +t1 0 PRIMARY 2 f2 ### ### ### ### ### ### ### +t1 0 my_idx1 1 f6 ### ### ### ### ### ### ### +t1 0 my_idx1 2 f1 ### ### ### ### ### ### ### +t1 0 my_idx2 1 f3 ### ### ### ### ### ### ### +SHOW INDEXES FROM db_datadict.t2; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t2 0 PRIMARY 1 f1 ### ### ### ### ### ### ### +t2 0 PRIMARY 2 f2 ### ### ### ### ### ### ### +# Establish connection testuser1 (user=testuser1) +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT (f5) ON `db_datadict`.`t1` TO 'testuser1'@'localhost' +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'db_datadict' +ORDER BY table_schema,table_name, constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL db_datadict my_idx1 db_datadict t1 UNIQUE +NULL db_datadict my_idx2 db_datadict t1 UNIQUE +NULL db_datadict PRIMARY db_datadict t1 PRIMARY KEY +SHOW INDEXES FROM db_datadict.t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 0 PRIMARY 1 f1 ### ### ### ### ### ### ### +t1 0 PRIMARY 2 f2 ### ### ### ### ### ### ### +t1 0 my_idx1 1 f6 ### ### ### ### ### ### ### +t1 0 my_idx1 2 f1 ### ### ### ### ### ### ### +t1 0 my_idx2 1 f3 ### ### ### ### ### ### ### +SHOW INDEXES FROM db_datadict.t2; +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2' +# Switch to connection default and close connection testuser1 +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; +######################################################################################### +# Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications +######################################################################################### +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table +(f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +SELECT constraint_name, table_schema, table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_table'; +constraint_name table_schema table_name constraint_type +PRIMARY test t1_my_table PRIMARY KEY +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT table_schema,table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict f2 db_datadict t1_my_tablex UNIQUE +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +DROP INDEX f2 ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,f1); +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict my_idx db_datadict t1_my_tablex UNIQUE +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict my_idx db_datadict t1_my_tablex UNIQUE +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict my_idx db_datadict t1_my_tablex UNIQUE +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN f2; +SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +constraint_schema constraint_name table_schema table_name constraint_type +db_datadict PRIMARY db_datadict t1_my_tablex PRIMARY KEY +SELECT table_name +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1)) +ENGINE = ; +INSERT INTO information_schema.table_constraints +(constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.table_constraints +SELECT * FROM information_schema.table_constraints; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.table_constraints +SET table_name = 'db1' WHERE constraint_name = 'primary'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.table_constraints WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.table_constraints; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i3 ON information_schema.table_constraints(table_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_constraints ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.table_constraints; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_constraints +RENAME db_datadict.table_constraints; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_constraints +RENAME information_schema.xtable_constraints; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_is.result b/mysql-test/suite/funcs_1/r/is_table_constraints_is.result new file mode 100644 index 00000000000..78724caa175 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_is.result @@ -0,0 +1,17 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'information_schema' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'information_schema' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result new file mode 100644 index 00000000000..0be4f0a6e95 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result @@ -0,0 +1,37 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* TO testuser1@localhost; +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +NULL mysql PRIMARY mysql columns_priv PRIMARY KEY +NULL mysql PRIMARY mysql db PRIMARY KEY +NULL mysql PRIMARY mysql func PRIMARY KEY +NULL mysql name mysql help_category UNIQUE +NULL mysql PRIMARY mysql help_category PRIMARY KEY +NULL mysql name mysql help_keyword UNIQUE +NULL mysql PRIMARY mysql help_keyword PRIMARY KEY +NULL mysql PRIMARY mysql help_relation PRIMARY KEY +NULL mysql name mysql help_topic UNIQUE +NULL mysql PRIMARY mysql help_topic PRIMARY KEY +NULL mysql PRIMARY mysql host PRIMARY KEY +NULL mysql PRIMARY mysql proc PRIMARY KEY +NULL mysql PRIMARY mysql procs_priv PRIMARY KEY +NULL mysql PRIMARY mysql tables_priv PRIMARY KEY +NULL mysql PRIMARY mysql time_zone PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY +NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY +NULL mysql PRIMARY mysql user PRIMARY KEY +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'mysql' +ORDER BY table_schema,table_name,constraint_name; +CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result new file mode 100644 index 00000000000..9bf04949710 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -0,0 +1,332 @@ +SHOW TABLES FROM information_schema LIKE 'TABLE_PRIVILEGES'; +Tables_in_information_schema (TABLE_PRIVILEGES) +TABLE_PRIVILEGES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLE_PRIVILEGES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLE_PRIVILEGES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TABLE_PRIVILEGES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TABLE_PRIVILEGES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.11.1: INFORMATION_SCHEMA.TABLE_PRIVILEGES layout +######################################################################### +DESCRIBE information_schema.TABLE_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SHOW CREATE TABLE information_schema.TABLE_PRIVILEGES; +Table Create Table +TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( + `GRANTEE` varchar(81) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', + `IS_GRANTABLE` varchar(3) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TABLE_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SELECT table_catalog, table_schema, table_name, privilege_type +FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name privilege_type +###################################################################### +# Testcase 3.2.11.2+3.2.11.3+3.2.11.4: +# INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information +###################################################################### +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.tb1(f1 INT, f2 INT, f3 INT) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, SELECT ON db_datadict.* +TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +# Establish connection testuser1 (user=testuser1) +CREATE TABLE tb3 (f1 TEXT) +ENGINE = ; +GRANT SELECT ON db_datadict.tb3 TO 'testuser3'@'localhost'; +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 'tb%' +ORDER BY grantee,table_schema,table_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict tb1 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT, CREATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `db_datadict`.`tb1` TO 'testuser1'@'localhost' +# Establish connection testuser2 (user=testuser3) +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 'tb%' +ORDER BY grantee,table_schema,table_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser2'@'localhost' NULL db_datadict tb1 ALTER YES +'testuser2'@'localhost' NULL db_datadict tb1 CREATE YES +'testuser2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 DELETE YES +'testuser2'@'localhost' NULL db_datadict tb1 DROP YES +'testuser2'@'localhost' NULL db_datadict tb1 INDEX YES +'testuser2'@'localhost' NULL db_datadict tb1 INSERT YES +'testuser2'@'localhost' NULL db_datadict tb1 REFERENCES YES +'testuser2'@'localhost' NULL db_datadict tb1 SELECT YES +'testuser2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 UPDATE YES +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO 'testuser2'@'localhost' WITH GRANT OPTION +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 'tb%' +ORDER BY grantee,table_schema,table_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL db_datadict tb3 SELECT NO +SHOW GRANTS FOR 'testuser3'@'localhost'; +Grants for testuser3@localhost +GRANT USAGE ON *.* TO 'testuser3'@'localhost' +GRANT SELECT ON `db_datadict`.`tb3` TO 'testuser3'@'localhost' +# Switch to connection default and close the other connections +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 'tb%' +ORDER BY grantee,table_schema,table_name,privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL db_datadict tb1 SELECT NO +'testuser2'@'localhost' NULL db_datadict tb1 ALTER YES +'testuser2'@'localhost' NULL db_datadict tb1 CREATE YES +'testuser2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 DELETE YES +'testuser2'@'localhost' NULL db_datadict tb1 DROP YES +'testuser2'@'localhost' NULL db_datadict tb1 INDEX YES +'testuser2'@'localhost' NULL db_datadict tb1 INSERT YES +'testuser2'@'localhost' NULL db_datadict tb1 REFERENCES YES +'testuser2'@'localhost' NULL db_datadict tb1 SELECT YES +'testuser2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 UPDATE YES +'testuser3'@'localhost' NULL db_datadict tb3 SELECT NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT, CREATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `db_datadict`.`tb1` TO 'testuser1'@'localhost' +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT ALL PRIVILEGES ON `db_datadict`.`tb1` TO 'testuser2'@'localhost' WITH GRANT OPTION +SHOW GRANTS FOR 'testuser3'@'localhost'; +Grants for testuser3@localhost +GRANT USAGE ON *.* TO 'testuser3'@'localhost' +GRANT SELECT ON `db_datadict`.`tb3` TO 'testuser3'@'localhost' +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; +################################################################################ +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_PRIVILEGES modifications +################################################################################ +DROP TABLE IF EXISTS test.t1_table; +DROP VIEW IF EXISTS test.t1_view; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE test.t1_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = ; +CREATE VIEW test.t1_view AS SELECT 1; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'the_user'@'localhost'; +SELECT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%'; +table_name +GRANT ALL ON test.t1_table TO 'testuser1'@'localhost'; +GRANT ALL ON test.t1_view TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_schema, table_name, privilege_type; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL test t1_table ALTER NO +'testuser1'@'localhost' NULL test t1_table CREATE NO +'testuser1'@'localhost' NULL test t1_table CREATE VIEW NO +'testuser1'@'localhost' NULL test t1_table DELETE NO +'testuser1'@'localhost' NULL test t1_table DROP NO +'testuser1'@'localhost' NULL test t1_table INDEX NO +'testuser1'@'localhost' NULL test t1_table INSERT NO +'testuser1'@'localhost' NULL test t1_table REFERENCES NO +'testuser1'@'localhost' NULL test t1_table SELECT NO +'testuser1'@'localhost' NULL test t1_table SHOW VIEW NO +'testuser1'@'localhost' NULL test t1_table UPDATE NO +'testuser1'@'localhost' NULL test t1_view ALTER NO +'testuser1'@'localhost' NULL test t1_view CREATE NO +'testuser1'@'localhost' NULL test t1_view CREATE VIEW NO +'testuser1'@'localhost' NULL test t1_view DELETE NO +'testuser1'@'localhost' NULL test t1_view DROP NO +'testuser1'@'localhost' NULL test t1_view INDEX NO +'testuser1'@'localhost' NULL test t1_view INSERT NO +'testuser1'@'localhost' NULL test t1_view REFERENCES NO +'testuser1'@'localhost' NULL test t1_view SELECT NO +'testuser1'@'localhost' NULL test t1_view SHOW VIEW NO +'testuser1'@'localhost' NULL test t1_view UPDATE NO +SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_name; +grantee table_name +'testuser1'@'localhost' t1_table +'testuser1'@'localhost' t1_view +RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost'; +FLUSH PRIVILEGES; +SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_name; +grantee table_name +'the_user'@'localhost' t1_table +'the_user'@'localhost' t1_view +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost' +SHOW GRANTS FOR 'the_user'@'localhost'; +Grants for the_user@localhost +GRANT USAGE ON *.* TO 'the_user'@'localhost' +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO 'the_user'@'localhost' +GRANT ALL PRIVILEGES ON `test`.`t1_table` TO 'the_user'@'localhost' +SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +test t1_table +test t1_view +RENAME TABLE test.t1_table TO db_datadict.t1_table; +RENAME TABLE test.t1_view TO db_datadict.t1_view; +ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed. +SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +test t1_table +test t1_view +SHOW GRANTS FOR 'the_user'@'localhost'; +Grants for the_user@localhost +GRANT USAGE ON *.* TO 'the_user'@'localhost' +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO 'the_user'@'localhost' +GRANT ALL PRIVILEGES ON `test`.`t1_table` TO 'the_user'@'localhost' +REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost'; +REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost'; +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT 1; +GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost'; +GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost'; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +RENAME TABLE db_datadict.t1_table TO db_datadict.t1_tablex; +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +RENAME TABLE db_datadict.t1_tablex TO db_datadict.t1_table; +RENAME TABLE db_datadict.t1_viewx TO db_datadict.t1_view; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +DROP TABLE db_datadict.t1_table; +DROP VIEW db_datadict.t1_view; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +CREATE TABLE db_datadict.t1_table +ENGINE = AS +SELECT 1; +CREATE VIEW db_datadict.t1_view AS SELECT 1; +GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost'; +GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost'; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +DROP DATABASE db_datadict; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_table +t1_view +DROP USER 'the_user'@'localhost'; +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; +INSERT INTO information_schema.table_privileges +SELECT * FROM information_schema.table_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.table_privileges SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.table_privileges WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.table_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_tables +ON information_schema.table_privileges(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_privileges ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.table_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_privileges +RENAME db_datadict.table_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.table_privileges +RENAME information_schema.xtable_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_tables.result b/mysql-test/suite/funcs_1/r/is_tables.result new file mode 100644 index 00000000000..45662b2b03f --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables.result @@ -0,0 +1,419 @@ +SHOW TABLES FROM information_schema LIKE 'TABLES'; +Tables_in_information_schema (TABLES) +TABLES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TABLES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TABLES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TABLES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TABLES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout +######################################################################### +DESCRIBE information_schema.TABLES; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +TABLE_TYPE varchar(64) NO +ENGINE varchar(64) YES NULL +VERSION bigint(21) YES NULL +ROW_FORMAT varchar(10) YES NULL +TABLE_ROWS bigint(21) YES NULL +AVG_ROW_LENGTH bigint(21) YES NULL +DATA_LENGTH bigint(21) YES NULL +MAX_DATA_LENGTH bigint(21) YES NULL +INDEX_LENGTH bigint(21) YES NULL +DATA_FREE bigint(21) YES NULL +AUTO_INCREMENT bigint(21) YES NULL +CREATE_TIME datetime YES NULL +UPDATE_TIME datetime YES NULL +CHECK_TIME datetime YES NULL +TABLE_COLLATION varchar(64) YES NULL +CHECKSUM bigint(21) YES NULL +CREATE_OPTIONS varchar(255) YES NULL +TABLE_COMMENT varchar(80) NO +SHOW CREATE TABLE information_schema.TABLES; +Table Create Table +TABLES CREATE TEMPORARY TABLE `TABLES` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `TABLE_TYPE` varchar(64) NOT NULL default '', + `ENGINE` varchar(64) default NULL, + `VERSION` bigint(21) default NULL, + `ROW_FORMAT` varchar(10) default NULL, + `TABLE_ROWS` bigint(21) default NULL, + `AVG_ROW_LENGTH` bigint(21) default NULL, + `DATA_LENGTH` bigint(21) default NULL, + `MAX_DATA_LENGTH` bigint(21) default NULL, + `INDEX_LENGTH` bigint(21) default NULL, + `DATA_FREE` bigint(21) default NULL, + `AUTO_INCREMENT` bigint(21) default NULL, + `CREATE_TIME` datetime default NULL, + `UPDATE_TIME` datetime default NULL, + `CHECK_TIME` datetime default NULL, + `TABLE_COLLATION` varchar(64) default NULL, + `CHECKSUM` bigint(21) default NULL, + `CREATE_OPTIONS` varchar(255) default NULL, + `TABLE_COMMENT` varchar(80) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TABLES; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +TABLE_TYPE varchar(64) NO +ENGINE varchar(64) YES NULL +VERSION bigint(21) YES NULL +ROW_FORMAT varchar(10) YES NULL +TABLE_ROWS bigint(21) YES NULL +AVG_ROW_LENGTH bigint(21) YES NULL +DATA_LENGTH bigint(21) YES NULL +MAX_DATA_LENGTH bigint(21) YES NULL +INDEX_LENGTH bigint(21) YES NULL +DATA_FREE bigint(21) YES NULL +AUTO_INCREMENT bigint(21) YES NULL +CREATE_TIME datetime YES NULL +UPDATE_TIME datetime YES NULL +CHECK_TIME datetime YES NULL +TABLE_COLLATION varchar(64) YES NULL +CHECKSUM bigint(21) YES NULL +CREATE_OPTIONS varchar(255) YES NULL +TABLE_COMMENT varchar(80) NO +SELECT table_catalog, table_schema, table_name +FROM information_schema.tables WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name +################################################################################ +# Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* +TO 'testuser1'@'localhost' WITH GRANT OPTION; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT) +ENGINE = ; +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; +# Establish connection testuser1 (user=testuser1) +CREATE TABLE tb2 (f1 DECIMAL) +ENGINE = ; +CREATE TABLE tb3 (f1 VARCHAR(200)) +ENGINE = ; +GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost'; +GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost'; +CREATE VIEW v3 AS SELECT * FROM tb3; +GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost'; +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb3 +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb3 +v3 +# Switch to connection default (user=root) +SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT +NULL db_datadict tb1 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb2 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict tb3 BASE TABLE #ENG# 10 #RF# 0 #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# latin1_swedish_ci #CS# +NULL db_datadict v3 VIEW #ENG# NULL #RF# NULL #ARL# #DL# #MDL# #IL# #DF# NULL #CRT #UT# #CT# NULL #CS# NULL VIEW +SHOW TABLES FROM db_datadict; +Tables_in_db_datadict +tb1 +tb2 +tb3 +v3 +# Close connection testuser1, testuser2, testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications +######################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = ; +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_table'; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_table +TABLE_TYPE BASE TABLE +ENGINE #ENG# +VERSION 10 +ROW_FORMAT #RF# +TABLE_ROWS 0 +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 #CS# +CREATE_OPTIONS +TABLE_COMMENT Initial Comment +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_table +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_schema table_name +test t1_my_tablex +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_schema table_name +db_datadict t1_my_tablex +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name engine +t1_my_tablex +ALTER TABLE db_datadict.t1_my_tablex +ENGINE = ; +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name engine +t1_my_tablex +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_rows +t1_my_tablex 0 +INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2); +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_rows +t1_my_tablex 2 +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex latin1_swedish_ci +ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex utf8_general_ci +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex utf8_general_ci +ALTER TABLE db_datadict.t1_my_tablex +DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name table_collation +t1_my_tablex latin1_german1_ci +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name TABLE_COMMENT +t1_my_tablex Initial Comment +ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment'; +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name TABLE_COMMENT +t1_my_tablex Changed Comment +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name AUTO_INCREMENT +t1_my_tablex NULL +ALTER TABLE db_datadict.t1_my_tablex +ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2); +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name AUTO_INCREMENT +t1_my_tablex 3 +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name ROW_FORMAT +t1_my_tablex Fixed +ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic; +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name ROW_FORMAT +t1_my_tablex Dynamic +SELECT table_name, checksum FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name checksum +t1_my_tablex NULL +ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; +SELECT table_name, checksum IS NOT NULL FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name checksum IS NOT NULL +t1_my_tablex 1 +SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; +SELECT UPDATE_TIME > @UPDATE_TIME +AS "Is current UPDATE_TIME bigger than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current UPDATE_TIME bigger than before last INSERT? +1 +SELECT checksum <> @checksum +AS "Is current CHECKSUM different than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current CHECKSUM different than before last INSERT? +1 +SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +t1_my_tablex +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +table_name +CREATE TABLE test.t1_my_tablex (f1 BIGINT) +ENGINE = ; +SELECT CREATE_TIME > @CREATE_TIME +AS "Is current CREATE_TIME bigger than for the old dropped table?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +Is current CREATE_TIME bigger than for the old dropped table? +1 +DROP TABLE test.t1_my_tablex; +CREATE VIEW test.t1_my_tablex AS SELECT 1; +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t1_my_tablex +TABLE_TYPE VIEW +ENGINE NULL +VERSION NULL +ROW_FORMAT NULL +TABLE_ROWS NULL +AVG_ROW_LENGTH NULL +DATA_LENGTH NULL +MAX_DATA_LENGTH NULL +INDEX_LENGTH NULL +DATA_FREE NULL +AUTO_INCREMENT NULL +CREATE_TIME NULL +UPDATE_TIME NULL +CHECK_TIME NULL +TABLE_COLLATION NULL +CHECKSUM NULL +CREATE_OPTIONS NULL +TABLE_COMMENT VIEW +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +CREATE TEMPORARY TABLE test.t1_my_tablex +ENGINE = +AS SELECT 1; +SELECT table_name, table_type FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP TEMPORARY TABLE test.t1_my_tablex; +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = AS +SELECT 1; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +t1_my_tablex +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +table_name +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.tables SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.tables WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables RENAME db_datadict.tables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.tables RENAME information_schema.xtables; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_tables_innodb.result b/mysql-test/suite/funcs_1/r/is_tables_innodb.result new file mode 100644 index 00000000000..fccf1cf5cb9 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_innodb.result @@ -0,0 +1,1063 @@ +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char(0), +f2 char(0) binary, +f3 char(0) ascii, +f4 tinytext unicode, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal, +f34 decimal unsigned, +f35 decimal zerofill, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = innodb; +Warnings: +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb1.txt' into table tb1 ; +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 = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +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 tinytext, +f122 text, +f123 mediumtext, +f124 longtext unicode, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +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 = innodb; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb3.txt' into table tb3 ; +drop table if exists tb4; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f235 char(0) unicode, +f236 char(90), +f237 char(255) ascii, +f238 varchar(0), +f239 varchar(20000) binary, +f240 varchar(2000) unicode, +f241 char(100) unicode +) engine = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb4.txt' into table tb4 ; +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 = innodb; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/innodb_tb2.txt' into table tb2 ; +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 = InnoDB; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = InnoDB; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test1 +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test4 +TABLE_NAME t6 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE InnoDB +VERSION 10 +ROW_FORMAT Compact +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 ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result new file mode 100644 index 00000000000..78193155e22 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -0,0 +1,771 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 = 'information_schema' +AND table_name <> 'profiling' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME CHARACTER_SETS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLLATIONS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLUMNS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLUMN_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME KEY_COLUMN_USAGE +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME ROUTINES +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SCHEMATA +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SCHEMA_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME STATISTICS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLE_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLE_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TRIGGERS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME USER_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME VIEWS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 = 'information_schema' +AND table_name <> 'profiling' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME CHARACTER_SETS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLLATIONS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLUMNS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME COLUMN_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME KEY_COLUMN_USAGE +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME ROUTINES +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SCHEMATA +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SCHEMA_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME STATISTICS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLE_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TABLE_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME TRIGGERS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME USER_PRIVILEGES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 0 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME VIEWS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +VERSION 0 +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_tables_memory.result b/mysql-test/suite/funcs_1/r/is_tables_memory.result new file mode 100644 index 00000000000..db3f40bf8a0 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_memory.result @@ -0,0 +1,1052 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = memory; +Warnings: +Note 1265 Data truncated for column 'f33' at row 1 +Note 1265 Data truncated for column 'f34' at row 1 +Note 1265 Data truncated for column 'f35' at row 1 +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; +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 = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +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 = memory; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; +drop table if exists tb4 ; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f236 char(95) unicode, +f241 char(255) unicode, +f237 char(130) binary, +f238 varchar(25000) binary, +f239 varbinary(0), +f240 varchar(1200) unicode +) engine = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; +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 = memory; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; +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 = MEMORY; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MEMORY; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test1 +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test4 +TABLE_NAME t6 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_tables_myisam.result b/mysql-test/suite/funcs_1/r/is_tables_myisam.result new file mode 100644 index 00000000000..27fed7591ac --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_myisam.result @@ -0,0 +1,1092 @@ +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +SET @NO_REFRESH = IF( '' = '', 0, 1); +DROP DATABASE IF EXISTS test1; +CREATE DATABASE test1; +USE test; +drop table if exists tb1 ; +create table tb1 ( +f1 char, +f2 char binary, +f3 char ascii, +f4 tinytext unicode, +f5 text, +f6 mediumtext, +f7 longtext, +f8 tinyblob, +f9 blob, +f10 mediumblob, +f11 longblob, +f12 binary, +f13 tinyint, +f14 tinyint unsigned, +f15 tinyint zerofill, +f16 tinyint unsigned zerofill, +f17 smallint, +f18 smallint unsigned, +f19 smallint zerofill, +f20 smallint unsigned zerofill, +f21 mediumint, +f22 mediumint unsigned, +f23 mediumint zerofill, +f24 mediumint unsigned zerofill, +f25 int, +f26 int unsigned, +f27 int zerofill, +f28 int unsigned zerofill, +f29 bigint, +f30 bigint unsigned, +f31 bigint zerofill, +f32 bigint unsigned zerofill, +f33 decimal not null DEFAULT 9.9, +f34 decimal unsigned not null DEFAULT 9.9, +f35 decimal zerofill not null DEFAULT 9.9, +f36 decimal unsigned zerofill not null DEFAULT 9.9, +f37 decimal (0) not null DEFAULT 9.9, +f38 decimal (64) not null DEFAULT 9.9, +f39 decimal (0) unsigned not null DEFAULT 9.9, +f40 decimal (64) unsigned not null DEFAULT 9.9, +f41 decimal (0) zerofill not null DEFAULT 9.9, +f42 decimal (64) zerofill not null DEFAULT 9.9, +f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, +f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, +f45 decimal (0,0) not null DEFAULT 9.9, +f46 decimal (63,30) not null DEFAULT 9.9, +f47 decimal (0,0) unsigned not null DEFAULT 9.9, +f48 decimal (63,30) unsigned not null DEFAULT 9.9, +f49 decimal (0,0) zerofill not null DEFAULT 9.9, +f50 decimal (63,30) zerofill not null DEFAULT 9.9, +f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, +f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, +f53 numeric not null DEFAULT 99, +f54 numeric unsigned not null DEFAULT 99, +f55 numeric zerofill not null DEFAULT 99, +f56 numeric unsigned zerofill not null DEFAULT 99, +f57 numeric (0) not null DEFAULT 99, +f58 numeric (64) not null DEFAULT 99 +) engine = myisam; +Warnings: +Note 1265 Data truncated for column 'f33' at row 1 +Note 1265 Data truncated for column 'f34' at row 1 +Note 1265 Data truncated for column 'f35' at row 1 +Note 1265 Data truncated for column 'f36' at row 1 +Note 1265 Data truncated for column 'f37' at row 1 +Note 1265 Data truncated for column 'f38' at row 1 +Note 1265 Data truncated for column 'f39' at row 1 +Note 1265 Data truncated for column 'f40' at row 1 +Note 1265 Data truncated for column 'f41' at row 1 +Note 1265 Data truncated for column 'f42' at row 1 +Note 1265 Data truncated for column 'f43' at row 1 +Note 1265 Data truncated for column 'f44' at row 1 +Note 1265 Data truncated for column 'f45' at row 1 +Note 1265 Data truncated for column 'f47' at row 1 +Note 1265 Data truncated for column 'f49' at row 1 +Note 1265 Data truncated for column 'f51' at row 1 +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; +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", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +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 tinytext, +f122 text, +f123 mediumtext, +f124 longtext unicode, +f125 tinyblob, +f126 blob, +f127 mediumblob, +f128 longblob, +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 = myisam; +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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; +drop table if exists tb4 ; +create table tb4 ( +f176 numeric (0) unsigned not null DEFAULT 9, +f177 numeric (64) unsigned not null DEFAULT 9, +f178 numeric (0) zerofill not null DEFAULT 9, +f179 numeric (64) zerofill not null DEFAULT 9, +f180 numeric (0) unsigned zerofill not null DEFAULT 9, +f181 numeric (64) unsigned zerofill not null DEFAULT 9, +f182 numeric (0,0) not null DEFAULT 9, +f183 numeric (63,30) not null DEFAULT 9, +f184 numeric (0,0) unsigned not null DEFAULT 9, +f185 numeric (63,30) unsigned not null DEFAULT 9, +f186 numeric (0,0) zerofill not null DEFAULT 9, +f187 numeric (63,30) zerofill not null DEFAULT 9, +f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, +f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, +f190 real not null DEFAULT 88.8, +f191 real unsigned not null DEFAULT 88.8, +f192 real zerofill not null DEFAULT 88.8, +f193 real unsigned zerofill not null DEFAULT 88.8, +f194 double not null DEFAULT 55.5, +f195 double unsigned not null DEFAULT 55.5, +f196 double zerofill not null DEFAULT 55.5, +f197 double unsigned zerofill not null DEFAULT 55.5, +f198 float, +f199 float unsigned, +f200 float zerofill, +f201 float unsigned zerofill, +f202 float(0), +f203 float(23), +f204 float(0) unsigned, +f205 float(23) unsigned, +f206 float(0) zerofill, +f207 float(23) zerofill, +f208 float(0) unsigned zerofill, +f209 float(23) unsigned zerofill, +f210 float(24), +f211 float(53), +f212 float(24) unsigned, +f213 float(53) unsigned, +f214 float(24) zerofill, +f215 float(53) zerofill, +f216 float(24) unsigned zerofill, +f217 float(53) unsigned zerofill, +f218 date, +f219 time, +f220 datetime, +f221 timestamp, +f222 year, +f223 year(3), +f224 year(4), +f225 enum("1enum","2enum"), +f226 set("1set","2set"), +f227 VARBINARY(64), +f228 VARBINARY(27), +f229 VARBINARY(64), +f230 VARBINARY(192), +f231 VARBINARY(192), +f232 VARBINARY(27), +f233 VARBINARY(64), +f234 VARBINARY(192), +f235 char(255) unicode, +f236 char(60) ascii, +f237 char(255) binary, +f238 varchar(0) binary, +f239 varbinary(1000), +f240 varchar(120) unicode, +f241 char(100) unicode, +f242 bit(30) +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; +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", +f110 VARBINARY(64) null, +f111 VARBINARY(27) null , +f112 VARBINARY(64) null , +f113 VARBINARY(192) null , +f114 VARBINARY(192) , +f115 VARBINARY(27) null , +f116 VARBINARY(64) null, +f117 VARBINARY(192) null +) engine = myisam; +load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; +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 = MyISAM; +CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; +drop TABLE if exists t3; +CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = MyISAM; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test1 +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test4 +TABLE_NAME t6 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME tb1 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb2 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb3 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA test +TABLE_NAME tb4 +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; +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; +DROP TABLE test.tb1; +DROP TABLE test.tb2; +DROP TABLE test.tb3; +DROP TABLE test.tb4; diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result new file mode 100644 index 00000000000..d407f224b7d --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -0,0 +1,424 @@ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 = 'mysql' +ORDER BY table_schema,table_name; +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME columns_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Column privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME db +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME func +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment User defined functions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_category +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help categories +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_keyword +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help keywords +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_relation +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment keyword-topic relation +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME help_topic +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment help topics +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME host +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Host privileges; Merged with database privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME proc +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Stored Procedures +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME procs_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Procedure privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME tables_priv +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Table privileges +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT 6 +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_leap_second +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Leap seconds information for time zones +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_name +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone names +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transitions +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME time_zone_transition_type +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Time zone transition types +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME user +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Users and global privileges +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 = 'mysql' +ORDER BY table_schema,table_name; +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result new file mode 100644 index 00000000000..5b9863a4673 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_tables_ndb.result @@ -0,0 +1,560 @@ +SET @NO_REFRESH = IF( '' = '', 0, 1); +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 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; +LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test4 +TABLE_NAME t6 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +DROP USER testuser1@localhost; +CREATE USER testuser1@localhost; +GRANT SELECT ON db_datadict.* 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 NULL +TABLE_SCHEMA test +TABLE_NAME t1 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t10 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t11 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t2 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t3 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t4 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t7 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t8 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test +TABLE_NAME t9 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA test4 +TABLE_NAME t6 +TABLE_TYPE BASE TABLE +ENGINE ndbcluster +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION latin1_swedish_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +# Switch to connection default and close connection testuser1 +DROP USER testuser1@localhost; +DROP DATABASE db_datadict; +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_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result new file mode 100644 index 00000000000..77bd2d8b670 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_triggers.result @@ -0,0 +1,212 @@ +SHOW TABLES FROM information_schema LIKE 'TRIGGERS'; +Tables_in_information_schema (TRIGGERS) +TRIGGERS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.TRIGGERS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.TRIGGERS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.TRIGGERS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.TRIGGERS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout +######################################################################### +DESCRIBE information_schema.TRIGGERS; +Field Type Null Key Default Extra +TRIGGER_CATALOG varchar(512) YES NULL +TRIGGER_SCHEMA varchar(64) NO +TRIGGER_NAME varchar(64) NO +EVENT_MANIPULATION varchar(6) NO +EVENT_OBJECT_CATALOG varchar(512) YES NULL +EVENT_OBJECT_SCHEMA varchar(64) NO +EVENT_OBJECT_TABLE varchar(64) NO +ACTION_ORDER bigint(4) NO 0 +ACTION_CONDITION longtext YES NULL +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO +ACTION_TIMING varchar(6) NO +ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL +ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL +ACTION_REFERENCE_OLD_ROW varchar(3) NO +ACTION_REFERENCE_NEW_ROW varchar(3) NO +CREATED datetime YES NULL +SQL_MODE longtext NO NULL +DEFINER longtext NO NULL +SHOW CREATE TABLE information_schema.TRIGGERS; +Table Create Table +TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( + `TRIGGER_CATALOG` varchar(512) default NULL, + `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', + `TRIGGER_NAME` varchar(64) NOT NULL default '', + `EVENT_MANIPULATION` varchar(6) NOT NULL default '', + `EVENT_OBJECT_CATALOG` varchar(512) default NULL, + `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', + `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', + `ACTION_ORDER` bigint(4) NOT NULL default '0', + `ACTION_CONDITION` longtext, + `ACTION_STATEMENT` longtext NOT NULL, + `ACTION_ORIENTATION` varchar(9) NOT NULL default '', + `ACTION_TIMING` varchar(6) NOT NULL default '', + `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, + `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, + `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', + `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', + `CREATED` datetime default NULL, + `SQL_MODE` longtext NOT NULL, + `DEFINER` longtext NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.TRIGGERS; +Field Type Null Key Default Extra +TRIGGER_CATALOG varchar(512) YES NULL +TRIGGER_SCHEMA varchar(64) NO +TRIGGER_NAME varchar(64) NO +EVENT_MANIPULATION varchar(6) NO +EVENT_OBJECT_CATALOG varchar(512) YES NULL +EVENT_OBJECT_SCHEMA varchar(64) NO +EVENT_OBJECT_TABLE varchar(64) NO +ACTION_ORDER bigint(4) NO 0 +ACTION_CONDITION longtext YES NULL +ACTION_STATEMENT longtext NO NULL +ACTION_ORIENTATION varchar(9) NO +ACTION_TIMING varchar(6) NO +ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL +ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL +ACTION_REFERENCE_OLD_ROW varchar(3) NO +ACTION_REFERENCE_NEW_ROW varchar(3) NO +CREATED datetime YES NULL +SQL_MODE longtext NO NULL +DEFINER longtext NO NULL +SELECT * FROM information_schema.triggers +WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL +OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL +OR action_reference_new_table IS NOT NULL; +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER +################################################################################## +# Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information +################################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +CREATE USER 'testuser4'@'localhost'; +GRANT SUPER ON *.* TO 'testuser1'@'localhost'; +GRANT SUPER ON *.* TO 'testuser3'@'localhost'; +GRANT SUPER ON *.* TO 'testuser4'@'localhost'; +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +# Establish connection testuser1 (user=testuser1) +CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) +ENGINE = ; +CREATE TRIGGER trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Establish connection testuser2 (user=testuser2) +SHOW GRANTS FOR 'testuser2'@'localhost'; +Grants for testuser2@localhost +GRANT USAGE ON *.* TO 'testuser2'@'localhost' +GRANT ALL PRIVILEGES ON `db_datadict`.`t1` TO 'testuser2'@'localhost' +# No SUPER Privilege --> no result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +# Establish connection testuser3 (user=testuser3) +SHOW GRANTS FOR 'testuser3'@'localhost'; +Grants for testuser3@localhost +GRANT SUPER ON *.* TO 'testuser3'@'localhost' +GRANT SELECT ON `db_datadict`.`t1` TO 'testuser3'@'localhost' +# SUPER Privilege + SELECT Privilege on t1 --> result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +# Establish connection testuser4 (user=testuser4) +SHOW GRANTS FOR 'testuser4'@'localhost'; +Grants for testuser4@localhost +GRANT SUPER ON *.* TO 'testuser4'@'localhost' +# SUPER Privilege + no SELECT Privilege on t1 --> no result for query +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +# Switch to connection default and close connections testuser1 - testuser4 +SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +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 +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +SHOW TRIGGERS FROM db_datadict; +Trigger Event Table Statement Timing Created sql_mode Definer +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications +######################################################################### +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +CREATE TRIGGER db_datadict.trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +INSERT INTO information_schema.triggers +SELECT * FROM information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.triggers SET trigger_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.triggers WHERE trigger_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers RENAME db_datadict.triggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result new file mode 100644 index 00000000000..f5fa1f858a1 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -0,0 +1,400 @@ +SHOW TABLES FROM information_schema LIKE 'USER_PRIVILEGES'; +Tables_in_information_schema (USER_PRIVILEGES) +USER_PRIVILEGES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.USER_PRIVILEGES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.USER_PRIVILEGES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.USER_PRIVILEGES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.USER_PRIVILEGES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.16.1: INFORMATION_SCHEMA.USER_PRIVILEGES layout +######################################################################### +DESCRIBE information_schema.USER_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SHOW CREATE TABLE information_schema.USER_PRIVILEGES; +Table Create Table +USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( + `GRANTEE` varchar(81) NOT NULL default '', + `TABLE_CATALOG` varchar(512) default NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', + `IS_GRANTABLE` varchar(3) NOT NULL default '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.USER_PRIVILEGES; +Field Type Null Key Default Extra +GRANTEE varchar(81) NO +TABLE_CATALOG varchar(512) YES NULL +PRIVILEGE_TYPE varchar(64) NO +IS_GRANTABLE varchar(3) NO +SELECT grantee, table_catalog, privilege_type +FROM information_schema.user_privileges +WHERE table_catalog IS NOT NULL; +grantee table_catalog privilege_type +########################################################################## +# Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES +# accessible information +########################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +GRANT INSERT ON *.* TO 'testuser2'@'localhost'; +GRANT UPDATE ON *.* TO 'testuser2'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# +# Add GRANT OPTION db_datadict.* to testuser1; +GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' + +# Now add SELECT on *.* to testuser1; +# Switch to connection default +GRANT SELECT ON *.* TO 'testuser1'@'localhost'; +# +# Here is shown correctly for testuser1; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL SELECT YES +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# Switch to connection testuser1 +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL SELECT YES +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +SHOW GRANTS; +Grants for testuser1@localhost +GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT, UPDATE ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'user' +SHOW GRANTS; +Grants for testuser2@localhost +GRANT INSERT, UPDATE ON *.* TO 'testuser2'@'localhost' +# Establish connection testuser3 (user=testuser3) +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'user' +SHOW GRANTS; +Grants for testuser3@localhost +GRANT USAGE ON *.* TO 'testuser3'@'localhost' + +# Revoke privileges from testuser1; +# Switch to connection default +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# Switch to connection testuser1 +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); +ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_55' +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); +ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66' + +# Add ALL on db_datadict.* (and select on mysql.user) to testuser1; +# Switch to connection default +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# Switch to connection testuser1 +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); +ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56' +USE db_datadict; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'testuser1'@'localhost' WITH GRANT OPTION +GRANT SELECT ON `mysql`.`user` TO 'testuser1'@'localhost' +CREATE TABLE tb_57 ( c1 TEXT ) +ENGINE = ; + +# Revoke privileges from testuser1; +# Switch to connection default +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +'testuser2'@'localhost' NULL INSERT NO +'testuser2'@'localhost' NULL UPDATE NO +'testuser3'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +# Switch to connection testuser1 +SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'user' +SHOW GRANTS; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +CREATE TABLE db_datadict.tb_58 ( c1 TEXT ) +ENGINE = ; +USE db_datadict; +ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'db_datadict' +CREATE TABLE db_datadict.tb_59 ( c1 TEXT ) +ENGINE = ; +# Switch to connection default and close connections testuser1,testuser2,testuser3 +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE IF EXISTS db_datadict; +######################################################################################## +# Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.USER_PRIVILEGES modifications +######################################################################################## +SELECT * FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost' +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL USAGE NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT USAGE ON *.* TO 'testuser1'@'localhost' +GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'testuser1'@'localhost' NULL SELECT NO +'testuser1'@'localhost' NULL FILE NO +SHOW GRANTS FOR 'testuser1'@'localhost'; +Grants for testuser1@localhost +GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost' +DROP USER 'testuser1'@'localhost'; +SELECT * FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +SHOW GRANTS FOR 'testuser1'@'localhost'; +ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localhost' +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +INSERT INTO information_schema.user_privileges +SELECT * FROM information_schema.user_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.user_privileges +SET PRIVILEGE_TYPE = 'gaming'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.user_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX i1 ON information_schema.user_privileges(grantee); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.user_privileges ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.user_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.user_privileges +RENAME db_datadict.user_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.user_privileges +RENAME information_schema.xuser_privileges; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP USER 'testuser1'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_views.result b/mysql-test/suite/funcs_1/r/is_views.result new file mode 100644 index 00000000000..b6fe00e30ae --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_views.result @@ -0,0 +1,238 @@ +SHOW TABLES FROM information_schema LIKE 'VIEWS'; +Tables_in_information_schema (VIEWS) +VIEWS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.VIEWS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.VIEWS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.VIEWS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.VIEWS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout +######################################################################### +DESCRIBE information_schema.VIEWS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO +IS_UPDATABLE varchar(3) NO +DEFINER varchar(77) NO +SECURITY_TYPE varchar(7) NO +SHOW CREATE TABLE information_schema.VIEWS; +Table Create Table +VIEWS CREATE TEMPORARY TABLE `VIEWS` ( + `TABLE_CATALOG` varchar(512) default NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL default '', + `TABLE_NAME` varchar(64) NOT NULL default '', + `VIEW_DEFINITION` longtext NOT NULL, + `CHECK_OPTION` varchar(8) NOT NULL default '', + `IS_UPDATABLE` varchar(3) NOT NULL default '', + `DEFINER` varchar(77) NOT NULL default '', + `SECURITY_TYPE` varchar(7) NOT NULL default '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.VIEWS; +Field Type Null Key Default Extra +TABLE_CATALOG varchar(512) YES NULL +TABLE_SCHEMA varchar(64) NO +TABLE_NAME varchar(64) NO +VIEW_DEFINITION longtext NO NULL +CHECK_OPTION varchar(8) NO +IS_UPDATABLE varchar(3) NO +DEFINER varchar(77) NO +SECURITY_TYPE varchar(7) NO +SELECT table_catalog, table_schema, table_name +FROM information_schema.views WHERE table_catalog IS NOT NULL; +table_catalog table_schema table_name +################################################################################ +# Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information +################################################################################ +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +CREATE USER 'test_no_views'@'localhost'; +CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT) +ENGINE = ; +CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1; +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost'; +GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost'; +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`t1`.`f1` AS `f1`,`db_datadict`.`t1`.`f2` AS `f2`,`db_datadict`.`t1`.`f3` AS `f3` from `db_datadict`.`t1` NONE YES root@localhost DEFINER +# Establish connection testuser1 (user=testuser1) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER +# Establish connection testuser2 (user=testuser2) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER +NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER +# Establish connection test_no_views (user=test_no_views) +SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +# Switch to connection default and close all other connections +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +DROP DATABASE db_datadict; +######################################################################### +# 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications +######################################################################### +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = ; +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE +NULL test t1_view /* ALGORITHM=UNDEFINED */ select distinct `test`.`t1_table`.`f1` AS `f1` from `test`.`t1_table` NONE NO root@localhost DEFINER +SELECT table_name,definer FROM information_schema.views +WHERE table_name = 't1_view'; +table_name definer +t1_view root@localhost +ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS +SELECT DISTINCT f1 FROM test.t1_table; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +table_name definer security_type +t1_view testuser1@localhost DEFINER +ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS +SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +table_name definer security_type +t1_view root@localhost INVOKER +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +test t1_view +RENAME TABLE test.t1_view TO db_datadict.t1_view; +ERROR HY000: Changing schema from 'test' to 'db_datadict' is not allowed. +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +table_schema table_name +db_datadict t1_view +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_viewx +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_viewx +DROP VIEW db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +DROP TABLE test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +Warnings: +Warning 1356 View 'db_datadict.t1_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment' +ENGINE = ; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +t1_view +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +table_name +DROP USER 'testuser1'@'localhost'; +DROP TABLE test.t1_table; +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA table are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE VIEW db_datadict.v1 AS SELECT 1; +INSERT INTO information_schema.views +SELECT * FROM information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +INSERT INTO information_schema.views(table_schema, table_name) +VALUES ('db2', 'v2'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.views SET table_schema = 'test' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.views WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_views ON information_schema.views(table_schema); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views RENAME db_datadict.views; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.views RENAME information_schema.xviews; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/memory__datadict.result b/mysql-test/suite/funcs_1/r/memory__datadict.result deleted file mode 100644 index 22385d98737..00000000000 --- a/mysql-test/suite/funcs_1/r/memory__datadict.result +++ /dev/null @@ -1,12814 +0,0 @@ - -. -. It is intended that the 3 __datadict.test files are named this way to be -. sure they are - in a *full run* of the suite - the first tests done for each -. storage engine. Using two _ and the order of processing in mysql-test-run.pl -. ensures this in an easy way. -. -. If needed a restart could be implemented later between the storage engines if -. values changes in the result depending from the position where the -. *__datadict.test are started. This can be a result of showing e.g. maximum -. values of the number of rows of tables. -. -. This .result file has been checked OK with Linux 5.0.48, -. build tree ChangeSet@1.2477.6.3, 2007-07-30 -. except that the not fixed Bug#30020 causes a difference. -. --------------------------------------------------------------------------------- - -FIXME: There are subtests that are switched off due to known bugs: ------------------------------------------------------------------- -SELECT 1 AS "have_bug_11589"; -have_bug_11589 -1 - -There are some statements where the ps-protocol is switched off. -This may come from the bug listed below, ir from other problems. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -SET @NO_REFRESH = IF( '' = '', 0, 1); -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = memory; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -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 = memory; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -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 = memory; -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 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb3.txt' into table tb3 ; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f236 char(95) unicode, -f241 char(255) unicode, -f237 char(130) binary, -f238 varchar(25000) binary, -f239 varbinary(0), -f240 varchar(1200) unicode -) engine = memory; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; -USE test1; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -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 = memory; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table tb2 ; -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 = memory; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = memory; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = memory; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = memory; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = memory; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = memory; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = memory; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = memory; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = memory; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = memory; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; -use information_schema; - -root@localhost information_schema - -Testcase 3.2.1.1: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE VIEW v1 AS SELECT * FROM information_schema.tables; -CREATE OR REPLACE VIEW db_datadict.vu1 as -SELECT grantee AS u -FROM information_schema.user_privileges; -CREATE OR REPLACE VIEW db_datadict.vu as -SELECT DISTINCT u, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3 ) -AS server, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3, -LENGTH( SUBSTRING( u, -LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) -AS Server_Clean -FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu order by u; -u server Server_Clean -'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -'root'@'' ' -'root'@'localhost' localhost' localhost -CREATE PROCEDURE db_datadict.sp_1() -BEGIN -SELECT * FROM db_datadict.v1; -END// -USE information_schema; -SHOW tables; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -select * from schemata ORDER BY 2 DESC, 1 ASC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from columns; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL db_datadict v1 TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references -NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references -NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references -NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL db_datadict vu server 2 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu Server_Clean 3 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu1 u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 14 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 15 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 16 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f122 5 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 16 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 17 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 18 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 24 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references -NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references -NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select * from character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -select sum(id) from collations where collation_name <> 'utf8_general_cs'; -sum(id) -10741 -select collation_name, character_set_name into @x,@y -from collation_character_set_applicability limit 1; -select @x, @y; -@x @y -big5_chinese_ci big5 -select * from routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select count(*) from routines; -count(*) -1 -select * from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 1 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 0 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE -select * from views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges order by grantee, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * from schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -NULL mysql PRIMARY mysql help_keyword PRIMARY KEY -NULL mysql name mysql help_keyword UNIQUE -NULL mysql PRIMARY mysql help_relation PRIMARY KEY -NULL mysql PRIMARY mysql help_topic PRIMARY KEY -NULL mysql name mysql help_topic UNIQUE -NULL mysql PRIMARY mysql host PRIMARY KEY -NULL mysql PRIMARY mysql proc PRIMARY KEY -NULL mysql PRIMARY mysql procs_priv PRIMARY KEY -NULL mysql PRIMARY mysql tables_priv PRIMARY KEY -NULL mysql PRIMARY mysql time_zone PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY -NULL mysql PRIMARY mysql user PRIMARY KEY -select * from key_column_usage; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -select count(*) as max_recs from key_column_usage; -max_recs -40 -select max(cardinality) from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -max(cardinality) -393 -select concat("View '", -table_name, "' is associated with the database '", table_schema, "'.") -AS "Who is Who for the Views" - from views; -Who is Who for the Views -View 'v1' is associated with the database 'db_datadict'. -View 'vu' is associated with the database 'db_datadict'. -View 'vu1' is associated with the database 'db_datadict'. -select concat("Table or view '", table_name, -"' is associated with the database '", table_schema, "'.") as "Who is Who" - from tables; -Who is Who -Table or view 'CHARACTER_SETS' is associated with the database 'information_schema'. -Table or view 'COLLATIONS' is associated with the database 'information_schema'. -Table or view 'COLLATION_CHARACTER_SET_APPLICABILITY' is associated with the database 'information_schema'. -Table or view 'COLUMNS' is associated with the database 'information_schema'. -Table or view 'COLUMN_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'KEY_COLUMN_USAGE' is associated with the database 'information_schema'. -Table or view 'ROUTINES' is associated with the database 'information_schema'. -Table or view 'SCHEMATA' is associated with the database 'information_schema'. -Table or view 'SCHEMA_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'STATISTICS' is associated with the database 'information_schema'. -Table or view 'TABLES' is associated with the database 'information_schema'. -Table or view 'TABLE_CONSTRAINTS' is associated with the database 'information_schema'. -Table or view 'TABLE_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'TRIGGERS' is associated with the database 'information_schema'. -Table or view 'USER_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'VIEWS' is associated with the database 'information_schema'. -Table or view 'v1' is associated with the database 'db_datadict'. -Table or view 'vu' is associated with the database 'db_datadict'. -Table or view 'vu1' is associated with the database 'db_datadict'. -Table or view 'columns_priv' is associated with the database 'mysql'. -Table or view 'db' is associated with the database 'mysql'. -Table or view 'func' is associated with the database 'mysql'. -Table or view 'help_category' is associated with the database 'mysql'. -Table or view 'help_keyword' is associated with the database 'mysql'. -Table or view 'help_relation' is associated with the database 'mysql'. -Table or view 'help_topic' is associated with the database 'mysql'. -Table or view 'host' is associated with the database 'mysql'. -Table or view 'proc' is associated with the database 'mysql'. -Table or view 'procs_priv' is associated with the database 'mysql'. -Table or view 'tables_priv' is associated with the database 'mysql'. -Table or view 'time_zone' is associated with the database 'mysql'. -Table or view 'time_zone_leap_second' is associated with the database 'mysql'. -Table or view 'time_zone_name' is associated with the database 'mysql'. -Table or view 'time_zone_transition' is associated with the database 'mysql'. -Table or view 'time_zone_transition_type' is associated with the database 'mysql'. -Table or view 'user' is associated with the database 'mysql'. -Table or view 't1' is associated with the database 'test'. -Table or view 't10' is associated with the database 'test'. -Table or view 't11' is associated with the database 'test'. -Table or view 't2' is associated with the database 'test'. -Table or view 't3' is associated with the database 'test'. -Table or view 't4' is associated with the database 'test'. -Table or view 't7' is associated with the database 'test'. -Table or view 't8' is associated with the database 'test'. -Table or view 't9' is associated with the database 'test'. -Table or view 'tb1' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test'. -Table or view 'tb3' is associated with the database 'test'. -Table or view 'tb4' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test1'. -Table or view 't6' is associated with the database 'test4'. -select grantee as "user's having select privilege", -substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select' - order by grantee; -user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'127.0.0.1' '127.0.0.1' -'root'@'' '' -'root'@'localhost' 'localhost' -select all table_schema from schema_privileges limit 0,5; -table_schema -test -test -test -test -test -select distinct(privilege_type) from table_privileges; -privilege_type -select * from column_privileges -group by table_schema having table_schema = 'db_datadict'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints limit 0,5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select count(*) as max_recs from key_column_usage limit 0,5; -max_recs -40 -select information_schema.tables.table_name as "table name", -count(distinct(column_name)) as "no of columns in the table" - from information_schema.tables left outer join information_schema.columns on -information_schema.tables.table_name = information_schema.columns.table_name -group by information_schema.tables.table_name; -table name no of columns in the table -CHARACTER_SETS 4 -COLLATIONS 6 -COLLATION_CHARACTER_SET_APPLICABILITY 2 -COLUMNS 19 -columns_priv 7 -COLUMN_PRIVILEGES 7 -db 20 -func 4 -help_category 4 -help_keyword 2 -help_relation 2 -help_topic 6 -host 19 -KEY_COLUMN_USAGE 12 -proc 16 -procs_priv 8 -ROUTINES 20 -SCHEMATA 5 -SCHEMA_PRIVILEGES 5 -STATISTICS 15 -t1 6 -t10 6 -t11 6 -t2 6 -t3 3 -t4 6 -t6 6 -t7 4 -t8 4 -t9 3 -TABLES 21 -tables_priv 8 -TABLE_CONSTRAINTS 6 -TABLE_PRIVILEGES 6 -tb1 50 -tb2 51 -tb3 52 -tb4 57 -time_zone 2 -time_zone_leap_second 2 -time_zone_name 2 -time_zone_transition 3 -time_zone_transition_type 5 -TRIGGERS 19 -user 37 -USER_PRIVILEGES 4 -v1 21 -VIEWS 8 -vu 3 -vu1 1 - -root: simple select to check all - and never forget some - tables ------------------------------------------------------------------ -SELECT * FROM schemata LIMIT 1; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -SELECT * FROM tables LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -SELECT * FROM columns LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -SELECT * FROM character_sets LIMIT 1; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -SELECT * FROM routines LIMIT 1; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost -SELECT * FROM statistics LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -SELECT * FROM views LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -SELECT * FROM user_privileges LIMIT 1; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -SELECT * FROM schema_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -SELECT * FROM table_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM column_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM table_constraints LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -SELECT * FROM key_column_usage LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -SELECT * FROM triggers LIMIT 1; -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 -SELECT * FROM parameters LIMIT 1; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT * FROM referential_constraints LIMIT 1; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -use db_datadict; -select * from schemata; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from tables; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.catalog_name, s.schema_name, s.default_character_set_name; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from columns limit 0, 5; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -select * from character_sets limit 0, 5; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -select * from collations limit 0, 5; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -select * from collation_character_set_applicability limit 0, 5; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -select * from routines limit 0, 5; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -select * from statistics limit 0, 5; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -select * from views limit 0, 5; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -select * from user_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -select * from schema_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -select * from table_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -select * from column_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -select * from table_constraints limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -select * from key_column_usage limit 0, 5; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist - -will fail due to missing database name --------------------------------------- - -known error 1146: ------------------ -SELECT * FROM schemata ; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * FROM tables ; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -SELECT * FROM columns ; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -SELECT * FROM character_sets ; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -SELECT * FROM collations ; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -SELECT * FROM collation_character_set_applicability ; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -SELECT * FROM routines ; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -SELECT * FROM statistics ; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -SELECT * FROM views ; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -SELECT * FROM user_privileges ; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -SELECT * FROM schema_privileges ; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -SELECT * FROM table_privileges ; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -SELECT * FROM column_privileges ; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -SELECT * FROM table_constraints ; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -SELECT * FROM key_column_usage ; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist -SELECT * FROM triggers ; -ERROR 42S02: Table 'db_datadict.triggers' doesn't exist -select * from information_schema.schemata ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE MEMORY -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from information_schema.schemata s inner join information_schema.tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MEMORY -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MEMORY -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MEMORY -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MEMORY -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MEMORY -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MEMORY -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from information_schema.columns limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -select * from information_schema.character_sets limit 0, 5; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -select * from information_schema.collations limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -select * from information_schema.collation_character_set_applicability limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -select * from information_schema.routines limit 0, 5; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select * from information_schema.statistics limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -select * from information_schema.views limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from information_schema.user_privileges limit 0, 5; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -select * from information_schema.schema_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from information_schema.table_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.column_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.table_constraints limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select * from information_schema.key_column_usage limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -select count(*) as max_recs from information_schema.key_column_usage limit 0, 5; -max_recs -40 - -root: check with db name ------------------------- -SELECT COUNT(*) FROM information_schema. schemata ; -COUNT(*) -6 -SELECT COUNT(*) FROM information_schema. tables ; -COUNT(*) -51 -SELECT COUNT(*) FROM information_schema. columns ; -COUNT(*) -642 -SELECT COUNT(*) FROM information_schema. character_sets ; -COUNT(*) -36 -SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. routines ; -COUNT(*) -1 -SELECT COUNT(*) FROM information_schema. statistics ; -COUNT(*) -43 -SELECT COUNT(*) FROM information_schema. views ; -COUNT(*) -3 -SELECT COUNT(*) FROM information_schema. user_privileges ; -COUNT(*) -75 -SELECT COUNT(*) FROM information_schema. schema_privileges ; -COUNT(*) -28 -SELECT COUNT(*) FROM information_schema. table_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. column_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. table_constraints ; -COUNT(*) -20 -SELECT COUNT(*) FROM information_schema. key_column_usage ; -COUNT(*) -40 -SELECT COUNT(*) FROM information_schema. triggers ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. parameters ; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT COUNT(*) FROM information_schema. referential_constraints ; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -USE db_datadict; -DROP VIEW v1, vu1, vu; -DROP PROCEDURE db_datadict.sp_1; -USE information_schema; - -Testcase 3.2.1.2: --------------------------------------------------------------------------------- -select catalog_name, schema_name, default_character_set_name -from schemata where schema_name like '%s%'; -catalog_name schema_name default_character_set_name -NULL information_schema utf8 -NULL mysql latin1 -NULL test latin1 -NULL test1 latin1 -NULL test4 latin1 -select count(*) as tot_tabs from tables; -tot_tabs -48 -select count(*) as the_cols from columns; -the_cols -617 -select max(maxlen) as the_max from character_sets; -the_max -3 -select * from collations order by id asc limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -latin2_czech_cs latin2 2 Yes 4 -dec8_swedish_ci dec8 3 Yes 0 -cp850_general_ci cp850 4 Yes 0 -latin1_german1_ci latin1 5 Yes 1 -select * from collation_character_set_applicability -order by character_set_name desc, collation_name limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -select routine_definition from routines; -routine_definition -select * from statistics where table_name not like 'help_%' -group by index_name asc limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -select concat(table_schema, ', ', table_name, ', ', view_definition) view_info -from views; -view_info -select concat(table_schema, ', ', table_name) "Table_info" - from tables ORDER BY 1; -Table_info -information_schema, CHARACTER_SETS -information_schema, COLLATIONS -information_schema, COLLATION_CHARACTER_SET_APPLICABILITY -information_schema, COLUMNS -information_schema, COLUMN_PRIVILEGES -information_schema, KEY_COLUMN_USAGE -information_schema, ROUTINES -information_schema, SCHEMATA -information_schema, SCHEMA_PRIVILEGES -information_schema, STATISTICS -information_schema, TABLES -information_schema, TABLE_CONSTRAINTS -information_schema, TABLE_PRIVILEGES -information_schema, TRIGGERS -information_schema, USER_PRIVILEGES -information_schema, VIEWS -mysql, columns_priv -mysql, db -mysql, func -mysql, help_category -mysql, help_keyword -mysql, help_relation -mysql, help_topic -mysql, host -mysql, proc -mysql, procs_priv -mysql, tables_priv -mysql, time_zone -mysql, time_zone_leap_second -mysql, time_zone_name -mysql, time_zone_transition -mysql, time_zone_transition_type -mysql, user -test, t1 -test, t10 -test, t11 -test, t2 -test, t3 -test, t4 -test, t7 -test, t8 -test, t9 -test, tb1 -test, tb2 -test, tb3 -test, tb4 -test1, tb2 -test4, t6 -select distinct grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select * from schema_privileges where table_catalog is null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from table_privileges where grantee like '%r%' limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges where table_catalog is not null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select HIGH_PRIORITY * from table_constraints -group by constraint_name desc limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select sum(ordinal_position) from key_column_usage; -sum(ordinal_position) -77 -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select distinct grantee from user_privileges; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select all grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -select id , character_set_name from collations order by id asc limit 10; -id character_set_name -1 big5 -2 latin2 -3 dec8 -4 cp850 -5 latin1 -6 hp8 -7 koi8r -8 latin1 -9 latin2 -10 swe7 -select table_catalog from columns -union all -select table_catalog from tables limit 0,5; -table_catalog -NULL -NULL -NULL -NULL -NULL -select table_catalog from columns -union -select table_catalog from tables limit 0,5; -table_catalog -NULL -select all schema_name from information_schema.schemata; -schema_name -information_schema -db_datadict -mysql -test -test1 -test4 -SELECT * -INTO OUTFILE '../tmp/out.memory.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -USE test; -SELECT * -INTO OUTFILE '../tmp/out.memory.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CREATE USER user_3212@localhost; -GRANT ALL ON db_datadict.* TO user_3212@localhost; -GRANT FILE ON *.* TO user_3212@localhost; -connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_3212@localhost db_datadict -SELECT * -INTO OUTFILE '../tmp/out.memory.user.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -INTO OUTFILE '../tmp/out.memory.user.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; -SELECT * -INTO OUTFILE '../tmp/out.memory.user_2.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -SELECT * -FROM schemata LIMIT 0, 5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -SELECT * -INTO OUTFILE '../tmp/out.memory.user_2.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; - -root@localhost information_schema -use db_datadict; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from information_schema.columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from information_schema.tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -use information_schema; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -DROP USER user_3212@localhost; - -Testcase 3.2.1.3: --------------------------------------------------------------------------------- -insert into schemata (catalog_name, schema_name, default_character_set_name, sql_path) -values ('null', 'db1', 'latin1', 'null'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into tables (table_schema, table_name)values('db_datadict', 't1'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into columns (table_name, column_name)values('t3', 'f2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into character_sets (character_set_name, default_collate_name, description, maxlen) -values('cp1251', 'cp1251_general_ci', 'windows cyrillic', 1); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collation_character_set_applicability (collation_name, character_set_name) -values (' big5_chinese_ci', 'big6'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into routines(routine_name, routine_type ) values ('p2', 'procedure'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into statistics(table_schema, table_name, index_name) -values ('mysql', 'db', 'primary'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into views(table_schema, table_name) values ('db2', 'v2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into user_privileges (privilege_type, is_grantable) values ('select', 'yes'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into schema_privileges (table_schema, privilege_type) values('db2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_privileges (able_schema, table_name, privilege_type) -values('db2', 'v2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into column_privileges (table_name, column_name, privilege_type) -values ('t3', 'f3', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into key_column_usage (constraint_schema, constraint_name, table_name) -values ('mysql', 'primary', 'db'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_3; -create procedure db_datadict.sp_4_1_3() -begin -insert into information_schema.schema_privileges (table_schema,privilege_type) -values('db2','insert'); -end// -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -call db_datadict.sp_4_1_3(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -drop procedure db_datadict.sp_4_1_3; -CREATE USER user_4_1_3@localhost; -connect(localhost,user_4_1_3,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_3@localhost test -use information_schema; -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.4: --------------------------------------------------------------------------------- -use information_schema; - -root@localhost information_schema -update schemata set schema_name = 'db5' where default_character_set_name = 'latin1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update tables set table_schema = 'db_datadict1' where table_name = 't1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update character_sets set character_set_name = 'cp1252' where maxlen = 1; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collations set collation_name = 'cp1253_bin' - where character_set_name = 'cp1251'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collation_character_set_applicability set collation_name = 'big6_chinese_ci' - where character_set_name = 'big6'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update routines set routine_name = p2 where routine_body = 'sql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update statistics set table_schema = 'mysql1' where table_name = 'db'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update views set table_schema = 'db3' where table_name = 'v1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update schema_privileges set table_schema = 'db2' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_privileges set table_name = 'v3' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update column_privileges set table_name = 't4' where column_name = 'f3'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_constraints set constraint_schema = 'primary' - where table_schema = 'proc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update key_column_usage set table_name = 'db1' where constraint_name = 'primary'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_4; -create procedure db_datadict.sp_4_1_4() -begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end// -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -call db_datadict.sp_4_1_4(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -drop procedure db_datadict.sp_4_1_4; -use information_schema; - -user_4_1_3@localhost information_schema -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.5: --------------------------------------------------------------------------------- -use information_schema; - -root: DELETE FROM any table in IS ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schemata where schema_name = 'mysql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from columns; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from character_sets; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collations; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collation_character_set_applicability; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from routines; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from statistics; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from views; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from user_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schema_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from column_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_constraints; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from key_column_usage; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_5; -create procedure db_datadict.sp_4_1_5() -begin -delete from information_schema.column_privileges; -end// -call db_datadict.sp_4_1_5(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure db_datadict.sp_4_1_5; -use information_schema; - -user_4_1_3@localhost information_schema -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_3@localhost; - -Testcase 3.2.1.6: --------------------------------------------------------------------------------- -use information_schema; - -root: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use db_datadict; - -root: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -CREATE USER user_4_1_6@localhost; -grant all on *.* to user_4_1_6@localhost; -FLUSH PRIVILEGES; -SHOW GRANTS FOR user_4_1_6@localhost; -Grants for user_4_1_6@localhost -GRANT ALL PRIVILEGES ON *.* TO 'user_4_1_6'@'localhost' -connect(localhost,user_4_1_6,,information_schema,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_6@localhost information_schema -use information_schema; - -user: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use test; - -user: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema - -root@localhost db_datadict -DROP USER user_4_1_6@localhost; - -Testcase 3.2.1.7: --------------------------------------------------------------------------------- -use information_schema; - -root: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -USE db_datadict; - -root: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.columns; -SELECT * FROM v1 LIMIT 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -CREATE USER user_4_1_7@localhost; -GRANT ALL ON db_datadict.* TO user_4_1_7@localhost; -GRANT ALL ON information_schema.* TO user_4_1_7@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,user_4_1_7,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_7@localhost information_schema - -user: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -create view v1 as select * from table_privileges; -ERROR 42S02: Unknown table 'v1' in information_schema -use db_datadict; - -user: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' - -root@localhost db_datadict -DROP USER user_4_1_7@localhost; -DROP VIEW db_datadict.v1; - -Testcase 3.2.1.8: --------------------------------------------------------------------------------- -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_8@localhost; -grant select, index on *.* to user_4_1_8@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_8,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_8@localhost test -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_8@localhost; - -Testcase 3.2.1.9: --------------------------------------------------------------------------------- - -root: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; - -root: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schemata add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table tables drop primary key; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table columns add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table character_sets disable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collation_character_set_applicability add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table routines discard tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table statistics import tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table views drop column table_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table user_privileges drop index privilege_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schema_privileges drop column is_grantable; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_privileges order by constraint_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table column_privileges rename to aaxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_constraints order by schema_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table key_column_usage rename to information_schema.aabxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table triggers rename to information_schema.sql_mode; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER user_4_1_9@localhost; -grant select, alter, create, insert on *.* to user_4_1_9@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_9,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_9@localhost db_datadict -use db_datadict; - -user: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -use information_schema; - -user: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_9@localhost; - -Testcase 3.2.1.10: --------------------------------------------------------------------------------- -use information_schema; - -root: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; - -root: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_10@localhost; -GRANT SELECT, DROP ON *.* TO user_4_1_10@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_10,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_10@localhost information_schema - -user: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -use db_datadict; - -user: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_10@localhost; -CREATE USER user_4_1_11@localhost; -GRANT SUPER ON *.* TO user_4_1_11@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_11,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_11@localhost information_schema -drop table routines; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name ); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create view v1 as select * from schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -delete from columns; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, -is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_11@localhost; - -Testcase 3.2.1.11: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'u_6_401011'@'localhost'; -GRANT ALL ON information_schema.* TO 'u_6_401011'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401011'@'localhost'; -FLUSH PRIVILEGES; -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' - -root: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -connect(localhost,u_6_401011,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; - -u_6_401011@localhost information_schema -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -user: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP TABLE IF EXISTS db_datadict.schemata; -DROP USER 'u_6_401011'@'localhost'; - -Testcase 3.2.1.12: --------------------------------------------------------------------------------- - -root: delete from IS tables ---------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.tables SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.columns SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.statistics SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.views SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.column_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_constraints SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.key_column_usage SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schemata SET catalog_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.character_sets SET description = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collations SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collation_character_set_applicability -SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.routines SET routine_type = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.user_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schema_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.triggers SET sql_mode = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER 'u_6_401012'@'localhost'; -connect(localhost,u_6_401012,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -insert into information_schema.schemata (catalog_name, schema_name, -default_character_set_name, sql_path) -values (null, information_schema1, utf16, null); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.schemata rename db_datadict1.schemata; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.tables drop column checksum; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.statistics modify packed int; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.routines modify created int not null; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.key_column_usage drop column ordinal_position; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.table_privileges -change privilege_type rights_approved varchar(32); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -delete from information_schema.collations; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' - -root@localhost information_schema -drop table if exists db_datadict1.schemata; -DROP USER 'u_6_401012'@'localhost'; - -Testcase 3.2.1.13: --------------------------------------------------------------------------------- -use information_schema; - -first check status >before< creating the objects ... ----------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401013(f1 char(10), f2 char(25), f3 int) -engine = memory; -create view res_v_401013 as select * from res_t_401013; -CREATE USER u_6_401013@localhost; -create procedure sp_6_401013() select 'db_datadict'; -create function fn_6_401013() returns int return 0; -create index i_6_401013 on res_t_401013(f3); -use information_schema; - -now check whether all new objects exists in IS ... --------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MEMORY -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_t_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_v_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401013 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401013 FUNCTION DEFINER -sp_6_401013 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401013 db_datadict i_6_401013 HASH -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401013'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401013 on res_t_401013; -drop table db_datadict.res_t_401013; -drop view db_datadict.res_v_401013; -DROP USER u_6_401013@localhost; -drop procedure sp_6_401013; -drop function fn_6_401013; -drop database db_datadict; -use information_schema; - -and now check whether all objects are removed from IS ... ---------------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.14: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401014(f1 char(10), f2 varchar(25), f3 int); -create view res_v_401014 as select * from res_t_401014; -create procedure sp_6_401014() select 'db_datadict'; -create function fn_6_401014() returns int return 0; - -show existing objects >before< changing them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -alter table res_t_401014 change f1 ff1 int; -alter table res_t_401014 engine = MyISAM; -alter table res_t_401014 change f3 f3_new bigint; -alter view res_v_401014 as select ff1 from res_t_401014; -alter procedure sp_6_401014 sql security invoker; -alter function fn_6_401014 comment 'updated comments'; -alter database db_datadict character set utf8; - -now check whether the changes are visible in IS ... ---------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict utf8 utf8_general_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE INVOKER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop table db_datadict.res_t_401014; -drop view db_datadict.res_v_401014; -drop procedure sp_6_401014; -drop function fn_6_401014; -drop database db_datadict; - -Testcase 3.2.1.15: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401015(f1 char(10), f2 text(25), f3 int); -create view res_v_401015 as select * from res_t_401015; -CREATE USER u_6_401015@localhost; -create procedure sp_6_401015() select 'test'; -create function fn_6_401015() returns int return 0; -create index i_6_401015 on res_t_401015(f3); - -show existing objects >before< dropping them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_t_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_v_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401015 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401015 FUNCTION DEFINER -sp_6_401015 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401015 db_datadict i_6_401015 BTREE -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401015'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401015 on res_t_401015; -drop table db_datadict.res_t_401015; -drop view db_datadict.res_v_401015; -DROP USER u_6_401015@localhost; -drop procedure sp_6_401015; -drop function fn_6_401015; - -now check they are really gone ... ----------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.16: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE DATABASE db_hidden; -USE db_hidden; -CREATE TABLE tb_hidden ( c1 TEXT ); -USE db_datadict; -CREATE TABLE res_t_401016(f1 char(10),f2 text(25),f3 int); -CREATE TABLE res_t_401016_1(f1 char(10),f2 text(25),f3 int); -CREATE USER 'u_6_401016'@'localhost'; -GRANT SELECT ON db_datadict.res_t_401016 TO 'u_6_401016'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT table_schema, table_name, engine -FROM TABLES; -table_schema table_name engine -information_schema CHARACTER_SETS MEMORY -information_schema COLLATIONS MEMORY -information_schema COLLATION_CHARACTER_SET_APPLICABILITY MEMORY -information_schema COLUMNS MyISAM -information_schema COLUMN_PRIVILEGES MEMORY -information_schema KEY_COLUMN_USAGE MEMORY -information_schema ROUTINES MyISAM -information_schema SCHEMATA MEMORY -information_schema SCHEMA_PRIVILEGES MEMORY -information_schema STATISTICS MEMORY -information_schema TABLES MEMORY -information_schema TABLE_CONSTRAINTS MEMORY -information_schema TABLE_PRIVILEGES MEMORY -information_schema TRIGGERS MyISAM -information_schema USER_PRIVILEGES MEMORY -information_schema VIEWS MyISAM -db_datadict res_t_401016 MyISAM -test t1 MEMORY -test t10 MEMORY -test t11 MEMORY -test t2 MEMORY -test t3 MEMORY -test t4 MEMORY -test t7 MEMORY -test t8 MEMORY -test t9 MEMORY -test tb1 MEMORY -test tb2 MEMORY -test tb3 MEMORY -test tb4 MEMORY -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost db_datadict -grant usage on information_schema.* to 'u_6_401016'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401016'@'localhost'; -drop table res_t_401016; -drop table res_t_401016_1; -DROP DATABASE db_hidden; - -Testcase 3.2.1.17: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401017'@'localhost'; -grant select on information_schema.* to u_6_401017@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -select * from collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms -select * from schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -select table_name from tables; -table_name -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -t1 -t10 -t11 -t2 -t3 -t4 -t7 -t8 -t9 -tb1 -tb2 -tb3 -tb4 -select table_name, column_name, column_type from columns; -table_name column_name column_type -CHARACTER_SETS CHARACTER_SET_NAME varchar(64) -CHARACTER_SETS DEFAULT_COLLATE_NAME varchar(64) -CHARACTER_SETS DESCRIPTION varchar(60) -CHARACTER_SETS MAXLEN bigint(3) -COLLATIONS COLLATION_NAME varchar(64) -COLLATIONS CHARACTER_SET_NAME varchar(64) -COLLATIONS ID bigint(11) -COLLATIONS IS_DEFAULT varchar(3) -COLLATIONS IS_COMPILED varchar(3) -COLLATIONS SORTLEN bigint(3) -COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar(64) -COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar(64) -COLUMNS TABLE_CATALOG varchar(4096) -COLUMNS TABLE_SCHEMA varchar(64) -COLUMNS TABLE_NAME varchar(64) -COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) -COLUMNS COLUMN_DEFAULT longtext -COLUMNS IS_NULLABLE varchar(3) -COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) -COLUMNS CHARACTER_SET_NAME varchar(64) -COLUMNS COLLATION_NAME varchar(64) -COLUMNS COLUMN_TYPE longtext -COLUMNS COLUMN_KEY varchar(3) -COLUMNS EXTRA varchar(20) -COLUMNS PRIVILEGES varchar(80) -COLUMNS COLUMN_COMMENT varchar(255) -COLUMN_PRIVILEGES GRANTEE varchar(81) -COLUMN_PRIVILEGES TABLE_CATALOG varchar(4096) -COLUMN_PRIVILEGES TABLE_SCHEMA varchar(64) -COLUMN_PRIVILEGES TABLE_NAME varchar(64) -COLUMN_PRIVILEGES COLUMN_NAME varchar(64) -COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar(64) -COLUMN_PRIVILEGES IS_GRANTABLE varchar(3) -KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar(4096) -KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar(64) -KEY_COLUMN_USAGE CONSTRAINT_NAME varchar(64) -KEY_COLUMN_USAGE TABLE_CATALOG varchar(4096) -KEY_COLUMN_USAGE TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE TABLE_NAME varchar(64) -KEY_COLUMN_USAGE COLUMN_NAME varchar(64) -KEY_COLUMN_USAGE ORDINAL_POSITION bigint(10) -KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint(10) -KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar(64) -KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar(64) -ROUTINES SPECIFIC_NAME varchar(64) -ROUTINES ROUTINE_CATALOG varchar(4096) -ROUTINES ROUTINE_SCHEMA varchar(64) -ROUTINES ROUTINE_NAME varchar(64) -ROUTINES ROUTINE_TYPE varchar(9) -ROUTINES DTD_IDENTIFIER varchar(64) -ROUTINES ROUTINE_BODY varchar(8) -ROUTINES ROUTINE_DEFINITION longtext -ROUTINES EXTERNAL_NAME varchar(64) -ROUTINES EXTERNAL_LANGUAGE varchar(64) -ROUTINES PARAMETER_STYLE varchar(8) -ROUTINES IS_DETERMINISTIC varchar(3) -ROUTINES SQL_DATA_ACCESS varchar(64) -ROUTINES SQL_PATH varchar(64) -ROUTINES SECURITY_TYPE varchar(7) -ROUTINES CREATED datetime -ROUTINES LAST_ALTERED datetime -ROUTINES SQL_MODE longtext -ROUTINES ROUTINE_COMMENT varchar(64) -ROUTINES DEFINER varchar(77) -SCHEMATA CATALOG_NAME varchar(4096) -SCHEMATA SCHEMA_NAME varchar(64) -SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar(64) -SCHEMATA DEFAULT_COLLATION_NAME varchar(64) -SCHEMATA SQL_PATH varchar(4096) -SCHEMA_PRIVILEGES GRANTEE varchar(81) -SCHEMA_PRIVILEGES TABLE_CATALOG varchar(4096) -SCHEMA_PRIVILEGES TABLE_SCHEMA varchar(64) -SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar(64) -SCHEMA_PRIVILEGES IS_GRANTABLE varchar(3) -STATISTICS TABLE_CATALOG varchar(4096) -STATISTICS TABLE_SCHEMA varchar(64) -STATISTICS TABLE_NAME varchar(64) -STATISTICS NON_UNIQUE bigint(1) -STATISTICS INDEX_SCHEMA varchar(64) -STATISTICS INDEX_NAME varchar(64) -STATISTICS SEQ_IN_INDEX bigint(2) -STATISTICS COLUMN_NAME varchar(64) -STATISTICS COLLATION varchar(1) -STATISTICS CARDINALITY bigint(21) -STATISTICS SUB_PART bigint(3) -STATISTICS PACKED varchar(10) -STATISTICS NULLABLE varchar(3) -STATISTICS INDEX_TYPE varchar(16) -STATISTICS COMMENT varchar(16) -TABLES TABLE_CATALOG varchar(4096) -TABLES TABLE_SCHEMA varchar(64) -TABLES TABLE_NAME varchar(64) -TABLES TABLE_TYPE varchar(64) -TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) -TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) -TABLES CREATE_TIME datetime -TABLES UPDATE_TIME datetime -TABLES CHECK_TIME datetime -TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) -TABLES CREATE_OPTIONS varchar(255) -TABLES TABLE_COMMENT varchar(80) -TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) -TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_NAME varchar(64) -TABLE_CONSTRAINTS TABLE_SCHEMA varchar(64) -TABLE_CONSTRAINTS TABLE_NAME varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar(64) -TABLE_PRIVILEGES GRANTEE varchar(81) -TABLE_PRIVILEGES TABLE_CATALOG varchar(4096) -TABLE_PRIVILEGES TABLE_SCHEMA varchar(64) -TABLE_PRIVILEGES TABLE_NAME varchar(64) -TABLE_PRIVILEGES PRIVILEGE_TYPE varchar(64) -TABLE_PRIVILEGES IS_GRANTABLE varchar(3) -TRIGGERS TRIGGER_CATALOG varchar(4096) -TRIGGERS TRIGGER_SCHEMA varchar(64) -TRIGGERS TRIGGER_NAME varchar(64) -TRIGGERS EVENT_MANIPULATION varchar(6) -TRIGGERS EVENT_OBJECT_CATALOG varchar(4096) -TRIGGERS EVENT_OBJECT_SCHEMA varchar(64) -TRIGGERS EVENT_OBJECT_TABLE varchar(64) -TRIGGERS ACTION_ORDER bigint(4) -TRIGGERS ACTION_CONDITION longtext -TRIGGERS ACTION_STATEMENT longtext -TRIGGERS ACTION_ORIENTATION varchar(9) -TRIGGERS ACTION_TIMING varchar(6) -TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_OLD_ROW varchar(3) -TRIGGERS ACTION_REFERENCE_NEW_ROW varchar(3) -TRIGGERS CREATED datetime -TRIGGERS SQL_MODE longtext -TRIGGERS DEFINER longtext -USER_PRIVILEGES GRANTEE varchar(81) -USER_PRIVILEGES TABLE_CATALOG varchar(4096) -USER_PRIVILEGES PRIVILEGE_TYPE varchar(64) -USER_PRIVILEGES IS_GRANTABLE varchar(3) -VIEWS TABLE_CATALOG varchar(4096) -VIEWS TABLE_SCHEMA varchar(64) -VIEWS TABLE_NAME varchar(64) -VIEWS VIEW_DEFINITION longtext -VIEWS CHECK_OPTION varchar(8) -VIEWS IS_UPDATABLE varchar(3) -VIEWS DEFINER varchar(77) -VIEWS SECURITY_TYPE varchar(7) -t1 f1 char(20) -t1 f2 char(25) -t1 f3 date -t1 f4 int(11) -t1 f5 char(25) -t1 f6 int(11) -t10 f1 char(20) -t10 f2 char(25) -t10 f3 date -t10 f4 int(11) -t10 f5 char(25) -t10 f6 int(11) -t11 f1 char(20) -t11 f2 char(25) -t11 f3 date -t11 f4 int(11) -t11 f5 char(25) -t11 f6 int(11) -t2 f1 char(20) -t2 f2 char(25) -t2 f3 date -t2 f4 int(11) -t2 f5 char(25) -t2 f6 int(11) -t3 f1 char(20) -t3 f2 char(20) -t3 f3 int(11) -t4 f1 char(20) -t4 f2 char(25) -t4 f3 date -t4 f4 int(11) -t4 f5 char(25) -t4 f6 int(11) -t7 f1 char(20) -t7 f2 char(25) -t7 f3 date -t7 f4 int(11) -t8 f1 char(20) -t8 f2 char(25) -t8 f3 date -t8 f4 int(11) -t9 f1 int(11) -t9 f2 char(25) -t9 f3 int(11) -tb1 f1 char(1) -tb1 f2 char(1) -tb1 f3 char(1) -tb1 f12 binary(1) -tb1 f13 tinyint(4) -tb1 f14 tinyint(3) unsigned -tb1 f15 tinyint(3) unsigned zerofill -tb1 f16 tinyint(3) unsigned zerofill -tb1 f17 smallint(6) -tb1 f18 smallint(5) unsigned -tb1 f19 smallint(5) unsigned zerofill -tb1 f20 smallint(5) unsigned zerofill -tb1 f21 mediumint(9) -tb1 f22 mediumint(8) unsigned -tb1 f23 mediumint(8) unsigned zerofill -tb1 f24 mediumint(8) unsigned zerofill -tb1 f25 int(11) -tb1 f26 int(10) unsigned -tb1 f27 int(10) unsigned zerofill -tb1 f28 int(10) unsigned zerofill -tb1 f29 bigint(20) -tb1 f30 bigint(20) unsigned -tb1 f31 bigint(20) unsigned zerofill -tb1 f32 bigint(20) unsigned zerofill -tb1 f33 decimal(10,0) -tb1 f34 decimal(10,0) unsigned -tb1 f35 decimal(10,0) unsigned zerofill -tb1 f36 decimal(10,0) unsigned zerofill -tb1 f37 decimal(10,0) -tb1 f38 decimal(64,0) -tb1 f39 decimal(10,0) unsigned -tb1 f40 decimal(64,0) unsigned -tb1 f41 decimal(10,0) unsigned zerofill -tb1 f42 decimal(64,0) unsigned zerofill -tb1 f43 decimal(10,0) unsigned zerofill -tb1 f44 decimal(64,0) unsigned zerofill -tb1 f45 decimal(10,0) -tb1 f46 decimal(63,30) -tb1 f47 decimal(10,0) unsigned -tb1 f48 decimal(63,30) unsigned -tb1 f49 decimal(10,0) unsigned zerofill -tb1 f50 decimal(63,30) unsigned zerofill -tb1 f51 decimal(10,0) unsigned zerofill -tb1 f52 decimal(63,30) unsigned zerofill -tb1 f53 decimal(10,0) -tb1 f54 decimal(10,0) unsigned -tb1 f55 decimal(10,0) unsigned zerofill -tb1 f56 decimal(10,0) unsigned zerofill -tb1 f57 decimal(10,0) -tb1 f58 decimal(64,0) -tb2 f59 decimal(10,0) unsigned -tb2 f60 decimal(64,0) unsigned -tb2 f61 decimal(10,0) unsigned zerofill -tb2 f62 decimal(64,0) unsigned zerofill -tb2 f63 decimal(10,0) unsigned zerofill -tb2 f64 decimal(64,0) unsigned zerofill -tb2 f65 decimal(10,0) -tb2 f66 decimal(63,30) -tb2 f67 decimal(10,0) unsigned -tb2 f68 decimal(63,30) unsigned -tb2 f69 decimal(10,0) unsigned zerofill -tb2 f70 decimal(63,30) unsigned zerofill -tb2 f71 decimal(10,0) unsigned zerofill -tb2 f72 decimal(63,30) unsigned zerofill -tb2 f73 double -tb2 f74 double unsigned -tb2 f75 double unsigned zerofill -tb2 f76 double unsigned zerofill -tb2 f77 double -tb2 f78 double unsigned -tb2 f79 double unsigned zerofill -tb2 f80 double unsigned zerofill -tb2 f81 float -tb2 f82 float unsigned -tb2 f83 float unsigned zerofill -tb2 f84 float unsigned zerofill -tb2 f85 float -tb2 f86 float -tb2 f87 float unsigned -tb2 f88 float unsigned -tb2 f89 float unsigned zerofill -tb2 f90 float unsigned zerofill -tb2 f91 float unsigned zerofill -tb2 f92 float unsigned zerofill -tb2 f93 float -tb2 f94 double -tb2 f95 float unsigned -tb2 f96 double unsigned -tb2 f97 float unsigned zerofill -tb2 f98 double unsigned zerofill -tb2 f99 float unsigned zerofill -tb2 f100 double unsigned zerofill -tb2 f101 date -tb2 f102 time -tb2 f103 datetime -tb2 f104 timestamp -tb2 f105 year(4) -tb2 f106 year(4) -tb2 f107 year(4) -tb2 f108 enum('1enum','2enum') -tb2 f109 set('1set','2set') -tb3 f118 char(1) -tb3 f119 char(1) -tb3 f120 char(1) -tb3 f121 char(50) -tb3 f122 char(50) -tb3 f129 binary(1) -tb3 f130 tinyint(4) -tb3 f131 tinyint(3) unsigned -tb3 f132 tinyint(3) unsigned zerofill -tb3 f133 tinyint(3) unsigned zerofill -tb3 f134 smallint(6) -tb3 f135 smallint(5) unsigned -tb3 f136 smallint(5) unsigned zerofill -tb3 f137 smallint(5) unsigned zerofill -tb3 f138 mediumint(9) -tb3 f139 mediumint(8) unsigned -tb3 f140 mediumint(8) unsigned zerofill -tb3 f141 mediumint(8) unsigned zerofill -tb3 f142 int(11) -tb3 f143 int(10) unsigned -tb3 f144 int(10) unsigned zerofill -tb3 f145 int(10) unsigned zerofill -tb3 f146 bigint(20) -tb3 f147 bigint(20) unsigned -tb3 f148 bigint(20) unsigned zerofill -tb3 f149 bigint(20) unsigned zerofill -tb3 f150 decimal(10,0) -tb3 f151 decimal(10,0) unsigned -tb3 f152 decimal(10,0) unsigned zerofill -tb3 f153 decimal(10,0) unsigned zerofill -tb3 f154 decimal(10,0) -tb3 f155 decimal(64,0) -tb3 f156 decimal(10,0) unsigned -tb3 f157 decimal(64,0) unsigned -tb3 f158 decimal(10,0) unsigned zerofill -tb3 f159 decimal(64,0) unsigned zerofill -tb3 f160 decimal(10,0) unsigned zerofill -tb3 f161 decimal(64,0) unsigned zerofill -tb3 f162 decimal(10,0) -tb3 f163 decimal(63,30) -tb3 f164 decimal(10,0) unsigned -tb3 f165 decimal(63,30) unsigned -tb3 f166 decimal(10,0) unsigned zerofill -tb3 f167 decimal(63,30) unsigned zerofill -tb3 f168 decimal(10,0) unsigned zerofill -tb3 f169 decimal(63,30) unsigned zerofill -tb3 f170 decimal(10,0) -tb3 f171 decimal(10,0) unsigned -tb3 f172 decimal(10,0) unsigned zerofill -tb3 f173 decimal(10,0) unsigned zerofill -tb3 f174 decimal(10,0) -tb3 f175 decimal(64,0) -tb4 f176 decimal(10,0) unsigned -tb4 f177 decimal(64,0) unsigned -tb4 f178 decimal(10,0) unsigned zerofill -tb4 f179 decimal(64,0) unsigned zerofill -tb4 f180 decimal(10,0) unsigned zerofill -tb4 f181 decimal(64,0) unsigned zerofill -tb4 f182 decimal(10,0) -tb4 f183 decimal(63,30) -tb4 f184 decimal(10,0) unsigned -tb4 f185 decimal(63,30) unsigned -tb4 f186 decimal(10,0) unsigned zerofill -tb4 f187 decimal(63,30) unsigned zerofill -tb4 f188 decimal(10,0) unsigned zerofill -tb4 f189 decimal(63,30) unsigned zerofill -tb4 f190 double -tb4 f191 double unsigned -tb4 f192 double unsigned zerofill -tb4 f193 double unsigned zerofill -tb4 f194 double -tb4 f195 double unsigned -tb4 f196 double unsigned zerofill -tb4 f197 double unsigned zerofill -tb4 f198 float -tb4 f199 float unsigned -tb4 f200 float unsigned zerofill -tb4 f201 float unsigned zerofill -tb4 f202 float -tb4 f203 float -tb4 f204 float unsigned -tb4 f205 float unsigned -tb4 f206 float unsigned zerofill -tb4 f207 float unsigned zerofill -tb4 f208 float unsigned zerofill -tb4 f209 float unsigned zerofill -tb4 f210 float -tb4 f211 double -tb4 f212 float unsigned -tb4 f213 double unsigned -tb4 f214 float unsigned zerofill -tb4 f215 double unsigned zerofill -tb4 f216 float unsigned zerofill -tb4 f217 double unsigned zerofill -tb4 f218 date -tb4 f219 time -tb4 f220 datetime -tb4 f221 timestamp -tb4 f222 year(4) -tb4 f223 year(4) -tb4 f224 year(4) -tb4 f225 enum('1enum','2enum') -tb4 f226 set('1set','2set') -tb4 f236 char(95) -tb4 f241 char(255) -tb4 f237 char(130) -tb4 f238 varchar(25000) -tb4 f239 varbinary(0) -tb4 f240 varchar(1200) -select character_set_name from character_sets; -character_set_name -big5 -dec8 -cp850 -hp8 -koi8r -latin1 -latin2 -swe7 -ascii -ujis -sjis -hebrew -tis620 -euckr -koi8u -gb2312 -greek -cp1250 -gbk -latin5 -armscii8 -utf8 -ucs2 -cp866 -keybcs2 -macce -macroman -cp852 -latin7 -cp1251 -cp1256 -cp1257 -binary -geostd8 -cp932 -eucjpms -select collation_name from collations where collation_name <> 'utf8_general_cs'; -collation_name -big5_chinese_ci -big5_bin -dec8_swedish_ci -dec8_bin -cp850_general_ci -cp850_bin -hp8_english_ci -hp8_bin -koi8r_general_ci -koi8r_bin -latin1_german1_ci -latin1_swedish_ci -latin1_danish_ci -latin1_german2_ci -latin1_bin -latin1_general_ci -latin1_general_cs -latin1_spanish_ci -latin2_czech_cs -latin2_general_ci -latin2_hungarian_ci -latin2_croatian_ci -latin2_bin -swe7_swedish_ci -swe7_bin -ascii_general_ci -ascii_bin -ujis_japanese_ci -ujis_bin -sjis_japanese_ci -sjis_bin -hebrew_general_ci -hebrew_bin -tis620_thai_ci -tis620_bin -euckr_korean_ci -euckr_bin -koi8u_general_ci -koi8u_bin -gb2312_chinese_ci -gb2312_bin -greek_general_ci -greek_bin -cp1250_general_ci -cp1250_czech_cs -cp1250_croatian_ci -cp1250_bin -gbk_chinese_ci -gbk_bin -latin5_turkish_ci -latin5_bin -armscii8_general_ci -armscii8_bin -utf8_general_ci -utf8_bin -utf8_unicode_ci -utf8_icelandic_ci -utf8_latvian_ci -utf8_romanian_ci -utf8_slovenian_ci -utf8_polish_ci -utf8_estonian_ci -utf8_spanish_ci -utf8_swedish_ci -utf8_turkish_ci -utf8_czech_ci -utf8_danish_ci -utf8_lithuanian_ci -utf8_slovak_ci -utf8_spanish2_ci -utf8_roman_ci -utf8_persian_ci -utf8_esperanto_ci -utf8_hungarian_ci -ucs2_general_ci -ucs2_bin -ucs2_unicode_ci -ucs2_icelandic_ci -ucs2_latvian_ci -ucs2_romanian_ci -ucs2_slovenian_ci -ucs2_polish_ci -ucs2_estonian_ci -ucs2_spanish_ci -ucs2_swedish_ci -ucs2_turkish_ci -ucs2_czech_ci -ucs2_danish_ci -ucs2_lithuanian_ci -ucs2_slovak_ci -ucs2_spanish2_ci -ucs2_roman_ci -ucs2_persian_ci -ucs2_esperanto_ci -ucs2_hungarian_ci -cp866_general_ci -cp866_bin -keybcs2_general_ci -keybcs2_bin -macce_general_ci -macce_bin -macroman_general_ci -macroman_bin -cp852_general_ci -cp852_bin -latin7_estonian_cs -latin7_general_ci -latin7_general_cs -latin7_bin -cp1251_bulgarian_ci -cp1251_ukrainian_ci -cp1251_bin -cp1251_general_ci -cp1251_general_cs -cp1256_general_ci -cp1256_bin -cp1257_lithuanian_ci -cp1257_bin -cp1257_general_ci -binary -geostd8_general_ci -geostd8_bin -cp932_japanese_ci -cp932_bin -eucjpms_japanese_ci -eucjpms_bin -select routine_name, routine_type from routines; -routine_name routine_type -select table_name, index_name from statistics; -table_name index_name -select table_name from views; -table_name -select privilege_type from user_privileges; -privilege_type -USAGE -select grantee, privilege_type from schema_privileges; -grantee privilege_type -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select column_name, privilege_type from column_privileges; -column_name privilege_type -select table_name,constraint_type from table_constraints; -table_name constraint_type -select table_schema, table_name, column_name from key_column_usage; -table_schema table_name column_name - -root@localhost db_datadict -DROP USER 'u_6_401017'@'localhost'; - -Testcase 3.2.1.18: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401018'@'localhost'; -GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401018'@'localhost'; -SHOW GRANTS FOR 'u_6_401018'@'localhost'; -Grants for u_6_401018@localhost -GRANT USAGE ON *.* TO 'u_6_401018'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'u_6_401018'@'localhost' -FLUSH PRIVILEGES; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -connect(localhost,u_6_401018,,test,MYSQL_PORT,MYSQL_SOCK); -USE db_datadict; -create view db_datadict.v_401018 as -select * from information_schema.schemata; -SELECT * FROM v_401018 ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL - -root@localhost NULL -DROP USER 'u_6_401018'@'localhost'; -DROP DATABASE db_datadict; - -Testcase 3.2.1.19: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401019'@'localhost'; -grant alter on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant alter routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create temporary tables -on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant delete on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant drop on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant execute on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant index on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant insert on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant lock tables on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant update on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT * FROM information_schema.table_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM information_schema.column_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -DROP USER 'u_6_401019'@'localhost'; - -Testcase 3.2.1.20: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401020'@'localhost'; -connect(localhost,u_6_401020,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -CREATE TABLE tb_not_allowed ( col TEXT ); -ERROR 42S02: Unknown table 'tb_not_allowed' in information_schema -create view res_v1 as select * from information_schema.schemata; -ERROR 42S02: Unknown table 'res_v1' in information_schema -alter table schemata modify catalog_name varchar(255); -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -update schemata set catalog_name = 'abc' - where schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -CREATE PROCEDURE sp_3_2_1_20() -BEGIN -INSERT INTO information_schema.schema_privileges (table_schema,privilege_type) -VALUES('db2','insert'); -END// -ERROR 42000: Unknown database 'information_schema' -DELETE FROM schemata WHERE schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' - -root@localhost NULL -DROP USER 'u_6_401020'@'localhost'; - -Testcase 3.2.2.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC character_sets; -Field Type Null Key Default Extra -CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATE_NAME varchar(64) NO -DESCRIPTION varchar(60) NO -MAXLEN bigint(3) NO 0 -SHOW CREATE TABLE character_sets; -Table Create Table -CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.2.2: --------------------------------------------------------------------------------- - -root@localhost information_schema -SELECT * FROM information_schema.character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 - -Testcase 3.2.2.3: --------------------------------------------------------------------------------- - -Testcase 3.2.3.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collations; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -ID bigint(11) NO 0 -IS_DEFAULT varchar(3) NO -IS_COMPILED varchar(3) NO -SORTLEN bigint(3) NO 0 -SHOW CREATE TABLE collations; -Table Create Table -COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `ID` bigint(11) NOT NULL default '0', - `IS_DEFAULT` varchar(3) NOT NULL default '', - `IS_COMPILED` varchar(3) NOT NULL default '', - `SORTLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.3.2: --------------------------------------------------------------------------------- -SELECT * FROM collations where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -cp850_bin cp850 80 0 -hp8_english_ci hp8 6 Yes 0 -hp8_bin hp8 72 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8r_bin koi8r 74 0 -latin1_german1_ci latin1 5 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_bin latin1 47 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_spanish_ci latin1 94 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_bin latin2 77 Yes 1 -swe7_swedish_ci swe7 10 Yes 0 -swe7_bin swe7 82 0 -ascii_general_ci ascii 11 Yes 0 -ascii_bin ascii 65 0 -ujis_japanese_ci ujis 12 Yes Yes 1 -ujis_bin ujis 91 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -sjis_bin sjis 88 Yes 1 -hebrew_general_ci hebrew 16 Yes 0 -hebrew_bin hebrew 71 0 -tis620_thai_ci tis620 18 Yes Yes 4 -tis620_bin tis620 89 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -koi8u_general_ci koi8u 22 Yes 0 -koi8u_bin koi8u 75 0 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -greek_general_ci greek 25 Yes 0 -greek_bin greek 70 0 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_bin cp1250 66 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -latin5_turkish_ci latin5 30 Yes 0 -latin5_bin latin5 78 0 -armscii8_general_ci armscii8 32 Yes 0 -armscii8_bin armscii8 64 0 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_unicode_ci utf8 192 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_hungarian_ci utf8 210 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_bin ucs2 90 Yes 1 -ucs2_unicode_ci ucs2 128 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_hungarian_ci ucs2 146 Yes 8 -cp866_general_ci cp866 36 Yes 0 -cp866_bin cp866 68 0 -keybcs2_general_ci keybcs2 37 Yes 0 -keybcs2_bin keybcs2 73 0 -macce_general_ci macce 38 Yes 0 -macce_bin macce 43 0 -macroman_general_ci macroman 39 Yes 0 -macroman_bin macroman 53 0 -cp852_general_ci cp852 40 Yes 0 -cp852_bin cp852 81 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -latin7_bin latin7 79 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1251_bin cp1251 50 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1256_bin cp1256 67 0 -cp1257_lithuanian_ci cp1257 29 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -binary binary 63 Yes Yes 1 -geostd8_general_ci geostd8 92 Yes 0 -geostd8_bin geostd8 93 0 -cp932_japanese_ci cp932 95 Yes Yes 1 -cp932_bin cp932 96 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -eucjpms_bin eucjpms 98 Yes 1 - -Testcase 3.2.3.3: --------------------------------------------------------------------------------- - -Testcase 3.2.4.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collation_character_set_applicability; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -SHOW CREATE TABLE collation_character_set_applicability; -Table Create Table -COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -COUNT(*) -2 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.4.2: --------------------------------------------------------------------------------- -SELECT * FROM collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms - -Testcase 3.2.4.3: --------------------------------------------------------------------------------- - -Testcase 3.2.5.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC column_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE column_privileges; -Table Create Table -COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -COUNT(*) -7 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.5.2 + 3.2.5.3 + 3.2.5.4: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE TABLE db_datadict.res_t40502 (f1 INT, f2 DECIMAL, f3 TEXT); -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT INSERT(f1) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT UPDATE(f2) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT SELECT(f2) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT SELECT(f3) ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost' WITH GRANT OPTION; -GRANT ALL ON db_datadict.* TO 'user_3'@'localhost'; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE NO -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -FIXME: Check it is correct that the following GRANT changes ALL privs that user_1 has -------------------------------------------------------------------------------------- -GRANT UPDATE(f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost' WITH GRANT OPTION; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -FIXME: check it is correct that granted TABLES doesn_t occur in COLUMN_PRIVILEGES ---------------------------------------------------------------------------------- -SELECT * FROM information_schema.table_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 SELECT YES -'user_3'@'localhost' NULL db_datadict res_t40502 INSERT YES -SELECT * FROM information_schema.schema_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict SELECT NO -'user_3'@'localhost' NULL db_datadict INSERT NO -'user_3'@'localhost' NULL db_datadict UPDATE NO -'user_3'@'localhost' NULL db_datadict DELETE NO -'user_3'@'localhost' NULL db_datadict CREATE NO -'user_3'@'localhost' NULL db_datadict DROP NO -'user_3'@'localhost' NULL db_datadict REFERENCES NO -'user_3'@'localhost' NULL db_datadict INDEX NO -'user_3'@'localhost' NULL db_datadict ALTER NO -'user_3'@'localhost' NULL db_datadict CREATE TEMPORARY TABLES NO -'user_3'@'localhost' NULL db_datadict LOCK TABLES NO -'user_3'@'localhost' NULL db_datadict EXECUTE NO -'user_3'@'localhost' NULL db_datadict CREATE VIEW NO -'user_3'@'localhost' NULL db_datadict SHOW VIEW NO -'user_3'@'localhost' NULL db_datadict CREATE ROUTINE NO -'user_3'@'localhost' NULL db_datadict ALTER ROUTINE NO -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; - -FIXME: check whether it is intended that *my* grants to others are *NOT* shown here ------------------------------------------------------------------------------------ -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -user_2@localhost db_datadict -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO - -root@localhost db_datadict -DROP TABLE IF EXISTS db_datadict.res_t40502; -DROP DATABASE IF EXISTS db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; - -Testcase 3.2.6.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC columns; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 -COLUMN_DEFAULT longtext YES NULL -IS_NULLABLE varchar(3) NO -DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL -CHARACTER_SET_NAME varchar(64) YES NULL -COLLATION_NAME varchar(64) YES NULL -COLUMN_TYPE longtext NO NULL -COLUMN_KEY varchar(3) NO -EXTRA varchar(20) NO -PRIVILEGES varchar(80) NO -COLUMN_COMMENT varchar(255) NO -SHOW CREATE TABLE columns; -Table Create Table -COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(21) NOT NULL default '0', - `COLUMN_DEFAULT` longtext, - `IS_NULLABLE` varchar(3) NOT NULL default '', - `DATA_TYPE` varchar(64) NOT NULL default '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) default NULL, - `NUMERIC_PRECISION` bigint(21) default NULL, - `NUMERIC_SCALE` bigint(21) default NULL, - `CHARACTER_SET_NAME` varchar(64) default NULL, - `COLLATION_NAME` varchar(64) default NULL, - `COLUMN_TYPE` longtext NOT NULL, - `COLUMN_KEY` varchar(3) NOT NULL default '', - `EXTRA` varchar(20) NOT NULL default '', - `PRIVILEGES` varchar(80) NOT NULL default '', - `COLUMN_COMMENT` varchar(255) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select - -Testcase 3.2.6.2 + 3.2.6.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table t_6_406001(f1 char(10), f2 text, f3 date, f4 int); -grant select(f1, f2) on db_datadict.t_6_406001 to 'user_1'@'localhost'; -create table t_6_406002(f1 char(10), f2 text, f3 date, f4 int); -GRANT INSERT(f1, f2) ON db_datadict.t_6_406002 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406001 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406001 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406002 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406002 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 14 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 15 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 16 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f122 5 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 16 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 17 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 18 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 24 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references -NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references -NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 14 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 15 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 16 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f122 5 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 16 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 17 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 18 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 24 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references -NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references -NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) insert -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text insert -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f12 4 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 5 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 6 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 7 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 8 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 9 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 10 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 11 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 12 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 13 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 14 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 15 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 16 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 17 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 18 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 19 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 20 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 21 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 25 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 26 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 27 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 28 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 29 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 30 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 31 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 32 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 33 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 34 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 36 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 38 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 40 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 42 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 44 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 45 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 46 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 47 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 48 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 49 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 50 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f122 5 NULL YES char 50 50 NULL NULL latin1 latin1_swedish_ci char(50) select,insert,update,references -NULL test tb3 f129 6  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 7 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 8 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 9 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 10 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 11 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 12 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 13 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 14 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 15 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 16 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 17 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 18 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 19 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 20 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 21 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 22 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 23 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 24 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 25 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 26 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 27 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 28 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 29 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 30 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 31 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 32 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 33 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 34 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 35 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 36 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 40 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 42 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 44 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 48 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 50 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 52 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f236 52 NULL YES char 95 190 NULL NULL ucs2 ucs2_general_ci char(95) select,insert,update,references -NULL test tb4 f241 53 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f237 54 NULL YES char 130 130 NULL NULL latin1 latin1_bin char(130) select,insert,update,references -NULL test tb4 f238 55 NULL YES varchar 25000 25000 NULL NULL latin1 latin1_bin varchar(25000) select,insert,update,references -NULL test tb4 f239 56 NULL YES varbinary 0 0 NULL NULL NULL NULL varbinary(0) select,insert,update,references -NULL test tb4 f240 57 NULL YES varchar 1200 2400 NULL NULL ucs2 ucs2_general_ci varchar(1200) select,insert,update,references - -root@localhost db_datadict - -Show the quotient of COL and CML for all COLUMNS ------------------------------------------------- -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE 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 binary NULL NULL -1.0000 blob NULL NULL -1.0000 longblob NULL NULL -1.0000 char latin1 latin1_bin -1.0000 varchar latin1 latin1_bin -1.0000 char latin1 latin1_swedish_ci -1.0000 enum latin1 latin1_swedish_ci -1.0000 set latin1 latin1_swedish_ci -1.0000 text latin1 latin1_swedish_ci -1.0000 longtext utf8 utf8_general_ci -1.0000 text utf8 utf8_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 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 varchar ucs2 ucs2_general_ci -3.0000 char utf8 utf8_bin -3.0000 enum utf8 utf8_bin -3.0000 char utf8 utf8_general_ci -3.0000 enum utf8 utf8_general_ci -3.0000 set utf8 utf8_general_ci -3.0000 varchar utf8 utf8_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 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 bigint NULL NULL -NULL date NULL NULL -NULL datetime NULL NULL -NULL decimal NULL NULL -NULL double NULL NULL -NULL double unsigned NULL NULL -NULL double unsigned zerofill NULL NULL -NULL float NULL NULL -NULL float unsigned NULL NULL -NULL float unsigned zerofill NULL NULL -NULL int NULL NULL -NULL mediumint NULL NULL -NULL smallint NULL NULL -NULL time NULL NULL -NULL timestamp NULL NULL -NULL tinyint NULL NULL -NULL varbinary NULL NULL -NULL year 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 -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 db_datadict t_6_406001 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406001 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406001 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406001 f4 int NULL NULL NULL NULL int(11) -1.0000 db_datadict t_6_406002 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406002 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406002 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406002 f4 int NULL NULL NULL NULL int(11) -3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) -NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11) -3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) -3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10) -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) -1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime -NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime -1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema SCHEMATA CATALOG_NAME varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA SQL_PATH varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1) -3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2) -3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1) -NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21) -NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10) -3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema TABLES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime -3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4) -1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime -1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) -NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) -NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) -3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) -3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') -NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) -NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text -1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) -3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') -3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL') -3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') -3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') -3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') -1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob -3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) -1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) -NULL mysql proc created timestamp NULL NULL NULL NULL timestamp -NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp -3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') -3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') -3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) -3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') -NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) -NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') -3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') -NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11) -3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) -NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned -3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) -3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql user User char 16 48 utf8 utf8_bin char(16) -1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) -3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') -1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob -NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned -1.0000 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 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) -1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) -NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) -NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f25 int NULL NULL NULL NULL int(11) -NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned -NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) -NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f73 double NULL NULL NULL NULL double -NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f77 double NULL NULL NULL NULL double -NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f81 float NULL NULL NULL NULL float -NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f85 float NULL NULL NULL NULL float -NULL test tb2 f86 float NULL NULL NULL NULL float -NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f93 float NULL NULL NULL NULL float -NULL test tb2 f94 double NULL NULL NULL NULL double -NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f101 date NULL NULL NULL NULL date -NULL test tb2 f102 time NULL NULL NULL NULL time -NULL test tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test tb2 f105 year NULL NULL NULL NULL year(4) -NULL test tb2 f106 year NULL NULL NULL NULL year(4) -NULL test tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) -1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f121 char 50 50 latin1 latin1_swedish_ci char(50) -1.0000 test tb3 f122 char 50 50 latin1 latin1_swedish_ci char(50) -1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) -NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) -NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f142 int NULL NULL NULL NULL int(11) -NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned -NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) -NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f190 double NULL NULL NULL NULL double -NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f194 double NULL NULL NULL NULL double -NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f198 float NULL NULL NULL NULL float -NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f202 float NULL NULL NULL NULL float -NULL test tb4 f203 float NULL NULL NULL NULL float -NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f210 float NULL NULL NULL NULL float -NULL test tb4 f211 double NULL NULL NULL NULL double -NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f218 date NULL NULL NULL NULL date -NULL test tb4 f219 time NULL NULL NULL NULL time -NULL test tb4 f220 datetime NULL NULL NULL NULL datetime -NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp -NULL test tb4 f222 year NULL NULL NULL NULL year(4) -NULL test tb4 f223 year NULL NULL NULL NULL year(4) -NULL test tb4 f224 year NULL NULL NULL NULL year(4) -1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -2.0000 test tb4 f236 char 95 190 ucs2 ucs2_general_ci char(95) -2.0000 test tb4 f241 char 255 510 ucs2 ucs2_general_ci char(255) -1.0000 test tb4 f237 char 130 130 latin1 latin1_bin char(130) -1.0000 test tb4 f238 varchar 25000 25000 latin1 latin1_bin varchar(25000) -NULL test tb4 f239 varbinary 0 0 NULL NULL varbinary(0) -2.0000 test tb4 f240 varchar 1200 2400 ucs2 ucs2_general_ci varchar(1200) -NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f73 double NULL NULL NULL NULL double -NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f77 double NULL NULL NULL NULL double -NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f81 float NULL NULL NULL NULL float -NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f85 float NULL NULL NULL NULL float -NULL test1 tb2 f86 float NULL NULL NULL NULL float -NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f93 float NULL NULL NULL NULL float -NULL test1 tb2 f94 double NULL NULL NULL NULL double -NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f101 date NULL NULL NULL NULL date -NULL test1 tb2 f102 time NULL NULL NULL NULL time -NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -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 USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE IF EXISTS t_6_406001; -DROP TABLE IF EXISTS t_6_406002; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.7.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC key_column_usage; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 -POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL -REFERENCED_TABLE_SCHEMA varchar(64) YES NULL -REFERENCED_TABLE_NAME varchar(64) YES NULL -REFERENCED_COLUMN_NAME varchar(64) YES NULL -SHOW CREATE TABLE key_column_usage; -Table Create Table -KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(10) NOT NULL default '0', - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, - `REFERENCED_TABLE_NAME` varchar(64) default NULL, - `REFERENCED_COLUMN_NAME` varchar(64) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -COUNT(*) -12 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.7.2 + 3.2.7.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -CREATE TABLE t_40701 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40701 to 'user_1'@'localhost'; -CREATE TABLE t_40702 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40702 to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE t_40701; -DROP TABLE t_40702; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.8.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC routines; -Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(4096) YES NULL -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(9) NO -DTD_IDENTIFIER varchar(64) YES NULL -ROUTINE_BODY varchar(8) NO -ROUTINE_DEFINITION longtext YES NULL -EXTERNAL_NAME varchar(64) YES NULL -EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO -SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE longtext NO NULL -ROUTINE_COMMENT varchar(64) NO -DEFINER varchar(77) NO -SHOW CREATE TABLE routines; -Table Create Table -ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL default '', - `ROUTINE_CATALOG` varchar(4096) default NULL, - `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', - `ROUTINE_NAME` varchar(64) NOT NULL default '', - `ROUTINE_TYPE` varchar(9) NOT NULL default '', - `DTD_IDENTIFIER` varchar(64) default NULL, - `ROUTINE_BODY` varchar(8) NOT NULL default '', - `ROUTINE_DEFINITION` longtext, - `EXTERNAL_NAME` varchar(64) default NULL, - `EXTERNAL_LANGUAGE` varchar(64) default NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL default '', - `IS_DETERMINISTIC` varchar(3) NOT NULL default '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(64) default NULL, - `SECURITY_TYPE` varchar(7) NOT NULL default '', - `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', - `SQL_MODE` longtext NOT NULL, - `ROUTINE_COMMENT` varchar(64) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -COUNT(*) -20 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select - -Testcase 3.2.8.2 + 3.2.8.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_1(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1989-11-09', 0815); -DROP PROCEDURE IF EXISTS sp_6_408002_1; -CREATE PROCEDURE sp_6_408002_1() -BEGIN -SELECT * FROM db_datadict.res_6_408002_1; -END// -CREATE DATABASE db_datadict_2; -USE db_datadict_2; -CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_2(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1990-10-03', 4711); -DROP PROCEDURE IF EXISTS sp_6_408002_2; -CREATE PROCEDURE sp_6_408002_2() -BEGIN -SELECT * FROM db_datadict_2.res_6_408002_2; -END// -GRANT SELECT ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_2'@'localhost'; -GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER - -root@localhost db_datadict_2 -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -use db_datadict; -DROP TABLE res_6_408002_1; -DROP PROCEDURE sp_6_408002_1; -USE db_datadict_2; -DROP TABLE res_6_408002_2; -DROP PROCEDURE sp_6_408002_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.8.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_6_408004_1(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_1 values ('abc', 98765 , 99999999 , 98765, 10); -drop procedure if exists sp_6_408004; -create table res_6_408004_2(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_2 values ('abc', 98765 , 99999999 , 98765, 10); - -Checking the max. possible length of (currently) 4 GByte is not possible in this environment here. --------------------------------------------------------------------------------------------------- -create procedure sp_6_408004 () -begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -end// -call sp_6_408004 (); -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -select * from res_6_408004_2; -f1 f2 f3 f4 f5 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -SELECT *, LENGTH(routine_definition) -FROM information_schema.routines -WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME sp_6_408004 -ROUTINE_CATALOG NULL -ROUTINE_SCHEMA db_datadict -ROUTINE_NAME sp_6_408004 -ROUTINE_TYPE PROCEDURE -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -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 YYYY-MM-DD hh:mm:ss -LAST_ALTERED YYYY-MM-DD hh:mm:ss -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -LENGTH(routine_definition) 2549 -use db_datadict; -drop procedure sp_6_408004; -drop table res_6_408004_1; -drop table res_6_408004_2; -use test; -drop database db_datadict; - -Testcase 3.2.9.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schemata; -Field Type Null Key Default Extra -CATALOG_NAME varchar(4096) YES NULL -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATION_NAME varchar(64) NO -SQL_PATH varchar(4096) YES NULL -SHOW CREATE TABLE schemata; -Table Create Table -SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(4096) default NULL, - `SCHEMA_NAME` varchar(64) NOT NULL default '', - `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(4096) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select - -Testcase 3.2.9.2 + 3.2.9.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict_1; -CREATE DATABASE db_datadict_2; -GRANT SELECT ON db_datadict_1.* to 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.* to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict_1,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_2 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -2 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE db_datadict_1; -DROP DATABASE db_datadict_2; - -Testcase 3.2.10.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_constraints; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -CONSTRAINT_TYPE varchar(64) NO -SHOW CREATE TABLE table_constraints; -Table Create Table -TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `CONSTRAINT_TYPE` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.10.2 + 3.2.10.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -USE db_datadict; -CREATE TABLE res_6_401003_1(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -USE db_datadict_2; -CREATE TABLE res_6_401003_2(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -GRANT SELECT ON db_datadict.res_6_401003_1 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.res_6_401003_2 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict PRIMARY db_datadict res_6_401003_1 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict_2 PRIMARY db_datadict_2 res_6_401003_2 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -use db_datadict; - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE res_6_401003_1; -USE db_datadict_2; -DROP TABLE res_6_401003_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.11.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE table_privileges; -Table Create Table -TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.11.2 + 3.2.11.3 + 3.2.11.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, SELECT ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.table_privileges -WHERE table_name LIKE 'tb%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = USER(); -USER() COUNT(*) -user_2@localhost 0 -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = "'user_2'@'localhost'"; -USER() COUNT(*) -user_2@localhost 11 -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -drop table db_datadict.tb1; -drop table db_datadict.tb3; -use test; -drop database db_datadict; - -Testcase 3.2.12.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC tables; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO -ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL -ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL -CREATE_TIME datetime YES NULL -UPDATE_TIME datetime YES NULL -CHECK_TIME datetime YES NULL -TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL -CREATE_OPTIONS varchar(255) YES NULL -TABLE_COMMENT varchar(80) NO -SHOW CREATE TABLE tables; -Table Create Table -TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `TABLE_TYPE` varchar(64) NOT NULL default '', - `ENGINE` varchar(64) default NULL, - `VERSION` bigint(21) default NULL, - `ROW_FORMAT` varchar(10) default NULL, - `TABLE_ROWS` bigint(21) default NULL, - `AVG_ROW_LENGTH` bigint(21) default NULL, - `DATA_LENGTH` bigint(21) default NULL, - `MAX_DATA_LENGTH` bigint(21) default NULL, - `INDEX_LENGTH` bigint(21) default NULL, - `DATA_FREE` bigint(21) default NULL, - `AUTO_INCREMENT` bigint(21) default NULL, - `CREATE_TIME` datetime default NULL, - `UPDATE_TIME` datetime default NULL, - `CHECK_TIME` datetime default NULL, - `TABLE_COLLATION` varchar(64) default NULL, - `CHECKSUM` bigint(21) default NULL, - `CREATE_OPTIONS` varchar(255) default NULL, - `TABLE_COMMENT` varchar(80) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -COUNT(*) -21 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select - -Testcase 3.2.12.2 + 3.2.12.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* -TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb2 (f1 DECIMAL); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -GRANT INSERT ON db_datadict.tb3 to 'user_2'@'localhost'; -CREATE VIEW v3 AS SELECT * FROM tb3; -GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL - -root@localhost db_datadict -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MEMORY 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP TABLE db_datadict.tb1; -DROP TABLE db_datadict.tb3; -DROP VIEW db_datadict.v3; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.13.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC views; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO NULL -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(77) NO -SECURITY_TYPE varchar(7) NO -SHOW CREATE TABLE views; -Table Create Table -VIEWS CREATE TEMPORARY TABLE `VIEWS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `VIEW_DEFINITION` longtext NOT NULL, - `CHECK_OPTION` varchar(8) NOT NULL default '', - `IS_UPDATABLE` varchar(3) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '', - `SECURITY_TYPE` varchar(7) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -COUNT(*) -8 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select - -Testcase 3.2.13.2 + 3.2.13.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_no_views'@'localhost'; -USE db_datadict; -CREATE TABLE tb_401302(f1 INT, f2 INT, f3 INT); -CREATE VIEW v_granted_to_1 AS SELECT * FROM tb_401302; -CREATE VIEW v_granted_glob AS SELECT f2, f3 FROM tb_401302; -GRANT SELECT ON db_datadict.tb_401302 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.v_granted_to_1 TO 'user_1'@'localhost'; -GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f1` AS `f1`,`db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_no_views,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE - -root@localhost db_datadict -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_no_views'@'localhost'; -DROP VIEW v_granted_to_1; -DROP TABLE tb_401302; -DROP VIEW v_granted_glob; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.14.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC statistics; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -NON_UNIQUE bigint(1) NO 0 -INDEX_SCHEMA varchar(64) NO -INDEX_NAME varchar(64) NO -SEQ_IN_INDEX bigint(2) NO 0 -COLUMN_NAME varchar(64) NO -COLLATION varchar(1) YES NULL -CARDINALITY bigint(21) YES NULL -SUB_PART bigint(3) YES NULL -PACKED varchar(10) YES NULL -NULLABLE varchar(3) NO -INDEX_TYPE varchar(16) NO -COMMENT varchar(16) YES NULL -SHOW CREATE TABLE statistics; -Table Create Table -STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `NON_UNIQUE` bigint(1) NOT NULL default '0', - `INDEX_SCHEMA` varchar(64) NOT NULL default '', - `INDEX_NAME` varchar(64) NOT NULL default '', - `SEQ_IN_INDEX` bigint(2) NOT NULL default '0', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `COLLATION` varchar(1) default NULL, - `CARDINALITY` bigint(21) default NULL, - `SUB_PART` bigint(3) default NULL, - `PACKED` varchar(10) default NULL, - `NULLABLE` varchar(3) NOT NULL default '', - `INDEX_TYPE` varchar(16) NOT NULL default '', - `COMMENT` varchar(16) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -COUNT(*) -15 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select - -Testcase 3.2.14.2 + 3.2.14.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table tb_6_401402_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_6_401402_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict.tb_6_401402_1 to 'user_1'@'localhost' WITH GRANT OPTION; -USE db_datadict_2; -create table tb_2_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_2_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict_2.tb_2_1 to 'user_1'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.statistics -WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict tb_6_401402_2 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_2 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_2 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_2 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 0 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 2 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE - -user_1@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE - -user_2@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE tb_6_401402_1; -DROP TABLE tb_6_401402_2; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.15.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schema_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE schema_privileges; -Table Create Table -SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.15.2: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401502'@'localhost'; -use db_datadict; -create table res_6_401502(f1 int, f2 int, f3 int); -grant insert on db_datadict.* to 'u_6_401502'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401502,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401502'@'localhost'; -drop table res_6_401502; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.15.3 + 3.2.15.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401503_1'@'localhost'; -CREATE USER 'u_6_401503_2'@'localhost'; -CREATE USER 'u_6_401503_3'@'localhost'; -use db_datadict; -create table res_6_401503_1(f1 int, f2 int, f3 int); -use db_datadict_2; -create table res_6_401503_2(f1 int, f2 int, f3 int); -grant update on db_datadict.* to 'u_6_401503_1'@'localhost'; -grant delete on db_datadict_2.* to 'u_6_401503_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401503_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -connect(localhost,u_6_401503_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -connect(localhost,u_6_401503_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE - -root@localhost db_datadict_2 -use db_datadict; -DROP USER 'u_6_401503_1'@'localhost'; -DROP USER 'u_6_401503_2'@'localhost'; -DROP USER 'u_6_401503_3'@'localhost'; -drop table res_6_401503_1; -use db_datadict_2; -drop table res_6_401503_2; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.16.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC user_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE user_privileges; -Table Create Table -USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.16.2 + 3.2.16.3 + 3.2.16.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -GRANT INSERT ON *.* TO 'user_2'@'localhost'; -GRANT UPDATE ON *.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -FIXME (see Bug 12269) Here we expect more than only for user_1 ----------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -add GRANT OPTION db_datadict.* to user_1 ----------------------------------------- -GRANT UPDATE ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; - -FIXME (see Bug 12269) Here the is missing for the GRANT OPTION for user_1 -------------------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' - -Now add SELECT on *.* to user_1 -------------------------------- - -root@localhost information_schema -GRANT SELECT ON *.* TO 'user_1'@'localhost'; - -Here is shown correctly for user_1 ------------------------------------------------ -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT SELECT ON *.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_2@localhost -GRANT INSERT, UPDATE ON *.* TO 'user_2'@'localhost' -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_3'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_3@localhost -GRANT USAGE ON *.* TO 'user_3'@'localhost' - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' - -user_1@localhost db_datadict -CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_55' - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_66' - -add ALL on db_datadict.* (and select on mysql.user) to user_1 -------------------------------------------------------------- - -root@localhost information_schema -GRANT ALL ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_56' -USE db_datadict; - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE tb_57 ( c1 TEXT ); - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_58 ( c1 TEXT ); -USE db_datadict; -ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_datadict' -CREATE TABLE db_datadict.tb_59 ( c1 TEXT ); - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.17: Checks on Performance - not here in this script! --------------------------------------------------------------------------------- - -Testcase 3.2.18.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC triggers; -Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(4096) YES NULL -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(4096) YES NULL -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 -ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO NULL -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO -ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL -ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO -CREATED datetime YES NULL -SQL_MODE longtext NO NULL -DEFINER longtext NO NULL -SHOW CREATE TABLE triggers; -Table Create Table -TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(4096) default NULL, - `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', - `TRIGGER_NAME` varchar(64) NOT NULL default '', - `EVENT_MANIPULATION` varchar(6) NOT NULL default '', - `EVENT_OBJECT_CATALOG` varchar(4096) default NULL, - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', - `ACTION_ORDER` bigint(4) NOT NULL default '0', - `ACTION_CONDITION` longtext, - `ACTION_STATEMENT` longtext NOT NULL, - `ACTION_ORIENTATION` varchar(9) NOT NULL default '', - `ACTION_TIMING` varchar(6) NOT NULL default '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', - `CREATED` datetime default NULL, - `SQL_MODE` longtext NOT NULL, - `DEFINER` longtext NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select - -Testcase 3.2.18.2 + 3.2.18.3: --------------------------------------------------------------------------------- - -Testcase 3.2.19.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC parameters; -ERROR 42S02: Unknown table 'parameters' in information_schema - -Testcase 3.2.20.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC referential_constraints; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema - -*** End of Data Dictionary Tests *** --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.tb1; -DROP TABLE IF EXISTS test.tb2; -DROP TABLE IF EXISTS test.tb3; -DROP TABLE IF EXISTS test.tb4; -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.t7; -DROP TABLE IF EXISTS test.t8; -DROP TABLE IF EXISTS test.t9; -DROP TABLE IF EXISTS test.t10; -DROP TABLE IF EXISTS test.t11; -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test4; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; diff --git a/mysql-test/suite/funcs_1/r/memory__load.result b/mysql-test/suite/funcs_1/r/memory__load.result deleted file mode 100644 index c1b9c89b257..00000000000 --- a/mysql-test/suite/funcs_1/r/memory__load.result +++ /dev/null @@ -1 +0,0 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); diff --git a/mysql-test/suite/funcs_1/r/memory_bitdata.result b/mysql-test/suite/funcs_1/r/memory_bitdata.result index 2b98475d6d2..917157fcdae 100644 --- a/mysql-test/suite/funcs_1/r/memory_bitdata.result +++ b/mysql-test/suite/funcs_1/r/memory_bitdata.result @@ -1,68 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f236 char(95) unicode, -f241 char(255) unicode, -f237 char(130) binary, -f238 varchar(25000) binary, -f239 varbinary(0), -f240 varchar(1200) unicode -) engine = memory; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb4.txt' into table tb4 ; NOT YET IMPLEMENTED: bitdata tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_cursors.result b/mysql-test/suite/funcs_1/r/memory_cursors.result index 3221e05cc4f..9f20e51204b 100644 --- a/mysql-test/suite/funcs_1/r/memory_cursors.result +++ b/mysql-test/suite/funcs_1/r/memory_cursors.result @@ -1,78 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = memory; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb1.txt' into table tb1 ; NOT YET IMPLEMENTED: cursor tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result index 731d5c4a8cf..fd31aa76ab9 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result index 6ee2d712e73..c982691daad 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result index a627de4b534..890498e1966 100644 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result index 34e5ff76f29..0980ca84a8c 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result index 712d9ae933f..e3f9556a082 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result index 89c2fb736eb..7f9946218e9 100755 --- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0102.result b/mysql-test/suite/funcs_1/r/memory_trig_0102.result index e7fec297ca7..a9477604425 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0102.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -358,3 +355,4 @@ select @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/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index 7309e403cff..e5813236213 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -745,3 +742,4 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_0407.result b/mysql-test/suite/funcs_1/r/memory_trig_0407.result index 588039983e2..14974428ecf 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_0407.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -474,3 +471,4 @@ 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/memory_trig_08.result b/mysql-test/suite/funcs_1/r/memory_trig_08.result index a842bbc3ac7..a703de751c2 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_08.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_08.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -493,3 +490,4 @@ Testcase 3.5.8.7: (Disabled as a result of bug _____) 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/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result index 3dbe64958e3..da8b15901d9 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_09.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -265,3 +262,4 @@ 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/memory_trig_1011ext.result b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result index b93c67e894b..8fc9178f494 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_1011ext.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb3; create table tb3 ( f118 char not null DEFAULT 'a', @@ -400,3 +397,4 @@ 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/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 5fae2f8700a..04841ff7111 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -1,7 +1,4 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb2 ; create table tb2 ( f59 numeric (0) unsigned, @@ -60,8 +57,6 @@ load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/memory_tb2.txt' into table t DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test1; -set @@global.max_heap_table_size = 4294967295; -set @@session.max_heap_table_size = 4294967295; drop table if exists tb2 ; create table tb2 ( f59 numeric (0) unsigned, @@ -11457,4 +11452,5 @@ DROP VIEW IF EXISTS v1_secondview; DROP VIEW IF EXISTS v2; DROP DATABASE IF EXISTS test2; DROP DATABASE IF EXISTS test3; -DROP DATABASE IF EXISTS test1; +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/r/myisam__datadict.result b/mysql-test/suite/funcs_1/r/myisam__datadict.result deleted file mode 100644 index fd194de46d6..00000000000 --- a/mysql-test/suite/funcs_1/r/myisam__datadict.result +++ /dev/null @@ -1,13068 +0,0 @@ - -. -. It is intended that the 3 __datadict.test files are named this way to be -. sure they are - in a *full run* of the suite - the first tests done for each -. storage engine. Using two _ and the order of processing in mysql-test-run.pl -. ensures this in an easy way. -. -. If needed a restart could be implemented later between the storage engines if -. values changes in the result depending from the position where the -. *__datadict.test are started. This can be a result of showing e.g. maximum -. values of the number of rows of tables. -. -. This .result file has been checked OK with Linux 5.0.48, -. build tree ChangeSet@1.2477.6.3, 2007-07-30 -. except that the not fixed Bug#30020 causes a difference. -. --------------------------------------------------------------------------------- - -FIXME: There are subtests that are switched off due to known bugs: ------------------------------------------------------------------- -SELECT 1 AS "have_bug_11589"; -have_bug_11589 -1 - -There are some statements where the ps-protocol is switched off. -This may come from the bug listed below, ir from other problems. -Bug#11589: mysqltest, --ps-protocol, strange output, float/double/real with zerofill --------------------------------------------------------------------------------- -SET @NO_REFRESH = IF( '' = '', 0, 1); -DROP DATABASE IF EXISTS test1; -CREATE DATABASE test1; -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = myisam; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; -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", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; -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 tinytext, -f122 text, -f123 mediumtext, -f124 longtext unicode, -f125 tinyblob, -f126 blob, -f127 mediumblob, -f128 longblob, -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 = myisam; -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 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb3.txt' into table tb3 ; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f227 VARBINARY(64), -f228 VARBINARY(27), -f229 VARBINARY(64), -f230 VARBINARY(192), -f231 VARBINARY(192), -f232 VARBINARY(27), -f233 VARBINARY(64), -f234 VARBINARY(192), -f235 char(255) unicode, -f236 char(60) ascii, -f237 char(255) binary, -f238 varchar(0) binary, -f239 varbinary(1000), -f240 varchar(120) unicode, -f241 char(100) unicode, -f242 bit(30) -) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; -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", -f110 VARBINARY(64) null, -f111 VARBINARY(27) null , -f112 VARBINARY(64) null , -f113 VARBINARY(192) null , -f114 VARBINARY(192) , -f115 VARBINARY(27) null , -f116 VARBINARY(64) null, -f117 VARBINARY(192) null -) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb2.txt' into table tb2 ; -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 = myisam; -CREATE TABLE t2 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = myisam; -CREATE TABLE t4 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = myisam; -CREATE TABLE t10 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = myisam; -CREATE TABLE t11 (f1 char(20), f2 char(25), f3 date, f4 int, f5 char(25), f6 int) ENGINE = myisam; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t1; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t2; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t4; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t10; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t4.txt' INTO TABLE t11; -drop TABLE if exists t3; -CREATE TABLE t3 (f1 char(20), f2 char(20), f3 integer) ENGINE = myisam; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = myisam; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = myisam; -CREATE TABLE t8 (f1 char(20), f2 char(25), f3 date, f4 int) ENGINE = myisam; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/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 'MYSQL_TEST_DIR/suite/funcs_1/data/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 = myisam; -LOAD DATA INFILE 'MYSQL_TEST_DIR/suite/funcs_1/data/t9.txt' INTO TABLE t9; -use information_schema; - -root@localhost information_schema - -Testcase 3.2.1.1: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE VIEW v1 AS SELECT * FROM information_schema.tables; -CREATE OR REPLACE VIEW db_datadict.vu1 as -SELECT grantee AS u -FROM information_schema.user_privileges; -CREATE OR REPLACE VIEW db_datadict.vu as -SELECT DISTINCT u, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3 ) -AS server, -SUBSTRING( u, LENGTH(SUBSTRING_INDEX(u,_utf8'@',1))+3, -LENGTH( SUBSTRING( u, -LENGTH( SUBSTRING_INDEX(u, _utf8'@',1)) +3 )) - 1 ) -AS Server_Clean -FROM db_datadict.vu1; -SELECT * FROM db_datadict.vu order by u; -u server Server_Clean -'root'@'127.0.0.1' 127.0.0.1' 127.0.0.1 -'root'@'' ' -'root'@'localhost' localhost' localhost -CREATE PROCEDURE db_datadict.sp_1() -BEGIN -SELECT * FROM db_datadict.v1; -END// -USE information_schema; -SHOW tables; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -select * from schemata ORDER BY 2 DESC, 1 ASC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from columns; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL db_datadict v1 TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select,insert,update,references -NULL db_datadict v1 TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references -NULL db_datadict v1 TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL db_datadict v1 TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references -NULL db_datadict v1 CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select,insert,update,references -NULL db_datadict v1 CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select,insert,update,references -NULL db_datadict v1 TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select,insert,update,references -NULL db_datadict vu u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL db_datadict vu server 2 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu Server_Clean 3 NO varchar 243 729 NULL NULL utf8 utf8_general_ci varchar(243) select,insert,update,references -NULL db_datadict vu1 u 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select,insert,update,references -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references -NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references -NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references -NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references -NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references -NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select * from character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 -select sum(id) from collations where collation_name <> 'utf8_general_cs'; -sum(id) -10741 -select collation_name, character_set_name into @x,@y -from collation_character_set_applicability limit 1; -select @x, @y; -@x @y -big5_chinese_ci big5 -select * from routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select count(*) from routines; -count(*) -1 -select * from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 1 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 0 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 3 NULL NULL BTREE -select * from views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from user_privileges order by grantee, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * from schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -NULL mysql PRIMARY mysql help_keyword PRIMARY KEY -NULL mysql name mysql help_keyword UNIQUE -NULL mysql PRIMARY mysql help_relation PRIMARY KEY -NULL mysql PRIMARY mysql help_topic PRIMARY KEY -NULL mysql name mysql help_topic UNIQUE -NULL mysql PRIMARY mysql host PRIMARY KEY -NULL mysql PRIMARY mysql proc PRIMARY KEY -NULL mysql PRIMARY mysql procs_priv PRIMARY KEY -NULL mysql PRIMARY mysql tables_priv PRIMARY KEY -NULL mysql PRIMARY mysql time_zone PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_name PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition PRIMARY KEY -NULL mysql PRIMARY mysql time_zone_transition_type PRIMARY KEY -NULL mysql PRIMARY mysql user PRIMARY KEY -select * from key_column_usage; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -select count(*) as max_recs from key_column_usage; -max_recs -40 -select max(cardinality) from statistics -where not (table_schema = 'mysql' and table_name like 'help_%'); -max(cardinality) -393 -select concat("View '", -table_name, "' is associated with the database '", table_schema, "'.") -AS "Who is Who for the Views" - from views; -Who is Who for the Views -View 'v1' is associated with the database 'db_datadict'. -View 'vu' is associated with the database 'db_datadict'. -View 'vu1' is associated with the database 'db_datadict'. -select concat("Table or view '", table_name, -"' is associated with the database '", table_schema, "'.") as "Who is Who" - from tables; -Who is Who -Table or view 'CHARACTER_SETS' is associated with the database 'information_schema'. -Table or view 'COLLATIONS' is associated with the database 'information_schema'. -Table or view 'COLLATION_CHARACTER_SET_APPLICABILITY' is associated with the database 'information_schema'. -Table or view 'COLUMNS' is associated with the database 'information_schema'. -Table or view 'COLUMN_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'KEY_COLUMN_USAGE' is associated with the database 'information_schema'. -Table or view 'ROUTINES' is associated with the database 'information_schema'. -Table or view 'SCHEMATA' is associated with the database 'information_schema'. -Table or view 'SCHEMA_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'STATISTICS' is associated with the database 'information_schema'. -Table or view 'TABLES' is associated with the database 'information_schema'. -Table or view 'TABLE_CONSTRAINTS' is associated with the database 'information_schema'. -Table or view 'TABLE_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'TRIGGERS' is associated with the database 'information_schema'. -Table or view 'USER_PRIVILEGES' is associated with the database 'information_schema'. -Table or view 'VIEWS' is associated with the database 'information_schema'. -Table or view 'v1' is associated with the database 'db_datadict'. -Table or view 'vu' is associated with the database 'db_datadict'. -Table or view 'vu1' is associated with the database 'db_datadict'. -Table or view 'columns_priv' is associated with the database 'mysql'. -Table or view 'db' is associated with the database 'mysql'. -Table or view 'func' is associated with the database 'mysql'. -Table or view 'help_category' is associated with the database 'mysql'. -Table or view 'help_keyword' is associated with the database 'mysql'. -Table or view 'help_relation' is associated with the database 'mysql'. -Table or view 'help_topic' is associated with the database 'mysql'. -Table or view 'host' is associated with the database 'mysql'. -Table or view 'proc' is associated with the database 'mysql'. -Table or view 'procs_priv' is associated with the database 'mysql'. -Table or view 'tables_priv' is associated with the database 'mysql'. -Table or view 'time_zone' is associated with the database 'mysql'. -Table or view 'time_zone_leap_second' is associated with the database 'mysql'. -Table or view 'time_zone_name' is associated with the database 'mysql'. -Table or view 'time_zone_transition' is associated with the database 'mysql'. -Table or view 'time_zone_transition_type' is associated with the database 'mysql'. -Table or view 'user' is associated with the database 'mysql'. -Table or view 't1' is associated with the database 'test'. -Table or view 't10' is associated with the database 'test'. -Table or view 't11' is associated with the database 'test'. -Table or view 't2' is associated with the database 'test'. -Table or view 't3' is associated with the database 'test'. -Table or view 't4' is associated with the database 'test'. -Table or view 't7' is associated with the database 'test'. -Table or view 't8' is associated with the database 'test'. -Table or view 't9' is associated with the database 'test'. -Table or view 'tb1' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test'. -Table or view 'tb3' is associated with the database 'test'. -Table or view 'tb4' is associated with the database 'test'. -Table or view 'tb2' is associated with the database 'test1'. -Table or view 't6' is associated with the database 'test4'. -select grantee as "user's having select privilege", -substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -from user_privileges where privilege_type = 'select' - order by grantee; -user's having select privilege substring( grantee, length(SUBSTRING_INDEX(grantee,_utf8'@',1))+2 ) -'root'@'127.0.0.1' '127.0.0.1' -'root'@'' '' -'root'@'localhost' 'localhost' -select all table_schema from schema_privileges limit 0,5; -table_schema -test -test -test -test -test -select distinct(privilege_type) from table_privileges; -privilege_type -select * from column_privileges -group by table_schema having table_schema = 'db_datadict'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from table_constraints limit 0,5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select count(*) as max_recs from key_column_usage limit 0,5; -max_recs -40 -select information_schema.tables.table_name as "table name", -count(distinct(column_name)) as "no of columns in the table" - from information_schema.tables left outer join information_schema.columns on -information_schema.tables.table_name = information_schema.columns.table_name -group by information_schema.tables.table_name; -table name no of columns in the table -CHARACTER_SETS 4 -COLLATIONS 6 -COLLATION_CHARACTER_SET_APPLICABILITY 2 -COLUMNS 19 -columns_priv 7 -COLUMN_PRIVILEGES 7 -db 20 -func 4 -help_category 4 -help_keyword 2 -help_relation 2 -help_topic 6 -host 19 -KEY_COLUMN_USAGE 12 -proc 16 -procs_priv 8 -ROUTINES 20 -SCHEMATA 5 -SCHEMA_PRIVILEGES 5 -STATISTICS 15 -t1 6 -t10 6 -t11 6 -t2 6 -t3 3 -t4 6 -t6 6 -t7 4 -t8 4 -t9 3 -TABLES 21 -tables_priv 8 -TABLE_CONSTRAINTS 6 -TABLE_PRIVILEGES 6 -tb1 58 -tb2 59 -tb3 58 -tb4 67 -time_zone 2 -time_zone_leap_second 2 -time_zone_name 2 -time_zone_transition 3 -time_zone_transition_type 5 -TRIGGERS 19 -user 37 -USER_PRIVILEGES 4 -v1 21 -VIEWS 8 -vu 3 -vu1 1 - -root: simple select to check all - and never forget some - tables ------------------------------------------------------------------ -SELECT * FROM schemata LIMIT 1; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -SELECT * FROM tables LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL utf8_general_ci NULL #CO# -SELECT * FROM columns LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -SELECT * FROM character_sets LIMIT 1; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -SELECT * FROM collations where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -SELECT * FROM collation_character_set_applicability where collation_name <> 'utf8_general_cs' LIMIT 1; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -SELECT * FROM routines LIMIT 1; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER root@localhost -SELECT * FROM statistics LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -SELECT * FROM views LIMIT 1; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -SELECT * FROM user_privileges LIMIT 1; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -SELECT * FROM schema_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -SELECT * FROM table_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM column_privileges LIMIT 1; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM table_constraints LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -SELECT * FROM key_column_usage LIMIT 1; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -SELECT * FROM triggers LIMIT 1; -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 -SELECT * FROM parameters LIMIT 1; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT * FROM referential_constraints LIMIT 1; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -use db_datadict; -select * from schemata; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from tables; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from schemata s inner join tables t -ORDER BY s.catalog_name, s.schema_name, s.default_character_set_name; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -select * from columns limit 0, 5; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -select * from character_sets limit 0, 5; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -select * from collations limit 0, 5; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -select * from collation_character_set_applicability limit 0, 5; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -select * from routines limit 0, 5; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -select * from statistics limit 0, 5; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -select * from views limit 0, 5; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -select * from user_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -select * from schema_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -select * from table_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -select * from column_privileges limit 0, 5; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -select * from table_constraints limit 0, 5; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -select * from key_column_usage limit 0, 5; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist - -will fail due to missing database name --------------------------------------- - -known error 1146: ------------------ -SELECT * FROM schemata ; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * FROM tables ; -ERROR 42S02: Table 'db_datadict.tables' doesn't exist -SELECT * FROM columns ; -ERROR 42S02: Table 'db_datadict.columns' doesn't exist -SELECT * FROM character_sets ; -ERROR 42S02: Table 'db_datadict.character_sets' doesn't exist -SELECT * FROM collations ; -ERROR 42S02: Table 'db_datadict.collations' doesn't exist -SELECT * FROM collation_character_set_applicability ; -ERROR 42S02: Table 'db_datadict.collation_character_set_applicability' doesn't exist -SELECT * FROM routines ; -ERROR 42S02: Table 'db_datadict.routines' doesn't exist -SELECT * FROM statistics ; -ERROR 42S02: Table 'db_datadict.statistics' doesn't exist -SELECT * FROM views ; -ERROR 42S02: Table 'db_datadict.views' doesn't exist -SELECT * FROM user_privileges ; -ERROR 42S02: Table 'db_datadict.user_privileges' doesn't exist -SELECT * FROM schema_privileges ; -ERROR 42S02: Table 'db_datadict.schema_privileges' doesn't exist -SELECT * FROM table_privileges ; -ERROR 42S02: Table 'db_datadict.table_privileges' doesn't exist -SELECT * FROM column_privileges ; -ERROR 42S02: Table 'db_datadict.column_privileges' doesn't exist -SELECT * FROM table_constraints ; -ERROR 42S02: Table 'db_datadict.table_constraints' doesn't exist -SELECT * FROM key_column_usage ; -ERROR 42S02: Table 'db_datadict.key_column_usage' doesn't exist -SELECT * FROM triggers ; -ERROR 42S02: Table 'db_datadict.triggers' doesn't exist -select * from information_schema.schemata ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test4 latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME CHARACTER_SETS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATIONS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMNS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME COLUMN_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME KEY_COLUMN_USAGE -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME ROUTINES -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMATA -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME SCHEMA_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME STATISTICS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_CONSTRAINTS -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TABLE_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME TRIGGERS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME USER_PRIVILEGES -TABLE_TYPE SYSTEM VIEW -ENGINE MEMORY -VERSION 0 -ROW_FORMAT Fixed -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA information_schema -TABLE_NAME VIEWS -TABLE_TYPE SYSTEM VIEW -ENGINE MyISAM -VERSION 0 -ROW_FORMAT Dynamic -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') -AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME v1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA db_datadict -TABLE_NAME vu1 -TABLE_TYPE VIEW -ENGINE NULL -VERSION NULL -ROW_FORMAT NULL -TABLE_ROWS NULL -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION NULL -CHECKSUM NULL -CREATE_OPTIONS NULL -TABLE_COMMENT VIEW -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME columns_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Column privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME db -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 2 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME func -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT User defined functions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME host -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Host privileges; Merged with database privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME proc -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 1 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Stored Procedures -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME procs_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Procedure privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME tables_priv -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 0 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Table privileges -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 5 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT 6 -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_leap_second -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 22 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Leap seconds information for time zones -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_name -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 6 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone names -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 393 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transitions -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME time_zone_transition_type -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 31 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_general_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Time zone transition types -TABLE_CATALOG NULL -TABLE_SCHEMA mysql -TABLE_NAME user -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 3 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION utf8_bin -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT Users and global privileges -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t10 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t11 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t7 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t8 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME t9 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb1 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb3 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test -TABLE_NAME tb4 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test1 -TABLE_NAME tb2 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Dynamic -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE MyISAM -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS 10 -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME YYYY-MM-DD hh:mm:ss -UPDATE_TIME YYYY-MM-DD hh:mm:ss -CHECK_TIME YYYY-MM-DD hh:mm:ss -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS -TABLE_COMMENT -select s.catalog_name, s.schema_name, s.default_character_set_name, -t.table_type, t.engine -from information_schema.schemata s inner join information_schema.tables t -ORDER BY s.schema_name, s.default_character_set_name, table_type, engine; -catalog_name schema_name default_character_set_name table_type engine -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 BASE TABLE MyISAM -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MEMORY -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 SYSTEM VIEW MyISAM -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL db_datadict latin1 VIEW NULL -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 BASE TABLE MyISAM -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MEMORY -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 SYSTEM VIEW MyISAM -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL information_schema utf8 VIEW NULL -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 BASE TABLE MyISAM -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MEMORY -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 SYSTEM VIEW MyISAM -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL mysql latin1 VIEW NULL -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 BASE TABLE MyISAM -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MEMORY -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 SYSTEM VIEW MyISAM -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test latin1 VIEW NULL -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 BASE TABLE MyISAM -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MEMORY -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 SYSTEM VIEW MyISAM -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test1 latin1 VIEW NULL -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 BASE TABLE MyISAM -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MEMORY -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 SYSTEM VIEW MyISAM -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -NULL test4 latin1 VIEW NULL -select * from information_schema.columns limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -select * from information_schema.character_sets limit 0, 5; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -select * from information_schema.collations limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -select * from information_schema.collation_character_set_applicability limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -select * from information_schema.routines limit 0, 5; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_1 NULL db_datadict sp_1 PROCEDURE NULL SQL BEGIN -SELECT * FROM db_datadict.v1; -END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -select * from information_schema.statistics limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -select * from information_schema.views limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT` from `information_schema`.`tables` NONE NO root@localhost DEFINER -NULL db_datadict vu /* ALGORITHM=UNDEFINED */ select distinct `vu1`.`u` AS `u`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3)) AS `server`,substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3),(length(substr(`vu1`.`u`,(length(substring_index(`vu1`.`u`,_utf8'@',1)) + 3))) - 1)) AS `Server_Clean` from `db_datadict`.`vu1` NONE NO root@localhost DEFINER -NULL db_datadict vu1 /* ALGORITHM=UNDEFINED */ select `user_privileges`.`GRANTEE` AS `u` from `information_schema`.`user_privileges` NONE NO root@localhost DEFINER -select * from information_schema.user_privileges limit 0, 5; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL UPDATE YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL CREATE YES -select * from information_schema.schema_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from information_schema.table_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.column_privileges limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from information_schema.table_constraints limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql PRIMARY mysql db PRIMARY KEY -NULL mysql PRIMARY mysql func PRIMARY KEY -NULL mysql PRIMARY mysql help_category PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select * from information_schema.key_column_usage limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -select count(*) as max_recs from information_schema.key_column_usage limit 0, 5; -max_recs -40 - -root: check with db name ------------------------- -SELECT COUNT(*) FROM information_schema. schemata ; -COUNT(*) -6 -SELECT COUNT(*) FROM information_schema. tables ; -COUNT(*) -51 -SELECT COUNT(*) FROM information_schema. columns ; -COUNT(*) -682 -SELECT COUNT(*) FROM information_schema. character_sets ; -COUNT(*) -36 -SELECT COUNT(*) FROM information_schema. collations where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. collation_character_set_applicability where collation_name <> 'utf8_general_cs' ; -COUNT(*) -126 -SELECT COUNT(*) FROM information_schema. routines ; -COUNT(*) -1 -SELECT COUNT(*) FROM information_schema. statistics ; -COUNT(*) -43 -SELECT COUNT(*) FROM information_schema. views ; -COUNT(*) -3 -SELECT COUNT(*) FROM information_schema. user_privileges ; -COUNT(*) -75 -SELECT COUNT(*) FROM information_schema. schema_privileges ; -COUNT(*) -28 -SELECT COUNT(*) FROM information_schema. table_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. column_privileges ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. table_constraints ; -COUNT(*) -20 -SELECT COUNT(*) FROM information_schema. key_column_usage ; -COUNT(*) -40 -SELECT COUNT(*) FROM information_schema. triggers ; -COUNT(*) -0 -SELECT COUNT(*) FROM information_schema. parameters ; -ERROR 42S02: Unknown table 'parameters' in information_schema -SELECT COUNT(*) FROM information_schema. referential_constraints ; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema -USE db_datadict; -DROP VIEW v1, vu1, vu; -DROP PROCEDURE db_datadict.sp_1; -USE information_schema; - -Testcase 3.2.1.2: --------------------------------------------------------------------------------- -select catalog_name, schema_name, default_character_set_name -from schemata where schema_name like '%s%'; -catalog_name schema_name default_character_set_name -NULL information_schema utf8 -NULL mysql latin1 -NULL test latin1 -NULL test1 latin1 -NULL test4 latin1 -select count(*) as tot_tabs from tables; -tot_tabs -48 -select count(*) as the_cols from columns; -the_cols -657 -select max(maxlen) as the_max from character_sets; -the_max -3 -select * from collations order by id asc limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -latin2_czech_cs latin2 2 Yes 4 -dec8_swedish_ci dec8 3 Yes 0 -cp850_general_ci cp850 4 Yes 0 -latin1_german1_ci latin1 5 Yes 1 -select * from collation_character_set_applicability -order by character_set_name desc, collation_name limit 0, 5; -COLLATION_NAME CHARACTER_SET_NAME -utf8_bin utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_esperanto_ci utf8 -utf8_estonian_ci utf8 -select routine_definition from routines; -routine_definition -select * from statistics where table_name not like 'help_%' -group by index_name asc limit 0, 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -select concat(table_schema, ', ', table_name, ', ', view_definition) view_info -from views; -view_info -select concat(table_schema, ', ', table_name) "Table_info" - from tables ORDER BY 1; -Table_info -information_schema, CHARACTER_SETS -information_schema, COLLATIONS -information_schema, COLLATION_CHARACTER_SET_APPLICABILITY -information_schema, COLUMNS -information_schema, COLUMN_PRIVILEGES -information_schema, KEY_COLUMN_USAGE -information_schema, ROUTINES -information_schema, SCHEMATA -information_schema, SCHEMA_PRIVILEGES -information_schema, STATISTICS -information_schema, TABLES -information_schema, TABLE_CONSTRAINTS -information_schema, TABLE_PRIVILEGES -information_schema, TRIGGERS -information_schema, USER_PRIVILEGES -information_schema, VIEWS -mysql, columns_priv -mysql, db -mysql, func -mysql, help_category -mysql, help_keyword -mysql, help_relation -mysql, help_topic -mysql, host -mysql, proc -mysql, procs_priv -mysql, tables_priv -mysql, time_zone -mysql, time_zone_leap_second -mysql, time_zone_name -mysql, time_zone_transition -mysql, time_zone_transition_type -mysql, user -test, t1 -test, t10 -test, t11 -test, t2 -test, t3 -test, t4 -test, t7 -test, t8 -test, t9 -test, tb1 -test, tb2 -test, tb3 -test, tb4 -test1, tb2 -test4, t6 -select distinct grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select * from schema_privileges where table_catalog is null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -select * from table_privileges where grantee like '%r%' limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * from column_privileges where table_catalog is not null limit 0, 5; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select HIGH_PRIORITY * from table_constraints -group by constraint_name desc limit 0, 5; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL mysql PRIMARY mysql columns_priv PRIMARY KEY -NULL mysql name mysql help_category UNIQUE -select sum(ordinal_position) from key_column_usage; -sum(ordinal_position) -77 -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select * from schemata limit 0,5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL mysql latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -NULL test1 latin1 latin1_swedish_ci NULL -select distinct grantee from user_privileges; -grantee -'root'@'127.0.0.1' -'root'@'' -'root'@'localhost' -select all grantee from user_privileges order by grantee, privilege_type; -grantee -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'127.0.0.1' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -'root'@'localhost' -select id , character_set_name from collations order by id asc limit 10; -id character_set_name -1 big5 -2 latin2 -3 dec8 -4 cp850 -5 latin1 -6 hp8 -7 koi8r -8 latin1 -9 latin2 -10 swe7 -select table_catalog from columns -union all -select table_catalog from tables limit 0,5; -table_catalog -NULL -NULL -NULL -NULL -NULL -select table_catalog from columns -union -select table_catalog from tables limit 0,5; -table_catalog -NULL -select all schema_name from information_schema.schemata; -schema_name -information_schema -db_datadict -mysql -test -test1 -test4 -SELECT * -INTO OUTFILE '../tmp/out.myisam.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -USE test; -SELECT * -INTO OUTFILE '../tmp/out.myisam.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CREATE USER user_3212@localhost; -GRANT ALL ON db_datadict.* TO user_3212@localhost; -GRANT FILE ON *.* TO user_3212@localhost; -connect(localhost,user_3212,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_3212@localhost db_datadict -SELECT * -INTO OUTFILE '../tmp/out.myisam.user.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -FROM schemata LIMIT 0, 5; -ERROR 42S02: Table 'db_datadict.schemata' doesn't exist -SELECT * -INTO OUTFILE '../tmp/out.myisam.user.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; -SELECT * -INTO OUTFILE '../tmp/out.myisam.user_2.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM schemata LIMIT 0, 5; -SELECT * -FROM schemata LIMIT 0, 5; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -SELECT * -INTO OUTFILE '../tmp/out.myisam.user_2.db.file' - FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' - LINES TERMINATED BY '\n' - FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -SELECT * -FROM information_schema.schemata -WHERE schema_name LIKE 'db_%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -USE information_schema; - -root@localhost information_schema -use db_datadict; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from information_schema.columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from information_schema.tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -use information_schema; -select table_catalog "1", table_schema "2", table_name "3", column_name "4" - from columns -union -select table_catalog, table_schema, table_name, -concat( "*** type = ", table_type ) -from tables -order by 3, 4 desc, 1, 2 limit 30; -1 2 3 4 -NULL information_schema CHARACTER_SETS MAXLEN -NULL information_schema CHARACTER_SETS DESCRIPTION -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME -NULL information_schema CHARACTER_SETS *** type = SYSTEM VIEW -NULL information_schema COLLATIONS SORTLEN -NULL information_schema COLLATIONS IS_DEFAULT -NULL information_schema COLLATIONS IS_COMPILED -NULL information_schema COLLATIONS ID -NULL information_schema COLLATIONS COLLATION_NAME -NULL information_schema COLLATIONS CHARACTER_SET_NAME -NULL information_schema COLLATIONS *** type = SYSTEM VIEW -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY *** type = SYSTEM VIEW -NULL information_schema COLUMNS TABLE_SCHEMA -NULL information_schema COLUMNS TABLE_NAME -NULL information_schema COLUMNS TABLE_CATALOG -NULL information_schema COLUMNS PRIVILEGES -NULL information_schema COLUMNS ORDINAL_POSITION -NULL information_schema COLUMNS NUMERIC_SCALE -NULL information_schema COLUMNS NUMERIC_PRECISION -NULL information_schema COLUMNS IS_NULLABLE -NULL information_schema COLUMNS EXTRA -NULL information_schema COLUMNS DATA_TYPE -NULL information_schema COLUMNS COLUMN_TYPE -NULL information_schema COLUMNS COLUMN_NAME -NULL information_schema COLUMNS COLUMN_KEY -NULL information_schema COLUMNS COLUMN_DEFAULT -NULL information_schema COLUMNS COLUMN_COMMENT -DROP USER user_3212@localhost; - -Testcase 3.2.1.3: --------------------------------------------------------------------------------- -insert into schemata (catalog_name, schema_name, default_character_set_name, sql_path) -values ('null', 'db1', 'latin1', 'null'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into tables (table_schema, table_name)values('db_datadict', 't1'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into columns (table_name, column_name)values('t3', 'f2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into character_sets (character_set_name, default_collate_name, description, maxlen) -values('cp1251', 'cp1251_general_ci', 'windows cyrillic', 1); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into collation_character_set_applicability (collation_name, character_set_name) -values (' big5_chinese_ci', 'big6'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into routines(routine_name, routine_type ) values ('p2', 'procedure'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into statistics(table_schema, table_name, index_name) -values ('mysql', 'db', 'primary'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into views(table_schema, table_name) values ('db2', 'v2'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into user_privileges (privilege_type, is_grantable) values ('select', 'yes'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into schema_privileges (table_schema, privilege_type) values('db2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_privileges (able_schema, table_name, privilege_type) -values('db2', 'v2', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into column_privileges (table_name, column_name, privilege_type) -values ('t3', 'f3', 'insert'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -insert into key_column_usage (constraint_schema, constraint_name, table_name) -values ('mysql', 'primary', 'db'); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_3; -create procedure db_datadict.sp_4_1_3() -begin -insert into information_schema.schema_privileges (table_schema,privilege_type) -values('db2','insert'); -end// -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -call db_datadict.sp_4_1_3(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT table_schema, privilege_type FROM information_schema.schema_privileges -WHERE table_schema LIKE 'db%'; -table_schema privilege_type -drop procedure db_datadict.sp_4_1_3; -CREATE USER user_4_1_3@localhost; -connect(localhost,user_4_1_3,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_3@localhost test -use information_schema; -insert into table_constraints ( constraint_schema, constraint_name, table_schema) -values ('primary', 'mysql', 'user'); -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.4: --------------------------------------------------------------------------------- -use information_schema; - -root@localhost information_schema -update schemata set schema_name = 'db5' where default_character_set_name = 'latin1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update tables set table_schema = 'db_datadict1' where table_name = 't1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update character_sets set character_set_name = 'cp1252' where maxlen = 1; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collations set collation_name = 'cp1253_bin' - where character_set_name = 'cp1251'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update collation_character_set_applicability set collation_name = 'big6_chinese_ci' - where character_set_name = 'big6'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update routines set routine_name = p2 where routine_body = 'sql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update statistics set table_schema = 'mysql1' where table_name = 'db'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update views set table_schema = 'db3' where table_name = 'v1'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update schema_privileges set table_schema = 'db2' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_privileges set table_name = 'v3' where privilege_type = 'select'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update column_privileges set table_name = 't4' where column_name = 'f3'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update table_constraints set constraint_schema = 'primary' - where table_schema = 'proc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -update key_column_usage set table_name = 'db1' where constraint_name = 'primary'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_4; -create procedure db_datadict.sp_4_1_4() -begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end// -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -call db_datadict.sp_4_1_4(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -select * from information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_4_1_4 NULL db_datadict sp_4_1_4 PROCEDURE NULL SQL begin -update information_schema.routines set routine_name = 'p2' - where routine_name = 'sp_4_1_4'; -end NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -drop procedure db_datadict.sp_4_1_4; -use information_schema; - -user_4_1_3@localhost information_schema -update user_privileges set privilege_type = 'insert' where is_grantable = 'yes'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema - -Testcase 3.2.1.5: --------------------------------------------------------------------------------- -use information_schema; - -root: DELETE FROM any table in IS ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schemata where schema_name = 'mysql'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from columns; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from character_sets; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collations; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from collation_character_set_applicability; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from routines; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from statistics; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from views; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from user_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from schema_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from column_privileges; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from table_constraints; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -delete from key_column_usage; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure if exists db_datadict.sp_4_1_5; -create procedure db_datadict.sp_4_1_5() -begin -delete from information_schema.column_privileges; -end// -call db_datadict.sp_4_1_5(); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -drop procedure db_datadict.sp_4_1_5; -use information_schema; - -user_4_1_3@localhost information_schema -delete from tables where table_name = 'abc'; -ERROR 42000: Access denied for user 'user_4_1_3'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_3@localhost; - -Testcase 3.2.1.6: --------------------------------------------------------------------------------- -use information_schema; - -root: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use db_datadict; - -root: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -CREATE USER user_4_1_6@localhost; -grant all on *.* to user_4_1_6@localhost; -FLUSH PRIVILEGES; -SHOW GRANTS FOR user_4_1_6@localhost; -Grants for user_4_1_6@localhost -GRANT ALL PRIVILEGES ON *.* TO 'user_4_1_6'@'localhost' -connect(localhost,user_4_1_6,,information_schema,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_6@localhost information_schema -use information_schema; - -user: create a table with a name of an IS table directly in IS --------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema -use test; - -user: create a table with a name of an IS table from other db -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE TABLE information_schema. schemata ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. tables ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. columns ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. character_sets ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collations ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. collation_character_set_applicability ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. routines ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. statistics ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. views ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. user_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. schema_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. column_privileges ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. table_constraints ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. key_column_usage ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -CREATE TABLE information_schema. triggers ( c1 INT ); -ERROR 42000: Access denied for user 'user_4_1_6'@'localhost' to database 'information_schema' -create table information_schema.t1 (f1 int, f2 int, f3 int); -ERROR 42S02: Unknown table 't1' in information_schema - -root@localhost db_datadict -DROP USER user_4_1_6@localhost; - -Testcase 3.2.1.7: --------------------------------------------------------------------------------- -use information_schema; - -root: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -USE db_datadict; - -root: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM mysql.time_zone; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE VIEW v1 AS SELECT * FROM information_schema.columns; -SELECT * FROM v1 LIMIT 5; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -CREATE USER user_4_1_7@localhost; -GRANT ALL ON db_datadict.* TO user_4_1_7@localhost; -GRANT ALL ON information_schema.* TO user_4_1_7@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,user_4_1_7,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_7@localhost information_schema - -user: create a view with a name of an IS table directly in IS -------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -create view v1 as select * from table_privileges; -ERROR 42S02: Unknown table 'v1' in information_schema -use db_datadict; - -user: create a view with a name of an IS table from other db ------------------------------------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -CREATE VIEW information_schema. schemata AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. tables AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. columns AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. character_sets AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collations AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. collation_character_set_applicability AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. routines AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. statistics AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. views AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. user_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. schema_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. column_privileges AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. table_constraints AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. key_column_usage AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' -CREATE VIEW information_schema. triggers AS SELECT * FROM db_datadict.v1; -ERROR 42000: Access denied for user 'user_4_1_7'@'localhost' to database 'information_schema' - -root@localhost db_datadict -DROP USER user_4_1_7@localhost; -DROP VIEW db_datadict.v1; - -Testcase 3.2.1.8: --------------------------------------------------------------------------------- -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_8@localhost; -grant select, index on *.* to user_4_1_8@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_8,,test,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_8@localhost test -use information_schema; -create index i1 on schemata(schema_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i2 on tables(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i3 on columns(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i4 on character_sets(character_set_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i6 on collation_character_set_applicability(collation_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i7 on routines(routine_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i8 on statistics(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i9 on views(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i10 on user_privileges(privilege_type); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i11 on schema_privileges(table_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i12 on table_privileges(able_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i13 on column_privileges(table_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i14 on table_constraints(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i15 on key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -create index i16 on triggers(trigger_name); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' -use db_datadict; -create index i15 on information_schema.key_column_usage(constraint_schema); -ERROR 42000: Access denied for user 'user_4_1_8'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_8@localhost; - -Testcase 3.2.1.9: --------------------------------------------------------------------------------- - -root: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; - -root: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schemata add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table tables drop primary key; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table columns add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table character_sets disable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table collation_character_set_applicability add f1 int; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table routines discard tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table statistics import tablespace; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table views drop column table_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table user_privileges drop index privilege_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table schema_privileges drop column is_grantable; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_privileges order by constraint_type; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table column_privileges rename to aaxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table table_constraints order by schema_name; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table key_column_usage rename to information_schema.aabxyz; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -alter table triggers rename to information_schema.sql_mode; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER user_4_1_9@localhost; -grant select, alter, create, insert on *.* to user_4_1_9@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_9,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -user_4_1_9@localhost db_datadict -use db_datadict; - -user: alter a table from other db ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -use information_schema; - -user: alter a table from directly ---------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE schemata ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE tables ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE columns ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE character_sets ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collations ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE collation_character_set_applicability ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE routines ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE statistics ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE views ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE user_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE schema_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE column_privileges ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE table_constraints ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE key_column_usage ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' -ALTER TABLE triggers ADD f1 INT; -ERROR 42000: Access denied for user 'user_4_1_9'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_9@localhost; - -Testcase 3.2.1.10: --------------------------------------------------------------------------------- -use information_schema; - -root: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use db_datadict; - -root: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -use information_schema; -CREATE USER user_4_1_10@localhost; -GRANT SELECT, DROP ON *.* TO user_4_1_10@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_10,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_10@localhost information_schema - -user: drop a table from IS --------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -use db_datadict; - -user: drop a table from other db --------------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DROP TABLE information_schema. schemata ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. tables ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. columns ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. character_sets ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collations ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. routines ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. statistics ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. views ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. user_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. column_privileges ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. table_constraints ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' -DROP TABLE information_schema. triggers ; -ERROR 42000: Access denied for user 'user_4_1_10'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_10@localhost; -CREATE USER user_4_1_11@localhost; -GRANT SUPER ON *.* TO user_4_1_11@localhost; -FLUSH PRIVILEGES; -connect(localhost,user_4_1_11,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; - -user_4_1_11@localhost information_schema -drop table routines; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -alter table collations enable keys; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create index i5 on collations( collation_name ); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -create view v1 as select * from schemata; -ERROR 42S02: Unknown table 'v1' in information_schema -delete from columns; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' -insert into collations ( collation_name, character_set_name, id, is_default, -is_compiled, sortlen) -values ('cp1251_bin', 'cp1251', 50, '', '', 0); -ERROR 42000: Access denied for user 'user_4_1_11'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP USER user_4_1_11@localhost; - -Testcase 3.2.1.11: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'u_6_401011'@'localhost'; -GRANT ALL ON information_schema.* TO 'u_6_401011'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401011'@'localhost'; -FLUSH PRIVILEGES; -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' - -root: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -connect(localhost,u_6_401011,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; - -u_6_401011@localhost information_schema -ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -user: move table to other DB ----------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -ALTER TABLE information_schema. schemata RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. tables RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. columns RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. character_sets RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collations RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. collation_character_set_applicability RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. routines RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. statistics RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. views RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. user_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. schema_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. column_privileges RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. table_constraints RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. key_column_usage RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' -ALTER TABLE information_schema. triggers RENAME db_datadict.tb_01; -ERROR 42000: Access denied for user 'u_6_401011'@'localhost' to database 'information_schema' - -root@localhost information_schema -DROP TABLE IF EXISTS db_datadict.schemata; -DROP USER 'u_6_401011'@'localhost'; - -Testcase 3.2.1.12: --------------------------------------------------------------------------------- - -root: delete from IS tables ---------------------------- - -known error 1044 (ERROR 42000: Access denied for user ... to database ...): ---------------------------------------------------------------------------- -DELETE FROM information_schema. schemata ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. tables ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. columns ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. character_sets ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collations ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. collation_character_set_applicability ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. routines ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. statistics ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. views ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. user_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. schema_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. column_privileges ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. table_constraints ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. key_column_usage ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -DELETE FROM information_schema. triggers ; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.tables SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.columns SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.statistics SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.views SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.column_privileges SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.table_constraints SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.key_column_usage SET table_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schemata SET catalog_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.character_sets SET description = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collations SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.collation_character_set_applicability -SET character_set_name = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.routines SET routine_type = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.user_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.schema_privileges SET grantee = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -UPDATE information_schema.triggers SET sql_mode = 't_4711'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -CREATE USER 'u_6_401012'@'localhost'; -connect(localhost,u_6_401012,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -insert into information_schema.schemata (catalog_name, schema_name, -default_character_set_name, sql_path) -values (null, information_schema1, utf16, null); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.schemata rename db_datadict1.schemata; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.tables drop column checksum; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.statistics modify packed int; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.routines modify created int not null; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.key_column_usage drop column ordinal_position; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -alter table information_schema.table_privileges -change privilege_type rights_approved varchar(32); -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -update columns set table_name = 't4' where column_name = 'f2'; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' -delete from information_schema.collations; -ERROR 42000: Access denied for user 'u_6_401012'@'localhost' to database 'information_schema' - -root@localhost information_schema -drop table if exists db_datadict1.schemata; -DROP USER 'u_6_401012'@'localhost'; - -Testcase 3.2.1.13: --------------------------------------------------------------------------------- -use information_schema; - -first check status >before< creating the objects ... ----------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401013(f1 char(10), f2 char(25), f3 int) -engine = myisam; -create view res_v_401013 as select * from res_t_401013; -CREATE USER u_6_401013@localhost; -create procedure sp_6_401013() select 'db_datadict'; -create function fn_6_401013() returns int return 0; -create index i_6_401013 on res_t_401013(f3); -use information_schema; - -now check whether all new objects exists in IS ... --------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_t_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401013 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401013 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL db_datadict res_v_401013 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401013 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401013 FUNCTION DEFINER -sp_6_401013 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401013 db_datadict i_6_401013 BTREE -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401013'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401013 on res_t_401013; -drop table db_datadict.res_t_401013; -drop view db_datadict.res_v_401013; -DROP USER u_6_401013@localhost; -drop procedure sp_6_401013; -drop function fn_6_401013; -drop database db_datadict; -use information_schema; - -and now check whether all objects are removed from IS ... ---------------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.14: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401014(f1 char(10), f2 varchar(25), f3 int); -create view res_v_401014 as select * from res_t_401014; -create procedure sp_6_401014() select 'db_datadict'; -create function fn_6_401014() returns int return 0; - -show existing objects >before< changing them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_v_401014 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_v_401014 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -alter table res_t_401014 change f1 ff1 int; -alter table res_t_401014 engine = MEMORY; -alter table res_t_401014 change f3 f3_new bigint; -alter view res_v_401014 as select ff1 from res_t_401014; -alter procedure sp_6_401014 sql security invoker; -alter function fn_6_401014 comment 'updated comments'; -alter database db_datadict character set utf8; - -now check whether the changes are visible in IS ... ---------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict utf8 utf8_general_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MEMORY -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict res_t_401014 f2 2 NULL YES varchar 25 25 NULL NULL latin1 latin1_swedish_ci varchar(25) select,insert,update,references -NULL db_datadict res_t_401014 f3_new 3 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL db_datadict res_v_401014 ff1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401014 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401014 FUNCTION DEFINER -sp_6_401014 PROCEDURE INVOKER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop table db_datadict.res_t_401014; -drop view db_datadict.res_v_401014; -drop procedure sp_6_401014; -drop function fn_6_401014; -drop database db_datadict; - -Testcase 3.2.1.15: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_t_401015(f1 char(10), f2 text(25), f3 int); -create view res_v_401015 as select * from res_t_401015; -CREATE USER u_6_401015@localhost; -create procedure sp_6_401015() select 'test'; -create function fn_6_401015() returns int return 0; -create index i_6_401015 on res_t_401015(f3); - -show existing objects >before< dropping them ... ------------------------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -NULL db_datadict MyISAM -NULL db_datadict NULL -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict res_t_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_t_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_t_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) MUL select,insert,update,references -NULL db_datadict res_v_401015 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict res_v_401015 f2 2 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL db_datadict res_v_401015 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -db_datadict res_v_401015 YES -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -fn_6_401015 FUNCTION DEFINER -sp_6_401015 PROCEDURE DEFINER -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -res_t_401015 db_datadict i_6_401015 BTREE -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -'u_6_401015'@'localhost' NULL USAGE NO -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER -use db_datadict; -drop index i_6_401015 on res_t_401015; -drop table db_datadict.res_t_401015; -drop view db_datadict.res_v_401015; -DROP USER u_6_401015@localhost; -drop procedure sp_6_401015; -drop function fn_6_401015; - -now check they are really gone ... ----------------------------------- -select * -from information_schema.schemata -where schema_name like 'db_datadict%'; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL db_datadict latin1 latin1_swedish_ci NULL -select table_catalog, table_schema, engine -from information_schema.tables -where table_schema like 'db_datadict%'; -table_catalog table_schema engine -select * -from information_schema.columns -where table_schema like 'db_datadict%'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -select table_schema, table_name, is_updatable -from information_schema.views -where table_schema like 'db_datadict%'; -table_schema table_name is_updatable -select routine_name, routine_type, security_type, sql_mode -from information_schema.routines -where routine_schema like 'db_datadict%'; -routine_name routine_type security_type sql_mode -select table_name, index_schema, index_name, index_type -from information_schema.statistics -where table_schema like 'db_datadict%'; -table_name index_schema index_name index_type -select * -from information_schema.user_privileges; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'root'@'127.0.0.1' NULL ALTER YES -'root'@'127.0.0.1' NULL ALTER ROUTINE YES -'root'@'127.0.0.1' NULL CREATE YES -'root'@'127.0.0.1' NULL CREATE ROUTINE YES -'root'@'127.0.0.1' NULL CREATE TEMPORARY TABLES YES -'root'@'127.0.0.1' NULL CREATE USER YES -'root'@'127.0.0.1' NULL CREATE VIEW YES -'root'@'127.0.0.1' NULL DELETE YES -'root'@'127.0.0.1' NULL DROP YES -'root'@'127.0.0.1' NULL EXECUTE YES -'root'@'127.0.0.1' NULL FILE YES -'root'@'127.0.0.1' NULL INDEX YES -'root'@'127.0.0.1' NULL INSERT YES -'root'@'127.0.0.1' NULL LOCK TABLES YES -'root'@'127.0.0.1' NULL PROCESS YES -'root'@'127.0.0.1' NULL REFERENCES YES -'root'@'127.0.0.1' NULL RELOAD YES -'root'@'127.0.0.1' NULL REPLICATION CLIENT YES -'root'@'127.0.0.1' NULL REPLICATION SLAVE YES -'root'@'127.0.0.1' NULL SELECT YES -'root'@'127.0.0.1' NULL SHOW DATABASES YES -'root'@'127.0.0.1' NULL SHOW VIEW YES -'root'@'127.0.0.1' NULL SHUTDOWN YES -'root'@'127.0.0.1' NULL SUPER YES -'root'@'127.0.0.1' NULL UPDATE YES -'root'@'' NULL ALTER YES -'root'@'' NULL ALTER ROUTINE YES -'root'@'' NULL CREATE YES -'root'@'' NULL CREATE ROUTINE YES -'root'@'' NULL CREATE TEMPORARY TABLES YES -'root'@'' NULL CREATE USER YES -'root'@'' NULL CREATE VIEW YES -'root'@'' NULL DELETE YES -'root'@'' NULL DROP YES -'root'@'' NULL EXECUTE YES -'root'@'' NULL FILE YES -'root'@'' NULL INDEX YES -'root'@'' NULL INSERT YES -'root'@'' NULL LOCK TABLES YES -'root'@'' NULL PROCESS YES -'root'@'' NULL REFERENCES YES -'root'@'' NULL RELOAD YES -'root'@'' NULL REPLICATION CLIENT YES -'root'@'' NULL REPLICATION SLAVE YES -'root'@'' NULL SELECT YES -'root'@'' NULL SHOW DATABASES YES -'root'@'' NULL SHOW VIEW YES -'root'@'' NULL SHUTDOWN YES -'root'@'' NULL SUPER YES -'root'@'' NULL UPDATE YES -'root'@'localhost' NULL ALTER YES -'root'@'localhost' NULL ALTER ROUTINE YES -'root'@'localhost' NULL CREATE YES -'root'@'localhost' NULL CREATE ROUTINE YES -'root'@'localhost' NULL CREATE TEMPORARY TABLES YES -'root'@'localhost' NULL CREATE USER YES -'root'@'localhost' NULL CREATE VIEW YES -'root'@'localhost' NULL DELETE YES -'root'@'localhost' NULL DROP YES -'root'@'localhost' NULL EXECUTE YES -'root'@'localhost' NULL FILE YES -'root'@'localhost' NULL INDEX YES -'root'@'localhost' NULL INSERT YES -'root'@'localhost' NULL LOCK TABLES YES -'root'@'localhost' NULL PROCESS YES -'root'@'localhost' NULL REFERENCES YES -'root'@'localhost' NULL RELOAD YES -'root'@'localhost' NULL REPLICATION CLIENT YES -'root'@'localhost' NULL REPLICATION SLAVE YES -'root'@'localhost' NULL SELECT YES -'root'@'localhost' NULL SHOW DATABASES YES -'root'@'localhost' NULL SHOW VIEW YES -'root'@'localhost' NULL SHUTDOWN YES -'root'@'localhost' NULL SUPER YES -'root'@'localhost' NULL UPDATE YES -select * -from information_schema.column_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.table_privileges -where table_schema like 'db_datadict%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select * -from information_schema.key_column_usage -where table_schema like 'db_datadict%'; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -SELECT * -FROM information_schema.triggers -WHERE trigger_schema LIKE 'db_datadict%'; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER - -Testcase 3.2.1.16: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE DATABASE db_hidden; -USE db_hidden; -CREATE TABLE tb_hidden ( c1 TEXT ); -USE db_datadict; -CREATE TABLE res_t_401016(f1 char(10),f2 text(25),f3 int); -CREATE TABLE res_t_401016_1(f1 char(10),f2 text(25),f3 int); -CREATE USER 'u_6_401016'@'localhost'; -GRANT SELECT ON db_datadict.res_t_401016 TO 'u_6_401016'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT table_schema, table_name, engine -FROM TABLES; -table_schema table_name engine -information_schema CHARACTER_SETS MEMORY -information_schema COLLATIONS MEMORY -information_schema COLLATION_CHARACTER_SET_APPLICABILITY MEMORY -information_schema COLUMNS MyISAM -information_schema COLUMN_PRIVILEGES MEMORY -information_schema KEY_COLUMN_USAGE MEMORY -information_schema ROUTINES MyISAM -information_schema SCHEMATA MEMORY -information_schema SCHEMA_PRIVILEGES MEMORY -information_schema STATISTICS MEMORY -information_schema TABLES MEMORY -information_schema TABLE_CONSTRAINTS MEMORY -information_schema TABLE_PRIVILEGES MEMORY -information_schema TRIGGERS MyISAM -information_schema USER_PRIVILEGES MEMORY -information_schema VIEWS MyISAM -db_datadict res_t_401016 MyISAM -test t1 MyISAM -test t10 MyISAM -test t11 MyISAM -test t2 MyISAM -test t3 MyISAM -test t4 MyISAM -test t7 MyISAM -test t8 MyISAM -test t9 MyISAM -test tb1 MyISAM -test tb2 MyISAM -test tb3 MyISAM -test tb4 MyISAM -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost db_datadict -grant usage on information_schema.* to 'u_6_401016'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401016,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SHOW TABLES; -Tables_in_information_schema -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401016'@'localhost'; -drop table res_t_401016; -drop table res_t_401016_1; -DROP DATABASE db_hidden; - -Testcase 3.2.1.17: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401017'@'localhost'; -grant select on information_schema.* to u_6_401017@localhost; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -FLUSH PRIVILEGES; -connect(localhost,u_6_401017,,test,MYSQL_PORT,MYSQL_SOCK); -use information_schema; -select * from collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms -select * from schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -select table_name from tables; -table_name -CHARACTER_SETS -COLLATIONS -COLLATION_CHARACTER_SET_APPLICABILITY -COLUMNS -COLUMN_PRIVILEGES -KEY_COLUMN_USAGE -ROUTINES -SCHEMATA -SCHEMA_PRIVILEGES -STATISTICS -TABLES -TABLE_CONSTRAINTS -TABLE_PRIVILEGES -TRIGGERS -USER_PRIVILEGES -VIEWS -t1 -t10 -t11 -t2 -t3 -t4 -t7 -t8 -t9 -tb1 -tb2 -tb3 -tb4 -select table_name, column_name, column_type from columns; -table_name column_name column_type -CHARACTER_SETS CHARACTER_SET_NAME varchar(64) -CHARACTER_SETS DEFAULT_COLLATE_NAME varchar(64) -CHARACTER_SETS DESCRIPTION varchar(60) -CHARACTER_SETS MAXLEN bigint(3) -COLLATIONS COLLATION_NAME varchar(64) -COLLATIONS CHARACTER_SET_NAME varchar(64) -COLLATIONS ID bigint(11) -COLLATIONS IS_DEFAULT varchar(3) -COLLATIONS IS_COMPILED varchar(3) -COLLATIONS SORTLEN bigint(3) -COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar(64) -COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar(64) -COLUMNS TABLE_CATALOG varchar(4096) -COLUMNS TABLE_SCHEMA varchar(64) -COLUMNS TABLE_NAME varchar(64) -COLUMNS COLUMN_NAME varchar(64) -COLUMNS ORDINAL_POSITION bigint(21) -COLUMNS COLUMN_DEFAULT longtext -COLUMNS IS_NULLABLE varchar(3) -COLUMNS DATA_TYPE varchar(64) -COLUMNS CHARACTER_MAXIMUM_LENGTH bigint(21) -COLUMNS CHARACTER_OCTET_LENGTH bigint(21) -COLUMNS NUMERIC_PRECISION bigint(21) -COLUMNS NUMERIC_SCALE bigint(21) -COLUMNS CHARACTER_SET_NAME varchar(64) -COLUMNS COLLATION_NAME varchar(64) -COLUMNS COLUMN_TYPE longtext -COLUMNS COLUMN_KEY varchar(3) -COLUMNS EXTRA varchar(20) -COLUMNS PRIVILEGES varchar(80) -COLUMNS COLUMN_COMMENT varchar(255) -COLUMN_PRIVILEGES GRANTEE varchar(81) -COLUMN_PRIVILEGES TABLE_CATALOG varchar(4096) -COLUMN_PRIVILEGES TABLE_SCHEMA varchar(64) -COLUMN_PRIVILEGES TABLE_NAME varchar(64) -COLUMN_PRIVILEGES COLUMN_NAME varchar(64) -COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar(64) -COLUMN_PRIVILEGES IS_GRANTABLE varchar(3) -KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar(4096) -KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar(64) -KEY_COLUMN_USAGE CONSTRAINT_NAME varchar(64) -KEY_COLUMN_USAGE TABLE_CATALOG varchar(4096) -KEY_COLUMN_USAGE TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE TABLE_NAME varchar(64) -KEY_COLUMN_USAGE COLUMN_NAME varchar(64) -KEY_COLUMN_USAGE ORDINAL_POSITION bigint(10) -KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint(10) -KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar(64) -KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar(64) -KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar(64) -ROUTINES SPECIFIC_NAME varchar(64) -ROUTINES ROUTINE_CATALOG varchar(4096) -ROUTINES ROUTINE_SCHEMA varchar(64) -ROUTINES ROUTINE_NAME varchar(64) -ROUTINES ROUTINE_TYPE varchar(9) -ROUTINES DTD_IDENTIFIER varchar(64) -ROUTINES ROUTINE_BODY varchar(8) -ROUTINES ROUTINE_DEFINITION longtext -ROUTINES EXTERNAL_NAME varchar(64) -ROUTINES EXTERNAL_LANGUAGE varchar(64) -ROUTINES PARAMETER_STYLE varchar(8) -ROUTINES IS_DETERMINISTIC varchar(3) -ROUTINES SQL_DATA_ACCESS varchar(64) -ROUTINES SQL_PATH varchar(64) -ROUTINES SECURITY_TYPE varchar(7) -ROUTINES CREATED datetime -ROUTINES LAST_ALTERED datetime -ROUTINES SQL_MODE longtext -ROUTINES ROUTINE_COMMENT varchar(64) -ROUTINES DEFINER varchar(77) -SCHEMATA CATALOG_NAME varchar(4096) -SCHEMATA SCHEMA_NAME varchar(64) -SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar(64) -SCHEMATA DEFAULT_COLLATION_NAME varchar(64) -SCHEMATA SQL_PATH varchar(4096) -SCHEMA_PRIVILEGES GRANTEE varchar(81) -SCHEMA_PRIVILEGES TABLE_CATALOG varchar(4096) -SCHEMA_PRIVILEGES TABLE_SCHEMA varchar(64) -SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar(64) -SCHEMA_PRIVILEGES IS_GRANTABLE varchar(3) -STATISTICS TABLE_CATALOG varchar(4096) -STATISTICS TABLE_SCHEMA varchar(64) -STATISTICS TABLE_NAME varchar(64) -STATISTICS NON_UNIQUE bigint(1) -STATISTICS INDEX_SCHEMA varchar(64) -STATISTICS INDEX_NAME varchar(64) -STATISTICS SEQ_IN_INDEX bigint(2) -STATISTICS COLUMN_NAME varchar(64) -STATISTICS COLLATION varchar(1) -STATISTICS CARDINALITY bigint(21) -STATISTICS SUB_PART bigint(3) -STATISTICS PACKED varchar(10) -STATISTICS NULLABLE varchar(3) -STATISTICS INDEX_TYPE varchar(16) -STATISTICS COMMENT varchar(16) -TABLES TABLE_CATALOG varchar(4096) -TABLES TABLE_SCHEMA varchar(64) -TABLES TABLE_NAME varchar(64) -TABLES TABLE_TYPE varchar(64) -TABLES ENGINE varchar(64) -TABLES VERSION bigint(21) -TABLES ROW_FORMAT varchar(10) -TABLES TABLE_ROWS bigint(21) -TABLES AVG_ROW_LENGTH bigint(21) -TABLES DATA_LENGTH bigint(21) -TABLES MAX_DATA_LENGTH bigint(21) -TABLES INDEX_LENGTH bigint(21) -TABLES DATA_FREE bigint(21) -TABLES AUTO_INCREMENT bigint(21) -TABLES CREATE_TIME datetime -TABLES UPDATE_TIME datetime -TABLES CHECK_TIME datetime -TABLES TABLE_COLLATION varchar(64) -TABLES CHECKSUM bigint(21) -TABLES CREATE_OPTIONS varchar(255) -TABLES TABLE_COMMENT varchar(80) -TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar(4096) -TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_NAME varchar(64) -TABLE_CONSTRAINTS TABLE_SCHEMA varchar(64) -TABLE_CONSTRAINTS TABLE_NAME varchar(64) -TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar(64) -TABLE_PRIVILEGES GRANTEE varchar(81) -TABLE_PRIVILEGES TABLE_CATALOG varchar(4096) -TABLE_PRIVILEGES TABLE_SCHEMA varchar(64) -TABLE_PRIVILEGES TABLE_NAME varchar(64) -TABLE_PRIVILEGES PRIVILEGE_TYPE varchar(64) -TABLE_PRIVILEGES IS_GRANTABLE varchar(3) -TRIGGERS TRIGGER_CATALOG varchar(4096) -TRIGGERS TRIGGER_SCHEMA varchar(64) -TRIGGERS TRIGGER_NAME varchar(64) -TRIGGERS EVENT_MANIPULATION varchar(6) -TRIGGERS EVENT_OBJECT_CATALOG varchar(4096) -TRIGGERS EVENT_OBJECT_SCHEMA varchar(64) -TRIGGERS EVENT_OBJECT_TABLE varchar(64) -TRIGGERS ACTION_ORDER bigint(4) -TRIGGERS ACTION_CONDITION longtext -TRIGGERS ACTION_STATEMENT longtext -TRIGGERS ACTION_ORIENTATION varchar(9) -TRIGGERS ACTION_TIMING varchar(6) -TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar(64) -TRIGGERS ACTION_REFERENCE_OLD_ROW varchar(3) -TRIGGERS ACTION_REFERENCE_NEW_ROW varchar(3) -TRIGGERS CREATED datetime -TRIGGERS SQL_MODE longtext -TRIGGERS DEFINER longtext -USER_PRIVILEGES GRANTEE varchar(81) -USER_PRIVILEGES TABLE_CATALOG varchar(4096) -USER_PRIVILEGES PRIVILEGE_TYPE varchar(64) -USER_PRIVILEGES IS_GRANTABLE varchar(3) -VIEWS TABLE_CATALOG varchar(4096) -VIEWS TABLE_SCHEMA varchar(64) -VIEWS TABLE_NAME varchar(64) -VIEWS VIEW_DEFINITION longtext -VIEWS CHECK_OPTION varchar(8) -VIEWS IS_UPDATABLE varchar(3) -VIEWS DEFINER varchar(77) -VIEWS SECURITY_TYPE varchar(7) -t1 f1 char(20) -t1 f2 char(25) -t1 f3 date -t1 f4 int(11) -t1 f5 char(25) -t1 f6 int(11) -t10 f1 char(20) -t10 f2 char(25) -t10 f3 date -t10 f4 int(11) -t10 f5 char(25) -t10 f6 int(11) -t11 f1 char(20) -t11 f2 char(25) -t11 f3 date -t11 f4 int(11) -t11 f5 char(25) -t11 f6 int(11) -t2 f1 char(20) -t2 f2 char(25) -t2 f3 date -t2 f4 int(11) -t2 f5 char(25) -t2 f6 int(11) -t3 f1 char(20) -t3 f2 char(20) -t3 f3 int(11) -t4 f1 char(20) -t4 f2 char(25) -t4 f3 date -t4 f4 int(11) -t4 f5 char(25) -t4 f6 int(11) -t7 f1 char(20) -t7 f2 char(25) -t7 f3 date -t7 f4 int(11) -t8 f1 char(20) -t8 f2 char(25) -t8 f3 date -t8 f4 int(11) -t9 f1 int(11) -t9 f2 char(25) -t9 f3 int(11) -tb1 f1 char(1) -tb1 f2 char(1) -tb1 f3 char(1) -tb1 f4 tinytext -tb1 f5 text -tb1 f6 mediumtext -tb1 f7 longtext -tb1 f8 tinyblob -tb1 f9 blob -tb1 f10 mediumblob -tb1 f11 longblob -tb1 f12 binary(1) -tb1 f13 tinyint(4) -tb1 f14 tinyint(3) unsigned -tb1 f15 tinyint(3) unsigned zerofill -tb1 f16 tinyint(3) unsigned zerofill -tb1 f17 smallint(6) -tb1 f18 smallint(5) unsigned -tb1 f19 smallint(5) unsigned zerofill -tb1 f20 smallint(5) unsigned zerofill -tb1 f21 mediumint(9) -tb1 f22 mediumint(8) unsigned -tb1 f23 mediumint(8) unsigned zerofill -tb1 f24 mediumint(8) unsigned zerofill -tb1 f25 int(11) -tb1 f26 int(10) unsigned -tb1 f27 int(10) unsigned zerofill -tb1 f28 int(10) unsigned zerofill -tb1 f29 bigint(20) -tb1 f30 bigint(20) unsigned -tb1 f31 bigint(20) unsigned zerofill -tb1 f32 bigint(20) unsigned zerofill -tb1 f33 decimal(10,0) -tb1 f34 decimal(10,0) unsigned -tb1 f35 decimal(10,0) unsigned zerofill -tb1 f36 decimal(10,0) unsigned zerofill -tb1 f37 decimal(10,0) -tb1 f38 decimal(64,0) -tb1 f39 decimal(10,0) unsigned -tb1 f40 decimal(64,0) unsigned -tb1 f41 decimal(10,0) unsigned zerofill -tb1 f42 decimal(64,0) unsigned zerofill -tb1 f43 decimal(10,0) unsigned zerofill -tb1 f44 decimal(64,0) unsigned zerofill -tb1 f45 decimal(10,0) -tb1 f46 decimal(63,30) -tb1 f47 decimal(10,0) unsigned -tb1 f48 decimal(63,30) unsigned -tb1 f49 decimal(10,0) unsigned zerofill -tb1 f50 decimal(63,30) unsigned zerofill -tb1 f51 decimal(10,0) unsigned zerofill -tb1 f52 decimal(63,30) unsigned zerofill -tb1 f53 decimal(10,0) -tb1 f54 decimal(10,0) unsigned -tb1 f55 decimal(10,0) unsigned zerofill -tb1 f56 decimal(10,0) unsigned zerofill -tb1 f57 decimal(10,0) -tb1 f58 decimal(64,0) -tb2 f59 decimal(10,0) unsigned -tb2 f60 decimal(64,0) unsigned -tb2 f61 decimal(10,0) unsigned zerofill -tb2 f62 decimal(64,0) unsigned zerofill -tb2 f63 decimal(10,0) unsigned zerofill -tb2 f64 decimal(64,0) unsigned zerofill -tb2 f65 decimal(10,0) -tb2 f66 decimal(63,30) -tb2 f67 decimal(10,0) unsigned -tb2 f68 decimal(63,30) unsigned -tb2 f69 decimal(10,0) unsigned zerofill -tb2 f70 decimal(63,30) unsigned zerofill -tb2 f71 decimal(10,0) unsigned zerofill -tb2 f72 decimal(63,30) unsigned zerofill -tb2 f73 double -tb2 f74 double unsigned -tb2 f75 double unsigned zerofill -tb2 f76 double unsigned zerofill -tb2 f77 double -tb2 f78 double unsigned -tb2 f79 double unsigned zerofill -tb2 f80 double unsigned zerofill -tb2 f81 float -tb2 f82 float unsigned -tb2 f83 float unsigned zerofill -tb2 f84 float unsigned zerofill -tb2 f85 float -tb2 f86 float -tb2 f87 float unsigned -tb2 f88 float unsigned -tb2 f89 float unsigned zerofill -tb2 f90 float unsigned zerofill -tb2 f91 float unsigned zerofill -tb2 f92 float unsigned zerofill -tb2 f93 float -tb2 f94 double -tb2 f95 float unsigned -tb2 f96 double unsigned -tb2 f97 float unsigned zerofill -tb2 f98 double unsigned zerofill -tb2 f99 float unsigned zerofill -tb2 f100 double unsigned zerofill -tb2 f101 date -tb2 f102 time -tb2 f103 datetime -tb2 f104 timestamp -tb2 f105 year(4) -tb2 f106 year(4) -tb2 f107 year(4) -tb2 f108 enum('1enum','2enum') -tb2 f109 set('1set','2set') -tb2 f110 varbinary(64) -tb2 f111 varbinary(27) -tb2 f112 varbinary(64) -tb2 f113 varbinary(192) -tb2 f114 varbinary(192) -tb2 f115 varbinary(27) -tb2 f116 varbinary(64) -tb2 f117 varbinary(192) -tb3 f118 char(1) -tb3 f119 char(1) -tb3 f120 char(1) -tb3 f121 tinytext -tb3 f122 text -tb3 f123 mediumtext -tb3 f124 longtext -tb3 f125 tinyblob -tb3 f126 blob -tb3 f127 mediumblob -tb3 f128 longblob -tb3 f129 binary(1) -tb3 f130 tinyint(4) -tb3 f131 tinyint(3) unsigned -tb3 f132 tinyint(3) unsigned zerofill -tb3 f133 tinyint(3) unsigned zerofill -tb3 f134 smallint(6) -tb3 f135 smallint(5) unsigned -tb3 f136 smallint(5) unsigned zerofill -tb3 f137 smallint(5) unsigned zerofill -tb3 f138 mediumint(9) -tb3 f139 mediumint(8) unsigned -tb3 f140 mediumint(8) unsigned zerofill -tb3 f141 mediumint(8) unsigned zerofill -tb3 f142 int(11) -tb3 f143 int(10) unsigned -tb3 f144 int(10) unsigned zerofill -tb3 f145 int(10) unsigned zerofill -tb3 f146 bigint(20) -tb3 f147 bigint(20) unsigned -tb3 f148 bigint(20) unsigned zerofill -tb3 f149 bigint(20) unsigned zerofill -tb3 f150 decimal(10,0) -tb3 f151 decimal(10,0) unsigned -tb3 f152 decimal(10,0) unsigned zerofill -tb3 f153 decimal(10,0) unsigned zerofill -tb3 f154 decimal(10,0) -tb3 f155 decimal(64,0) -tb3 f156 decimal(10,0) unsigned -tb3 f157 decimal(64,0) unsigned -tb3 f158 decimal(10,0) unsigned zerofill -tb3 f159 decimal(64,0) unsigned zerofill -tb3 f160 decimal(10,0) unsigned zerofill -tb3 f161 decimal(64,0) unsigned zerofill -tb3 f162 decimal(10,0) -tb3 f163 decimal(63,30) -tb3 f164 decimal(10,0) unsigned -tb3 f165 decimal(63,30) unsigned -tb3 f166 decimal(10,0) unsigned zerofill -tb3 f167 decimal(63,30) unsigned zerofill -tb3 f168 decimal(10,0) unsigned zerofill -tb3 f169 decimal(63,30) unsigned zerofill -tb3 f170 decimal(10,0) -tb3 f171 decimal(10,0) unsigned -tb3 f172 decimal(10,0) unsigned zerofill -tb3 f173 decimal(10,0) unsigned zerofill -tb3 f174 decimal(10,0) -tb3 f175 decimal(64,0) -tb4 f176 decimal(10,0) unsigned -tb4 f177 decimal(64,0) unsigned -tb4 f178 decimal(10,0) unsigned zerofill -tb4 f179 decimal(64,0) unsigned zerofill -tb4 f180 decimal(10,0) unsigned zerofill -tb4 f181 decimal(64,0) unsigned zerofill -tb4 f182 decimal(10,0) -tb4 f183 decimal(63,30) -tb4 f184 decimal(10,0) unsigned -tb4 f185 decimal(63,30) unsigned -tb4 f186 decimal(10,0) unsigned zerofill -tb4 f187 decimal(63,30) unsigned zerofill -tb4 f188 decimal(10,0) unsigned zerofill -tb4 f189 decimal(63,30) unsigned zerofill -tb4 f190 double -tb4 f191 double unsigned -tb4 f192 double unsigned zerofill -tb4 f193 double unsigned zerofill -tb4 f194 double -tb4 f195 double unsigned -tb4 f196 double unsigned zerofill -tb4 f197 double unsigned zerofill -tb4 f198 float -tb4 f199 float unsigned -tb4 f200 float unsigned zerofill -tb4 f201 float unsigned zerofill -tb4 f202 float -tb4 f203 float -tb4 f204 float unsigned -tb4 f205 float unsigned -tb4 f206 float unsigned zerofill -tb4 f207 float unsigned zerofill -tb4 f208 float unsigned zerofill -tb4 f209 float unsigned zerofill -tb4 f210 float -tb4 f211 double -tb4 f212 float unsigned -tb4 f213 double unsigned -tb4 f214 float unsigned zerofill -tb4 f215 double unsigned zerofill -tb4 f216 float unsigned zerofill -tb4 f217 double unsigned zerofill -tb4 f218 date -tb4 f219 time -tb4 f220 datetime -tb4 f221 timestamp -tb4 f222 year(4) -tb4 f223 year(4) -tb4 f224 year(4) -tb4 f225 enum('1enum','2enum') -tb4 f226 set('1set','2set') -tb4 f227 varbinary(64) -tb4 f228 varbinary(27) -tb4 f229 varbinary(64) -tb4 f230 varbinary(192) -tb4 f231 varbinary(192) -tb4 f232 varbinary(27) -tb4 f233 varbinary(64) -tb4 f234 varbinary(192) -tb4 f235 char(255) -tb4 f236 char(60) -tb4 f237 char(255) -tb4 f238 varchar(0) -tb4 f239 varbinary(1000) -tb4 f240 varchar(120) -tb4 f241 char(100) -tb4 f242 bit(30) -select character_set_name from character_sets; -character_set_name -big5 -dec8 -cp850 -hp8 -koi8r -latin1 -latin2 -swe7 -ascii -ujis -sjis -hebrew -tis620 -euckr -koi8u -gb2312 -greek -cp1250 -gbk -latin5 -armscii8 -utf8 -ucs2 -cp866 -keybcs2 -macce -macroman -cp852 -latin7 -cp1251 -cp1256 -cp1257 -binary -geostd8 -cp932 -eucjpms -select collation_name from collations where collation_name <> 'utf8_general_cs'; -collation_name -big5_chinese_ci -big5_bin -dec8_swedish_ci -dec8_bin -cp850_general_ci -cp850_bin -hp8_english_ci -hp8_bin -koi8r_general_ci -koi8r_bin -latin1_german1_ci -latin1_swedish_ci -latin1_danish_ci -latin1_german2_ci -latin1_bin -latin1_general_ci -latin1_general_cs -latin1_spanish_ci -latin2_czech_cs -latin2_general_ci -latin2_hungarian_ci -latin2_croatian_ci -latin2_bin -swe7_swedish_ci -swe7_bin -ascii_general_ci -ascii_bin -ujis_japanese_ci -ujis_bin -sjis_japanese_ci -sjis_bin -hebrew_general_ci -hebrew_bin -tis620_thai_ci -tis620_bin -euckr_korean_ci -euckr_bin -koi8u_general_ci -koi8u_bin -gb2312_chinese_ci -gb2312_bin -greek_general_ci -greek_bin -cp1250_general_ci -cp1250_czech_cs -cp1250_croatian_ci -cp1250_bin -gbk_chinese_ci -gbk_bin -latin5_turkish_ci -latin5_bin -armscii8_general_ci -armscii8_bin -utf8_general_ci -utf8_bin -utf8_unicode_ci -utf8_icelandic_ci -utf8_latvian_ci -utf8_romanian_ci -utf8_slovenian_ci -utf8_polish_ci -utf8_estonian_ci -utf8_spanish_ci -utf8_swedish_ci -utf8_turkish_ci -utf8_czech_ci -utf8_danish_ci -utf8_lithuanian_ci -utf8_slovak_ci -utf8_spanish2_ci -utf8_roman_ci -utf8_persian_ci -utf8_esperanto_ci -utf8_hungarian_ci -ucs2_general_ci -ucs2_bin -ucs2_unicode_ci -ucs2_icelandic_ci -ucs2_latvian_ci -ucs2_romanian_ci -ucs2_slovenian_ci -ucs2_polish_ci -ucs2_estonian_ci -ucs2_spanish_ci -ucs2_swedish_ci -ucs2_turkish_ci -ucs2_czech_ci -ucs2_danish_ci -ucs2_lithuanian_ci -ucs2_slovak_ci -ucs2_spanish2_ci -ucs2_roman_ci -ucs2_persian_ci -ucs2_esperanto_ci -ucs2_hungarian_ci -cp866_general_ci -cp866_bin -keybcs2_general_ci -keybcs2_bin -macce_general_ci -macce_bin -macroman_general_ci -macroman_bin -cp852_general_ci -cp852_bin -latin7_estonian_cs -latin7_general_ci -latin7_general_cs -latin7_bin -cp1251_bulgarian_ci -cp1251_ukrainian_ci -cp1251_bin -cp1251_general_ci -cp1251_general_cs -cp1256_general_ci -cp1256_bin -cp1257_lithuanian_ci -cp1257_bin -cp1257_general_ci -binary -geostd8_general_ci -geostd8_bin -cp932_japanese_ci -cp932_bin -eucjpms_japanese_ci -eucjpms_bin -select routine_name, routine_type from routines; -routine_name routine_type -select table_name, index_name from statistics; -table_name index_name -select table_name from views; -table_name -select privilege_type from user_privileges; -privilege_type -USAGE -select grantee, privilege_type from schema_privileges; -grantee privilege_type -select * from table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -select column_name, privilege_type from column_privileges; -column_name privilege_type -select table_name,constraint_type from table_constraints; -table_name constraint_type -select table_schema, table_name, column_name from key_column_usage; -table_schema table_name column_name - -root@localhost db_datadict -DROP USER 'u_6_401017'@'localhost'; - -Testcase 3.2.1.18: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401018'@'localhost'; -GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -GRANT ALL ON db_datadict.* TO 'u_6_401018'@'localhost'; -SHOW GRANTS FOR 'u_6_401018'@'localhost'; -Grants for u_6_401018@localhost -GRANT USAGE ON *.* TO 'u_6_401018'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'u_6_401018'@'localhost' -FLUSH PRIVILEGES; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -connect(localhost,u_6_401018,,test,MYSQL_PORT,MYSQL_SOCK); -USE db_datadict; -create view db_datadict.v_401018 as -select * from information_schema.schemata; -SELECT * FROM v_401018 ORDER BY 2 DESC; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL test latin1 latin1_swedish_ci NULL -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict latin1 latin1_swedish_ci NULL - -root@localhost NULL -DROP USER 'u_6_401018'@'localhost'; -DROP DATABASE db_datadict; - -Testcase 3.2.1.19: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401019'@'localhost'; -grant alter on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant alter routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create routine on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant create temporary tables -on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant delete on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant drop on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant execute on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant index on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant insert on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant lock tables on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -grant update on information_schema.* to 'u_6_401019'@'localhost'; -ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' -SELECT * FROM information_schema.table_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -SELECT * FROM information_schema.column_privileges -WHERE table_schema = "information_schema"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -DROP USER 'u_6_401019'@'localhost'; - -Testcase 3.2.1.20: --------------------------------------------------------------------------------- -CREATE USER 'u_6_401020'@'localhost'; -connect(localhost,u_6_401020,,test,MYSQL_PORT,MYSQL_SOCK); -USE information_schema; -SELECT * FROM schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL -CREATE TABLE tb_not_allowed ( col TEXT ); -ERROR 42S02: Unknown table 'tb_not_allowed' in information_schema -create view res_v1 as select * from information_schema.schemata; -ERROR 42S02: Unknown table 'res_v1' in information_schema -alter table schemata modify catalog_name varchar(255); -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -update schemata set catalog_name = 'abc' - where schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' -CREATE PROCEDURE sp_3_2_1_20() -BEGIN -INSERT INTO information_schema.schema_privileges (table_schema,privilege_type) -VALUES('db2','insert'); -END// -ERROR 42000: Unknown database 'information_schema' -DELETE FROM schemata WHERE schema_name = 'information_schema'; -ERROR 42000: Access denied for user 'u_6_401020'@'localhost' to database 'information_schema' - -root@localhost NULL -DROP USER 'u_6_401020'@'localhost'; - -Testcase 3.2.2.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC character_sets; -Field Type Null Key Default Extra -CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATE_NAME varchar(64) NO -DESCRIPTION varchar(60) NO -MAXLEN bigint(3) NO 0 -SHOW CREATE TABLE character_sets; -Table Create Table -CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'character_sets' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.2.2: --------------------------------------------------------------------------------- - -root@localhost information_schema -SELECT * FROM information_schema.character_sets; -CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN -big5 big5_chinese_ci Big5 Traditional Chinese 2 -dec8 dec8_swedish_ci DEC West European 1 -cp850 cp850_general_ci DOS West European 1 -hp8 hp8_english_ci HP West European 1 -koi8r koi8r_general_ci KOI8-R Relcom Russian 1 -latin1 latin1_swedish_ci cp1252 West European 1 -latin2 latin2_general_ci ISO 8859-2 Central European 1 -swe7 swe7_swedish_ci 7bit Swedish 1 -ascii ascii_general_ci US ASCII 1 -ujis ujis_japanese_ci EUC-JP Japanese 3 -sjis sjis_japanese_ci Shift-JIS Japanese 2 -hebrew hebrew_general_ci ISO 8859-8 Hebrew 1 -tis620 tis620_thai_ci TIS620 Thai 1 -euckr euckr_korean_ci EUC-KR Korean 2 -koi8u koi8u_general_ci KOI8-U Ukrainian 1 -gb2312 gb2312_chinese_ci GB2312 Simplified Chinese 2 -greek greek_general_ci ISO 8859-7 Greek 1 -cp1250 cp1250_general_ci Windows Central European 1 -gbk gbk_chinese_ci GBK Simplified Chinese 2 -latin5 latin5_turkish_ci ISO 8859-9 Turkish 1 -armscii8 armscii8_general_ci ARMSCII-8 Armenian 1 -utf8 utf8_general_ci UTF-8 Unicode 3 -ucs2 ucs2_general_ci UCS-2 Unicode 2 -cp866 cp866_general_ci DOS Russian 1 -keybcs2 keybcs2_general_ci DOS Kamenicky Czech-Slovak 1 -macce macce_general_ci Mac Central European 1 -macroman macroman_general_ci Mac West European 1 -cp852 cp852_general_ci DOS Central European 1 -latin7 latin7_general_ci ISO 8859-13 Baltic 1 -cp1251 cp1251_general_ci Windows Cyrillic 1 -cp1256 cp1256_general_ci Windows Arabic 1 -cp1257 cp1257_general_ci Windows Baltic 1 -binary binary Binary pseudo charset 1 -geostd8 geostd8_general_ci GEOSTD8 Georgian 1 -cp932 cp932_japanese_ci SJIS for Windows Japanese 2 -eucjpms eucjpms_japanese_ci UJIS for Windows Japanese 3 - -Testcase 3.2.2.3: --------------------------------------------------------------------------------- - -Testcase 3.2.3.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collations; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -ID bigint(11) NO 0 -IS_DEFAULT varchar(3) NO -IS_COMPILED varchar(3) NO -SORTLEN bigint(3) NO 0 -SHOW CREATE TABLE collations; -Table Create Table -COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `ID` bigint(11) NOT NULL default '0', - `IS_DEFAULT` varchar(3) NOT NULL default '', - `IS_COMPILED` varchar(3) NOT NULL default '', - `SORTLEN` bigint(3) NOT NULL default '0' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collations' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select - -Testcase 3.2.3.2: --------------------------------------------------------------------------------- -SELECT * FROM collations where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN -big5_chinese_ci big5 1 Yes Yes 1 -big5_bin big5 84 Yes 1 -dec8_swedish_ci dec8 3 Yes 0 -dec8_bin dec8 69 0 -cp850_general_ci cp850 4 Yes 0 -cp850_bin cp850 80 0 -hp8_english_ci hp8 6 Yes 0 -hp8_bin hp8 72 0 -koi8r_general_ci koi8r 7 Yes 0 -koi8r_bin koi8r 74 0 -latin1_german1_ci latin1 5 Yes 1 -latin1_swedish_ci latin1 8 Yes Yes 1 -latin1_danish_ci latin1 15 Yes 1 -latin1_german2_ci latin1 31 Yes 2 -latin1_bin latin1 47 Yes 1 -latin1_general_ci latin1 48 Yes 1 -latin1_general_cs latin1 49 Yes 1 -latin1_spanish_ci latin1 94 Yes 1 -latin2_czech_cs latin2 2 Yes 4 -latin2_general_ci latin2 9 Yes Yes 1 -latin2_hungarian_ci latin2 21 Yes 1 -latin2_croatian_ci latin2 27 Yes 1 -latin2_bin latin2 77 Yes 1 -swe7_swedish_ci swe7 10 Yes 0 -swe7_bin swe7 82 0 -ascii_general_ci ascii 11 Yes 0 -ascii_bin ascii 65 0 -ujis_japanese_ci ujis 12 Yes Yes 1 -ujis_bin ujis 91 Yes 1 -sjis_japanese_ci sjis 13 Yes Yes 1 -sjis_bin sjis 88 Yes 1 -hebrew_general_ci hebrew 16 Yes 0 -hebrew_bin hebrew 71 0 -tis620_thai_ci tis620 18 Yes Yes 4 -tis620_bin tis620 89 Yes 1 -euckr_korean_ci euckr 19 Yes Yes 1 -euckr_bin euckr 85 Yes 1 -koi8u_general_ci koi8u 22 Yes 0 -koi8u_bin koi8u 75 0 -gb2312_chinese_ci gb2312 24 Yes Yes 1 -gb2312_bin gb2312 86 Yes 1 -greek_general_ci greek 25 Yes 0 -greek_bin greek 70 0 -cp1250_general_ci cp1250 26 Yes Yes 1 -cp1250_czech_cs cp1250 34 Yes 2 -cp1250_croatian_ci cp1250 44 Yes 1 -cp1250_bin cp1250 66 Yes 1 -gbk_chinese_ci gbk 28 Yes Yes 1 -gbk_bin gbk 87 Yes 1 -latin5_turkish_ci latin5 30 Yes 0 -latin5_bin latin5 78 0 -armscii8_general_ci armscii8 32 Yes 0 -armscii8_bin armscii8 64 0 -utf8_general_ci utf8 33 Yes Yes 1 -utf8_bin utf8 83 Yes 1 -utf8_unicode_ci utf8 192 Yes 8 -utf8_icelandic_ci utf8 193 Yes 8 -utf8_latvian_ci utf8 194 Yes 8 -utf8_romanian_ci utf8 195 Yes 8 -utf8_slovenian_ci utf8 196 Yes 8 -utf8_polish_ci utf8 197 Yes 8 -utf8_estonian_ci utf8 198 Yes 8 -utf8_spanish_ci utf8 199 Yes 8 -utf8_swedish_ci utf8 200 Yes 8 -utf8_turkish_ci utf8 201 Yes 8 -utf8_czech_ci utf8 202 Yes 8 -utf8_danish_ci utf8 203 Yes 8 -utf8_lithuanian_ci utf8 204 Yes 8 -utf8_slovak_ci utf8 205 Yes 8 -utf8_spanish2_ci utf8 206 Yes 8 -utf8_roman_ci utf8 207 Yes 8 -utf8_persian_ci utf8 208 Yes 8 -utf8_esperanto_ci utf8 209 Yes 8 -utf8_hungarian_ci utf8 210 Yes 8 -ucs2_general_ci ucs2 35 Yes Yes 1 -ucs2_bin ucs2 90 Yes 1 -ucs2_unicode_ci ucs2 128 Yes 8 -ucs2_icelandic_ci ucs2 129 Yes 8 -ucs2_latvian_ci ucs2 130 Yes 8 -ucs2_romanian_ci ucs2 131 Yes 8 -ucs2_slovenian_ci ucs2 132 Yes 8 -ucs2_polish_ci ucs2 133 Yes 8 -ucs2_estonian_ci ucs2 134 Yes 8 -ucs2_spanish_ci ucs2 135 Yes 8 -ucs2_swedish_ci ucs2 136 Yes 8 -ucs2_turkish_ci ucs2 137 Yes 8 -ucs2_czech_ci ucs2 138 Yes 8 -ucs2_danish_ci ucs2 139 Yes 8 -ucs2_lithuanian_ci ucs2 140 Yes 8 -ucs2_slovak_ci ucs2 141 Yes 8 -ucs2_spanish2_ci ucs2 142 Yes 8 -ucs2_roman_ci ucs2 143 Yes 8 -ucs2_persian_ci ucs2 144 Yes 8 -ucs2_esperanto_ci ucs2 145 Yes 8 -ucs2_hungarian_ci ucs2 146 Yes 8 -cp866_general_ci cp866 36 Yes 0 -cp866_bin cp866 68 0 -keybcs2_general_ci keybcs2 37 Yes 0 -keybcs2_bin keybcs2 73 0 -macce_general_ci macce 38 Yes 0 -macce_bin macce 43 0 -macroman_general_ci macroman 39 Yes 0 -macroman_bin macroman 53 0 -cp852_general_ci cp852 40 Yes 0 -cp852_bin cp852 81 0 -latin7_estonian_cs latin7 20 0 -latin7_general_ci latin7 41 Yes 0 -latin7_general_cs latin7 42 0 -latin7_bin latin7 79 0 -cp1251_bulgarian_ci cp1251 14 0 -cp1251_ukrainian_ci cp1251 23 0 -cp1251_bin cp1251 50 0 -cp1251_general_ci cp1251 51 Yes 0 -cp1251_general_cs cp1251 52 0 -cp1256_general_ci cp1256 57 Yes 0 -cp1256_bin cp1256 67 0 -cp1257_lithuanian_ci cp1257 29 0 -cp1257_bin cp1257 58 0 -cp1257_general_ci cp1257 59 Yes 0 -binary binary 63 Yes Yes 1 -geostd8_general_ci geostd8 92 Yes 0 -geostd8_bin geostd8 93 0 -cp932_japanese_ci cp932 95 Yes Yes 1 -cp932_bin cp932 96 Yes 1 -eucjpms_japanese_ci eucjpms 97 Yes Yes 1 -eucjpms_bin eucjpms 98 Yes 1 - -Testcase 3.2.3.3: --------------------------------------------------------------------------------- - -Testcase 3.2.4.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC collation_character_set_applicability; -Field Type Null Key Default Extra -COLLATION_NAME varchar(64) NO -CHARACTER_SET_NAME varchar(64) NO -SHOW CREATE TABLE collation_character_set_applicability; -Table Create Table -COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -COUNT(*) -2 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'collation_character_set_applicability' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.4.2: --------------------------------------------------------------------------------- -SELECT * FROM collation_character_set_applicability -where collation_name <> 'utf8_general_cs'; -COLLATION_NAME CHARACTER_SET_NAME -big5_chinese_ci big5 -big5_bin big5 -dec8_swedish_ci dec8 -dec8_bin dec8 -cp850_general_ci cp850 -cp850_bin cp850 -hp8_english_ci hp8 -hp8_bin hp8 -koi8r_general_ci koi8r -koi8r_bin koi8r -latin1_german1_ci latin1 -latin1_swedish_ci latin1 -latin1_danish_ci latin1 -latin1_german2_ci latin1 -latin1_bin latin1 -latin1_general_ci latin1 -latin1_general_cs latin1 -latin1_spanish_ci latin1 -latin2_czech_cs latin2 -latin2_general_ci latin2 -latin2_hungarian_ci latin2 -latin2_croatian_ci latin2 -latin2_bin latin2 -swe7_swedish_ci swe7 -swe7_bin swe7 -ascii_general_ci ascii -ascii_bin ascii -ujis_japanese_ci ujis -ujis_bin ujis -sjis_japanese_ci sjis -sjis_bin sjis -hebrew_general_ci hebrew -hebrew_bin hebrew -tis620_thai_ci tis620 -tis620_bin tis620 -euckr_korean_ci euckr -euckr_bin euckr -koi8u_general_ci koi8u -koi8u_bin koi8u -gb2312_chinese_ci gb2312 -gb2312_bin gb2312 -greek_general_ci greek -greek_bin greek -cp1250_general_ci cp1250 -cp1250_czech_cs cp1250 -cp1250_croatian_ci cp1250 -cp1250_bin cp1250 -gbk_chinese_ci gbk -gbk_bin gbk -latin5_turkish_ci latin5 -latin5_bin latin5 -armscii8_general_ci armscii8 -armscii8_bin armscii8 -utf8_general_ci utf8 -utf8_bin utf8 -utf8_unicode_ci utf8 -utf8_icelandic_ci utf8 -utf8_latvian_ci utf8 -utf8_romanian_ci utf8 -utf8_slovenian_ci utf8 -utf8_polish_ci utf8 -utf8_estonian_ci utf8 -utf8_spanish_ci utf8 -utf8_swedish_ci utf8 -utf8_turkish_ci utf8 -utf8_czech_ci utf8 -utf8_danish_ci utf8 -utf8_lithuanian_ci utf8 -utf8_slovak_ci utf8 -utf8_spanish2_ci utf8 -utf8_roman_ci utf8 -utf8_persian_ci utf8 -utf8_esperanto_ci utf8 -utf8_hungarian_ci utf8 -ucs2_general_ci ucs2 -ucs2_bin ucs2 -ucs2_unicode_ci ucs2 -ucs2_icelandic_ci ucs2 -ucs2_latvian_ci ucs2 -ucs2_romanian_ci ucs2 -ucs2_slovenian_ci ucs2 -ucs2_polish_ci ucs2 -ucs2_estonian_ci ucs2 -ucs2_spanish_ci ucs2 -ucs2_swedish_ci ucs2 -ucs2_turkish_ci ucs2 -ucs2_czech_ci ucs2 -ucs2_danish_ci ucs2 -ucs2_lithuanian_ci ucs2 -ucs2_slovak_ci ucs2 -ucs2_spanish2_ci ucs2 -ucs2_roman_ci ucs2 -ucs2_persian_ci ucs2 -ucs2_esperanto_ci ucs2 -ucs2_hungarian_ci ucs2 -cp866_general_ci cp866 -cp866_bin cp866 -keybcs2_general_ci keybcs2 -keybcs2_bin keybcs2 -macce_general_ci macce -macce_bin macce -macroman_general_ci macroman -macroman_bin macroman -cp852_general_ci cp852 -cp852_bin cp852 -latin7_estonian_cs latin7 -latin7_general_ci latin7 -latin7_general_cs latin7 -latin7_bin latin7 -cp1251_bulgarian_ci cp1251 -cp1251_ukrainian_ci cp1251 -cp1251_bin cp1251 -cp1251_general_ci cp1251 -cp1251_general_cs cp1251 -cp1256_general_ci cp1256 -cp1256_bin cp1256 -cp1257_lithuanian_ci cp1257 -cp1257_bin cp1257 -cp1257_general_ci cp1257 -binary binary -geostd8_general_ci geostd8 -geostd8_bin geostd8 -cp932_japanese_ci cp932 -cp932_bin cp932 -eucjpms_japanese_ci eucjpms -eucjpms_bin eucjpms - -Testcase 3.2.4.3: --------------------------------------------------------------------------------- - -Testcase 3.2.5.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC column_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE column_privileges; -Table Create Table -COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -COUNT(*) -7 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'column_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.5.2 + 3.2.5.3 + 3.2.5.4: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE TABLE db_datadict.res_t40502 (f1 INT, f2 DECIMAL, f3 TEXT); -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT INSERT(f1) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT UPDATE(f2) ON db_datadict.res_t40502 TO 'user_1'@'localhost'; -GRANT SELECT(f2) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT SELECT(f3) ON db_datadict.res_t40502 TO 'user_3'@'localhost'; -GRANT INSERT, SELECT ON db_datadict.res_t40502 TO 'user_3'@'localhost' WITH GRANT OPTION; -GRANT ALL ON db_datadict.* TO 'user_3'@'localhost'; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE NO -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -FIXME: Check it is correct that the following GRANT changes ALL privs that user_1 has -------------------------------------------------------------------------------------- -GRANT UPDATE(f3) ON db_datadict.res_t40502 TO 'user_1'@'localhost' WITH GRANT OPTION; -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict res_t40502 f1 INSERT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f1 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f2 UPDATE YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -'user_1'@'localhost' NULL db_datadict res_t40502 f3 UPDATE YES -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); - -FIXME: check it is correct that granted TABLES doesn_t occur in COLUMN_PRIVILEGES ---------------------------------------------------------------------------------- -SELECT * FROM information_schema.table_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 SELECT YES -'user_3'@'localhost' NULL db_datadict res_t40502 INSERT YES -SELECT * FROM information_schema.schema_privileges WHERE grantee LIKE "'user%"; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict SELECT NO -'user_3'@'localhost' NULL db_datadict INSERT NO -'user_3'@'localhost' NULL db_datadict UPDATE NO -'user_3'@'localhost' NULL db_datadict DELETE NO -'user_3'@'localhost' NULL db_datadict CREATE NO -'user_3'@'localhost' NULL db_datadict DROP NO -'user_3'@'localhost' NULL db_datadict REFERENCES NO -'user_3'@'localhost' NULL db_datadict INDEX NO -'user_3'@'localhost' NULL db_datadict ALTER NO -'user_3'@'localhost' NULL db_datadict CREATE TEMPORARY TABLES NO -'user_3'@'localhost' NULL db_datadict LOCK TABLES NO -'user_3'@'localhost' NULL db_datadict EXECUTE NO -'user_3'@'localhost' NULL db_datadict CREATE VIEW NO -'user_3'@'localhost' NULL db_datadict SHOW VIEW NO -'user_3'@'localhost' NULL db_datadict CREATE ROUTINE NO -'user_3'@'localhost' NULL db_datadict ALTER ROUTINE NO -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES -GRANT SELECT(f1, f3) ON db_datadict.res_t40502 TO 'user_2'@'localhost'; - -FIXME: check whether it is intended that *my* grants to others are *NOT* shown here ------------------------------------------------------------------------------------ -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict res_t40502 f3 SELECT YES - -user_2@localhost db_datadict -SELECT * FROM information_schema.column_privileges -WHERE grantee LIKE "'user%" - ORDER BY grantee, table_name, column_name, privilege_type; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict res_t40502 f1 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f2 SELECT NO -'user_2'@'localhost' NULL db_datadict res_t40502 f3 SELECT NO - -root@localhost db_datadict -DROP TABLE IF EXISTS db_datadict.res_t40502; -DROP DATABASE IF EXISTS db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; - -Testcase 3.2.6.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC columns; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 -COLUMN_DEFAULT longtext YES NULL -IS_NULLABLE varchar(3) NO -DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL -CHARACTER_SET_NAME varchar(64) YES NULL -COLLATION_NAME varchar(64) YES NULL -COLUMN_TYPE longtext NO NULL -COLUMN_KEY varchar(3) NO -EXTRA varchar(20) NO -PRIVILEGES varchar(80) NO -COLUMN_COMMENT varchar(255) NO -SHOW CREATE TABLE columns; -Table Create Table -COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(21) NOT NULL default '0', - `COLUMN_DEFAULT` longtext, - `IS_NULLABLE` varchar(3) NOT NULL default '', - `DATA_TYPE` varchar(64) NOT NULL default '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) default NULL, - `NUMERIC_PRECISION` bigint(21) default NULL, - `NUMERIC_SCALE` bigint(21) default NULL, - `CHARACTER_SET_NAME` varchar(64) default NULL, - `COLLATION_NAME` varchar(64) default NULL, - `COLUMN_TYPE` longtext NOT NULL, - `COLUMN_KEY` varchar(3) NOT NULL default '', - `EXTRA` varchar(20) NOT NULL default '', - `PRIVILEGES` varchar(80) NOT NULL default '', - `COLUMN_COMMENT` varchar(255) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'columns' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select - -Testcase 3.2.6.2 + 3.2.6.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table t_6_406001(f1 char(10), f2 text, f3 date, f4 int); -grant select(f1, f2) on db_datadict.t_6_406001 to 'user_1'@'localhost'; -create table t_6_406002(f1 char(10), f2 text, f3 date, f4 int); -GRANT INSERT(f1, f2) ON db_datadict.t_6_406002 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406001 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406001 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select,insert,update,references -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL db_datadict t_6_406002 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL db_datadict t_6_406002 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Column_name 5 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Index_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_tmp_table_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Create_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references -NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references -NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references -NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references -NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_category url 4 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql help_keyword help_keyword_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_keyword name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_relation help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_relation help_keyword_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic help_topic_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql help_topic name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references -NULL mysql help_topic help_category_id 3 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL mysql help_topic description 4 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic example 5 NULL NO text 65535 65535 NULL NULL utf8 utf8_general_ci text select,insert,update,references -NULL mysql help_topic url 6 NULL NO char 128 384 NULL NULL utf8 utf8_general_ci char(128) select,insert,update,references -NULL mysql host Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql host Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Insert_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Delete_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Drop_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Grant_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Index_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_tmp_table_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_view_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Create_routine_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Alter_routine_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql host Execute_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references -NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references -NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references -NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references -NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references -NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references -NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references -NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references -NULL mysql time_zone_leap_second Transition_time 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_name Name 1 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references -NULL mysql time_zone_name Time_zone_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition Transition_time 2 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) PRI select,insert,update,references -NULL mysql time_zone_transition Transition_type_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Transition_type_id 2 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI select,insert,update,references -NULL mysql time_zone_transition_type Offset 3 0 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL mysql time_zone_transition_type Is_DST 4 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL mysql time_zone_transition_type Abbreviation 5 NO char 8 24 NULL NULL utf8 utf8_general_ci char(8) select,insert,update,references -NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references -NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references -NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_priv 8 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_tmp_table_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_slave_priv 23 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Repl_client_priv 24 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_routine_priv 27 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Alter_routine_priv 28 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references -NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references -NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references -NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references -NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references -NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references -NULL test1 tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test1 tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test1 tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test1 tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test1 tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test1 tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test1 tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test1 tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test1 tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test1 tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test1 tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test1 tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test1 tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test1 tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test1 tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test1 tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test1 tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test1 tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test1 tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test1 tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test1 tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test1 tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test1 tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test1 tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test1 tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test1 tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test4 t6 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test4 t6 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test4 t6 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test4 t6 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test4 t6 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406001 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) select -NULL db_datadict t_6_406001 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references -NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references -NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references -NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references -NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references -NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.columns -ORDER BY table_schema, table_name, ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL db_datadict t_6_406002 f1 1 NULL YES char 10 10 NULL NULL latin1 latin1_swedish_ci char(10) insert -NULL db_datadict t_6_406002 f2 2 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text insert -NULL information_schema CHARACTER_SETS CHARACTER_SET_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema CHARACTER_SETS DESCRIPTION 3 NO varchar 60 180 NULL NULL utf8 utf8_general_ci varchar(60) select -NULL information_schema CHARACTER_SETS MAXLEN 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATIONS COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATIONS ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(11) select -NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS IS_COMPILED 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMNS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS COLUMN_DEFAULT 6 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select -NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema COLUMN_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES COLUMN_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMN_PRIVILEGES IS_GRANTABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL test t1 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t1 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t1 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t1 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t1 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t10 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t10 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t10 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t10 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t11 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t11 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t11 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t11 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t2 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t2 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t2 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t2 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t3 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f2 2 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t3 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t4 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t4 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t4 f5 5 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t4 f6 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t7 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t7 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t7 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t7 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t8 f1 1 NULL YES char 20 20 NULL NULL latin1 latin1_swedish_ci char(20) select,insert,update,references -NULL test t8 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t8 f3 3 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test t8 f4 4 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f1 1 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test t9 f2 2 NULL YES char 25 25 NULL NULL latin1 latin1_swedish_ci char(25) select,insert,update,references -NULL test t9 f3 3 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f1 1 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f2 2 NULL YES char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb1 f4 4 NULL YES tinytext 127 255 NULL NULL ucs2 ucs2_general_ci tinytext select,insert,update,references -NULL test tb1 f5 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb1 f6 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb1 f7 7 NULL YES longtext 4294967295 4294967295 NULL NULL latin1 latin1_swedish_ci longtext select,insert,update,references -NULL test tb1 f8 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb1 f9 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb1 f10 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb1 f11 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb1 f12 12 NULL YES binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb1 f13 13 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb1 f14 14 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb1 f15 15 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f16 16 NULL YES tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb1 f17 17 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb1 f18 18 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb1 f19 19 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f20 20 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb1 f21 21 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb1 f22 22 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb1 f23 23 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f24 24 NULL YES mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb1 f25 25 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb1 f26 26 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f36 36 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f37 37 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f38 38 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb1 f39 39 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f40 40 10 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb1 f41 41 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f42 42 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f43 43 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f44 44 0000000000000000000000000000000000000000000000000000000000000010 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb1 f45 45 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f46 46 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb1 f47 47 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f48 48 9.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb1 f49 49 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f50 50 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f51 51 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f52 52 000000000000000000000000000000009.900000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb1 f53 53 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f54 54 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb1 f55 55 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f56 56 0000000099 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb1 f57 57 99 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb1 f58 58 99 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb2 f59 1 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f60 2 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb2 f61 3 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f62 4 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f63 5 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f64 6 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb2 f65 7 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb2 f66 8 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb2 f67 9 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb2 f68 10 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb2 f69 11 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f70 12 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f71 13 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb2 f72 14 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb2 f73 15 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f74 16 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f75 17 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f76 18 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f77 19 7.7 YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f78 20 7.7 YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f79 21 00000000000000000007.7 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f80 22 00000000000000000008.8 YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f81 23 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f82 24 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f83 25 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f84 26 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f85 27 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f86 28 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f87 29 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f88 30 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f89 31 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f90 32 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f91 33 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f92 34 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f93 35 8.8 NO float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb2 f94 36 8.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb2 f95 37 8.8 NO float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb2 f96 38 8.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb2 f97 39 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f98 40 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f99 41 0000000008.8 NO float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb2 f100 42 00000000000000000008.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb2 f101 43 2000-01-01 NO date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb2 f102 44 00:00:20 NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb2 f103 45 0002-02-02 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb2 f104 46 2000-12-31 23:59:59 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb2 f105 47 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f106 48 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f107 49 2000 NO year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb2 f108 50 1enum NO enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb2 f109 51 1set NO set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb2 f110 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f111 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f112 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f113 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f114 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb2 f115 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb2 f116 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb2 f117 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb3 f118 1 a NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f119 2  NO char 1 1 NULL NULL latin1 latin1_bin char(1) select,insert,update,references -NULL test tb3 f120 3  NO char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) select,insert,update,references -NULL test tb3 f121 4 NULL YES tinytext 255 255 NULL NULL latin1 latin1_swedish_ci tinytext select,insert,update,references -NULL test tb3 f122 5 NULL YES text 65535 65535 NULL NULL latin1 latin1_swedish_ci text select,insert,update,references -NULL test tb3 f123 6 NULL YES mediumtext 16777215 16777215 NULL NULL latin1 latin1_swedish_ci mediumtext select,insert,update,references -NULL test tb3 f124 7 NULL YES longtext 2147483647 4294967295 NULL NULL ucs2 ucs2_general_ci longtext select,insert,update,references -NULL test tb3 f125 8 NULL YES tinyblob 255 255 NULL NULL NULL NULL tinyblob select,insert,update,references -NULL test tb3 f126 9 NULL YES blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL test tb3 f127 10 NULL YES mediumblob 16777215 16777215 NULL NULL NULL NULL mediumblob select,insert,update,references -NULL test tb3 f128 11 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references -NULL test tb3 f129 12  NO binary 1 1 NULL NULL NULL NULL binary(1) select,insert,update,references -NULL test tb3 f130 13 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(4) select,insert,update,references -NULL test tb3 f131 14 99 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned select,insert,update,references -NULL test tb3 f132 15 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f133 16 099 NO tinyint NULL NULL 3 0 NULL NULL tinyint(3) unsigned zerofill select,insert,update,references -NULL test tb3 f134 17 999 NO smallint NULL NULL 5 0 NULL NULL smallint(6) select,insert,update,references -NULL test tb3 f135 18 999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references -NULL test tb3 f136 19 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f137 20 00999 NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned zerofill select,insert,update,references -NULL test tb3 f138 21 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(9) select,insert,update,references -NULL test tb3 f139 22 9999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned select,insert,update,references -NULL test tb3 f140 23 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f141 24 00009999 NO mediumint NULL NULL 7 0 NULL NULL mediumint(8) unsigned zerofill select,insert,update,references -NULL test tb3 f142 25 99999 NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references -NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned select,insert,update,references -NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill select,insert,update,references -NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) select,insert,update,references -NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references -NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill select,insert,update,references -NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f153 36 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f154 37 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f155 38 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb3 f156 39 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f157 40 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb3 f158 41 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f159 42 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f160 43 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f161 44 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb3 f162 45 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f163 46 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb3 f164 47 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f165 48 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb3 f166 49 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f167 50 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f168 51 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f169 52 NULL YES decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb3 f170 53 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f171 54 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb3 f172 55 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f173 56 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb3 f174 57 NULL YES decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb3 f175 58 NULL YES decimal NULL NULL 64 0 NULL NULL decimal(64,0) select,insert,update,references -NULL test tb4 f176 1 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f177 2 9 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned select,insert,update,references -NULL test tb4 f178 3 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f179 4 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f180 5 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f181 6 0000000000000000000000000000000000000000000000000000000000000009 NO decimal NULL NULL 64 0 NULL NULL decimal(64,0) unsigned zerofill select,insert,update,references -NULL test tb4 f182 7 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) select,insert,update,references -NULL test tb4 f183 8 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) select,insert,update,references -NULL test tb4 f184 9 9 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned select,insert,update,references -NULL test tb4 f185 10 9.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned select,insert,update,references -NULL test tb4 f186 11 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f187 12 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f188 13 0000000009 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill select,insert,update,references -NULL test tb4 f189 14 000000000000000000000000000000009.000000000000000000000000000000 NO decimal NULL NULL 63 30 NULL NULL decimal(63,30) unsigned zerofill select,insert,update,references -NULL test tb4 f190 15 88.8 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f191 16 88.8 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f192 17 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f193 18 00000000000000000088.8 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f194 19 55.5 NO double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f195 20 55.5 NO double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f196 21 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f197 22 00000000000000000055.5 NO double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f198 23 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f199 24 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f200 25 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f201 26 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f202 27 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f203 28 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f204 29 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f205 30 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f206 31 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f207 32 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f208 33 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f209 34 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f210 35 NULL YES float NULL NULL 12 NULL NULL NULL float select,insert,update,references -NULL test tb4 f211 36 NULL YES double NULL NULL 22 NULL NULL NULL double select,insert,update,references -NULL test tb4 f212 37 NULL YES float unsigned NULL NULL 12 NULL NULL NULL float unsigned select,insert,update,references -NULL test tb4 f213 38 NULL YES double unsigned NULL NULL 22 NULL NULL NULL double unsigned select,insert,update,references -NULL test tb4 f214 39 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f215 40 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f216 41 NULL YES float unsigned zerofill NULL NULL 12 NULL NULL NULL float unsigned zerofill select,insert,update,references -NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL NULL double unsigned zerofill select,insert,update,references -NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references -NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references -NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references -NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references -NULL test tb4 f225 50 NULL YES enum 5 5 NULL NULL latin1 latin1_swedish_ci enum('1enum','2enum') select,insert,update,references -NULL test tb4 f226 51 NULL YES set 9 9 NULL NULL latin1 latin1_swedish_ci set('1set','2set') select,insert,update,references -NULL test tb4 f227 52 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f228 53 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f229 54 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f230 55 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f231 56 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f232 57 NULL YES varbinary 27 27 NULL NULL NULL NULL varbinary(27) select,insert,update,references -NULL test tb4 f233 58 NULL YES varbinary 64 64 NULL NULL NULL NULL varbinary(64) select,insert,update,references -NULL test tb4 f234 59 NULL YES varbinary 192 192 NULL NULL NULL NULL varbinary(192) select,insert,update,references -NULL test tb4 f235 60 NULL YES char 255 510 NULL NULL ucs2 ucs2_general_ci char(255) select,insert,update,references -NULL test tb4 f236 61 NULL YES char 60 60 NULL NULL latin1 latin1_swedish_ci char(60) select,insert,update,references -NULL test tb4 f237 62 NULL YES char 255 255 NULL NULL latin1 latin1_bin char(255) select,insert,update,references -NULL test tb4 f238 63 NULL YES varchar 0 0 NULL NULL latin1 latin1_bin varchar(0) select,insert,update,references -NULL test tb4 f239 64 NULL YES varbinary 1000 1000 NULL NULL NULL NULL varbinary(1000) select,insert,update,references -NULL test tb4 f240 65 NULL YES varchar 120 240 NULL NULL ucs2 ucs2_general_ci varchar(120) select,insert,update,references -NULL test tb4 f241 66 NULL YES char 100 200 NULL NULL ucs2 ucs2_general_ci char(100) select,insert,update,references -NULL test tb4 f242 67 NULL YES bit NULL NULL 30 NULL NULL NULL bit(30) select,insert,update,references - -root@localhost db_datadict - -Show the quotient of COL and CML for all COLUMNS ------------------------------------------------- -SELECT DISTINCT -CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, -DATA_TYPE, -CHARACTER_SET_NAME, -COLLATION_NAME -FROM information_schema.columns -WHERE 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 binary NULL NULL -1.0000 blob NULL NULL -1.0000 longblob NULL NULL -1.0000 mediumblob NULL NULL -1.0000 tinyblob NULL NULL -1.0000 varbinary NULL NULL -1.0000 char latin1 latin1_bin -1.0000 char latin1 latin1_swedish_ci -1.0000 enum latin1 latin1_swedish_ci -1.0000 longtext latin1 latin1_swedish_ci -1.0000 mediumtext latin1 latin1_swedish_ci -1.0000 set latin1 latin1_swedish_ci -1.0000 text latin1 latin1_swedish_ci -1.0000 tinytext latin1 latin1_swedish_ci -1.0000 longtext utf8 utf8_general_ci -1.0000 text utf8 utf8_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 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 varchar ucs2 ucs2_general_ci -2.0079 tinytext ucs2 ucs2_general_ci -3.0000 char utf8 utf8_bin -3.0000 enum utf8 utf8_bin -3.0000 char utf8 utf8_general_ci -3.0000 enum utf8 utf8_general_ci -3.0000 set utf8 utf8_general_ci -3.0000 varchar utf8 utf8_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 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 bigint NULL NULL -NULL bit NULL NULL -NULL date NULL NULL -NULL datetime NULL NULL -NULL decimal NULL NULL -NULL double NULL NULL -NULL double unsigned NULL NULL -NULL double unsigned zerofill NULL NULL -NULL float NULL NULL -NULL float unsigned NULL NULL -NULL float unsigned zerofill NULL NULL -NULL int NULL NULL -NULL mediumint NULL NULL -NULL smallint NULL NULL -NULL time NULL NULL -NULL timestamp NULL NULL -NULL tinyint NULL NULL -NULL year NULL NULL -NULL varchar latin1 latin1_bin ---> 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 -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 db_datadict t_6_406001 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406001 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406001 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406001 f4 int NULL NULL NULL NULL int(11) -1.0000 db_datadict t_6_406002 f1 char 10 10 latin1 latin1_swedish_ci char(10) -1.0000 db_datadict t_6_406002 f2 text 65535 65535 latin1 latin1_swedish_ci text -NULL db_datadict t_6_406002 f3 date NULL NULL NULL NULL date -NULL db_datadict t_6_406002 f4 int NULL NULL NULL NULL int(11) -3.0000 information_schema CHARACTER_SETS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DEFAULT_COLLATE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema CHARACTER_SETS DESCRIPTION varchar 60 180 utf8 utf8_general_ci varchar(60) -NULL information_schema CHARACTER_SETS MAXLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATIONS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATIONS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLLATIONS ID bigint NULL NULL NULL NULL bigint(11) -3.0000 information_schema COLLATIONS IS_DEFAULT varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLLATIONS IS_COMPILED varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) -1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) -3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(10) -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NULL NULL NULL NULL bigint(10) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema ROUTINES DTD_IDENTIFIER varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES ROUTINE_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) -1.0000 information_schema ROUTINES ROUTINE_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES EXTERNAL_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES EXTERNAL_LANGUAGE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES PARAMETER_STYLE varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema ROUTINES IS_DETERMINISTIC varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema ROUTINES SQL_DATA_ACCESS varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SQL_PATH varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -NULL information_schema ROUTINES CREATED datetime NULL NULL NULL NULL datetime -NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datetime -1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema SCHEMATA CATALOG_NAME varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA DEFAULT_COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMATA SQL_PATH varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS NON_UNIQUE bigint NULL NULL NULL NULL bigint(1) -3.0000 information_schema STATISTICS INDEX_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS INDEX_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema STATISTICS SEQ_IN_INDEX bigint NULL NULL NULL NULL bigint(2) -3.0000 information_schema STATISTICS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema STATISTICS COLLATION varchar 1 3 utf8 utf8_general_ci varchar(1) -NULL information_schema STATISTICS CARDINALITY bigint NULL NULL NULL NULL bigint(21) -NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) -3.0000 information_schema STATISTICS PACKED varchar 10 30 utf8 utf8_general_ci varchar(10) -3.0000 information_schema STATISTICS NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema STATISTICS INDEX_TYPE varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema STATISTICS COMMENT varchar 16 48 utf8 utf8_general_ci varchar(16) -3.0000 information_schema TABLES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime -NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime -3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) -3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) -3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema TABLE_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TABLE_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TABLE_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS TRIGGER_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS TRIGGER_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS TRIGGER_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_MANIPULATION varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS EVENT_OBJECT_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema TRIGGERS EVENT_OBJECT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS EVENT_OBJECT_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint(4) -1.0000 information_schema TRIGGERS ACTION_CONDITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS ACTION_STATEMENT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema TRIGGERS ACTION_ORIENTATION varchar 9 27 utf8 utf8_general_ci varchar(9) -3.0000 information_schema TRIGGERS ACTION_TIMING varchar 6 18 utf8 utf8_general_ci varchar(6) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW varchar 3 9 utf8 utf8_general_ci varchar(3) -NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime -1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) -3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema USER_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS TABLE_CATALOG varchar 4096 12288 utf8 utf8_general_ci varchar(4096) -3.0000 information_schema VIEWS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) -3.0000 information_schema VIEWS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -1.0000 information_schema VIEWS VIEW_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext -3.0000 information_schema VIEWS CHECK_OPTION varchar 8 24 utf8 utf8_general_ci varchar(8) -3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) -3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) -3.0000 mysql columns_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql columns_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql columns_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) -NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql db Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) -NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) -3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) -3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') -NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -3.0000 mysql help_category url char 128 384 utf8 utf8_general_ci char(128) -NULL mysql help_keyword help_keyword_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_keyword name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_relation help_topic_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_relation help_keyword_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql help_topic help_topic_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql help_topic name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned -1.0000 mysql help_topic description text 65535 65535 utf8 utf8_general_ci text -1.0000 mysql help_topic example text 65535 65535 utf8 utf8_general_ci text -3.0000 mysql help_topic url char 128 384 utf8 utf8_general_ci char(128) -3.0000 mysql host Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql host Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql host Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') -3.0000 mysql proc specific_name char 64 192 utf8 utf8_general_ci char(64) -3.0000 mysql proc language enum 3 9 utf8 utf8_general_ci enum('SQL') -3.0000 mysql proc sql_data_access enum 17 51 utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') -3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') -3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') -1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob -3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) -1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob -3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) -NULL mysql proc created timestamp NULL NULL NULL NULL timestamp -NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp -3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') -3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') -3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) -3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') -NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) -3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) -3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) -NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') -3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') -NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned -3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') -NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_leap_second Correction int NULL NULL NULL NULL int(11) -3.0000 mysql time_zone_name Name char 64 192 utf8 utf8_general_ci char(64) -NULL mysql time_zone_name Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition Transition_time bigint NULL NULL NULL NULL bigint(20) -NULL mysql time_zone_transition Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Time_zone_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Transition_type_id int NULL NULL NULL NULL int(10) unsigned -NULL mysql time_zone_transition_type Offset int NULL NULL NULL NULL int(11) -NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint(3) unsigned -3.0000 mysql time_zone_transition_type Abbreviation char 8 24 utf8 utf8_general_ci char(8) -3.0000 mysql user Host char 60 180 utf8 utf8_bin char(60) -3.0000 mysql user User char 16 48 utf8 utf8_bin char(16) -1.0000 mysql user Password char 41 41 latin1 latin1_bin char(41) -3.0000 mysql user Select_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Insert_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Update_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Delete_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Drop_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Reload_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Shutdown_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Process_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user File_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Grant_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user References_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Index_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_db_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Super_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_tmp_table_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Lock_tables_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_slave_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Repl_client_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Show_view_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') -3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') -1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob -1.0000 mysql user x509_subject blob 65535 65535 NULL NULL blob -NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned -NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned -1.0000 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 test tb1 f1 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb1 f2 char 1 1 latin1 latin1_bin char(1) -1.0000 test tb1 f3 char 1 1 latin1 latin1_swedish_ci char(1) -2.0079 test tb1 f4 tinytext 127 255 ucs2 ucs2_general_ci tinytext -1.0000 test tb1 f5 text 65535 65535 latin1 latin1_swedish_ci text -1.0000 test tb1 f6 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -1.0000 test tb1 f7 longtext 4294967295 4294967295 latin1 latin1_swedish_ci longtext -1.0000 test tb1 f8 tinyblob 255 255 NULL NULL tinyblob -1.0000 test tb1 f9 blob 65535 65535 NULL NULL blob -1.0000 test tb1 f10 mediumblob 16777215 16777215 NULL NULL mediumblob -1.0000 test tb1 f11 longblob 4294967295 4294967295 NULL NULL longblob -1.0000 test tb1 f12 binary 1 1 NULL NULL binary(1) -NULL test tb1 f13 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb1 f14 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb1 f15 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f16 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb1 f17 smallint NULL NULL NULL NULL smallint(6) -NULL test tb1 f18 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb1 f19 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f20 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb1 f21 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb1 f22 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb1 f23 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f24 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb1 f25 int NULL NULL NULL NULL int(11) -NULL test tb1 f26 int NULL NULL NULL NULL int(10) unsigned -NULL test tb1 f27 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f28 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb1 f29 bigint NULL NULL NULL NULL bigint(20) -NULL test tb1 f30 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb1 f31 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f32 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb1 f33 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f34 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f35 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f36 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f37 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f38 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb1 f39 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f40 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb1 f41 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f42 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f43 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f44 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb1 f45 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f46 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb1 f47 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f48 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb1 f49 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f50 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f51 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f52 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb1 f53 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f54 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb1 f55 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f56 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb1 f57 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb1 f58 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb2 f73 double NULL NULL NULL NULL double -NULL test tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f77 double NULL NULL NULL NULL double -NULL test tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f81 float NULL NULL NULL NULL float -NULL test tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f85 float NULL NULL NULL NULL float -NULL test tb2 f86 float NULL NULL NULL NULL float -NULL test tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f93 float NULL NULL NULL NULL float -NULL test tb2 f94 double NULL NULL NULL NULL double -NULL test tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb2 f101 date NULL NULL NULL NULL date -NULL test tb2 f102 time NULL NULL NULL NULL time -NULL test tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test tb2 f105 year NULL NULL NULL NULL year(4) -NULL test tb2 f106 year NULL NULL NULL NULL year(4) -NULL test tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -1.0000 test tb2 f110 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb2 f111 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test tb2 f112 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb2 f113 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test tb2 f114 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test tb2 f115 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test tb2 f116 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb2 f117 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test tb3 f118 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f119 char 1 1 latin1 latin1_bin char(1) -1.0000 test tb3 f120 char 1 1 latin1 latin1_swedish_ci char(1) -1.0000 test tb3 f121 tinytext 255 255 latin1 latin1_swedish_ci tinytext -1.0000 test tb3 f122 text 65535 65535 latin1 latin1_swedish_ci text -1.0000 test tb3 f123 mediumtext 16777215 16777215 latin1 latin1_swedish_ci mediumtext -2.0000 test tb3 f124 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext -1.0000 test tb3 f125 tinyblob 255 255 NULL NULL tinyblob -1.0000 test tb3 f126 blob 65535 65535 NULL NULL blob -1.0000 test tb3 f127 mediumblob 16777215 16777215 NULL NULL mediumblob -1.0000 test tb3 f128 longblob 4294967295 4294967295 NULL NULL longblob -1.0000 test tb3 f129 binary 1 1 NULL NULL binary(1) -NULL test tb3 f130 tinyint NULL NULL NULL NULL tinyint(4) -NULL test tb3 f131 tinyint NULL NULL NULL NULL tinyint(3) unsigned -NULL test tb3 f132 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f133 tinyint NULL NULL NULL NULL tinyint(3) unsigned zerofill -NULL test tb3 f134 smallint NULL NULL NULL NULL smallint(6) -NULL test tb3 f135 smallint NULL NULL NULL NULL smallint(5) unsigned -NULL test tb3 f136 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f137 smallint NULL NULL NULL NULL smallint(5) unsigned zerofill -NULL test tb3 f138 mediumint NULL NULL NULL NULL mediumint(9) -NULL test tb3 f139 mediumint NULL NULL NULL NULL mediumint(8) unsigned -NULL test tb3 f140 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f141 mediumint NULL NULL NULL NULL mediumint(8) unsigned zerofill -NULL test tb3 f142 int NULL NULL NULL NULL int(11) -NULL test tb3 f143 int NULL NULL NULL NULL int(10) unsigned -NULL test tb3 f144 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f145 int NULL NULL NULL NULL int(10) unsigned zerofill -NULL test tb3 f146 bigint NULL NULL NULL NULL bigint(20) -NULL test tb3 f147 bigint NULL NULL NULL NULL bigint(20) unsigned -NULL test tb3 f148 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f149 bigint NULL NULL NULL NULL bigint(20) unsigned zerofill -NULL test tb3 f150 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f151 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f152 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f153 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f154 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f155 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb3 f156 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f157 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb3 f158 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f159 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f160 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f161 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb3 f162 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f163 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb3 f164 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f165 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb3 f166 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f167 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f168 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f169 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb3 f170 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f171 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb3 f172 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f173 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb3 f174 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb3 f175 decimal NULL NULL NULL NULL decimal(64,0) -NULL test tb4 f176 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f177 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test tb4 f178 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f179 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f180 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f181 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test tb4 f182 decimal NULL NULL NULL NULL decimal(10,0) -NULL test tb4 f183 decimal NULL NULL NULL NULL decimal(63,30) -NULL test tb4 f184 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test tb4 f185 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test tb4 f186 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f187 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f188 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test tb4 f189 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test tb4 f190 double NULL NULL NULL NULL double -NULL test tb4 f191 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f192 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f193 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f194 double NULL NULL NULL NULL double -NULL test tb4 f195 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f196 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f197 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f198 float NULL NULL NULL NULL float -NULL test tb4 f199 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f200 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f201 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f202 float NULL NULL NULL NULL float -NULL test tb4 f203 float NULL NULL NULL NULL float -NULL test tb4 f204 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f205 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f206 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f207 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f208 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f209 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f210 float NULL NULL NULL NULL float -NULL test tb4 f211 double NULL NULL NULL NULL double -NULL test tb4 f212 float unsigned NULL NULL NULL NULL float unsigned -NULL test tb4 f213 double unsigned NULL NULL NULL NULL double unsigned -NULL test tb4 f214 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f215 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f216 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test tb4 f217 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test tb4 f218 date NULL NULL NULL NULL date -NULL test tb4 f219 time NULL NULL NULL NULL time -NULL test tb4 f220 datetime NULL NULL NULL NULL datetime -NULL test tb4 f221 timestamp NULL NULL NULL NULL timestamp -NULL test tb4 f222 year NULL NULL NULL NULL year(4) -NULL test tb4 f223 year NULL NULL NULL NULL year(4) -NULL test tb4 f224 year NULL NULL NULL NULL year(4) -1.0000 test tb4 f225 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test tb4 f226 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -1.0000 test tb4 f227 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb4 f228 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test tb4 f229 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb4 f230 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test tb4 f231 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test tb4 f232 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test tb4 f233 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test tb4 f234 varbinary 192 192 NULL NULL varbinary(192) -2.0000 test tb4 f235 char 255 510 ucs2 ucs2_general_ci char(255) -1.0000 test tb4 f236 char 60 60 latin1 latin1_swedish_ci char(60) -1.0000 test tb4 f237 char 255 255 latin1 latin1_bin char(255) -NULL test tb4 f238 varchar 0 0 latin1 latin1_bin varchar(0) -1.0000 test tb4 f239 varbinary 1000 1000 NULL NULL varbinary(1000) -2.0000 test tb4 f240 varchar 120 240 ucs2 ucs2_general_ci varchar(120) -2.0000 test tb4 f241 char 100 200 ucs2 ucs2_general_ci char(100) -NULL test tb4 f242 bit NULL NULL NULL NULL bit(30) -NULL test1 tb2 f59 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f60 decimal NULL NULL NULL NULL decimal(64,0) unsigned -NULL test1 tb2 f61 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f62 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f63 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f64 decimal NULL NULL NULL NULL decimal(64,0) unsigned zerofill -NULL test1 tb2 f65 decimal NULL NULL NULL NULL decimal(10,0) -NULL test1 tb2 f66 decimal NULL NULL NULL NULL decimal(63,30) -NULL test1 tb2 f67 decimal NULL NULL NULL NULL decimal(10,0) unsigned -NULL test1 tb2 f68 decimal NULL NULL NULL NULL decimal(63,30) unsigned -NULL test1 tb2 f69 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f70 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f71 decimal NULL NULL NULL NULL decimal(10,0) unsigned zerofill -NULL test1 tb2 f72 decimal NULL NULL NULL NULL decimal(63,30) unsigned zerofill -NULL test1 tb2 f73 double NULL NULL NULL NULL double -NULL test1 tb2 f74 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f75 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f76 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f77 double NULL NULL NULL NULL double -NULL test1 tb2 f78 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f79 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f80 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f81 float NULL NULL NULL NULL float -NULL test1 tb2 f82 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f83 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f84 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f85 float NULL NULL NULL NULL float -NULL test1 tb2 f86 float NULL NULL NULL NULL float -NULL test1 tb2 f87 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f88 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f89 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f90 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f91 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f92 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f93 float NULL NULL NULL NULL float -NULL test1 tb2 f94 double NULL NULL NULL NULL double -NULL test1 tb2 f95 float unsigned NULL NULL NULL NULL float unsigned -NULL test1 tb2 f96 double unsigned NULL NULL NULL NULL double unsigned -NULL test1 tb2 f97 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f98 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f99 float unsigned zerofill NULL NULL NULL NULL float unsigned zerofill -NULL test1 tb2 f100 double unsigned zerofill NULL NULL NULL NULL double unsigned zerofill -NULL test1 tb2 f101 date NULL NULL NULL NULL date -NULL test1 tb2 f102 time NULL NULL NULL NULL time -NULL test1 tb2 f103 datetime NULL NULL NULL NULL datetime -NULL test1 tb2 f104 timestamp NULL NULL NULL NULL timestamp -NULL test1 tb2 f105 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f106 year NULL NULL NULL NULL year(4) -NULL test1 tb2 f107 year NULL NULL NULL NULL year(4) -1.0000 test1 tb2 f108 enum 5 5 latin1 latin1_swedish_ci enum('1enum','2enum') -1.0000 test1 tb2 f109 set 9 9 latin1 latin1_swedish_ci set('1set','2set') -1.0000 test1 tb2 f110 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test1 tb2 f111 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test1 tb2 f112 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test1 tb2 f113 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test1 tb2 f114 varbinary 192 192 NULL NULL varbinary(192) -1.0000 test1 tb2 f115 varbinary 27 27 NULL NULL varbinary(27) -1.0000 test1 tb2 f116 varbinary 64 64 NULL NULL varbinary(64) -1.0000 test1 tb2 f117 varbinary 192 192 NULL NULL varbinary(192) -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 USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE IF EXISTS t_6_406001; -DROP TABLE IF EXISTS t_6_406002; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.7.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC key_column_usage; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(10) NO 0 -POSITION_IN_UNIQUE_CONSTRAINT bigint(10) YES NULL -REFERENCED_TABLE_SCHEMA varchar(64) YES NULL -REFERENCED_TABLE_NAME varchar(64) YES NULL -REFERENCED_COLUMN_NAME varchar(64) YES NULL -SHOW CREATE TABLE key_column_usage; -Table Create Table -KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(10) NOT NULL default '0', - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, - `REFERENCED_TABLE_NAME` varchar(64) default NULL, - `REFERENCED_COLUMN_NAME` varchar(64) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -COUNT(*) -12 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'key_column_usage' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE ORDINAL_POSITION 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(10) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME 12 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.7.2 + 3.2.7.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -CREATE TABLE t_40701 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40701 to 'user_1'@'localhost'; -CREATE TABLE t_40702 ( -f1 INT NOT NULL, PRIMARY KEY(f1), -f2 INT, INDEX f2_ind(f2) -); -GRANT SELECT ON t_40702 to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_category name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_keyword name 1 NULL NULL NULL NULL -NULL mysql name NULL mysql help_topic name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql columns_priv Column_name 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql db User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql func name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_category help_category_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_keyword help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_keyword_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_relation help_topic_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql help_topic help_topic_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql host Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc db 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc name 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql proc type 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql procs_priv Routine_type 5 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Db 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv User 3 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql tables_priv Table_name 4 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_leap_second Transition_time 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_name Name 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition Transition_time 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Time_zone_id 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql time_zone_transition_type Transition_type_id 2 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user Host 1 NULL NULL NULL NULL -NULL mysql PRIMARY NULL mysql user User 2 NULL NULL NULL NULL -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40701 f1 1 NULL NULL NULL NULL -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.key_column_usage -ORDER BY constraint_catalog, constraint_schema, constraint_name, -table_catalog, table_schema, table_name, ordinal_position; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME -NULL db_datadict PRIMARY NULL db_datadict t_40702 f1 1 NULL NULL NULL NULL - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE t_40701; -DROP TABLE t_40702; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.8.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC routines; -Field Type Null Key Default Extra -SPECIFIC_NAME varchar(64) NO -ROUTINE_CATALOG varchar(4096) YES NULL -ROUTINE_SCHEMA varchar(64) NO -ROUTINE_NAME varchar(64) NO -ROUTINE_TYPE varchar(9) NO -DTD_IDENTIFIER varchar(64) YES NULL -ROUTINE_BODY varchar(8) NO -ROUTINE_DEFINITION longtext YES NULL -EXTERNAL_NAME varchar(64) YES NULL -EXTERNAL_LANGUAGE varchar(64) YES NULL -PARAMETER_STYLE varchar(8) NO -IS_DETERMINISTIC varchar(3) NO -SQL_DATA_ACCESS varchar(64) NO -SQL_PATH varchar(64) YES NULL -SECURITY_TYPE varchar(7) NO -CREATED datetime NO 0000-00-00 00:00:00 -LAST_ALTERED datetime NO 0000-00-00 00:00:00 -SQL_MODE longtext NO NULL -ROUTINE_COMMENT varchar(64) NO -DEFINER varchar(77) NO -SHOW CREATE TABLE routines; -Table Create Table -ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL default '', - `ROUTINE_CATALOG` varchar(4096) default NULL, - `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', - `ROUTINE_NAME` varchar(64) NOT NULL default '', - `ROUTINE_TYPE` varchar(9) NOT NULL default '', - `DTD_IDENTIFIER` varchar(64) default NULL, - `ROUTINE_BODY` varchar(8) NOT NULL default '', - `ROUTINE_DEFINITION` longtext, - `EXTERNAL_NAME` varchar(64) default NULL, - `EXTERNAL_LANGUAGE` varchar(64) default NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL default '', - `IS_DETERMINISTIC` varchar(3) NOT NULL default '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(64) default NULL, - `SECURITY_TYPE` varchar(7) NOT NULL default '', - `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', - `SQL_MODE` longtext NOT NULL, - `ROUTINE_COMMENT` varchar(64) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -COUNT(*) -20 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'routines' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema ROUTINES SPECIFIC_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema ROUTINES ROUTINE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_TYPE 5 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES ROUTINE_BODY 7 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES ROUTINE_DEFINITION 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES EXTERNAL_NAME 9 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES PARAMETER_STYLE 11 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema ROUTINES IS_DETERMINISTIC 12 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema ROUTINES SQL_DATA_ACCESS 13 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SQL_PATH 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES SECURITY_TYPE 15 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select -NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES LAST_ALTERED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema ROUTINES SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema ROUTINES ROUTINE_COMMENT 19 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select - -Testcase 3.2.8.2 + 3.2.8.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -USE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_1(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1989-11-09', 0815); -DROP PROCEDURE IF EXISTS sp_6_408002_1; -CREATE PROCEDURE sp_6_408002_1() -BEGIN -SELECT * FROM db_datadict.res_6_408002_1; -END// -CREATE DATABASE db_datadict_2; -USE db_datadict_2; -CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT); -INSERT INTO res_6_408002_2(f1, f2, f3, f4) -VALUES('abc', 'xyz', '1990-10-03', 4711); -DROP PROCEDURE IF EXISTS sp_6_408002_2; -CREATE PROCEDURE sp_6_408002_2() -BEGIN -SELECT * FROM db_datadict_2.res_6_408002_2; -END// -GRANT SELECT ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_1'@'localhost'; -GRANT EXECUTE ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_2'@'localhost'; -GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 TO 'user_2'@'localhost'; -GRANT EXECUTE ON db_datadict_2.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER - -root@localhost db_datadict_2 -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -use db_datadict; -DROP TABLE res_6_408002_1; -DROP PROCEDURE sp_6_408002_1; -USE db_datadict_2; -DROP TABLE res_6_408002_2; -DROP PROCEDURE sp_6_408002_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.8.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -USE db_datadict; -create table res_6_408004_1(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_1 values ('abc', 98765 , 99999999 , 98765, 10); -drop procedure if exists sp_6_408004; -create table res_6_408004_2(f1 longtext , f2 mediumint , f3 longblob , f4 real , f5 year); -insert into res_6_408004_2 values ('abc', 98765 , 99999999 , 98765, 10); - -Checking the max. possible length of (currently) 4 GByte is not possible in this environment here. --------------------------------------------------------------------------------------------------- -create procedure sp_6_408004 () -begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -end// -call sp_6_408004 (); -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -@a -test row -select * from res_6_408004_2; -f1 f2 f3 f4 f5 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -abc 98765 99999999 98765 2010 -SELECT *, LENGTH(routine_definition) -FROM information_schema.routines -WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME sp_6_408004 -ROUTINE_CATALOG NULL -ROUTINE_SCHEMA db_datadict -ROUTINE_NAME sp_6_408004 -ROUTINE_TYPE PROCEDURE -DTD_IDENTIFIER NULL -ROUTINE_BODY SQL -ROUTINE_DEFINITION begin -declare done integer default 0; -declare variable_number_1 longtext; -declare variable_number_2 mediumint; -declare variable_number_3 longblob; -declare variable_number_4 real; -declare variable_number_5 year; -declare cursor_number_1 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_2 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_3 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_4 cursor for select * from res_6_408004_1 limit 0, 10; -declare cursor_number_5 cursor for select * from res_6_408004_1 limit 0, 10; -declare continue handler for sqlstate '02000' set done = 1; -begin -open cursor_number_1; -while done <> 1 do -fetch cursor_number_1 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, -variable_number_4, variable_number_5); -end if; -end while; -begin -begin -set done = 0; -open cursor_number_2; -while done <> 1 do -fetch cursor_number_2 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -set done = 0; -open cursor_number_3; -while done <> 1 do -fetch cursor_number_3 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values(variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -end; -begin -set done = 0; -open cursor_number_4; -while done <> 1 do -fetch cursor_number_4 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -begin -set done = 0; -open cursor_number_5; -while done <> 1 do -fetch cursor_number_5 into variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5; -if done <> 0 then -insert into res_6_408004_2 values (variable_number_1, variable_number_2, variable_number_3, variable_number_4, variable_number_5); -end if; -end while; -end; -begin -set @a='test row'; -select @a; -select @a; -select @a; -end; -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 YYYY-MM-DD hh:mm:ss -LAST_ALTERED YYYY-MM-DD hh:mm:ss -SQL_MODE -ROUTINE_COMMENT -DEFINER root@localhost -LENGTH(routine_definition) 2549 -use db_datadict; -drop procedure sp_6_408004; -drop table res_6_408004_1; -drop table res_6_408004_2; -use test; -drop database db_datadict; - -Testcase 3.2.9.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schemata; -Field Type Null Key Default Extra -CATALOG_NAME varchar(4096) YES NULL -SCHEMA_NAME varchar(64) NO -DEFAULT_CHARACTER_SET_NAME varchar(64) NO -DEFAULT_COLLATION_NAME varchar(64) NO -SQL_PATH varchar(4096) YES NULL -SHOW CREATE TABLE schemata; -Table Create Table -SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(4096) default NULL, - `SCHEMA_NAME` varchar(64) NOT NULL default '', - `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(4096) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schemata' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMATA CATALOG_NAME 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMATA SCHEMA_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA DEFAULT_COLLATION_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMATA SQL_PATH 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select - -Testcase 3.2.9.2 + 3.2.9.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict_1; -CREATE DATABASE db_datadict_2; -GRANT SELECT ON db_datadict_1.* to 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.* to 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict_1,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_1 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -3 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL db_datadict_2 latin1 latin1_swedish_ci NULL -NULL test latin1 latin1_swedish_ci NULL -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT COUNT(*) FROM information_schema.schemata; -COUNT(*) -2 -SELECT * FROM information_schema.schemata; -CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME DEFAULT_COLLATION_NAME SQL_PATH -NULL information_schema utf8 utf8_general_ci NULL -NULL test latin1 latin1_swedish_ci NULL - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE db_datadict_1; -DROP DATABASE db_datadict_2; - -Testcase 3.2.10.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_constraints; -Field Type Null Key Default Extra -CONSTRAINT_CATALOG varchar(4096) YES NULL -CONSTRAINT_SCHEMA varchar(64) NO -CONSTRAINT_NAME varchar(64) NO -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -CONSTRAINT_TYPE varchar(64) NO -SHOW CREATE TABLE table_constraints; -Table Create Table -TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( - `CONSTRAINT_CATALOG` varchar(4096) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `CONSTRAINT_TYPE` varchar(64) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_constraints' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_SCHEMA 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS TABLE_NAME 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_TYPE 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select - -Testcase 3.2.10.2 + 3.2.10.3: --------------------------------------------------------------------------------- -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -USE db_datadict; -CREATE TABLE res_6_401003_1(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -USE db_datadict_2; -CREATE TABLE res_6_401003_2(f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)); -GRANT SELECT ON db_datadict.res_6_401003_1 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict_2.res_6_401003_2 TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict PRIMARY db_datadict res_6_401003_1 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -connect(localhost,user_2,,db_datadict_2,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE -NULL db_datadict_2 PRIMARY db_datadict_2 res_6_401003_2 PRIMARY KEY -SELECT COUNT(*) FROM information_schema.table_constraints; -COUNT(*) -1 -use db_datadict; - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE res_6_401003_1; -USE db_datadict_2; -DROP TABLE res_6_401003_2; -USE test; -DROP DATABASE db_datadict; -DROP DATABASE db_datadict_2; - -Testcase 3.2.11.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC table_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE table_privileges; -Table Create Table -TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -COUNT(*) -6 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'table_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLE_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema TABLE_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLE_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES PRIVILEGE_TYPE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLE_PRIVILEGES IS_GRANTABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.11.2 + 3.2.11.3 + 3.2.11.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, SELECT ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.table_privileges -WHERE table_name LIKE 'tb%'; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = USER(); -USER() COUNT(*) -user_2@localhost 0 -SELECT USER(), COUNT(*) -FROM information_schema.table_privileges -WHERE grantee = "'user_2'@'localhost'"; -USER() COUNT(*) -user_2@localhost 11 -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -SELECT * FROM information_schema.table_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL db_datadict tb1 SELECT YES -'user_2'@'localhost' NULL db_datadict tb1 INSERT YES -'user_2'@'localhost' NULL db_datadict tb1 UPDATE YES -'user_2'@'localhost' NULL db_datadict tb1 DELETE YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE YES -'user_2'@'localhost' NULL db_datadict tb1 DROP YES -'user_2'@'localhost' NULL db_datadict tb1 REFERENCES YES -'user_2'@'localhost' NULL db_datadict tb1 INDEX YES -'user_2'@'localhost' NULL db_datadict tb1 ALTER YES -'user_2'@'localhost' NULL db_datadict tb1 CREATE VIEW YES -'user_2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES -'user_1'@'localhost' NULL db_datadict tb1 SELECT NO -'user_3'@'localhost' NULL db_datadict tb3 SELECT NO - -root@localhost db_datadict -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -drop table db_datadict.tb1; -drop table db_datadict.tb3; -use test; -drop database db_datadict; - -Testcase 3.2.12.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC tables; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -TABLE_TYPE varchar(64) NO -ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL -ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL -CREATE_TIME datetime YES NULL -UPDATE_TIME datetime YES NULL -CHECK_TIME datetime YES NULL -TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL -CREATE_OPTIONS varchar(255) YES NULL -TABLE_COMMENT varchar(80) NO -SHOW CREATE TABLE tables; -Table Create Table -TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `TABLE_TYPE` varchar(64) NOT NULL default '', - `ENGINE` varchar(64) default NULL, - `VERSION` bigint(21) default NULL, - `ROW_FORMAT` varchar(10) default NULL, - `TABLE_ROWS` bigint(21) default NULL, - `AVG_ROW_LENGTH` bigint(21) default NULL, - `DATA_LENGTH` bigint(21) default NULL, - `MAX_DATA_LENGTH` bigint(21) default NULL, - `INDEX_LENGTH` bigint(21) default NULL, - `DATA_FREE` bigint(21) default NULL, - `AUTO_INCREMENT` bigint(21) default NULL, - `CREATE_TIME` datetime default NULL, - `UPDATE_TIME` datetime default NULL, - `CHECK_TIME` datetime default NULL, - `TABLE_COLLATION` varchar(64) default NULL, - `CHECKSUM` bigint(21) default NULL, - `CREATE_OPTIONS` varchar(255) default NULL, - `TABLE_COMMENT` varchar(80) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -COUNT(*) -21 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'tables' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select -NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select - -Testcase 3.2.12.2 + 3.2.12.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -create database db_datadict; -CREATE USER 'user_1'@'localhost'; -GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* -TO 'user_1'@'localhost' WITH GRANT OPTION; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -use db_datadict; -create table tb1(f1 int, f2 int, f3 int); -grant select on db_datadict.tb1 to 'user_1'@'localhost'; -GRANT ALL on db_datadict.tb1 to 'user_2'@'localhost' WITH GRANT OPTION; -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -CREATE TABLE tb2 (f1 DECIMAL); -CREATE TABLE tb3 (f1 TEXT); -GRANT SELECT ON db_datadict.tb3 to 'user_3'@'localhost'; -GRANT INSERT ON db_datadict.tb3 to 'user_2'@'localhost'; -CREATE VIEW v3 AS SELECT * FROM tb3; -GRANT SELECT ON db_datadict.v3 to 'user_3'@'localhost'; -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -connect(localhost,user_3,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL - -root@localhost db_datadict -SELECT * FROM information_schema.tables -WHERE table_schema = 'information_schema'; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL information_schema CHARACTER_SETS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATIONS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMNS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema COLUMN_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema KEY_COLUMN_USAGE SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema ROUTINES SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMATA SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema SCHEMA_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema STATISTICS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_CONSTRAINTS SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TABLE_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema TRIGGERS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema USER_PRIVILEGES SYSTEM VIEW MEMORY 0 Fixed NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -NULL information_schema VIEWS SYSTEM VIEW MyISAM 0 Dynamic NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL #CO# -SELECT * FROM information_schema.tables -WHERE NOT( table_schema = 'information_schema') AND NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT -NULL db_datadict tb1 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb2 BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict tb3 BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL db_datadict v3 VIEW NULL NULL NULL NULL #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss NULL NULL NULL VIEW -NULL mysql columns_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Column privileges -NULL mysql db BASE TABLE MyISAM 10 Fixed 3 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Database privileges -NULL mysql func BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL User defined functions -NULL mysql host BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Host privileges; Merged with database privileges -NULL mysql proc BASE TABLE MyISAM 10 Dynamic 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Stored Procedures -NULL mysql procs_priv BASE TABLE MyISAM 10 Fixed 0 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Procedure privileges -NULL mysql tables_priv BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Table privileges -NULL mysql time_zone BASE TABLE MyISAM 10 Fixed 5 #ARL# #DL# #MDL# #IL# #DF# 6 YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zones -NULL mysql time_zone_leap_second BASE TABLE MyISAM 10 Fixed 22 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Leap seconds information for time zones -NULL mysql time_zone_name BASE TABLE MyISAM 10 Fixed 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone names -NULL mysql time_zone_transition BASE TABLE MyISAM 10 Fixed 393 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transitions -NULL mysql time_zone_transition_type BASE TABLE MyISAM 10 Fixed 31 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_general_ci NULL Time zone transition types -NULL mysql user BASE TABLE MyISAM 10 Dynamic 6 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss utf8_bin NULL Users and global privileges -NULL test t1 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t10 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t11 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t2 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t3 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t4 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t7 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t8 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test t9 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb1 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb3 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test tb4 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test1 tb2 BASE TABLE MyISAM 10 Dynamic 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -NULL test4 t6 BASE TABLE MyISAM 10 Fixed 10 #ARL# #DL# #MDL# #IL# #DF# NULL YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss latin1_swedish_ci NULL -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP TABLE db_datadict.tb1; -DROP TABLE db_datadict.tb3; -DROP VIEW db_datadict.v3; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.13.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC views; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -VIEW_DEFINITION longtext NO NULL -CHECK_OPTION varchar(8) NO -IS_UPDATABLE varchar(3) NO -DEFINER varchar(77) NO -SECURITY_TYPE varchar(7) NO -SHOW CREATE TABLE views; -Table Create Table -VIEWS CREATE TEMPORARY TABLE `VIEWS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `VIEW_DEFINITION` longtext NOT NULL, - `CHECK_OPTION` varchar(8) NOT NULL default '', - `IS_UPDATABLE` varchar(3) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '', - `SECURITY_TYPE` varchar(7) NOT NULL default '' -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -COUNT(*) -8 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'views' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema VIEWS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema VIEWS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema VIEWS VIEW_DEFINITION 4 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select -NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select -NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select - -Testcase 3.2.13.2 + 3.2.13.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_no_views'@'localhost'; -USE db_datadict; -CREATE TABLE tb_401302(f1 INT, f2 INT, f3 INT); -CREATE VIEW v_granted_to_1 AS SELECT * FROM tb_401302; -CREATE VIEW v_granted_glob AS SELECT f2, f3 FROM tb_401302; -GRANT SELECT ON db_datadict.tb_401302 TO 'user_1'@'localhost'; -GRANT SELECT ON db_datadict.v_granted_to_1 TO 'user_1'@'localhost'; -GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 /* ALGORITHM=UNDEFINED */ select `db_datadict`.`tb_401302`.`f1` AS `f1`,`db_datadict`.`tb_401302`.`f2` AS `f2`,`db_datadict`.`tb_401302`.`f3` AS `f3` from `db_datadict`.`tb_401302` NONE YES root@localhost DEFINER -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -NULL db_datadict v_granted_glob NONE YES root@localhost DEFINER -NULL db_datadict v_granted_to_1 NONE YES root@localhost DEFINER -connect(localhost,user_no_views,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.views; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE - -root@localhost db_datadict -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_no_views'@'localhost'; -DROP VIEW v_granted_to_1; -DROP TABLE tb_401302; -DROP VIEW v_granted_glob; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.14.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC statistics; -Field Type Null Key Default Extra -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -TABLE_NAME varchar(64) NO -NON_UNIQUE bigint(1) NO 0 -INDEX_SCHEMA varchar(64) NO -INDEX_NAME varchar(64) NO -SEQ_IN_INDEX bigint(2) NO 0 -COLUMN_NAME varchar(64) NO -COLLATION varchar(1) YES NULL -CARDINALITY bigint(21) YES NULL -SUB_PART bigint(3) YES NULL -PACKED varchar(10) YES NULL -NULLABLE varchar(3) NO -INDEX_TYPE varchar(16) NO -COMMENT varchar(16) YES NULL -SHOW CREATE TABLE statistics; -Table Create Table -STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `NON_UNIQUE` bigint(1) NOT NULL default '0', - `INDEX_SCHEMA` varchar(64) NOT NULL default '', - `INDEX_NAME` varchar(64) NOT NULL default '', - `SEQ_IN_INDEX` bigint(2) NOT NULL default '0', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `COLLATION` varchar(1) default NULL, - `CARDINALITY` bigint(21) default NULL, - `SUB_PART` bigint(3) default NULL, - `PACKED` varchar(10) default NULL, - `NULLABLE` varchar(3) NOT NULL default '', - `INDEX_TYPE` varchar(16) NOT NULL default '', - `COMMENT` varchar(16) default NULL -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -COUNT(*) -15 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'statistics' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS NON_UNIQUE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(1) select -NULL information_schema STATISTICS INDEX_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS INDEX_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS SEQ_IN_INDEX 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(2) select -NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select -NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(3) select -NULL information_schema STATISTICS PACKED 12 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select -NULL information_schema STATISTICS NULLABLE 13 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema STATISTICS INDEX_TYPE 14 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select -NULL information_schema STATISTICS COMMENT 15 NULL YES varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select - -Testcase 3.2.14.2 + 3.2.14.3: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -CREATE DATABASE db_datadict; -CREATE DATABASE db_datadict_2; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -USE db_datadict; -create table tb_6_401402_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_6_401402_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict.tb_6_401402_1 to 'user_1'@'localhost' WITH GRANT OPTION; -USE db_datadict_2; -create table tb_2_1(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -create table tb_2_2(f1 int not null, primary key(f1), f2 int, index f2_ind(f2)); -grant select on db_datadict_2.tb_2_1 to 'user_1'@'localhost'; -FLUSH PRIVILEGES; -connect(localhost,user_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -connect(localhost,user_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -REVOKE SELECT ON db_datadict.tb_6_401402_1 FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.statistics -WHERE NOT (table_schema = 'mysql' AND table_name LIKE 'help_%'); -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict tb_6_401402_2 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_2 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_2 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_2 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL mysql columns_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 4 Table_name A NULL NULL NULL BTREE -NULL mysql columns_priv 0 mysql PRIMARY 5 Column_name A 0 NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql db 0 mysql PRIMARY 3 User A 2 NULL NULL BTREE -NULL mysql db 1 mysql User 1 User A 1 NULL NULL BTREE -NULL mysql func 0 mysql PRIMARY 1 name A 0 NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql host 0 mysql PRIMARY 2 Db A 0 NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 1 db A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 2 name A NULL NULL NULL BTREE -NULL mysql proc 0 mysql PRIMARY 3 type A 0 NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A NULL NULL NULL BTREE -NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A 0 NULL NULL BTREE -NULL mysql procs_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 2 Db A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 3 User A NULL NULL NULL BTREE -NULL mysql tables_priv 0 mysql PRIMARY 4 Table_name A 2 NULL NULL BTREE -NULL mysql tables_priv 1 mysql Grantor 1 Grantor A NULL NULL NULL BTREE -NULL mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A 5 NULL NULL BTREE -NULL mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A 22 NULL NULL BTREE -NULL mysql time_zone_name 0 mysql PRIMARY 1 Name A 6 NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition 0 mysql PRIMARY 2 Transition_time A 393 NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 1 Time_zone_id A NULL NULL NULL BTREE -NULL mysql time_zone_transition_type 0 mysql PRIMARY 2 Transition_type_id A 31 NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 1 Host A NULL NULL NULL BTREE -NULL mysql user 0 mysql PRIMARY 2 User A 5 NULL NULL BTREE - -user_1@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT -NULL db_datadict tb_6_401402_1 0 db_datadict PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict tb_6_401402_1 1 db_datadict f2_ind 1 f2 A NULL NULL NULL YES BTREE -NULL db_datadict_2 tb_2_1 0 db_datadict_2 PRIMARY 1 f1 A 0 NULL NULL BTREE -NULL db_datadict_2 tb_2_1 1 db_datadict_2 f2_ind 1 f2 A NULL NULL NULL YES BTREE - -user_2@localhost test -SELECT * FROM information_schema.statistics; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT - -root@localhost db_datadict_2 -USE db_datadict; -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP TABLE tb_6_401402_1; -DROP TABLE tb_6_401402_2; -USE test; -DROP DATABASE db_datadict; - -Testcase 3.2.15.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC schema_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -TABLE_SCHEMA varchar(64) NO -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE schema_privileges; -Table Create Table -SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -COUNT(*) -5 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'schema_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema SCHEMA_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.15.2: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401502'@'localhost'; -use db_datadict; -create table res_6_401502(f1 int, f2 int, f3 int); -grant insert on db_datadict.* to 'u_6_401502'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401502,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401502'@'localhost' NULL db_datadict INSERT NO -use db_datadict; - -root@localhost db_datadict -DROP USER 'u_6_401502'@'localhost'; -drop table res_6_401502; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.15.3 + 3.2.15.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_2; -create database db_datadict; -create database db_datadict_2; -CREATE USER 'u_6_401503_1'@'localhost'; -CREATE USER 'u_6_401503_2'@'localhost'; -CREATE USER 'u_6_401503_3'@'localhost'; -use db_datadict; -create table res_6_401503_1(f1 int, f2 int, f3 int); -use db_datadict_2; -create table res_6_401503_2(f1 int, f2 int, f3 int); -grant update on db_datadict.* to 'u_6_401503_1'@'localhost'; -grant delete on db_datadict_2.* to 'u_6_401503_2'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -''@'%' NULL test SELECT NO -''@'%' NULL test INSERT NO -''@'%' NULL test UPDATE NO -''@'%' NULL test DELETE NO -''@'%' NULL test CREATE NO -''@'%' NULL test DROP NO -''@'%' NULL test REFERENCES NO -''@'%' NULL test INDEX NO -''@'%' NULL test ALTER NO -''@'%' NULL test CREATE TEMPORARY TABLES NO -''@'%' NULL test LOCK TABLES NO -''@'%' NULL test CREATE VIEW NO -''@'%' NULL test SHOW VIEW NO -''@'%' NULL test CREATE ROUTINE NO -''@'%' NULL test\_% SELECT NO -''@'%' NULL test\_% INSERT NO -''@'%' NULL test\_% UPDATE NO -''@'%' NULL test\_% DELETE NO -''@'%' NULL test\_% CREATE NO -''@'%' NULL test\_% DROP NO -''@'%' NULL test\_% REFERENCES NO -''@'%' NULL test\_% INDEX NO -''@'%' NULL test\_% ALTER NO -''@'%' NULL test\_% CREATE TEMPORARY TABLES NO -''@'%' NULL test\_% LOCK TABLES NO -''@'%' NULL test\_% CREATE VIEW NO -''@'%' NULL test\_% SHOW VIEW NO -''@'%' NULL test\_% CREATE ROUTINE NO -connect(localhost,u_6_401503_1,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_1'@'localhost' NULL db_datadict UPDATE NO -connect(localhost,u_6_401503_2,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE -'u_6_401503_2'@'localhost' NULL db_datadict_2 DELETE NO -connect(localhost,u_6_401503_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.schema_privileges; -GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE - -root@localhost db_datadict_2 -use db_datadict; -DROP USER 'u_6_401503_1'@'localhost'; -DROP USER 'u_6_401503_2'@'localhost'; -DROP USER 'u_6_401503_3'@'localhost'; -drop table res_6_401503_1; -use db_datadict_2; -drop table res_6_401503_2; -use test; -drop database db_datadict; -drop database db_datadict_2; - -Testcase 3.2.16.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC user_privileges; -Field Type Null Key Default Extra -GRANTEE varchar(81) NO -TABLE_CATALOG varchar(4096) YES NULL -PRIVILEGE_TYPE varchar(64) NO -IS_GRANTABLE varchar(3) NO -SHOW CREATE TABLE user_privileges; -Table Create Table -USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(4096) default NULL, - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' -) ENGINE=MEMORY DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -COUNT(*) -4 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'user_privileges' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL utf8 utf8_general_ci varchar(81) select -NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select - -Testcase 3.2.16.2 + 3.2.16.3 + 3.2.16.4: --------------------------------------------------------------------------------- -DROP DATABASE IF EXISTS db_datadict; -CREATE DATABASE db_datadict; -CREATE USER 'user_1'@'localhost'; -CREATE USER 'user_2'@'localhost'; -CREATE USER 'user_3'@'localhost'; -GRANT SELECT ON db_datadict.* TO 'user_1'@'localhost'; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -GRANT INSERT ON *.* TO 'user_2'@'localhost'; -GRANT UPDATE ON *.* TO 'user_2'@'localhost'; -FLUSH PRIVILEGES; - -FIXME (see Bug 12269) Here we expect more than only for user_1 ----------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -add GRANT OPTION db_datadict.* to user_1 ----------------------------------------- -GRANT UPDATE ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; - -FIXME (see Bug 12269) Here the is missing for the GRANT OPTION for user_1 -------------------------------------------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -connect(localhost,user_1,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' - -Now add SELECT on *.* to user_1 -------------------------------- - -root@localhost information_schema -GRANT SELECT ON *.* TO 'user_1'@'localhost'; - -Here is shown correctly for user_1 ------------------------------------------------ -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT YES -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N Y N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT SELECT ON *.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT, UPDATE ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -connect(localhost,user_2,,db_datadict,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_2@localhost -GRANT INSERT, UPDATE ON *.* TO 'user_2'@'localhost' -connect(localhost,user_3,,test,MYSQL_PORT,MYSQL_SOCK); -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_3'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_3@localhost -GRANT USAGE ON *.* TO 'user_3'@'localhost' - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' - -user_1@localhost db_datadict -CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_55' - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_66' - -add ALL on db_datadict.* (and select on mysql.user) to user_1 -------------------------------------------------------------- - -root@localhost information_schema -GRANT ALL ON db_datadict.* TO 'user_1'@'localhost' WITH GRANT OPTION; -GRANT SELECT ON mysql.user TO 'user_1'@'localhost'; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); -ERROR 42000: CREATE command denied to user 'user_1'@'localhost' for table 'tb_56' -USE db_datadict; - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.* TO 'user_1'@'localhost' WITH GRANT OPTION -GRANT SELECT ON `mysql`.`user` TO 'user_1'@'localhost' -CREATE TABLE tb_57 ( c1 TEXT ); - -revoke privileges from user_1 ------------------------------ - -root@localhost information_schema -REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'user_1'@'localhost'; -FLUSH PRIVILEGES; -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION - -user_1@localhost db_datadict -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 'user' -SHOW GRANTS; -Grants for user_1@localhost -GRANT USAGE ON *.* TO 'user_1'@'localhost' -CREATE TABLE db_datadict.tb_58 ( c1 TEXT ); -USE db_datadict; -ERROR 42000: Access denied for user 'user_1'@'localhost' to database 'db_datadict' -CREATE TABLE db_datadict.tb_59 ( c1 TEXT ); - -root@localhost information_schema -DROP USER 'user_1'@'localhost'; -DROP USER 'user_2'@'localhost'; -DROP USER 'user_3'@'localhost'; -DROP DATABASE IF EXISTS db_datadict; - -Testcase 3.2.17: Checks on Performance - not here in this script! --------------------------------------------------------------------------------- - -Testcase 3.2.18.1: --------------------------------------------------------------------------------- -USE information_schema; -DESC triggers; -Field Type Null Key Default Extra -TRIGGER_CATALOG varchar(4096) YES NULL -TRIGGER_SCHEMA varchar(64) NO -TRIGGER_NAME varchar(64) NO -EVENT_MANIPULATION varchar(6) NO -EVENT_OBJECT_CATALOG varchar(4096) YES NULL -EVENT_OBJECT_SCHEMA varchar(64) NO -EVENT_OBJECT_TABLE varchar(64) NO -ACTION_ORDER bigint(4) NO 0 -ACTION_CONDITION longtext YES NULL -ACTION_STATEMENT longtext NO NULL -ACTION_ORIENTATION varchar(9) NO -ACTION_TIMING varchar(6) NO -ACTION_REFERENCE_OLD_TABLE varchar(64) YES NULL -ACTION_REFERENCE_NEW_TABLE varchar(64) YES NULL -ACTION_REFERENCE_OLD_ROW varchar(3) NO -ACTION_REFERENCE_NEW_ROW varchar(3) NO -CREATED datetime YES NULL -SQL_MODE longtext NO NULL -DEFINER longtext NO NULL -SHOW CREATE TABLE triggers; -Table Create Table -TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(4096) default NULL, - `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', - `TRIGGER_NAME` varchar(64) NOT NULL default '', - `EVENT_MANIPULATION` varchar(6) NOT NULL default '', - `EVENT_OBJECT_CATALOG` varchar(4096) default NULL, - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', - `ACTION_ORDER` bigint(4) NOT NULL default '0', - `ACTION_CONDITION` longtext, - `ACTION_STATEMENT` longtext NOT NULL, - `ACTION_ORIENTATION` varchar(9) NOT NULL default '', - `ACTION_TIMING` varchar(6) NOT NULL default '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', - `CREATED` datetime default NULL, - `SQL_MODE` longtext NOT NULL, - `DEFINER` longtext NOT NULL -) ENGINE=MyISAM DEFAULT CHARSET=utf8 -SELECT COUNT(*) FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -COUNT(*) -19 -SELECT * FROM information_schema.columns -WHERE table_schema = 'information_schema' - AND table_name = 'triggers' -ORDER BY ordinal_position; -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT -NULL information_schema TRIGGERS TRIGGER_CATALOG 1 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS TRIGGER_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS TRIGGER_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 4096 12288 NULL NULL utf8 utf8_general_ci varchar(4096) select -NULL information_schema TRIGGERS EVENT_OBJECT_SCHEMA 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS EVENT_OBJECT_TABLE 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_ORDER 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select -NULL information_schema TRIGGERS ACTION_CONDITION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS ACTION_ORIENTATION 11 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select -NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_TABLE 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS ACTION_REFERENCE_NEW_ROW 16 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TRIGGERS SQL_MODE 18 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select -NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select - -Testcase 3.2.18.2 + 3.2.18.3: --------------------------------------------------------------------------------- - -Testcase 3.2.19.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC parameters; -ERROR 42S02: Unknown table 'parameters' in information_schema - -Testcase 3.2.20.1: --------------------------------------------------------------------------------- - -checking a table that will be implemented later ------------------------------------------------ -DESC referential_constraints; -ERROR 42S02: Unknown table 'referential_constraints' in information_schema - -*** End of Data Dictionary Tests *** --------------------------------------------------------------------------------- -DROP TABLE IF EXISTS test.tb1; -DROP TABLE IF EXISTS test.tb2; -DROP TABLE IF EXISTS test.tb3; -DROP TABLE IF EXISTS test.tb4; -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.t7; -DROP TABLE IF EXISTS test.t8; -DROP TABLE IF EXISTS test.t9; -DROP TABLE IF EXISTS test.t10; -DROP TABLE IF EXISTS test.t11; -DROP DATABASE IF EXISTS test1; -DROP DATABASE IF EXISTS test4; -DROP DATABASE IF EXISTS db_datadict; -DROP DATABASE IF EXISTS db_datadict_1; -DROP DATABASE IF EXISTS db_datadict_2; diff --git a/mysql-test/suite/funcs_1/r/myisam__load.result b/mysql-test/suite/funcs_1/r/myisam__load.result deleted file mode 100644 index c1b9c89b257..00000000000 --- a/mysql-test/suite/funcs_1/r/myisam__load.result +++ /dev/null @@ -1 +0,0 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); diff --git a/mysql-test/suite/funcs_1/r/myisam_bitdata.result b/mysql-test/suite/funcs_1/r/myisam_bitdata.result index 8d78b70c333..917157fcdae 100644 --- a/mysql-test/suite/funcs_1/r/myisam_bitdata.result +++ b/mysql-test/suite/funcs_1/r/myisam_bitdata.result @@ -1,76 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb4 ; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f227 VARBINARY(64), -f228 VARBINARY(27), -f229 VARBINARY(64), -f230 VARBINARY(192), -f231 VARBINARY(192), -f232 VARBINARY(27), -f233 VARBINARY(64), -f234 VARBINARY(192), -f235 char(255) unicode, -f236 char(60) ascii, -f237 char(255) binary, -f238 varchar(0) binary, -f239 varbinary(1000), -f240 varchar(120) unicode, -f241 char(100) unicode, -f242 bit(30) -) engine = myisam; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb4.txt' into table tb4 ; NOT YET IMPLEMENTED: bitdata tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_cursors.result b/mysql-test/suite/funcs_1/r/myisam_cursors.result index 35b567105f7..9f20e51204b 100644 --- a/mysql-test/suite/funcs_1/r/myisam_cursors.result +++ b/mysql-test/suite/funcs_1/r/myisam_cursors.result @@ -1,84 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char, -f2 char binary, -f3 char ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal not null DEFAULT 9.9, -f34 decimal unsigned not null DEFAULT 9.9, -f35 decimal zerofill not null DEFAULT 9.9, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = myisam; -Warnings: -Note 1265 Data truncated for column 'f33' at row 1 -Note 1265 Data truncated for column 'f34' at row 1 -Note 1265 Data truncated for column 'f35' at row 1 -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/myisam_tb1.txt' into table tb1 ; NOT YET IMPLEMENTED: cursor tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result index 7a16c10859b..aff27fbabc4 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result index e20c32967e9..0057b7ef229 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result index 11b1d3873b3..a85c4347962 100644 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result index e4330211306..0865d77e4f0 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result index 4dda7ef69ae..3e612817200 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result index 33a51a7edbe..b24e222fc4b 100755 --- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result +++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result index 6dd56a1e912..08ad956b167 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0102.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -362,3 +361,4 @@ select @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/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index 3dbfa77b464..42e984245e3 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -749,3 +748,4 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result index 16d91726e30..4e578888fe5 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_0407.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -478,3 +477,4 @@ 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/myisam_trig_08.result b/mysql-test/suite/funcs_1/r/myisam_trig_08.result index 8a13e91d71d..bab8d0f2ddd 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_08.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_08.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -497,3 +496,4 @@ Testcase 3.5.8.7: (Disabled as a result of bug _____) 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/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result index b7a5933e2f7..7cbcd8a6862 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -269,3 +268,4 @@ 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/myisam_trig_1011ext.result b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result index 7867fc9f9e2..c991fb67ec1 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_1011ext.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -404,3 +403,4 @@ 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/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 6f80aa12097..751c2c2be3b 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb2 ; create table tb2 ( @@ -11447,4 +11446,5 @@ DROP VIEW IF EXISTS v1_secondview; DROP VIEW IF EXISTS v2; DROP DATABASE IF EXISTS test2; DROP DATABASE IF EXISTS test3; -DROP DATABASE IF EXISTS test1; +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc index 6dafa23f840..b7f7b2cae02 100644 --- a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc +++ b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc @@ -12,9 +12,6 @@ let $message= --source suite/funcs_1/storedproc/load_sp_tb.inc; --disable_abort_on_error --enable_query_log -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; - # use the same .inc to cleanup before and after the test --source suite/funcs_1/storedproc/cleanup_sp_tb.inc diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_03.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_06.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_07.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_08.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_08_show.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_10.inc old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/charset_collation_1.test b/mysql-test/suite/funcs_1/t/charset_collation_1.test new file mode 100644 index 00000000000..7415220455e --- /dev/null +++ b/mysql-test/suite/funcs_1/t/charset_collation_1.test @@ -0,0 +1,30 @@ +# Tests checking the content of the information_schema tables +# character_sets +# collations +# collation_character_set_applicability +# +# Content variant 1 which should fit to +# Enterprise or Classic builds (binaries provided by MySQL) +# Pushbuilds +# Source builds without "max" +# +# Please read suite/funcs_1/datadict/charset_collation.inc for +# additional information. +# +# Created: +# 2007-12-18 mleich - remove the unstable character_set/collation subtests +# from include/datadict-master.inc +# - create this new test +# + +if (`SELECT EXISTS (SELECT 1 FROM information_schema.collations + WHERE collation_name = 'utf8_general_cs') + OR ( @@version_comment NOT LIKE '%Source%' + AND @@version_comment NOT LIKE '%Enterprise%' + AND @@version_comment NOT LIKE '%Classic%' + AND @@version_comment NOT LIKE '%Pushbuild%')`) +{ + skip Test needs Enterprise, Classic , Pushbuild or Source-without-max build; +} + +--source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_2.test b/mysql-test/suite/funcs_1/t/charset_collation_2.test new file mode 100644 index 00000000000..d4924953b7d --- /dev/null +++ b/mysql-test/suite/funcs_1/t/charset_collation_2.test @@ -0,0 +1,24 @@ +# Tests checking the content of the information_schema tables +# character_sets +# collations +# collation_character_set_applicability +# +# Content variant 2 (compile from source with "max") +# +# Please read suite/funcs_1/datadict/charset_collation.inc for +# additional information. +# +# Created: +# 2007-12-18 mleich - remove the unstable character_set/collation subtests +# from include/datadict-master.inc +# - create this new test +# + +if (`SELECT @@version_comment NOT LIKE '%Source%' + OR NOT EXISTS (SELECT 1 FROM information_schema.collations + WHERE collation_name = 'utf8_general_cs')`) +{ + skip Test needs Source build with "max"; +} + +--source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/charset_collation_3.test b/mysql-test/suite/funcs_1/t/charset_collation_3.test new file mode 100644 index 00000000000..0701b96896f --- /dev/null +++ b/mysql-test/suite/funcs_1/t/charset_collation_3.test @@ -0,0 +1,24 @@ +# Tests checking the content of the information_schema tables +# character_sets +# collations +# collation_character_set_applicability +# +# Content variant 3 which should fit to +# Community and Cluster builds (binaries provided by MySQL) +# +# Please read suite/funcs_1/datadict/charset_collation.inc for +# additional information. +# +# Created: +# 2007-12-18 mleich - remove the unstable character_set/collation subtests +# from include/datadict-master.inc +# - create this new test +# + +if (`SELECT @@version_comment NOT LIKE '%Community%' + AND @@version_comment NOT LIKE '%Cluster%'`) +{ + skip Test needs Community or Cluster build; +} + +--source suite/funcs_1/datadict/charset_collation.inc diff --git a/mysql-test/suite/funcs_1/t/datadict_help_tables_build.test b/mysql-test/suite/funcs_1/t/datadict_help_tables_build.test deleted file mode 100644 index 370fcf0375c..00000000000 --- a/mysql-test/suite/funcs_1/t/datadict_help_tables_build.test +++ /dev/null @@ -1,73 +0,0 @@ -###### suite/funcs_1/t/datadict_help_tables_dev.test ##### -# -# Check the information about the help tables within -# INFORMATION_SCHEMA.TABLES/INFORMATION_SCHEMA.STATISTICS -# -# Variant for use during build tests (non empty help tables) -# -# Creation: -# 2007-08-25 mleich Add this test as compensation for the -# checks removed within datadict_master.inc. -# - -let $c_help_category= `SELECT COUNT(*) FROM mysql.help_category`; -let $c_help_keyword= `SELECT COUNT(*) FROM mysql.help_keyword`; -let $c_help_relation= `SELECT COUNT(*) FROM mysql.help_relation`; -let $c_help_topic= `SELECT COUNT(*) FROM mysql.help_topic`; - -if (`SELECT $c_help_category + $c_help_keyword + $c_help_relation - + $c_help_topic = 0`) -{ - --skip # Test requires non empty help tables = Build test configuration -} - -# We reach this point when we run on a configuration with at least one -# non empty help table. -# 2007-08 MySQL 5.0 row count of the help tables -# help_category help_keyword help_relation help_topic -# 36 395 809 466 -# Let's assume for all help tables that their content never dramatic -# shrinks and do some plausibility checks. -let $limit_help_category = 30; -let $limit_help_keyword = 320; -let $limit_help_relation = 640; -let $limit_help_topic = 380; -if (`SELECT $c_help_category < $limit_help_category - OR $c_help_keyword < $limit_help_keyword - OR $c_help_relation < $limit_help_relation - OR $c_help_topic < $limit_help_topic`) -{ - --echo # The row count within the help tables is unexepected small. - SELECT COUNT(*), 'exepected: >= $limit_help_category' FROM mysql.help_category; - SELECT COUNT(*), 'exepected: >= $limit_help_keyword' FROM mysql.help_keyword; - SELECT COUNT(*), 'exepected: >= $limit_help_relation' FROM mysql.help_relation; - SELECT COUNT(*), 'exepected: >= $limit_help_topic' FROM mysql.help_topic; - --echo # Either the current help table content (build problem? or - --echo # the expected minimum row count within this script is wrong. - --echo # Abort - exit; -} - -# Enforce a static number of rows within the help tables. -let $limit= `SELECT $c_help_category - $limit_help_category`; ---replace_result $limit -eval DELETE FROM mysql.help_category LIMIT $limit; -# -let $limit= `SELECT $c_help_keyword - $limit_help_keyword`; ---replace_result $limit -eval DELETE FROM mysql.help_keyword LIMIT $limit; -# -let $limit= `SELECT $c_help_relation - $limit_help_relation`; ---replace_result $limit -eval DELETE FROM mysql.help_relation LIMIT $limit; -# -let $limit= `SELECT $c_help_topic - $limit_help_topic`; ---replace_result $limit -eval DELETE FROM mysql.help_topic LIMIT $limit; - - ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -SELECT * FROM INFORMATION_SCHEMA.STATISTICS -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; diff --git a/mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test b/mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test deleted file mode 100644 index 3342fbca4be..00000000000 --- a/mysql-test/suite/funcs_1/t/datadict_help_tables_dev.test +++ /dev/null @@ -1,27 +0,0 @@ -###### suite/funcs_1/t/datadict_help_tables_dev.test ##### -# -# Check the information about the help tables within -# INFORMATION_SCHEMA.TABLES/INFORMATION_SCHEMA.STATISTICS -# -# Variant for use during development (empty help tables) -# -# Creation: -# 2007-08-25 mleich Add this test as compensation for the -# checks removed within datadict_master.inc. -# - -let $c_help_category= `SELECT COUNT(*) FROM mysql.help_category`; -let $c_help_keyword= `SELECT COUNT(*) FROM mysql.help_keyword`; -let $c_help_relation= `SELECT COUNT(*) FROM mysql.help_relation`; -let $c_help_topic= `SELECT COUNT(*) FROM mysql.help_topic`; -if (`SELECT $c_help_category + $c_help_keyword + $c_help_relation - + $c_help_topic > 0`) -{ - --skip # Test requires empty help tables = Development test configuration -} - ---replace_column 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "YYYY-MM-DD hh:mm:ss" 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" -SELECT * FROM INFORMATION_SCHEMA.TABLES -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; -SELECT * FROM INFORMATION_SCHEMA.STATISTICS -WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME LIKE 'help_%'; diff --git a/mysql-test/suite/funcs_1/t/innodb__datadict.test b/mysql-test/suite/funcs_1/t/innodb__datadict.test deleted file mode 100644 index 587ab1d6588..00000000000 --- a/mysql-test/suite/funcs_1/t/innodb__datadict.test +++ /dev/null @@ -1,11 +0,0 @@ -#### suite/funcs_1/t/datadict_innodb.test -# ---source include/have_innodb.inc - -let $engine_type= innodb; -# $OTHER_ENGINE_TYPE must be -# - <> $engine_type -# - all time available like MyISAM or MEMORY -let $OTHER_ENGINE_TYPE= MEMORY; - ---source suite/funcs_1/datadict/datadict_master.inc diff --git a/mysql-test/suite/funcs_1/t/innodb__load.test b/mysql-test/suite/funcs_1/t/innodb__load.test deleted file mode 100644 index d03672b31ff..00000000000 --- a/mysql-test/suite/funcs_1/t/innodb__load.test +++ /dev/null @@ -1,47 +0,0 @@ -##### suite/funcs_1/funcs_1/t/innodb__load.test - -# InnoDB tables should be used -# -# 1. Check if InnoDB is available ---source include/have_innodb.inc -# 2. Set $engine_type -let $engine_type= innodb; - -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means all objects have to be (re)created within the current script. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means the current script must not (re)create any object and every -# testscript/case (re)creates only the objects it needs. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb1.inc - --source suite/funcs_1/include/innodb_tb2.inc - --source suite/funcs_1/include/innodb_tb3.inc - --source suite/funcs_1/include/innodb_tb4.inc - - # The database test1 is needed for the VIEW testcases - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/innodb_tb2.inc - USE test; - - # These tables are needed for the stored procedure testscases - --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; -} - diff --git a/mysql-test/suite/funcs_1/t/innodb_bitdata.test b/mysql-test/suite/funcs_1/t/innodb_bitdata.test index 24d5f077d96..b178aac598c 100644 --- a/mysql-test/suite/funcs_1/t/innodb_bitdata.test +++ b/mysql-test/suite/funcs_1/t/innodb_bitdata.test @@ -7,28 +7,11 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: bitdata tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb4.inc - - let $run= 0; -} - +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb4.inc --source suite/funcs_1/bitdata/bitdata_master.test - diff --git a/mysql-test/suite/funcs_1/t/innodb_cursors.test b/mysql-test/suite/funcs_1/t/innodb_cursors.test index 8d77045f2e7..a75e5cbba05 100644 --- a/mysql-test/suite/funcs_1/t/innodb_cursors.test +++ b/mysql-test/suite/funcs_1/t/innodb_cursors.test @@ -7,28 +7,13 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: cursor tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb1.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb1.inc --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_02.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_02.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_03.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_03.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_06.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_06.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_07.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_07.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_08.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_08.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_storedproc_10.test b/mysql-test/suite/funcs_1/t/innodb_storedproc_10.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test index edd706b9e5d..c1da8f5448e 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0102.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/triggers_0102.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03.test b/mysql-test/suite/funcs_1/t/innodb_trig_03.test index 5f931e1be47..374bcf59a37 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_03.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_03.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/triggers_03.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test index da8a074bab6..d6b7d4a9942 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_0407.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc --source suite/funcs_1/triggers/triggers_0407.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_08.test b/mysql-test/suite/funcs_1/t/innodb_trig_08.test index 05aabe8b0f5..a4ac2db0955 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_08.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_08.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/triggers_08.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_09.test b/mysql-test/suite/funcs_1/t/innodb_trig_09.test index ac21142779e..40a0f145ef0 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_09.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_09.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/triggers_09.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test index a507a488ca9..f778b097a1b 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_1011ext.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/triggers_1011ext.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test index e99273672cd..57298fd9056 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_frkey.test @@ -7,28 +7,10 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb3.inc - - let $run= 0; -} - --source suite/funcs_1/triggers/trig_frkey.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/innodb_views.test b/mysql-test/suite/funcs_1/t/innodb_views.test index 1a835779762..dcab8ec305b 100644 --- a/mysql-test/suite/funcs_1/t/innodb_views.test +++ b/mysql-test/suite/funcs_1/t/innodb_views.test @@ -7,40 +7,18 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/innodb_tb2.inc +--disable_warnings +DROP DATABASE IF EXISTS test1; +--enable_warnings +CREATE DATABASE test1; +USE test1; +--source suite/funcs_1/include/innodb_tb2.inc +USE test; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/innodb_tb2.inc - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/innodb_tb2.inc - USE test; - -} - --source suite/funcs_1/views/views_master.inc - -# If we created the database in the above loop we now need to drop it -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - DROP DATABASE IF EXISTS test1; -} +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test new file mode 100644 index 00000000000..8097c3ab3b1 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test @@ -0,0 +1,503 @@ +# suite/funcs_1/t/is_basics_mixed.test +# +# Checks of some basic properties of the INFORMATION_SCHEMA which are not +# related to a certain INFORMATION_SCHEMA table. +# +# This test should not check properties related to storage engines. +# +# 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. +# + +--source suite/funcs_1/datadict/datadict.pre + +# $engine_type must point to storage engine which is all time available. +# The fastest engine should be preferred. +let $engine_type = MEMORY; + + +# The INFORMATION_SCHEMA database must exist. +SHOW DATABASES LIKE 'information_schema'; + + +--echo ####################################################################### +--echo # Testcase 3.2.1.20: USE INFORMATION_SCHEMA is supported +--echo ####################################################################### +# Ensure that USE INFORMATION_SCHEMA allows the user to switch to the +# INFORMATION_SCHEMA database, for query purposes only. +# +# Note: The "for query purposes only" is checked in other tests. +# High privileged user (root) +--echo # Switch to connection default +connection default; +USE test; +SELECT DATABASE(); +USE information_schema; +SELECT DATABASE(); +# +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +# Low privileged user +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +SELECT DATABASE(); +USE information_schema; +SELECT DATABASE(); +# +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER 'testuser1'@'localhost'; + + +--echo ####################################################################### +--echo # Testcase TBD1: The INFORMATION_SCHEMA cannot be dropped. +--echo ####################################################################### +--error ER_DBACCESS_DENIED_ERROR +DROP DATABASE information_schema; + + +--echo ####################################################################### +--echo # Testcase TBD2: There cannot be a second database INFORMATION_SCHEMA. +--echo ####################################################################### +--error ER_DBACCESS_DENIED_ERROR +CREATE DATABASE information_schema; + + +--echo ################################################################################## +--echo # Testcase 3.2.1.6+3.2.1.7: No user may create an INFORMATION_SCHEMA table or view +--echo ################################################################################## +# 3.2.1.6 Ensure that no user may create an INFORMATION_SCHEMA base table. +# 3.2.1.7 Ensure that no user may create an INFORMATION_SCHEMA view +# + +# 1. High privileged user (root) +--echo # Switch to connection default (user=root) +connection default; +--source suite/funcs_1/datadict/basics_mixed1.inc + +# 2. High privileged user (testuser1) +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON *.* TO testuser1@localhost; +SHOW GRANTS FOR testuser1@localhost; +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +--source suite/funcs_1/datadict/basics_mixed1.inc + +--echo # Switch to connection default (user=root) and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER 'testuser1'@'localhost'; + +--echo ############################################################################### +--echo # Testcase 3.2.1.1+3.2.1.2: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ############################################################################### +# 3.2.1.1 Ensure that every INFORMATION_SCHEMA table can be queried with +# a SELECT statement, just as if it were an ordinary user-defined table. +# 3.2.1.2 Ensure that queries on an INFORMATION_SCHEMA table can accept all +# SELECT statement options and are always correctly evaluated. +# +# Some notes(mleich): +# - Currently here only a subset of select statement options is checked, it's +# still not possible to check here all possible options +# - The content of many INFORMATION_SCHEMA tables is checked in other tests. +# - We work here only with a subset of the columns of information_schema.tables +# because we want have a stable base (all time existing table, stable layout). +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_first (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_second (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = $engine_type; + +# SELECT * +--echo # Attention: The protocolling of the next result set is disabled. +--disable_result_log +SELECT * FROM information_schema.tables; +--enable_result_log +# +# SELECT + WHERE +--sorted_result +SELECT table_name FROM information_schema.tables +WHERE table_schema = 'db_datadict'; +# +# SELECT string_function() + ORDER BY +SELECT LENGTH(table_name) FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +# +# SELECT aggregate_function() + WHERE with LIKE +SELECT count(table_name) FROM information_schema.tables +WHERE table_schema LIKE 'db_datadic%'; +# +# SELECT with addition in column list +--sorted_result +SELECT CAST((LENGTH(table_schema) + LENGTH(table_name)) AS DECIMAL(15,1)) +FROM information_schema.tables +WHERE table_schema = 'db_datadict'; +# +# WHERE with IN + LIMIT +SELECT table_name FROM information_schema.tables +WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1; +SELECT table_name FROM information_schema.tables +WHERE table_name IN ('t1_first','t1_second') ORDER BY table_name LIMIT 1,1; +# +# WHERE with AND +SELECT table_name,table_schema AS my_col FROM information_schema.tables +WHERE table_name = 't1_first' AND table_schema = 'db_datadict'; +# +# SELECT HIGH_PRIORITY + WHERE with OR +--sorted_result +SELECT HIGH_PRIORITY table_name AS my_col FROM information_schema.tables +WHERE table_name = 't1_first' OR table_name = 't1_second'; +# +# Empty result set +SELECT 1 AS my_col FROM information_schema.tables +WHERE table_name = 't1_third'; +# +# SELECT INTO USER VARIABLE +SELECT table_name,table_schema INTO @table_name,@table_schema +FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name LIMIT 1; +SELECT @table_name,@table_schema; +# +# SELECT INTO OUTFILE +let $OUTFILE = $MYSQL_TMP_DIR/datadict.out; +--error 0,1 +remove_file $OUTFILE; +--replace_result $OUTFILE +eval SELECT table_name,table_schema +INTO OUTFILE '$OUTFILE' +FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' +LINES TERMINATED BY '\n' +FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +cat_file $OUTFILE; +remove_file $OUTFILE; +# +# UNION +--sorted_result +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_first' +UNION ALL +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_second'; +# +# DISTINCT + SUBQUERY +SELECT DISTINCT table_schema FROM information_schema.tables +WHERE table_name IN (SELECT table_name FROM information_schema.tables + WHERE table_schema = 'db_datadict') +ORDER BY table_name; +# +# JOIN +SELECT table_name FROM information_schema.tables t1 +LEFT JOIN information_schema.tables t2 USING(table_name,table_schema) +WHERE t2.table_schema = 'db_datadict' +ORDER BY table_name; +# +# No schema assigned in SELECT + we are in SCHEMA test +# --> The table tables does not exist +USE test; +--error ER_NO_SUCH_TABLE +SELECT * FROM tables; + + +--echo ######################################################################### +--echo # Testcase 3.2.1.17+3.2.1.18 +--echo ######################################################################### +# 3.2.1.17: Ensure that the SELECT privilege is granted TO PUBLIC WITH GRANT +# OPTION on every INFORMATION_SCHEMA table. +# +# 3.2.1.18: Ensure that the CREATE VIEW privilege on an INFORMATION_SCHEMA table +# may be granted to any user. +# +# Note (mleich): The requirements are to some extend outdated. +# Every user is allowed to SELECT on the INFORMATION_SCHEMA. +# But the result sets depend on the privileges of the user. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT UNIQUE, f2 BIGINT) +ENGINE = $engine_type; +SELECT * FROM db_datadict.t1; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +GRANT CREATE VIEW,SELECT ON db_datadict.* TO testuser1@localhost +WITH GRANT OPTION; +GRANT USAGE ON db_datadict.* TO testuser2@localhost; +FLUSH PRIVILEGES; + +# Check 0: Reveal that GRANT ON INFORMATION_SCHEMA is no +# longer allowed. +--error ER_DBACCESS_DENIED_ERROR +GRANT SELECT on information_schema.* TO testuser1@localhost; +--error ER_DBACCESS_DENIED_ERROR +GRANT CREATE VIEW ON information_schema.* TO 'u_6_401018'@'localhost'; + +# Check 1: Show that a "simple" user (<> root) has the permission to SELECT +# on some INFORMATION_SCHEMA table. +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_schema = 'information_schema' AND table_name = 'tables'; + +# Check 2: Show the privileges of the user on some INFORMATION_SCHEMA tables. +SELECT * FROM information_schema.table_privileges +WHERE table_schema = 'information_schema'; +SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'information_schema'; + +# Check 3: Show the following +# 1. If a simple user (testuser1) has the privilege to create a VIEW +# than this VIEW could use a SELECT on an INFORMATION_SCHEMA table. +# 2. This user (testuser1) is also able to GRANT the SELECT privilege +# on this VIEW to another user (testuser2). +# 3. The other user (testuser2) must be able to SELECT on this VIEW +# but gets a different result set than testuser1. +CREATE VIEW db_datadict.v2 AS +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM db_datadict.v2; +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; +GRANT SELECT ON db_datadict.v2 to testuser2@localhost; +# +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM db_datadict.v2; +SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE +FROM information_schema.tables WHERE table_schema = 'db_datadict'; + +# Cleanup +--echo # Switch to connection default and close connections testuser1 and testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################### +--echo # Testcase 3.2.1.19 +--echo ######################################################################### +# Ensure that no other privilege on an INFORMATION_SCHEMA table is granted, or +# may be granted, to any user. +# +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; + +# Initial privileges on the INFORMATION_SCHEMA tables (empty result sets) +let $my_select1 = SELECT 'empty result set was expected' AS my_col +FROM information_schema.schema_privileges +WHERE table_schema = 'information_schema'; +let $my_select2 = SELECT 'empty result set was expected' AS my_col +FROM information_schema.table_privileges +WHERE table_schema = 'information_schema'; +let $my_select3 = SELECT 'empty result set was expected' AS my_col +FROM information_schema.column_privileges +WHERE table_schema = 'information_schema'; +eval $my_select1; +eval $my_select2; +eval $my_select3; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT ALTER ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT ALTER ROUTINE ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT CREATE ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT CREATE ROUTINE ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT CREATE TEMPORARY TABLES ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT DELETE ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT DROP ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT EXECUTE ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT INDEX ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT INSERT ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT LOCK TABLES ON information_schema.* +TO 'testuser1'@'localhost'; + +#FIXME: check GRANT on IS +--error ER_DBACCESS_DENIED_ERROR +GRANT UPDATE ON information_schema.* +TO 'testuser1'@'localhost'; + +# Has something accidently changed? +eval $my_select1; +eval $my_select2; +eval $my_select3; + +# Cleanup +DROP USER 'testuser1'@'localhost'; + + +--echo ######################################################################### +--echo # Testcase 3.2.1.16 +--echo ######################################################################### +# Ensure that no user may use any INFORMATION_SCHEMA table to determine any +# information on a database and/or its structure unless authorized to get that +# information. +# Note: The plan is to create a new database and objects within it so that +# any INFORMATION_SCHEMA table gets additional rows if possible. +# A user having no rights on the new database and no rights on objects +# must nowhere see tha name of the new database. +--source suite/funcs_1/datadict/basics_mixed3.inc + +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT NOT NULL, f3 BIGINT, +PRIMARY KEY(f1)) +ENGINE = $engine_type; +CREATE UNIQUE INDEX UIDX ON db_datadict.t1(f3); +CREATE PROCEDURE db_datadict.sproc1() SELECT 'db_datadict'; +CREATE FUNCTION db_datadict.func1() RETURNS INT RETURN 0; +CREATE TRIGGER db_datadict.trig1 BEFORE INSERT ON db_datadict.t1 +FOR EACH ROW SET @aux = 1; +CREATE VIEW db_datadict.v1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v2 AS SELECT * FROM information_schema.tables; + +--source suite/funcs_1/datadict/basics_mixed3.inc + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON test.* TO 'testuser1'@'localhost'; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +--source suite/funcs_1/datadict/basics_mixed3.inc + +# Cleanup +--echo # Switch to connection default and close connections testuser1 and testuser2 +connection default; +disconnect testuser1; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# Thorough tests checking the requirements above per every INFORMATION_SCHEMA +# table are within other scripts. +# We check here only that the requirement is fulfilled even when using a +# STORED PROCEDURE. +--disable_warnings +DROP PROCEDURE IF EXISTS test.p1; +--enable_warnings +CREATE PROCEDURE test.p1() +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables LIMIT 1; +--error ER_DBACCESS_DENIED_ERROR +CALL test.p1(); + +DROP PROCEDURE test.p1; +CREATE PROCEDURE test.p1() +UPDATE information_schema.columns SET table_schema = 'garbage'; +--error ER_DBACCESS_DENIED_ERROR +CALL test.p1(); + +DROP PROCEDURE test.p1; +CREATE PROCEDURE test.p1() +DELETE FROM information_schema.schemata; +--error ER_DBACCESS_DENIED_ERROR +CALL test.p1(); + +DROP PROCEDURE test.p1; + + +--echo ######################################################################### +--echo # Testcase 3.2.17.1+3.2.17.2: To be implemented outside of this script +--echo ######################################################################### +# 3.2.17.1 Ensure that every INFORMATION_SCHEMA table shows all the correct +# information, and no incorrect information, for a database to which +# 100 different users, each of which has a randomly issued set of +# privileges and access to a randomly chosen set of database objects, +# have access. +# The database should contain a mixture of all types of database +# objects (i.e. tables, views, stored procedures, triggers). +# 3.2.17.2 Ensure that every INFORMATION_SCHEMA table shows all the correct +# information, and no incorrect information, for 10 different +# databases to which 50 different users, each of which has a randomly +# issued set of privileges and access to a randomly chosen set of +# database objects in two or more of the databases, have access. +# The databases should each contain a mixture of all types of database +# objects (i.e. tables, views, stored procedures, triggers). +# +# Note(mleich): These requirements are kept here so that they do not get lost. +# The tests are not yet implemented. +# If they are ever developed than they should be stored in other +# scripts. They will have most probably a long runtime because +# the current INFORMATION_SCHEMA implementation has some performance +# issues if a lot of users, privileges and objects are involved. +# diff --git a/mysql-test/suite/funcs_1/t/is_character_sets.test b/mysql-test/suite/funcs_1/t/is_character_sets.test new file mode 100644 index 00000000000..dbb35587eab --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_character_sets.test @@ -0,0 +1,107 @@ +# suite/funcs_1/t/is_character_sets.test +# +# Check the layout of information_schema.character_sets and run some +# functionality related tests. +# +# 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. +# + +let $is_table = CHARACTER_SETS; + +# The table INFORMATION_SCHEMA.CHARACTER_SETS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.2.1: INFORMATION_SCHEMA.CHARACTER_SETS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.CHARACTER_SETS table has the following +# columns, in the following order: +# +# CHARACTER_SET_NAME (shows a character set name), +# DEFAULT_COLLATE_NAME (shows the name of the default collation for that +# character set), +# DESCRIPTION (shows a descriptive name for that character set), +# MAXLEN (shows the number of bytes used to store each character supported by +# that character set). +# +eval DESCRIBE information_schema.$is_table; +eval SHOW CREATE TABLE information_schema.$is_table; +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.character_sets is in is_columns_is.test. +# Retrieval of information_schema.character_sets content is in +# charset_collation.inc (sourced by charset_collation_*.test). + + +echo # Testcases 3.2.2.2 and 3.2.2.3 are checked in suite/funcs_1/t/charset_collation*.test; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.character_sets +SELECT * FROM information_schema.character_sets; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.character_sets SET description = 'just updated'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.character_sets WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.character_sets; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx ON information_schema.character_sets(character_set_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.character_sets DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.character_sets ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.character_sets; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.character_sets RENAME db_datadict.character_sets; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.character_sets +RENAME information_schema.xcharacter_sets; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test b/mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test new file mode 100644 index 00000000000..6572d8e5d55 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_collation_character_set_applicability.test @@ -0,0 +1,108 @@ +# suite/funcs_1/t/is_collation_character_set_applicability.test +# +# Check the layout of information_schema.collation_character_set_applicability +# and some functionality realted tests. +# +# 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. +# + +let $is_table = COLLATION_CHARACTER_SET_APPLICABILITY; + +# The table INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.4.1: INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.CHARACTER_SET_APPLICABILITY table has the +# following columns, in the following order: +# +# COLLATION_NAME (shows the name of a collation), +# CHARACTER_SET_NAME (shows the name of a character set to which that +# collation applies). +# +eval DESCRIBE information_schema.$is_table; +eval SHOW CREATE TABLE information_schema.$is_table; +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.collation_character_set_applicability is in +# is_columns_is.test. +# Retrieval of information_schema.collation_character_set_applicability +# content is in charset_collation.inc (sourced by charset_collation_*.test). + +echo # Testcases 3.2.4.2 and 3.2.4.3 are checked in suite/funcs_1/t/charset_collation*.test; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.collation_character_set_applicability +SELECT * FROM information_schema.collation_character_set_applicability; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.collation_character_set_applicability +SET collation_name = 'big6_chinese_ci' WHERE character_set_name = 'big6'; +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.collation_character_set_applicability +SET character_set_name = 't_4711'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.collation_character_set_applicability; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.collation_character_set_applicability; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx +ON information_schema.collation_character_set_applicability(collation_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collation_character_set_applicability ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.collation_character_set_applicability; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collation_character_set_applicability +RENAME db_datadict.collation_character_set_applicability; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collation_character_set_applicability +RENAME information_schema.xcollation_character_set_applicability; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_collations.test b/mysql-test/suite/funcs_1/t/is_collations.test new file mode 100644 index 00000000000..e807b3cb028 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_collations.test @@ -0,0 +1,114 @@ +# suite/funcs_1/t/is_collations.test +# +# Check the layout of information_schema.collations and some +# functionality related tests. +# +# 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. +# + +let $is_table = COLLATIONS; + +# The table INFORMATION_SCHEMA.COLLATIONS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.3.1: INFORMATION_SCHEMA.COLLATIONS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.COLLATIONS table has the following +# columns, in the following order: +# +# COLLATION_NAME (shows a collation name), +# CHARACTER_SET_NAME (shows the name of the character set to which the +# collation applies), +# ID (shows a numeric identifier for that collation/character set combination), +# IS_DEFAULT (shows whether the collation is the default collation for the +# character set shown), +# IS_COMPILED (indicates whether the collation is compiled into the MySQL server), +# SORTLEN (shows a value related to the amount of memory required to sort +# strings using this collation/character set combination). +# +eval DESCRIBE information_schema.$is_table; +eval SHOW CREATE TABLE information_schema.$is_table; +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.collations is in is_columns_is.test. +# Retrieval of information_schema.collations content is in +# charset_collation.inc (sourced by charset_collation_*.test). + +echo # Testcases 3.2.3.2 and 3.2.3.3 are checked in suite/funcs_1/t/charset_collation*.test; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.collations +SELECT * FROM information_schema.collations; +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.collations + (collation_name,character_set_name,id,is_default,is_compiled,sortlen) +VALUES ( 'cp1251_bin', 'cp1251',50, '', '',0); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.collations SET description = 'just updated'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.collations WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.collations; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx ON information_schema.collations(character_set_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collations DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collations ADD f1 INT; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collations ENABLE KEYS; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.collations; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collations RENAME db_datadict.collations; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.collations +RENAME information_schema.xcollations; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges.test b/mysql-test/suite/funcs_1/t/is_column_privileges.test new file mode 100644 index 00000000000..8f125051060 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_column_privileges.test @@ -0,0 +1,351 @@ +# suite/funcs_1/t/is_column_privileges.test +# +# Check the layout of information_schema.column_privileges and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = COLUMN_PRIVILEGES; + +# The table INFORMATION_SCHEMA.COLUMN_PRIVILEGES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.5.1: INFORMATION_SCHEMA.COLUMN_PRIVILEGES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.COLUMN_PRIVILEGES table has the following +# columns, in the following order: +# +# GRANTEE (shows the name of a user who has either granted, +# or been granted a column privilege), +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the schema, or database, in which the table +# for which a column privilege has been granted resides), +# TABLE_NAME (shows the name of the table), +# COLUMN_NAME (shows the name of the column on which a column privilege has +# been granted), +# PRIVILEGE_TYPE (shows the type of privilege that was granted; must be either +# SELECT, INSERT, UPDATE, or REFERENCES), +# IS_GRANTABLE (shows whether that privilege was granted WITH GRANT OPTION). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns +# about information_schema.column_privileges is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name, column_name, privilege_type +FROM information_schema.column_privileges WHERE table_catalog IS NOT NULL; + + +--echo ###################################################################### +--echo # Testcase 3.2.5.2+3.2.5.3+3.2.5.4: +--echo # INFORMATION_SCHEMA.COLUMN_PRIVILEGES accessible information +--echo ###################################################################### +# 3.2.5.2: Ensure that the table shows the relevant information on every +# column privilege which has been granted to the current user or +# PUBLIC, or which was granted by the current user. +# 3.2.5.3: Ensure that the table does not show any information on any column +# privilege which was granted to any user other than the current user +# or PUBLIC, or which was granted by any user other than +# the current user. +# 3.2.5.4: Ensure that the table does not show any information on any +# privileges that are not column privileges for the current user. +# +# Note: Check of content within information_schema.column_privileges about the +# databases information_schema, mysql and test is in +# is_column_privileges_is_mysql_test.test +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.t1 (f1 INT, f2 DECIMAL, f3 TEXT) +ENGINE = $other_engine_type; + +USE db_datadict; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT INSERT(f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT UPDATE(f2) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT(f2) ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +GRANT SELECT(f3) ON db_datadict.t1 TO 'testuser3'@'localhost'; + +GRANT INSERT, SELECT ON db_datadict.t1 TO 'testuser3'@'localhost' +WITH GRANT OPTION; +GRANT ALL ON db_datadict.* TO 'testuser3'@'localhost'; + +let $select= SELECT * FROM information_schema.column_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +eval $select; + +# Note: WITH GRANT OPTION applies to all privileges on this table +# and not to the columns mentioned only. +GRANT UPDATE(f3) ON db_datadict.t1 TO 'testuser1'@'localhost' +WITH GRANT OPTION; + +eval $select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $select; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +eval $select; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , db_datadict); + +--echo # FIXME: Is it correct that granted TABLES do not occur in COLUMN_PRIVILEGES? +SELECT * FROM information_schema.table_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee,table_schema,table_name,privilege_type; +SELECT * FROM information_schema.schema_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee,table_schema,privilege_type; +eval $select; +GRANT SELECT(f1, f3) ON db_datadict.t1 TO 'testuser2'@'localhost'; + +--echo # FIXME: Is it intended that *my* grants to others are *NOT* shown here? +eval $select; + +--echo # Switch to connection testuser2 (user=testuser2) +connection testuser2; +eval $select; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; + + +--echo ################################################################################ +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMN_PRIVILEGES modifications +--echo ################################################################################ +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +# Note (mleich): +# The MySQL privilege system allows to GRANT objects before they exist. +# (Exception: Grant privileges for columns of not existing tables/views.) +# There is also no migration of privileges if objects (tables, views, columns) +# are moved to other databases (tables only), renamed or dropped. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.my_table (f1 BIGINT, f2 CHAR(10), f3 DATE) +ENGINE = $engine_type; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT ALL ON test.* TO 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.column_privileges +WHERE table_name = 'my_table' +ORDER BY grantee, table_schema,table_name,column_name,privilege_type; +let $my_show = SHOW GRANTS FOR 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +eval $my_select; +eval $my_show; + +--echo # Switch to connection default +connection default; +GRANT SELECT (f1,f3) ON db_datadict.my_table TO 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show; + +--echo # Switch to connection default +connection default; +ALTER TABLE db_datadict.my_table DROP COLUMN f3; +GRANT UPDATE (f1) ON db_datadict.my_table TO 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show; +--error ER_BAD_FIELD_ERROR +SELECT f1, f3 FROM db_datadict.my_table; + +--echo # Switch to connection default +connection default; +ALTER TABLE db_datadict.my_table CHANGE COLUMN f1 my_col BIGINT; +eval $my_select; +eval $my_show; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show; + +--echo # Switch to connection default +connection default; +DROP TABLE db_datadict.my_table; +eval $my_select; +eval $my_show; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show; + +--echo # Switch to connection default +connection default; +REVOKE ALL ON db_datadict.my_table FROM 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show; + +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = $engine_type; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.column_privileges +SELECT * FROM information_schema.column_privileges; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.column_privileges SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.column_privileges WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.column_privileges; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_tables +ON information_schema.column_privileges(table_schema); +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.column_privileges ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.column_privileges; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.column_privileges +RENAME db_datadict.column_privileges; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.column_privileges +RENAME information_schema.xcolumn_privileges; + +# Cleanup +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; + diff --git a/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test new file mode 100644 index 00000000000..3ed8597e309 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_column_privileges_is_mysql_test.test @@ -0,0 +1,58 @@ +# suite/funcs_1/t/is_column_privileges_is_mysql_test.test +# +# Check the content of information_schema.column_privileges about the databases +# information_schema and mysql visible to high and low privileged users. +# +# 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. +# +# + +--echo ############################################################################## +--echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information +--echo ############################################################################## +# 3.2.9.2 Ensure that the table shows the relevant information for every +# database on which the current user or PUBLIC have privileges. +# 3.2.9.3 Ensure that the table does not show any information on any databases +# on which the current user and PUBLIC have no privileges. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.column_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY table_schema, table_name, column_name; +let $my_show1 = SHOW DATABASES LIKE 'information_schema'; +let $my_show2 = SHOW DATABASES LIKE 'mysql'; +let $my_show3 = SHOW DATABASES LIKE 'test'; +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +# Cleanup +--echo # Switch to connection default and close connection testuser1 +connection default; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_columns.test b/mysql-test/suite/funcs_1/t/is_columns.test new file mode 100644 index 00000000000..385de733ac3 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns.test @@ -0,0 +1,444 @@ +# suite/funcs_1/t/is_columns.test +# +# Check the layout of information_schema.columns and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on its content. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = COLUMNS; + +# The table INFORMATION_SCHEMA.COLUMNS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.6.1: INFORMATION_SCHEMA.COLUMNS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.COLUMNS table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the database, or schema, in which an +# accessible table resides), +# TABLE_NAME (shows the name of an accessible table), +# COLUMN_NAME (shows the name of a column within that table), +# ORDINAL_POSITION (shows the ordinal position of that column in that table), +# COLUMN_DEFAULT (shows the column's default value), +# IS_NULLABLE (shows whether the column may accept NULL values), +# DATA_TYPE (shows the column's defined data type; keyword only), +# CHARACTER_MAXIMUM_LENGTH (shows, for a string column, the column's defined +# maximum length in characters; otherwise NULL), +# CHARACTER_OCTET_LENGTH (shows, for a string column, the column's defined +# maximum length in octets; otherwise NULL), +# NUMERIC_PRECISION (shows, for a numeric column, the column's or data type's +# defined precision; otherwise NULL), +# NUMERIC_SCALE (shows, for a numeric column, the column's or data type's +# defined scale; otherwise NULL), +# CHARACTER_SET_NAME (shows, for a character string column, the column's default +# character set; otherwise NULL), +# COLLATION_NAME (shows, for a character string column, the column's default +# collation; otherwise NULL), +# COLUMN_TYPE (shows the column's complete, defined data type), +# COLUMN_KEY (shows whether the column is indexed; possible values are PRI if +# the column is part of a PRIMARY KEY, UNI if the column is part of a +# UNIQUE key, MUL if the column is part of an index key that allows +# duplicates), +# EXTRA (shows any additional column definition information, e.g. whether the +# column was defined with the AUTO_INCREMENT attribute), +# PRIVILEGES (shows the privileges available to the user on the column), +# COLUMN_COMMENT (shows the comment, if any, defined for the comment; +# otherwise NULL). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.columns is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name, column_name +FROM information_schema.columns WHERE table_catalog IS NOT NULL; + + +--echo ############################################################################### +--echo # Testcase 3.2.6.2 + 3.2.6.3: INFORMATION_SCHEMA.COLUMNS accessible information +--echo ############################################################################### +# 3.2.6.2: Ensure that the table shows the relevant information on the columns +# of every table that is accessible to the current user or to PUBLIC. +# 3.2.6.3: Ensure that the table does not show any information on the columns +# of any table which is not accessible to the current user or PUBLIC. +# +# Note: Check of content within information_schema.columns about +# databases is in +# mysql is_columns_mysql.test +# information_schema is_columns_is.test +# test% is_columns_.test +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; + +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.t1 + (f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT AUTO_INCREMENT, + UNIQUE INDEX MUL_IDX(f1,f3), PRIMARY KEY (f4)) +ENGINE = $other_engine_type; +CREATE VIEW db_datadict.v1 AS SELECT 1 AS f1, 1 AS f2; +GRANT SELECT(f1, f2) ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT(f2) ON db_datadict.v1 TO 'testuser1'@'localhost'; + +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.t2 +(f1 CHAR(10), f2 TEXT, f3 DATE, f4 INT, PRIMARY KEY (f1,f4)) +ENGINE = $other_engine_type; +GRANT INSERT(f1, f2) ON db_datadict.t2 TO 'testuser2'@'localhost'; + +let $my_select= SELECT * FROM information_schema.columns + WHERE table_schema = 'db_datadict' +ORDER BY table_schema, table_name, ordinal_position; +let $my_show1 = SHOW COLUMNS FROM db_datadict.t1; +let $my_show2 = SHOW COLUMNS FROM db_datadict.t2; +let $my_show3 = SHOW COLUMNS FROM db_datadict.v1; + +# Point of view of user root. +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval $my_select; +eval $my_show1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_show2; +eval $my_show3; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval $my_select; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_show1; +eval $my_show2; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_show3; + +--echo # Switch to connection default and close connections testuser1, testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; + +# Cleanup +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE IF EXISTS db_datadict; + + +--echo ############################################################################### +--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.COLUMNS modifications +--echo ############################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table (f1 CHAR(12)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible in information_schema.columns. +--vertical_results +SELECT * FROM information_schema.columns +WHERE table_name = 't1_my_table'; +--horizontal_results +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.columns +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modification of COLUMN_NAME +SELECT table_name, column_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT table_name, column_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modification of COLUMN size +SELECT table_name, column_name, character_maximum_length, + character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(20); +SELECT table_name, column_name, character_maximum_length, + character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modification of COLUMN type +SELECT table_name, column_name, character_maximum_length, + character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col VARCHAR(20); +SELECT table_name, column_name, character_maximum_length, + character_octet_length, column_type +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modify COLUMN DEFAULT +SELECT table_name, column_name, column_default +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) DEFAULT 'hello'; +SELECT table_name, column_name, column_default +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modify IS_NULLABLE +SELECT table_name, column_name, is_nullable +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) NOT NULL; +SELECT table_name, column_name, is_nullable +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modify COLLATION +SELECT table_name, column_name, collation_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) COLLATE 'latin1_general_cs'; +SELECT table_name, column_name, collation_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modify CHARACTER SET +SELECT table_name, column_name, character_maximum_length, + character_octet_length, character_set_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) CHARACTER SET utf8; +SELECT table_name, column_name, character_maximum_length, + character_octet_length, character_set_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check modify COLUMN_COMMENT +SELECT table_name, column_name, column_comment +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN first_col CHAR(10) COMMENT 'Hello'; +SELECT table_name, column_name, column_comment +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check ADD COLUMN +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +ADD COLUMN second_col CHAR(10); +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check switch ordinal position of column +SELECT table_name, column_name, ordinal_position +FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +ALTER TABLE db_datadict.t1_my_tablex +MODIFY COLUMN second_col CHAR(10) FIRST; +SELECT table_name, column_name, ordinal_position +FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +# +# Check DROP COLUMN +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check set COLUMN UNIQUE +SELECT table_name, column_name, column_key +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +ADD UNIQUE INDEX IDX(second_col); +SELECT table_name, column_name, column_key +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP TABLE +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check a VIEW +CREATE VIEW test.t1_my_tablex +AS SELECT 1 AS "col1", 'A' collate latin1_german1_ci AS "col2"; +--vertical_results +SELECT * FROM information_schema.columns +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +--horizontal_results +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP SCHEMA +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.columns +WHERE table_name = 't1_my_tablex'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1; +--enable_warnings +CREATE DATABASE db_datadict; +CREATE TABLE test.t1 (f1 BIGINT); + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.columns (table_schema,table_name,column_name) +VALUES('test','t1', 'f2'); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.columns (table_schema,table_name,column_name) +VALUES('test','t2', 'f1'); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.columns SET table_name = 't4' WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.columns WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.columns; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i3 ON information_schema.columns(table_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.columns ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.columns; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.columns RENAME db_datadict.columns; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.columns RENAME information_schema.xcolumns; + +# Cleanup +DROP TABLE test.t1; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_columns_innodb.test b/mysql-test/suite/funcs_1/t/is_columns_innodb.test new file mode 100644 index 00000000000..04b9f8354e4 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_innodb.test @@ -0,0 +1,21 @@ +# suite/funcs_1/t/is_columns_innodb.test +# +# Check the content of information_schema.columns about tables within +# the databases created by the user. +# Variant for storage engine InnoDB +# +# 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. +# + +--source include/have_innodb.inc +let $engine_type= InnoDB; +--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 + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_is.test b/mysql-test/suite/funcs_1/t/is_columns_is.test new file mode 100644 index 00000000000..41a7d180be8 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_is.test @@ -0,0 +1,19 @@ +# suite/funcs_1/t/is_columns_is.test +# +# Check the content of information_schema.columns about tables within +# the database information_schema. +# +# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL +# Community version only) and therefore we exclude it from retrieval. +# +# 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. +# + +let $my_where = WHERE table_schema = 'information_schema' +AND table_name <> 'profiling'; +# --source suite/funcs_1/datadict/datadict.pre +--source suite/funcs_1/datadict/columns.inc + diff --git a/mysql-test/suite/funcs_1/t/is_columns_memory.test b/mysql-test/suite/funcs_1/t/is_columns_memory.test new file mode 100644 index 00000000000..6cbf3b298b4 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_memory.test @@ -0,0 +1,21 @@ +# suite/funcs_1/t/is_columns_memory.test +# +# Check the content of information_schema.columns about tables within +# the databases created by the user. +# Variant for storage engine MEMORY +# +# 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. +# + +let $engine_type= MEMORY; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--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 + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_myisam.test b/mysql-test/suite/funcs_1/t/is_columns_myisam.test new file mode 100644 index 00000000000..d98cd0347c6 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_myisam.test @@ -0,0 +1,21 @@ +# suite/funcs_1/t/is_columns_myisam.test +# +# Check the content of information_schema.columns about tables within +# the databases created by the user. +# Variant for storage engine MyISAM +# +# 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. +# + +let $engine_type= MyISAM; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--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 + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_mysql.test b/mysql-test/suite/funcs_1/t/is_columns_mysql.test new file mode 100644 index 00000000000..26539d0c8e0 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_mysql.test @@ -0,0 +1,13 @@ +# suite/funcs_1/t/is_columns_mysql.test +# +# Check the content of information_schema.columns about tables within +# the database mysql. +# +# 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. +# + +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/columns.inc diff --git a/mysql-test/suite/funcs_1/t/is_columns_ndb.test b/mysql-test/suite/funcs_1/t/is_columns_ndb.test new file mode 100644 index 00000000000..960e5f079bb --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_columns_ndb.test @@ -0,0 +1,33 @@ +# 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. +# + +--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_key_column_usage.test b/mysql-test/suite/funcs_1/t/is_key_column_usage.test new file mode 100644 index 00000000000..219277c8645 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_key_column_usage.test @@ -0,0 +1,344 @@ +# suite/funcs_1/t/is_key_column_usage.test +# +# Check the layout of information_schema.key_column_usage and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +# let $other_engine_type = MyISAM; + +let $is_table = KEY_COLUMN_USAGE; + +# The table INFORMATION_SCHEMA.KEY_COLUMN_USAGE must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.7.1: INFORMATION_SCHEMA.KEY_COLUMN_USAGE layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.KEY_COLUMN_USAGE table has the following +# columns, in the following order: +# +# CONSTRAINT_CATALOG (always shows NULL), +# CONSTRAINT_SCHEMA (shows the database, or schema, in which an accessible +# constraint, or index, resides), +# CONSTRAINT_NAME (shows the name of the accessible constraint), +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the database, or schema, in which the table constrained +# by that constraint resides), +# TABLE_NAME (shows the name of the table constrained by the constraint), +# COLUMN_NAME (shows the name of a column that is the index key, or part of +# the index key), +# ORDINAL_POSITION (shows the ordinal position of the column within the +# constraint index), +# POSITION_IN_UNIQUE_CONSTRAINT (shows, for a foreign key column, the ordinal +# position of the referenced column within the referenced unique index; +# otherwise NULL). +# added with 5.0.6: +# REFERENCED_TABLE_SCHEMA, +# REFERENCED_TABLE_NAME, +# REFERENCED_COLUMN_NAME +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.key_column_usage is in is_columns_is.test. + +# Show that CONSTRAINT_CATALOG and TABLE_CATALOG are always NULL. +SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, + table_schema, table_name, column_name +FROM information_schema.key_column_usage +WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; + + +--echo ######################################################################################## +--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.KEY_COLUMN_USAGE accessible information +--echo ######################################################################################## +# 3.2.7.2: Ensure that the table shows the relevant information on every column, defined to +# be part of an index key, which is accessible to the current user or to PUBLIC. +# 3.2.7.3: Ensure that the table does not show any information on any indexed column that is +# not accessible to the current user or PUBLIC. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; + +USE db_datadict; + +--replace_result $engine_type +eval +CREATE TABLE t1_1 + (f1 INT NOT NULL, PRIMARY KEY(f1), + f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; +GRANT SELECT ON t1_1 to 'testuser1'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE t1_2 + (f1 INT NOT NULL, PRIMARY KEY(f1), + f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; +GRANT SELECT ON t1_2 to 'testuser2'@'localhost'; +#FIXME: add foreign keys + +let $select= SELECT * FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_%' +ORDER BY constraint_catalog, constraint_schema, constraint_name, + table_catalog, table_schema, table_name, ordinal_position; + +# show view of user root +eval $select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $select; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +eval $select; + +# Cleanup +--echo # Switch to connection default and close connections testuser1, testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP TABLE t1_1; +DROP TABLE t1_2; +DROP DATABASE IF EXISTS db_datadict; + + +--echo ######################################################################################## +--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.KEY_COLUMN_USAGE modifications +--echo ######################################################################################## +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table + (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible +# in information_schema.key_column_usage. +--vertical_results +SELECT * FROM information_schema.key_column_usage +WHERE table_name = 't1_my_table'; +--horizontal_results +# +# Check modification of TABLE_NAME +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT DISTINCT table_name FROM information_schema.key_column_usage +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT DISTINCT table_schema,table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# Check modification of COLUMN_NAME +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +ALTER TABLE db_datadict.t1_my_tablex CHANGE COLUMN f1 first_col CHAR(12); +SELECT DISTINCT table_name, column_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +# +# Note: The size of the column list and the not very selective qualification +# is intended. I want to see that the schema names are equal and +# all records about 't1_my_tablex'. +let $my_select = SELECT constraint_schema, constraint_name, table_schema, +table_name, column_name, ordinal_position +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY constraint_schema, constraint_name, table_schema, + table_name, ordinal_position; +# +# Check ADD INDEX being not UNIQUE (does not show up in key_column_usage) +eval $my_select; +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX without name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX with name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +eval $my_select; +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,first_col); +eval $my_select; +# +# Check DROP COLUMN +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN first_col; +eval $my_select; +# +# Check impact of DROP TABLE +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex' +ORDER BY table_name, column_name; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name, column_name +FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# No UNIQUE CONSTRAINT -> no entry in key_column_usage +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# UNIQUE CONSTRAINT -> entry in key_column_usage +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP SCHEMA +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.key_column_usage +WHERE table_name = 't1_my_tablex'; +# + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.key_column_usage + (constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.key_column_usage +SELECT * FROM information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.key_column_usage +SET table_name = 'db1' WHERE constraint_name = 'primary'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.key_column_usage WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i3 ON information_schema.key_column_usage(table_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.key_column_usage; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage +RENAME db_datadict.key_column_usage; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.key_column_usage +RENAME information_schema.xkey_column_usage; + +# Cleanup +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_routines.test b/mysql-test/suite/funcs_1/t/is_routines.test new file mode 100644 index 00000000000..5f015b8624b --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_routines.test @@ -0,0 +1,471 @@ +# suite/funcs_1/t/is_routines.test +# +# Check the layout of information_schema.routines and the impact of +# CREATE/ALTER/DROP PROCEDURE/FUNCTION ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing routines (there are no +# in the moment) within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = ROUTINES; + +# The table INFORMATION_SCHEMA.TABLES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.8.1: INFORMATION_SCHEMA.ROUTINES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.ROUTINES table has the following columns, +# in the following order: +# +# SPECIFIC_NAME (shows the name of an accessible stored procedure, or routine), +# ROUTINE_CATALOG (always shows NULL), +# ROUTINE_SCHEMA (shows the database, or schema, in which the routine resides), +# ROUTINE_NAME (shows the same stored procedure name), +# ROUTINE_TYPE (shows whether the stored procedure is a procedure or a function), +# DTD_IDENTIFIER (shows, for a function, the complete data type definition of +# the value the function will return; otherwise NULL), +# ROUTINE_BODY (shows the language in which the stored procedure is written; +# currently always SQL), +# ROUTINE_DEFINITION (shows as much of the routine body as is possible in the +# allotted space), +# EXTERNAL_NAME (always shows NULL), +# EXTERNAL_LANGUAGE (always shows NULL), +# PARAMETER_STYLE (shows the routine's parameter style; always SQL), +# IS_DETERMINISTIC (shows whether the routine is deterministic), +# SQL_DATA_ACCESS (shows the routine's defined sql-data-access clause value), +# SQL_PATH (always shows NULL), +# SECURITY_TYPE (shows whether the routine's defined security_type is 'definer' +# or 'invoker'), +# CREATED (shows the timestamp of the time the routine was created), +# LAST_ALTERED (shows the timestamp of the time the routine was last altered), +# SQL_MODE (shows the sql_mode setting at the time the routine was created), +# ROUTINE_COMMENT (shows the comment, if any, defined for the routine; +# otherwise NULL), +# DEFINER (shows the user who created the routine). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +USE test; +--disable_warnings +DROP PROCEDURE IF EXISTS sp_for_routines; +DROP FUNCTION IF EXISTS function_for_routines; +--enable_warnings +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; + +# Show that the column values of +# ROUTINE_CATALOG, EXTERNAL_NAME, EXTERNAL_LANGUAGE, SQL_PATH are always NULL +# and +# ROUTINE_BODY, PARAMETER_STYLE are 'SQL' +# and +# SPECIFIC_NAME = ROUTINE_NAME. +SELECT specific_name,routine_catalog,routine_schema,routine_name,routine_type, + routine_body,external_name,external_language,parameter_style,sql_path +FROM information_schema.routines +WHERE routine_catalog IS NOT NULL OR external_name IS NOT NULL + OR external_language IS NOT NULL OR sql_path IS NOT NULL + OR routine_body <> 'SQL' OR parameter_style <> 'SQL' + OR specific_name <> routine_name; + +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; + + +--echo ################################################################################ +--echo # Testcase 3.2.8.2 + 3.2.8.3: INFORMATION_SCHEMA.ROUTINES accessible information +--echo ################################################################################ +# 3.2.8.2: Ensure that the table shows the relevant information on every SQL-invoked +# routine (i.e. stored procedure) which is accessible to the current user +# or to PUBLIC. +# 3.2.8.3: Ensure that the table does not show any information on any stored procedure +# that is not accessible to the current user or PUBLIC. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +--enable_warnings + +CREATE DATABASE db_datadict; +USE db_datadict; +--replace_result $other_engine_type +eval +CREATE TABLE res_6_408002_1(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = $other_engine_type; +INSERT INTO res_6_408002_1(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1989-11-09', 0815); +--disable_warnings +DROP PROCEDURE IF EXISTS sp_6_408002_1; +--enable_warnings +delimiter //; +CREATE PROCEDURE sp_6_408002_1() +BEGIN + SELECT * FROM db_datadict.res_6_408002_1; +END// +delimiter ;// + +CREATE DATABASE db_datadict_2; +USE db_datadict_2; +--replace_result $other_engine_type +eval +CREATE TABLE res_6_408002_2(f1 CHAR(3), f2 TEXT(25), f3 DATE, f4 INT) +ENGINE = $other_engine_type; +INSERT INTO res_6_408002_2(f1, f2, f3, f4) +VALUES('abc', 'xyz', '1990-10-03', 4711); +--disable_warnings +DROP PROCEDURE IF EXISTS sp_6_408002_2; +--enable_warnings +delimiter //; +CREATE PROCEDURE sp_6_408002_2() +BEGIN + SELECT * FROM db_datadict_2.res_6_408002_2; +END// +delimiter ;// + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + + +GRANT SELECT ON db_datadict_2.* TO 'testuser1'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser1'@'localhost'; + +GRANT EXECUTE ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser2'@'localhost'; + +GRANT EXECUTE ON PROCEDURE db_datadict_2.sp_6_408002_2 +TO 'testuser2'@'localhost'; +GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; +FLUSH PRIVILEGES; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT * FROM information_schema.routines; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; + +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; + +USE test; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.ROUTINES modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +# Some more tests are in t/information_schema_routines.test which exists +# in MySQL 5.1 and up only. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results + +ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; +ALTER FUNCTION function_for_routines COMMENT 'updated comments'; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results + +DROP PROCEDURE sp_for_routines; +DROP FUNCTION function_for_routines; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; + +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; +--vertical_results +--replace_column 16 17 +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' +ORDER BY routine_name; +--horizontal_results +use test; +DROP DATABASE db_datadict; +SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; + + +--echo ######################################################################### +--echo # 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for +--echo # ROUTINE_DEFINITION column +--echo ######################################################################### +# Ensure that a stored procedure with a routine body that is too large to fit +# into the INFORMATION_SCHEMA.ROUTINES.ROUTINE_DEFINITION column correctly shows +# as much of the information as is possible within the allotted size. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +USE db_datadict; +# +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.res_6_408004_1 + (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = $other_engine_type; +INSERT INTO db_datadict.res_6_408004_1 +VALUES ('abc', 98765 , 99999999 , 98765, 10); +# +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.res_6_408004_2 + (f1 LONGTEXT , f2 MEDIUMINT , f3 LONGBLOB , f4 REAL , f5 YEAR) +ENGINE = $other_engine_type; +INSERT INTO db_datadict.res_6_408004_2 +VALUES ('abc', 98765 , 99999999 , 98765, 10); + +--echo # Checking the max. possible length of (currently) 4 GByte is not +--echo # in this environment here. + +delimiter //; +CREATE PROCEDURE sp_6_408004 () +BEGIN + DECLARE done INTEGER DEFAULt 0; + DECLARE variable_number_1 LONGTEXT; + DECLARE variable_number_2 MEDIUMINT; + DECLARE variable_number_3 LONGBLOB; + DECLARE variable_number_4 REAL; + DECLARE variable_number_5 YEAR; + DECLARE cursor_number_1 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_2 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_3 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_4 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE cursor_number_5 CURSOR FOR SELECT * FROM res_6_408004_1 LIMIT 0, 10; + DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done = 1; + BEGIN + OPEN cursor_number_1; + WHILE done <> 1 DO + FETCH cursor_number_1 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + BEGIN + BEGIN + SET done = 0; + OPEN cursor_number_2; + WHILE done <> 1 DO + FETCH cursor_number_2 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES(variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + SET done = 0; + OPEN cursor_number_3; + WHILE done <> 1 DO + FETCH cursor_number_3 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES(variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + END; + BEGIN + SET done = 0; + OPEN cursor_number_4; + WHILE done <> 1 DO + FETCH cursor_number_4 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + BEGIN + SET @a='test row'; + SELECT @a; + SELECT @a; + SELECT @a; + END; + BEGIN + SET done = 0; + OPEN cursor_number_5; + WHILE done <> 1 DO + FETCH cursor_number_5 + INTO variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5; + IF done <> 0 THEN + INSERT INTO res_6_408004_2 + VALUES (variable_number_1, variable_number_2, variable_number_3, + variable_number_4, variable_number_5); + END IF; + END WHILE; + END; + BEGIN + SET @a='test row'; + SELECT @a; + SELECT @a; + SELECT @a; + END; +END// +delimiter ;// + +CALL db_datadict.sp_6_408004 (); +SELECT * FROM db_datadict.res_6_408004_2; + +--vertical_results +--replace_column 16 "YYYY-MM-DD hh:mm:ss" 17 "YYYY-MM-DD hh:mm:ss" +SELECT *, LENGTH(routine_definition) FROM information_schema.routines +WHERE routine_schema = 'db_datadict'; +--horizontal_results + +# Cleanup +DROP DATABASE db_datadict; +# ---------------------------------------------------------------------------------------------- + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +USE db_datadict; +CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; +USE test; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.routines (routine_name, routine_type ) +VALUES ('p2', 'procedure'); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.routines SET routine_name = 'p2' +WHERE routine_body = 'sql'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.routines ; +# +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.routines ; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i7 ON information_schema.routines (routine_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines ADD f1 INT; +# +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines DISCARD TABLESPACE; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.routines ; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines RENAME db_datadict.routines; +# +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.routines RENAME information_schema.xroutines; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges.test b/mysql-test/suite/funcs_1/t/is_schema_privileges.test new file mode 100644 index 00000000000..4eb4a273362 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges.test @@ -0,0 +1,336 @@ +# suite/funcs_1/t/is_schema_privileges.test +# +# Check the layout of information_schema.schema_privileges and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing schemas +# information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = SCHEMA_PRIVILEGES; + +# The table INFORMATION_SCHEMA.SCHEMA_PRIVILEGES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.15.1: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.SCHEMA_PRIVILEGES table has the following +# columns, in the following order: +# +# GRANTEE (shows a user to whom a schema privilege has been granted), +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the database, or schema, on which the +# privilege has been granted), +# PRIVILEGE_TYPE (shows the granted privilege), +# IS_GRANTABLE (shows whether the privilege was granted WITH GRANT OPTION) +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns +# about information_schema.schema_privileges is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT GRANTEE, TABLE_CATALOG, TABLE_SCHEMA, PRIVILEGE_TYPE +FROM information_schema.schema_privileges WHERE table_catalog IS NOT NULL; + + +--echo ############################################################################### +--echo # Testcase 3.2.15.2-3.2.15.4 INFORMATION_SCHEMA.SCHEMA_PRIVILEGES accessibility +--echo ############################################################################### +# 3.2.15.2 Ensure that the table shows the relevant information on every +# schema-level privilege which has been granted to the current user +# or to PUBLIC, or has been granted by the current user. +# FIXME: Why is "or has been granted by the current user" invisible? +# 3.2.15.3 Ensure that the table does not show any information on any +# schema-level privileges which have been granted to users +# other than the current user or to PUBLIC, or that have been +# granted by any user other than the current user. +# 3.2.15.4 Ensure that the table does not show any information on any +# privileges that are not schema-level privileges for the +# current user. +# +# Note: Check of content within information_schema.schema_privileges about the +# databases information_schema, mysql and test is in +# is_schema_privileges_is_mysql_test. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +DROP DATABASE IF EXISTS db_datadict_3; +--enable_warnings +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; +CREATE DATABASE db_datadict_3; +eval +CREATE TABLE db_datadict_2.t1(f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; + +GRANT INSERT ON db_datadict_1.* TO 'testuser1'@'localhost'; +GRANT INSERT ON db_datadict_2.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_4.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON db_datadict_3.* TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_1.* TO 'testuser2'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schema_privileges +WHERE table_schema LIKE 'db_datadict%' +ORDER BY grantee,table_schema,privilege_type; +let $show_testuser1 = SHOW GRANTS FOR 'testuser1'@'localhost'; +let $show_testuser2 = SHOW GRANTS FOR 'testuser2'@'localhost'; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +GRANT SELECT ON db_datadict_4.* TO 'testuser2'@'localhost'; +--echo # Root granted INSERT db_datadict_1 to me -> visible +--echo # Root granted SELECT db_datadict_1 to testuser2 -> invisible +--echo # Root granted INSERT db_datadict_2.t1 (no schema-level priv!) +--echo # but not db_datadict_2 to me -> invisible +--echo # Root granted SELECT db_datadict_3. to testuser2 but not to me -> invisible +--echo # Root granted SELECT db_datadict_4. to me -> visible +--echo # I granted SELECT db_datadict_4. to testuser2 -> invisible (reality), visible(requirement) +--echo # FIXME +eval $my_select; +eval $show_testuser1; +--error ER_DBACCESS_DENIED_ERROR +eval $show_testuser2; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , test); +--echo # Root granted SELECT db_datadict_1 to me -> visible +--echo # Root granted INSERT db_datadict_1 to testuser1 -> invisible +--echo # Root granted INSERT db_datadict_2.t1 but not db_datadict_1 to testuser1 -> invisible +--echo # Root granted SELECT db_datadict_3. to me -> visible +--echo # testuser1 granted SELECT db_datadict_4. to me -> visible +eval $my_select; +--error ER_DBACCESS_DENIED_ERROR +eval $show_testuser1; +eval $show_testuser2; + +--echo # Switch to connection default and close connections testuser1 and testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; +eval $my_select; +eval $show_testuser1; +eval $show_testuser2; + +# Cleanup +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; +DROP DATABASE db_datadict_3; + + +--echo ################################################################################ +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMA_PRIVILEGES modifications +--echo ################################################################################ +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +# Note (mleich): +# The MySQL privilege system allows to GRANT objects before they exist. +# (Exception: Grant privileges for columns of not existing tables/views.) +# There is also no migration of privileges if objects (tables, views, columns) +# are moved to other databases (tables only), renamed or dropped. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--error 0,ER_CANNOT_USER +DROP USER 'the_user'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON test.* TO 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict' +ORDER BY grantee,table_schema,privilege_type; + +############ Check grant SCHEMA +eval $my_select; +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +eval $my_select; +--echo # Switch to connection default +connection default; +GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost'; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +############ Check RENAME SCHEMA +# Implement this if RENAME SCHEMA is again available. +# Note(mleich): I expect that RENAME has no impact on the result sets, because +# the schema_name is not migrated. +# --echo # Switch to connection default +# connection default; +# RENAME SCHEMA db_datadict TO db_datadictx; +# eval $my_select; +# --echo # Switch to connection testuser1 +# eval $my_select; +# RENAME SCHEMA db_datadictx TO db_datadict; +############ Check extend PRIVILEGES (affects PRIVILEGE_TYPE) on SCHEMA +--echo # Switch to connection default +connection default; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +############ Check extend PRIVILEGES (affects IS_GRANTABLE) on SCHEMA +--echo # Switch to connection default +connection default; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +############ Check DROP SCHEMA +# No impact, because there is no "maintenance" of privileges. +--echo # Switch to connection default +connection default; +DROP SCHEMA db_datadict; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +############ Check REVOKE PRIVILEGE +--echo # Switch to connection default +connection default; +REVOKE UPDATE ON db_datadict.* FROM 'testuser1'@'localhost'; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +############ Check RENAME USER +--echo # Switch to connection default +connection default; +RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost'; +eval $my_select; +--echo # Switch to connection testuser1 +eval $my_select; +--echo # Close connection testuser1 +disconnect testuser1; +--echo # Establish connection the_user (user=the_user) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (the_user, localhost, the_user, , test); +eval $my_select; +--echo # Close connection the_user +disconnect the_user; +############ Check DROP USER +--echo # Switch to connection default +connection default; +eval $my_select; +DROP USER 'the_user'@'localhost'; +eval $my_select; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = $engine_type; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.schema_privileges +SELECT * FROM information_schema.schema_privileges; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.schema_privileges SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.schema_privileges +WHERE table_schema = 'db_datadict'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.schema_privileges; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_tables +ON information_schema.schema_privileges(table_schema); +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schema_privileges ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.schema_privileges; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schema_privileges +RENAME db_datadict.schema_privileges; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schema_privileges +RENAME information_schema.xschema_privileges; + +# Cleanup +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; + diff --git a/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test new file mode 100644 index 00000000000..cb34d1bad2d --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_schema_privileges_is_mysql_test.test @@ -0,0 +1,58 @@ +# suite/funcs_1/t/is_schema_privileges_is_mysql_test.test +# +# Check the content of information_schema.schema_privileges about the databases +# information_schema, mysql and test visible to high and low privileged users. +# +# 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. +# +# + +--echo ############################################################################## +--echo # Testcases 3.2.9.2+3.2.9.3 INFORMATION_SCHEMA.SCHEMATA accessible information +--echo ############################################################################## +# 3.2.9.2 Ensure that the table shows the relevant information for every +# database on which the current user or PUBLIC have privileges. +# 3.2.9.3 Ensure that the table does not show any information on any databases +# on which the current user and PUBLIC have no privileges. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schema_privileges +WHERE table_schema IN ('information_schema','mysql','test') +ORDER BY grantee, table_schema, privilege_type; +let $my_show1 = SHOW DATABASES LIKE 'information_schema'; +let $my_show2 = SHOW DATABASES LIKE 'mysql'; +let $my_show3 = SHOW DATABASES LIKE 'test'; +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +# Cleanup +--echo # Switch to connection default and close connection testuser1 +connection default; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_schemata.test b/mysql-test/suite/funcs_1/t/is_schemata.test new file mode 100644 index 00000000000..7eb08dba463 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_schemata.test @@ -0,0 +1,246 @@ +# suite/funcs_1/t/is_schemata.test +# +# Check the layout of information_schema.schemata, permissions and the impact of +# CREATE/ALTER/DROP SCHEMA on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing databases +# information_schema and mysql +# - for checking storage engine properties +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $is_table = SCHEMATA; + +# The table INFORMATION_SCHEMA.SCHEMATA must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.9.1: INFORMATION_SCHEMA.SCHEMATA layout; +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.SCHEMATA table has the following columns, +# in the following order: +# +# CATALOG_NAME (always shows NULL), +# SCHEMA_NAME (shows the name of a database, or schema, on which the current +# user or PUBLIC has privileges), +# DEFAULT_CHARACTER_SET_NAME (shows the name of that database's default +# character set), +# DEFAULT_COLLATION_NAME (shows the database defaul collation) +# SQL_PATH (always shows NULL). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.schemata is in is_columns_is.test. + +# Show that CATALOG_NAME and SQL_PATH are always NULL. +SELECT catalog_name, schema_name, sql_path +FROM information_schema.schemata +WHERE catalog_name IS NOT NULL or sql_path IS NOT NULL; + + +--echo ############################################################################### +--echo # Testcases 3.2.9.2+3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +--echo ############################################################################### +# 3.2.9.2 Ensure that the table shows the relevant information for every +# database on which the current user or PUBLIC have privileges. +# 3.2.9.3 Ensure that the table does not show any information on any databases +# on which the current user and PUBLIC have no privileges. +# +# Note: Check of content within information_schema.schemata about the databases +# information_schema and mysql is in +# suite/funcs_1/t/is_schemata_is_mysql.test. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict_1; +DROP DATABASE IF EXISTS db_datadict_2; +--enable_warnings +CREATE DATABASE db_datadict_1; +CREATE DATABASE db_datadict_2; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +GRANT SELECT ON db_datadict_1.* to 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict_1.* to 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict_2.* to 'testuser2'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schemata +WHERE schema_name LIKE 'db_datadict_%' ORDER BY schema_name; +let $my_show = SHOW DATABASES LIKE 'db_datadict_%'; + +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict_1); +# Shows db_datadict_1 +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict_2); +# Shows db_datadict_1 and db_datadict_2 +eval $my_select; +--sorted_result +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +# Shows neither db_datadict_1 nor db_datadict_2 +eval $my_select; +--sorted_result +eval $my_show; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict_1; +DROP DATABASE db_datadict_2; + + +--echo ################################################################################# +--echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.SCHEMATA modifications +--echo ################################################################################# +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings + +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; +SELECT * FROM information_schema.schemata WHERE schema_name = 'db_datadict'; + +# Check modify default CHARACTER SET +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict CHARACTER SET 'utf8'; +SELECT schema_name, default_character_set_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict CHARACTER SET 'latin1'; + +# Check modify default COLLATION +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; +ALTER SCHEMA db_datadict COLLATE 'latin1_general_cs'; +SELECT schema_name, default_collation_name FROM information_schema.schemata +WHERE schema_name = 'db_datadict'; + +# Check DROP DATABASE +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +DROP DATABASE db_datadict; +SELECT schema_name +FROM information_schema.schemata WHERE schema_name = 'db_datadict'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.schemata + (catalog_name, schema_name, default_character_set_name, sql_path) +VALUES (NULL, 'db1', 'latin1', NULL); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.schemata +SELECT * FROM information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.schemata +SET default_character_set_name = 'utf8' +WHERE schema_name = 'db_datadict'; +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.schemata SET catalog_name = 't_4711'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.schemata WHERE schema_name = 'db_datadict'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i1 ON information_schema.schemata(schema_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.schemata; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata RENAME db_datadict.schemata; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.schemata RENAME information_schema.xschemata; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test new file mode 100644 index 00000000000..cabcfa640d7 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_schemata_is_mysql_test.test @@ -0,0 +1,58 @@ +# suite/funcs_1/t/is_schemata_is_mysql_test.test +# +# Check the content of information_schema.schemata about the databases +# information_schema and mysql visible to high and low privileged users. +# +# 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. +# +# + +--echo ################################################################################# +--echo # Testcases 3.2.9.2 + 3.2.9.3: INFORMATION_SCHEMA.SCHEMATA accessible information +--echo ################################################################################# +# 3.2.9.2 Ensure that the table shows the relevant information for every +# database on which the current user or PUBLIC have privileges. +# 3.2.9.3 Ensure that the table does not show any information on any databases +# on which the current user and PUBLIC have no privileges. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +# Create a low privileged user. +# Note: The database db_datadict is just a "home" for the low privileged user +# and not in the focus of testing. +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.schemata +WHERE schema_name IN ('information_schema','mysql','test') +ORDER BY schema_name; +let $my_show1 = SHOW DATABASES LIKE 'information_schema'; +let $my_show2 = SHOW DATABASES LIKE 'mysql'; +let $my_show3 = SHOW DATABASES LIKE 'test'; +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $my_select; +eval $my_show1; +eval $my_show2; +eval $my_show3; + +# Cleanup +--echo # Switch to connection default and close connection testuser1 +connection default; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_statistics.test b/mysql-test/suite/funcs_1/t/is_statistics.test new file mode 100644 index 00000000000..5b17b711fff --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_statistics.test @@ -0,0 +1,379 @@ +# suite/funcs_1/t/is_statistics.test +# +# Check the layout of information_schema.statistics and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on its content. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = STATISTICS; + +# The table INFORMATION_SCHEMA.STATISTICS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.14.1: INFORMATION_SCHEMA.STATISTICS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.STATISTICS table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the database, or schema, in which a table indexed by +# an accessible index resides), +# TABLE_NAME (shows the name of the indexed table), +# NON_UNIQUE (shows whether the index may contain duplicate values; +# 0 if it cannot, 1 if it can), +# INDEX_SCHEMA (shows the database, or schema, in which an accessible +# index resides), +# INDEX_NAME (shows the name of an index which the current user may access), +# SEQ_IN_INDEX (shows the ordinal position of an indexed column within +# the index), +# COLUMN_NAME (shows the name of a column that comprises some, or all, of an +# index key), +# COLLATION (shows how the column is sorted in the index; either A for ascending +# or NULL for unsorted columns), +# CARDINALITY (shows the number of unique values in the index), +# SUB_PART (shows the number of indexed characters if the index is +# a prefix index), +# PACKED (shows how the index key is packed), +# NULLABLE (shows whether the index column may contain NULL values), +# INDEX_TYPE (shows the index type; either BTREE, FULLTEXT, HASH or RTREE), +# COMMENT (shows a comment on the index, if any). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.statistics is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name, index_schema, index_name +FROM information_schema.statistics WHERE table_catalog IS NOT NULL; + + +--echo #################################################################################### +--echo # Testcase 3.2.14.2 + 3.2.14.3: INFORMATION_SCHEMA.STATISTICS accessible information +--echo #################################################################################### +# 3.2.14.2 Ensure that the table shows the relevant information on every index +# which the current user or PUBLIC may access (usually because +# privileges on the indexed table have been granted). +# 3.2.14.3 Ensure that the table does not show any information on any indexes +# which the current user and PUBLIC may not access. +# +# Note: Check of content within information_schema.statistics about +# database is in +# mysql is_statistics_mysql.test +# information_schema is_statistics_is.test +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP DATABASE IF EXISTS db_datadict_2; +--enable_warnings +CREATE DATABASE db_datadict; +CREATE DATABASE db_datadict_2; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 + (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t2 + (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; + +eval +CREATE TABLE db_datadict_2.t3 + (f1 INT NOT NULL, f2 INT, f5 DATE, + PRIMARY KEY(f1), INDEX f2f1_ind(f2,f1), UNIQUE(f5)) +ENGINE = $engine_type; +eval +CREATE TABLE db_datadict_2.t4 + (f1 INT NOT NULL, PRIMARY KEY(f1), f2 INT, INDEX f2_ind(f2)) +ENGINE = $engine_type; + +let $my_select = SELECT * FROM information_schema.statistics +WHERE table_schema LIKE 'db_datadict%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +let $my_show1 = SHOW GRANTS FOR 'testuser1'@'localhost'; +let $my_show2 = SHOW GRANTS FOR 'testuser2'@'localhost'; +eval $my_select; +eval $my_show1; +eval $my_show2; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +# nothing visible for testuser1 +eval $my_select; +eval $my_show1; +--error ER_DBACCESS_DENIED_ERROR +eval $my_show2; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , test); +# nothing visible for testuser2 +eval $my_select; +--error ER_DBACCESS_DENIED_ERROR +eval $my_show1; +eval $my_show2; + +--echo # Switch to connection default +connection default; +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT(f1,f5) ON db_datadict_2.t3 TO 'testuser1'@'localhost'; +eval $my_select; +eval $my_show1; +eval $my_show2; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select; +eval $my_show1; +--error ER_DBACCESS_DENIED_ERROR +eval $my_show2; + +--echo # Switch to connection testuser2 +connection testuser2; +eval $my_select; +--error ER_DBACCESS_DENIED_ERROR +eval $my_show1; +eval $my_show2; + +--echo # Switch to connection default +connection default; +REVOKE SELECT,GRANT OPTION ON db_datadict.t1 FROM 'testuser1'@'localhost'; +eval $my_show1; + +--echo # Switch to connection testuser1 +# nothing visible for testuser1 +connection testuser1; +eval $my_select; +eval $my_show1; + +# Cleanup +--echo # Switch to connection default and close connections testuser1, testuser2 +connection default; +disconnect testuser1; +disconnect testuser2; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP DATABASE db_datadict; +DROP DATABASE db_datadict_2; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.STATISTICS modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $other_engine_type +eval +CREATE TABLE test.t1_1 (f1 BIGINT, + f2 TEXT, f2x TEXT, f3 CHAR(10), f3x CHAR(10), f4 BIGINT, f4x BIGINT, + f5 POINT, f5x POINT NOT NULL) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $other_engine_type; +--replace_result $engine_type +eval +CREATE TABLE test.t1_2 (f1 BIGINT, f2 BIGINT) +ENGINE = $engine_type; + +# Tables without primary key or index do not show up +# in information_schema.statistics. +SELECT table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +# Check ADD PRIMARY KEY (two columns) +ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1,f3); +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +# Check DROP PRIMARY KEY +ALTER TABLE test.t1_1 DROP PRIMARY KEY; +SELECT table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +# Check ADD PRIMARY KEY (one column) +ALTER TABLE test.t1_1 ADD PRIMARY KEY (f1); +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%'; +# Some variations on index definitions +# 1. No name assigned, one column +ALTER TABLE test.t1_1 ADD INDEX (f4); +# 2. Name assigned, two columns +CREATE INDEX f3_f1 ON test.t1_1 (f3,f1); +# 3. Unique index +CREATE UNIQUE INDEX f4x_uni ON test.t1_1 (f4x); +# 4. Index using HASH +CREATE INDEX f2_hash USING HASH ON test.t1_2 (f2); +# 5. Index with comment (feature introduced in 5.2) +--error ER_PARSE_ERROR +CREATE INDEX f1_idx ON test.t1_2 (f1) COMMENT = 'COMMENT'; +# 6. NOT NULL +CREATE INDEX not_null ON test.t1_1 (f3x); +# 7. Prefix index +CREATE INDEX f2_prefix ON test.t1_1 (f2(20)); +# +SELECT * FROM information_schema.statistics +WHERE table_name LIKE 't1_%' AND index_name <> 'PRIMARY' +ORDER BY table_schema,table_name,index_name,seq_in_index,column_name; +--horizontal_results +DROP TABLE test.t1_2; +# +# Check modification of TABLE_NAME +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1'; +RENAME TABLE test.t1_1 TO test.t1_1x; +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +# +# Check modification of TABLE_SCHEMA +SELECT DISTINCT table_schema,table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_1%'; +RENAME TABLE test.t1_1x TO db_datadict.t1_1x; +SELECT DISTINCT table_schema,table_name FROM information_schema.statistics +WHERE table_name LIKE 't1_1%'; +# +# Check impact of DROP TABLE +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +DROP TABLE db_datadict.t1_1x; +SELECT DISTINCT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +# +# Check a temporary table (not visible) +--replace_result $engine_type +eval +CREATE TEMPORARY TABLE test.t1_1x (PRIMARY KEY(f1,f2)) +ENGINE = $engine_type + AS SELECT 1 AS f1, 2 AS f2; +--vertical_results +SELECT * FROM information_schema.statistics +WHERE table_name = 't1_1x'; +--horizontal_results +DROP TEMPORARY TABLE test.t1_1x; +# +# Check impact of DROP SCHEMA +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_1x (PRIMARY KEY(f1)) +ENGINE = $engine_type + AS SELECT 1 AS f1, 2 AS f2; +SELECT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.statistics +WHERE table_name = 't1_1x'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.statistics +SELECT * FROM information_schema.statistics; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.statistics SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.statistics WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.statistics; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_statistics +ON information_schema.statistics(table_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.statistics DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.statistics ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.statistics; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.statistics RENAME db_datadict.statistics; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.statistics RENAME information_schema.xstatistics; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_statistics_is.test b/mysql-test/suite/funcs_1/t/is_statistics_is.test new file mode 100644 index 00000000000..0cf5df64955 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_statistics_is.test @@ -0,0 +1,14 @@ +# suite/funcs_1/t/is_statistics_is.test +# +# Check the content of information_schema.statistics about tables within +# the database information_schema for a high and a low privileged user. +# +# 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. +# + +let $my_where = WHERE table_schema = 'information_schema'; +--source suite/funcs_1/datadict/statistics.inc + diff --git a/mysql-test/suite/funcs_1/t/is_statistics_mysql.test b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test new file mode 100644 index 00000000000..a75cc922777 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_statistics_mysql.test @@ -0,0 +1,15 @@ +# suite/funcs_1/t/is_statistics_mysql.test +# +# Check the content of information_schema.statistics about tables within +# the database mysql for a high and a low privileged user. +# +# 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. +# + +let $database = mysql; +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/statistics.inc + diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints.test b/mysql-test/suite/funcs_1/t/is_table_constraints.test new file mode 100644 index 00000000000..60d5ebce703 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_table_constraints.test @@ -0,0 +1,331 @@ +# suite/funcs_1/t/is_table_constraints.test +# +# Check the layout of information_schema.table_constraints and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA/COLUMN ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_typee. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MyISAM; + +let $is_table = TABLE_CONSTRAINTS; + +# The table INFORMATION_SCHEMA.TABLE_CONSTRAINTS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.10.1: INFORMATION_SCHEMA.TABLE_CONSTRAINTS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TABLE_CONSTRAINTS table has the following +# columns, in the following order: +# +# CONSTRAINT_CATALOG (always shows NULL), +# CONSTRAINT_SCHEMA (shows the database, or schema, in which +# a constraint an accessible table resides), +# CONSTRAINT_NAME (shows the name of a constraint defined on +# an accessible table), +# TABLE_SCHEMA (shows the database, or schema, in which the +# table resides), +# TABLE_NAME (shows the name of the table), +# CONSTRAINT_TYPE (shows the type of the constraint; either +# 'primary key', 'foreign key', 'unique', 'check'). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.table_constraints is in is_columns_is.test. + +# Show that CONSTRAINT_CATALOG IS NULL +SELECT constraint_catalog, constraint_schema, constraint_name, + table_schema, table_name +FROM information_schema.table_constraints +WHERE constraint_catalog IS NOT NULL; + + +--echo ######################################################################################### +--echo # Testcase 3.2.7.2 + 3.2.7.3: INFORMATION_SCHEMA.TABLE_CONSTRAINTS accessible information +--echo ######################################################################################### +# 3.2.7.2: Ensure that the table shows the relevant information on every +# column, defined to be part of an index key, which is accessible to +# the current user or to PUBLIC. +# 3.2.7.3: Ensure that the table does not show any information on any indexed +# column that is not accessible to the current user or PUBLIC. +# +# Note: Check of content within table_constraints about tables within +# database is checked in +# mysql is_table_constraints_mysql +# information_schema is_table_constraints_is +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, + f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) +ENGINE = $engine_type; +CREATE UNIQUE INDEX my_idx1 ON db_datadict.t1(f6,f1); +CREATE UNIQUE INDEX my_idx2 ON db_datadict.t1(f3); +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t2 (f1 BIGINT, f2 BIGINT, f3 BIGINT, f4 BIGINT, + f5 BIGINT, f6 BIGINT, PRIMARY KEY (f1,f2)) +ENGINE = $engine_type; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT(f5) ON db_datadict.t1 TO 'testuser1'@'localhost'; +SHOW GRANTS FOR 'testuser1'@'localhost'; + +let $my_select = SELECT * FROM information_schema.table_constraints +WHERE table_schema = 'db_datadict' +ORDER BY table_schema,table_name, constraint_name; +let $my_show1 = SHOW INDEXES FROM db_datadict.t1; +let $my_show2 = SHOW INDEXES FROM db_datadict.t2; + +eval $my_select; +# 1 Table Note: We intentinally suppress the protocolling of all +# 2 Non_unique output being not of interest or depending on +# 3 Key_name storage engine used for the table. +# 4 Seq_in_index +# 5 Column_name +# 6 Collation +# 7 Cardinality +# 8 Sub_part +# 9 Packed +# 10 Null +# 11 Index_type +# 12 Comment +--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ### +eval $my_show1; +--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ### +eval $my_show2; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +SHOW GRANTS FOR 'testuser1'@'localhost'; +eval $my_select; +--replace_column 6 ### 7 ### 8 ### 9 ### 10 ### 11 ### 12 ### +eval $my_show1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_show2; + +# Cleanup +--echo # Switch to connection default and close connection testuser1 +connection default; +disconnect testuser1; +DROP USER 'testuser1'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################################### +--echo # Testcase 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_CONSTRAINTS modifications +--echo ######################################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS test.t1_my_table; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table + (f1 CHAR(12), f2 TIMESTAMP, f4 BIGINT, PRIMARY KEY(f1,f2)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible +# in information_schema.table_constraints. +SELECT constraint_name, table_schema, table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_table'; +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +# +let $my_select = SELECT constraint_schema, constraint_name, table_schema, +table_name, constraint_type +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex' +ORDER BY table_schema,table_name, constraint_name; +# +# Check ADD INDEX being not UNIQUE (does not show up in table_constraints) +eval $my_select; +CREATE INDEX f2 ON db_datadict.t1_my_tablex(f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX without name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE (f2); +eval $my_select; +DROP INDEX f2 ON db_datadict.t1_my_tablex; +# +# Check ADD UNIQUE INDEX with name explicit assigned +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f4,f1); +eval $my_select; +DROP INDEX my_idx ON db_datadict.t1_my_tablex; +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex ADD UNIQUE my_idx (f2); +eval $my_select; +# +# Check DROP COLUMN (removing an UNIQUE INDEX) +eval $my_select; +ALTER TABLE db_datadict.t1_my_tablex +DROP COLUMN f2; +eval $my_select; +# +# Check impact of DROP TABLE +SELECT table_name +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name +FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +# +# No UNIQUE CONSTRAINT -> no entry in key_column_usage +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1 AS f1; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +# UNIQUE CONSTRAINT -> entry in key_column_usage +ALTER TABLE db_datadict.t1_my_tablex ADD PRIMARY KEY(f1); +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP SCHEMA +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.table_constraints +WHERE table_name = 't1_my_tablex'; +# + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +DROP TABLE IF EXISTS db_datadict.t1; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, UNIQUE(f1)) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.table_constraints + (constraint_schema, constraint_name, table_name) +VALUES ( 'mysql', 'primary', 'db'); +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.table_constraints +SELECT * FROM information_schema.table_constraints; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.table_constraints +SET table_name = 'db1' WHERE constraint_name = 'primary'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.table_constraints WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.table_constraints; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i3 ON information_schema.table_constraints(table_name); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_constraints ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.table_constraints; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_constraints +RENAME db_datadict.table_constraints; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_constraints +RENAME information_schema.xtable_constraints; + +# Cleanup +DROP TABLE db_datadict.t1; +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_is.test b/mysql-test/suite/funcs_1/t/is_table_constraints_is.test new file mode 100644 index 00000000000..6105126386a --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_table_constraints_is.test @@ -0,0 +1,14 @@ +# suite/funcs_1/t/is_table_constraints_is.test +# +# Check the content of information_schema.table_constraints about tables within +# the database information_schema with different privileged users. +# +# 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. +# + +let $table_schema = information_schema; +--source suite/funcs_1/datadict/table_constraints.inc + diff --git a/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test new file mode 100644 index 00000000000..5ef1561ccdf --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_table_constraints_mysql.test @@ -0,0 +1,14 @@ +# suite/funcs_1/t/is_table_constraints_mysql.test +# +# Check the content of information_schema.table_constraints about tables within +# the database mysql (= the system tables) with different privileged users. +# +# 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. +# + +let $table_schema = mysql; +--source suite/funcs_1/datadict/table_constraints.inc + diff --git a/mysql-test/suite/funcs_1/t/is_table_privileges.test b/mysql-test/suite/funcs_1/t/is_table_privileges.test new file mode 100644 index 00000000000..b095a5ddad6 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_table_privileges.test @@ -0,0 +1,349 @@ +# suite/funcs_1/t/is_table_privileges.test +# +# Check the layout of information_schema.table_privileges and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = TABLE_PRIVILEGES; + +# The table INFORMATION_SCHEMA.TABLE_PRIVILEGES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.11.1: INFORMATION_SCHEMA.TABLE_PRIVILEGES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TABLE_PRIVILEGES table has the following +# columns, in the following order: +# +# GRANTEE (shows the name of a user who has either granted, or been granted a +# table privilege), +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the schema, or database, in which the table +# for which a privilege has been granted resides), +# TABLE_NAME (shows the name of the table), +# PRIVILEGE_TYPE (shows the type of privilege that was granted; must be either +# SELECT, INSERT, UPDATE, DELETE, REFERENCES, ALTER, INDEX, DROP or +# CREATE VIEW), +# IS_GRANTABLE (shows whether that privilege was granted WITH GRANT OPTION). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns +# about information_schema.table_privileges is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name, privilege_type +FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL; + +--echo ###################################################################### +--echo # Testcase 3.2.11.2+3.2.11.3+3.2.11.4: +--echo # INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information +--echo ###################################################################### +# 3.2.11.2: Ensure that the table shows the relevant information on every +# table privilege which has been granted to the current user or +# PUBLIC, or which was granted by the current user. +# 3.2.11.3: Ensure that the table does not show any information on any table +# privilege which was granted to any user other than the current +# user or PUBLIC, or which was granted by any user other than the +# current user. +# 3.2.11.4: Ensure that the table does not show any information on any +# privileges that are not table privileges for the current user. +# +# To be implemented: +# Check of content within information_schema.table_privileges about +# databases like 'information_schema' or 'mysql'. +# 2008-02-15 Neither root nor a just created low privileged user has table +# privileges within these schemas. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.tb1(f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, SELECT ON db_datadict.* +TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +let $my_select = SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 'tb%' +ORDER BY grantee,table_schema,table_name,privilege_type; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--replace_result $other_engine_type +eval +CREATE TABLE tb3 (f1 TEXT) +ENGINE = $other_engine_type; +GRANT SELECT ON db_datadict.tb3 TO 'testuser3'@'localhost'; +eval $my_select; +SHOW GRANTS FOR 'testuser1'@'localhost'; + +--echo # Establish connection testuser2 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +# we see only table privileges for this user, and not any other privileges +eval $my_select; +SHOW GRANTS FOR 'testuser2'@'localhost'; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , db_datadict); +# we see only table privileges for this user, and not any other privileges +eval $my_select; +SHOW GRANTS FOR 'testuser3'@'localhost'; + +--echo # Switch to connection default and close the other connections +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; + +# we see only 'public' table privileges +eval $my_select; +SHOW GRANTS FOR 'testuser1'@'localhost'; +SHOW GRANTS FOR 'testuser2'@'localhost'; +SHOW GRANTS FOR 'testuser3'@'localhost'; + +# Cleanup +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ################################################################################ +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLE_PRIVILEGES modifications +--echo ################################################################################ +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +# Note (mleich): +# The MySQL privilege system allows to GRANT objects before they exist. +# (Exception: Grant privileges for columns of not existing tables/views.) +# There is also no migration of privileges if objects (tables,views,columns) +# are moved to other databases (tables only), renamed or dropped. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_table; +DROP VIEW IF EXISTS test.t1_view; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE test.t1_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = $engine_type; +CREATE VIEW test.t1_view AS SELECT 1; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'the_user'@'localhost'; +# +# Check granted TABLE and VIEW +SELECT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%'; +GRANT ALL ON test.t1_table TO 'testuser1'@'localhost'; +GRANT ALL ON test.t1_view TO 'testuser1'@'localhost'; +SELECT * FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_schema, table_name, privilege_type; +# +# Check modification of GRANTEE (migration of permissions) +SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_name; +RENAME USER 'testuser1'@'localhost' TO 'the_user'@'localhost'; +# FIXME: mleich Workaround for bug to be reported +# It looks like an immediate reloading of the system tables is missing in case +# of RENAME USER. +FLUSH PRIVILEGES; +SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY grantee, table_name; +--error ER_NONEXISTING_GRANT +SHOW GRANTS FOR 'testuser1'@'localhost'; +SHOW GRANTS FOR 'the_user'@'localhost'; +# +# Check modification of TABLE_SCHEMA (no migration of permissions) +SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +RENAME TABLE test.t1_table TO db_datadict.t1_table; +--error ER_FORBID_SCHEMA_CHANGE +RENAME TABLE test.t1_view TO db_datadict.t1_view; +SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +SHOW GRANTS FOR 'the_user'@'localhost'; +REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost'; +REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost'; +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT 1; +GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost'; +GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost'; +# +# Check modification of TABLE_NAME (no migration of permissions) +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +RENAME TABLE db_datadict.t1_table TO db_datadict.t1_tablex; +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +RENAME TABLE db_datadict.t1_tablex TO db_datadict.t1_table; +RENAME TABLE db_datadict.t1_viewx TO db_datadict.t1_view; +# +# Check impact of DROP TABLE/VIEW (no removal of permissions) +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP TABLE db_datadict.t1_table; +DROP VIEW db_datadict.t1_view; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +# +# Check impact of DROP SCHEMA (no removal of permissions) +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_table +ENGINE = $engine_type AS +SELECT 1; +CREATE VIEW db_datadict.t1_view AS SELECT 1; +GRANT ALL ON db_datadict.t1_table TO 'the_user'@'localhost'; +GRANT ALL ON db_datadict.t1_view TO 'the_user'@'localhost'; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP DATABASE db_datadict; +SELECT DISTINCT table_name FROM information_schema.table_privileges +WHERE table_name LIKE 't1_%' +ORDER BY table_name; + +# Cleanup +DROP USER 'the_user'@'localhost'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT, f2 BIGINT) +ENGINE = $engine_type; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT SELECT (f1) ON db_datadict.t1 TO 'testuser1'@'localhost'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.table_privileges +SELECT * FROM information_schema.table_privileges; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.table_privileges SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.table_privileges WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.table_privileges; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_tables +ON information_schema.table_privileges(table_schema); +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_privileges ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.table_privileges; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_privileges +RENAME db_datadict.table_privileges; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.table_privileges +RENAME information_schema.xtable_privileges; + +# Cleanup +DROP DATABASE db_datadict; +DROP USER 'testuser1'@'localhost'; + diff --git a/mysql-test/suite/funcs_1/t/is_tables.test b/mysql-test/suite/funcs_1/t/is_tables.test new file mode 100644 index 00000000000..35b6b7ef007 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables.test @@ -0,0 +1,474 @@ +# suite/funcs_1/t/tables.test +# +# Check the layout of information_schema.tables and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# Some results of the subtests depend on the storage engines assigned. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = TABLES; + +# The table INFORMATION_SCHEMA.TABLES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TABLES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TABLES table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the name of the database, or schema, in which an +# accessible table resides), +# TABLE_NAME (shows the name of a table which the current user may access), +# TABLE_TYPE (shows whether the table is a BASE TABLE, a TEMPORARY table, +# or a VIEW), +# ENGINE (shows the storage engine used for the table), +# VERSION (shows the version number of the table's .frm file), +# ROW_FORMAT (shows the table's row storage format; either FIXED, DYNAMIC +# or COMPRESSED), +# TABLE_ROWS (shows the number of rows in the table), +# AVG_ROW_LENGTH (shows the average length of the table's rows), +# DATA_LENGTH (shows the length of the table's data file), +# MAX_DATA_LENGTH (shows the maximum length of the table's data file), +# INDEX_LENGTH (shows the length of the index file associated with the table), +# DATA_FREE (shows the number of allocated, unused bytes), +# AUTO_INCREMENT (shows the next AUTO_INCREMENT value, where applicable), +# CREATE_TIME (shows the timestamp of the time the table was created), +# UPDATE_TIME (shows the timestamp of the time the table's data file was +# last updated), +# CHECK_TIME (shows the timestamp of the time the table was last checked), +# TABLE_COLLATION (shows the table's default collation), +# CHECKSUM (shows the live checksum value for the table, if any; otherwise NULL), +# CREATE_OPTIONS (shows any additional options used in the table's definition; +# otherwise NULL), +# TABLE_COMMENT (shows the comment added to the table's definition; +# otherwise NULL). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.tables is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name +FROM information_schema.tables WHERE table_catalog IS NOT NULL; + + +--echo ################################################################################ +--echo # Testcase 3.2.12.2 + 3.2.12.3: INFORMATION_SCHEMA.TABLES accessible information +--echo ################################################################################ +# 3.2.12.2: Ensure that the table shows the relevant information on every base table +# and view on which the current user or PUBLIC has privileges. +# 3.2.12.3: Ensure that the table does not show any information on any tables +# on which the current user and public have no privileges. +# +# Note: Check of content within information_schema.tables about tables within +# database is in +# mysql is_tables_mysql.test +# information_schema is_tables_is.test +# test% is_tables_.test +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +GRANT CREATE, CREATE VIEW, INSERT, SELECT ON db_datadict.* + TO 'testuser1'@'localhost' WITH GRANT OPTION; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE db_datadict.tb1 (f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; + +GRANT SELECT ON db_datadict.tb1 TO 'testuser1'@'localhost'; +GRANT ALL ON db_datadict.tb1 TO 'testuser2'@'localhost' WITH GRANT OPTION; + +let $my_select = SELECT * FROM information_schema.tables +WHERE table_schema = 'db_datadict' ORDER BY table_name; +let $my_show = SHOW TABLES FROM db_datadict; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +# tb2 is not granted to anyone +--replace_result $engine_type +eval +CREATE TABLE tb2 (f1 DECIMAL) +ENGINE = $engine_type; +--replace_result $engine_type +eval +CREATE TABLE tb3 (f1 VARCHAR(200)) +ENGINE = $engine_type; +GRANT SELECT ON db_datadict.tb3 to 'testuser3'@'localhost'; +GRANT INSERT ON db_datadict.tb3 to 'testuser2'@'localhost'; +CREATE VIEW v3 AS SELECT * FROM tb3; +GRANT SELECT ON db_datadict.v3 to 'testuser3'@'localhost'; + +if ($have_bug_32285) +{ +--disable_ps_protocol +} +# We do not want to check here values affected by +# - the storage engine used +# - Operating system / Filesystem +# - start time of test +# 1 TABLE_CATALOG +# 2 TABLE_SCHEMA +# 3 TABLE_NAME +# 4 TABLE_TYPE +# 5 ENGINE affected by storage engine used +# 6 VERSION +# 7 ROW_FORMAT affected by storage engine used +# 8 TABLE_ROWS +# 9 AVG_ROW_LENGTH affected by storage engine used +# 10 DATA_LENGTH affected by storage engine used and maybe OS +# 11 MAX_DATA_LENGTH affected by storage engine used and maybe OS +# 12 INDEX_LENGTH affected by storage engine used and maybe OS +# 13 DATA_FREE affected by storage engine used and maybe OS +# 14 AUTO_INCREMENT +# 15 CREATE_TIME depends roughly on start time of test (*) +# 16 UPDATE_TIME depends roughly on start time of test (*) +# 17 CHECK_TIME depends roughly on start time of test and storage engine (*) +# 18 TABLE_COLLATION +# 19 CHECKSUM affected by storage engine used +# 20 CREATE_OPTIONS +# 21 TABLE_COMMENT affected by some storage engines +# (*) In case of view or temporary table NULL. +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , db_datadict); +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +--echo # Switch to connection default (user=root) +connection default; +# we see only 'public' tables +if ($have_bug_32285) +{ +--disable_ps_protocol +} +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +eval $my_select; +--enable_ps_protocol +--sorted_result +eval $my_show; + +# Cleanup +--echo # Close connection testuser1, testuser2, testuser3 +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TABLES modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +--replace_result $engine_type +eval +CREATE TABLE test.t1_my_table (f1 BIGINT) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +COMMENT = 'Initial Comment' ENGINE = $engine_type; +# Settings used in CREATE TABLE must be visible in information_schema.tables. +--vertical_results +--replace_column 5 "#ENG#" 7 "#RF#" 9 "#ARL#" 10 "#DL#" 11 "#MDL#" 12 "#IL#" 13 "#DF#" 15 "#CRT" 16 "#UT#" 17 "#CT#" 19 "#CS#" +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_table'; +--horizontal_results +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +RENAME TABLE test.t1_my_table TO test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +RENAME TABLE test.t1_my_tablex TO db_datadict.t1_my_tablex; +SELECT table_schema,table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of ENGINE +--replace_result $engine_type +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--replace_result $other_engine_type +eval +ALTER TABLE db_datadict.t1_my_tablex +ENGINE = $other_engine_type; +--replace_result $other_engine_type +SELECT table_name, engine FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of TABLE_ROWS +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +INSERT INTO db_datadict.t1_my_tablex VALUES(1),(2); +SELECT table_name, table_rows FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check indirect modification of TABLE_COLLATION +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex DEFAULT CHARACTER SET utf8; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# Check direct modification of TABLE_COLLATION +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +DEFAULT CHARACTER SET latin1 COLLATE latin1_german1_ci; +SELECT table_name, table_collation FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of TABLE_COMMENT +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex COMMENT 'Changed Comment'; +SELECT table_name, TABLE_COMMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of AUTO_INCREMENT +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex +ADD f2 BIGINT AUTO_INCREMENT, ADD PRIMARY KEY (f2); +SELECT table_name, AUTO_INCREMENT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check modification of ROW_FORMAT +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex ROW_FORMAT = dynamic; +SELECT table_name, ROW_FORMAT FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check "growth" of UPDATE_TIME and modification of CHECKSUM +SELECT table_name, checksum FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +ALTER TABLE db_datadict.t1_my_tablex CHECKSUM = 1; +SELECT table_name, checksum IS NOT NULL FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT UPDATE_TIME, checksum INTO @UPDATE_TIME, @checksum +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# Enforce a time difference bigger than the smallest unit (1 second). +--real_sleep 1.1 +INSERT INTO db_datadict.t1_my_tablex SET f1 = 3; +SELECT UPDATE_TIME > @UPDATE_TIME + AS "Is current UPDATE_TIME bigger than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +SELECT checksum <> @checksum + AS "Is current CHECKSUM different than before last INSERT?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Information is used later +SELECT CREATE_TIME INTO @CREATE_TIME FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check impact of DROP TABLE +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +DROP TABLE db_datadict.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name LIKE 't1_my_table%'; +# +# Check "growth" of CREATE_TIME +--replace_result $other_engine_type +eval +CREATE TABLE test.t1_my_tablex (f1 BIGINT) +ENGINE = $other_engine_type; +SELECT CREATE_TIME > @CREATE_TIME + AS "Is current CREATE_TIME bigger than for the old dropped table?" +FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP TABLE test.t1_my_tablex; +# +# Check a VIEW +CREATE VIEW test.t1_my_tablex AS SELECT 1; +--vertical_results +SELECT * FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--horizontal_results +DROP VIEW test.t1_my_tablex; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +# +# Check a temporary table +--replace_result $other_engine_type +eval +CREATE TEMPORARY TABLE test.t1_my_tablex +ENGINE = $other_engine_type + AS SELECT 1; +--vertical_results +SELECT table_name, table_type FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +--horizontal_results +DROP TEMPORARY TABLE test.t1_my_tablex; +# +# Check impact of DROP SCHEMA +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1_my_tablex +ENGINE = $engine_type AS +SELECT 1; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.tables +WHERE table_name = 't1_my_tablex'; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.tables +SELECT * FROM information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.tables SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.tables WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_tables ON information_schema.tables(table_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.tables; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables RENAME db_datadict.tables; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.tables RENAME information_schema.xtables; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_tables_innodb.test b/mysql-test/suite/funcs_1/t/is_tables_innodb.test new file mode 100644 index 00000000000..31a3900c7c3 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_innodb.test @@ -0,0 +1,22 @@ +# suite/funcs_1/t/is_tables_innodb.test +# +# Check the content of information_schema.tables about tables within +# the databases created by the user. +# Variant for storage engine InnoDB +# +# 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. +# + +--source include/have_innodb.inc +let $engine_type= InnoDB; +--source suite/funcs_1/datadict/datadict_load.inc +--enable_abort_on_error + +# We look only for the tables created by datadict_load.inc. +let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; +--source suite/funcs_1/datadict/tables1.inc + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_is.test b/mysql-test/suite/funcs_1/t/is_tables_is.test new file mode 100644 index 00000000000..66ad94f774b --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_is.test @@ -0,0 +1,18 @@ +# suite/funcs_1/t/is_tables_is.test +# +# Check the content of information_schema.tables about tables within +# the database information_schema. +# +# Note: The INFORMATION_SCHEMA table PROFILING is optional (exists in MySQL +# Community version only) and therefore we exclude it from retrieval. +# +# 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. +# + +let $my_where = WHERE table_schema = 'information_schema' +AND table_name <> 'profiling'; +--source suite/funcs_1/datadict/tables1.inc + diff --git a/mysql-test/suite/funcs_1/t/is_tables_memory.test b/mysql-test/suite/funcs_1/t/is_tables_memory.test new file mode 100644 index 00000000000..8b5da595462 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_memory.test @@ -0,0 +1,22 @@ +# suite/funcs_1/t/is_tables_memory.test +# +# Check the content of information_schema.tables about tables within +# the databases created by the user. +# Variant for storage engine MEMORY +# +# 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. +# + +let $engine_type= MEMORY; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--source suite/funcs_1/datadict/datadict_load.inc +--enable_abort_on_error + +# We look only for the tables created by datadict_load.inc. +let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; +--source suite/funcs_1/datadict/tables1.inc + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_myisam.test b/mysql-test/suite/funcs_1/t/is_tables_myisam.test new file mode 100644 index 00000000000..4fc88364d87 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_myisam.test @@ -0,0 +1,22 @@ +# suite/funcs_1/t/is_tables_myisam.test +# +# Check the content of information_schema.tables about tables within +# the databases created by the user. +# Variant for storage engine MyISAM +# +# 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. +# + +let $engine_type= MyISAM; +SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; +--source suite/funcs_1/datadict/datadict_load.inc +--enable_abort_on_error + +# We look only for the tables created by datadict_load.inc. +let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; +--source suite/funcs_1/datadict/tables1.inc + +--source suite/funcs_1/include/cleanup.inc diff --git a/mysql-test/suite/funcs_1/t/is_tables_mysql.test b/mysql-test/suite/funcs_1/t/is_tables_mysql.test new file mode 100644 index 00000000000..a6c3a72a1cf --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_mysql.test @@ -0,0 +1,14 @@ +# suite/funcs_1/t/is_tables_mysql.test +# +# Check the content of information_schema.tables about tables within +# the database mysql (= the system tables). +# +# 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. +# + +let $my_where = WHERE table_schema = 'mysql'; +--source suite/funcs_1/datadict/tables1.inc + diff --git a/mysql-test/suite/funcs_1/t/is_tables_ndb.test b/mysql-test/suite/funcs_1/t/is_tables_ndb.test new file mode 100644 index 00000000000..49ce60b08bd --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_tables_ndb.test @@ -0,0 +1,34 @@ +# 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. +# + +--source include/have_ndb.inc +let $engine_type= NDB; +--source suite/funcs_1/datadict/datadict_load.inc +--enable_abort_on_error + +# We look only for the tables created by datadict_load.inc. +let $my_where = WHERE table_schema LIKE 'test%' AND table_type = 'BASE TABLE'; +--source suite/funcs_1/datadict/tables1.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_triggers.test b/mysql-test/suite/funcs_1/t/is_triggers.test new file mode 100644 index 00000000000..261f082fb50 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_triggers.test @@ -0,0 +1,253 @@ +# suite/funcs_1/t/is_triggers.test +# +# Check the layout of information_schema.triggers and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing triggers +# (there are no in the moment) within the databases information_schema +# and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = TRIGGERS; + +# The table INFORMATION_SCHEMA.TRIGGERS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.12.1: INFORMATION_SCHEMA.TRIGGERS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.TRIGGERS table has the following columns, +# in the following order: +# +# TRIGGER_CATALOG NULL +# TRIGGER_SCHEMA name of the database in which the trigger occurs +# TRIGGER_NAME +# EVENT_MANIPULATION event associated with the trigger +# ('INSERT', 'DELETE', or 'UPDATE') +# EVENT_OBJECT_CATALOG NULL +# EVENT_OBJECT_SCHEMA database in which the table associated with the +# trigger occurs +# EVENT_OBJECT_TABLE name of the table associated with the trigger +# ACTION_ORDER 0 +# ACTION_CONDITION NULL +# ACTION_STATEMENT +# ACTION_ORIENTATION ROW +# ACTION_TIMING 'BEFORE' or 'AFTER' +# ACTION_REFERENCE_OLD_TABLE NULL +# ACTION_REFERENCE_NEW_TABLE NULL +# ACTION_REFERENCE_OLD_ROW OLD +# ACTION_REFERENCE_NEW_ROW NEW +# CREATED NULL (0) +# SQL_MODE server SQL mode that was in effect at the time +# when the trigger was created +# (also used during trigger execution) +# DEFINER who defined the trigger +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + + +# Note: Retrieval of information within information_schema.columns about +# information_schema.tables is in is_columns_is.test. + +# Show that several columns are always NULL. +SELECT * FROM information_schema.triggers +WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL + OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL + OR action_reference_new_table IS NOT NULL; + + +--echo ################################################################################## +--echo # Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information +--echo ################################################################################## +# 3.2.18.2: Ensure that the table shows the relevant information on every +# trigger on which the current user or PUBLIC has privileges. +# 3.2.18.3: Ensure that the table does not show any information on any trigger +# on which the current user and public have no privileges. +# The SUPER privilege is required for +# - creation of triggers +# - retrieval in INFORMATION_SCHEMA.TRIGGERS (affects size of result set) +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser4'@'localhost'; +CREATE USER 'testuser4'@'localhost'; + +GRANT SUPER ON *.* TO 'testuser1'@'localhost'; +GRANT SUPER ON *.* TO 'testuser3'@'localhost'; +GRANT SUPER ON *.* TO 'testuser4'@'localhost'; +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; + +let $my_select = SELECT * FROM information_schema.triggers +WHERE trigger_name = 'trg1'; +let $my_show = SHOW TRIGGERS FROM db_datadict; +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; +CREATE TRIGGER trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; +GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; +GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +SHOW GRANTS FOR 'testuser2'@'localhost'; +--echo # No SUPER Privilege --> no result for query +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +SHOW GRANTS FOR 'testuser3'@'localhost'; +--echo # SUPER Privilege + SELECT Privilege on t1 --> result for query +eval $my_select; +eval $my_show; + +--echo # Establish connection testuser4 (user=testuser4) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser4, localhost, testuser4, , test); +SHOW GRANTS FOR 'testuser4'@'localhost'; +--echo # SUPER Privilege + no SELECT Privilege on t1 --> no result for query +eval $my_select; +eval $my_show; + +--echo # Switch to connection default and close connections testuser1 - testuser4 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +disconnect testuser4; +eval $my_select; +eval $my_show; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP USER 'testuser4'@'localhost'; +DROP DATABASE db_datadict; + + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.TRIGGERS modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# FIXME: To be implemented + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = $engine_type; +CREATE TRIGGER db_datadict.trg1 BEFORE INSERT +ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.triggers +SELECT * FROM information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.triggers SET trigger_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.triggers WHERE trigger_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_triggers ON information_schema.triggers(trigger_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.triggers; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers RENAME db_datadict.triggers; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.triggers RENAME information_schema.xtriggers; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/is_user_privileges.test b/mysql-test/suite/funcs_1/t/is_user_privileges.test new file mode 100644 index 00000000000..dc39ad6fe4f --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_user_privileges.test @@ -0,0 +1,347 @@ +# suite/funcs_1/t/is_user_privileges.test +# +# Check the layout of information_schema.user_privileges, permissions and +# the impact of CREATE/ALTER/DROP SCHEMA on it. +# +# Note: +# This test is not intended +# - to show information about the all time existing tables +# within the databases information_schema and mysql +# - for checking storage engine properties +# Therefore please do not alter $engine_type and $other_engine_type. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = USER_PRIVILEGES; + +# The table INFORMATION_SCHEMA.USER_PRIVILEGES must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.16.1: INFORMATION_SCHEMA.USER_PRIVILEGES layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.USER_PRIVILEGES table has the following columns, +# in the following order: +# +# GRANTEE (shows a user to whom a user privilege has been granted), +# TABLE_CATALOG (always shows NULL), +# PRIVILEGE_TYPE (shows the granted privilege), +# IS_GRANTABLE (shows whether the privilege was granted WITH GRANT OPTION). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.user_privileges is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT grantee, table_catalog, privilege_type +FROM information_schema.user_privileges +WHERE table_catalog IS NOT NULL; + + +--echo ########################################################################## +--echo # Testcases 3.2.16.2+3.2.16.3+3.2.16.4: INFORMATION_SCHEMA.USER_PRIVILEGES +--echo # accessible information +--echo ########################################################################## +# 3.2.16.2: Ensure that the table shows the relevant information on every user +# privilege which has been granted to the current user or to PUBLIC, +# or has been granted by the current user. +# 3.2.16.3: Ensure that the table does not show any information on any user +# privileges which have been granted to users other than the current +# user or have been granted by any user other than the current user. +# 3.2.16.4: Ensure that the table does not show any information on any +# privileges that are not user privileges for the current user. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser3'@'localhost'; +CREATE USER 'testuser3'@'localhost'; + +GRANT SELECT ON db_datadict.* TO 'testuser1'@'localhost'; +GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; + +GRANT INSERT ON *.* TO 'testuser2'@'localhost'; +GRANT UPDATE ON *.* TO 'testuser2'@'localhost'; + +let $my_select1= SELECT * FROM information_schema.user_privileges +WHERE grantee LIKE '''testuser%''' +ORDER BY grantee, table_catalog, privilege_type; +let $my_select2= SELECT * FROM mysql.user +WHERE user LIKE 'testuser%' ORDER BY host, user; +let $my_show= SHOW GRANTS; +eval $my_select1; +eval $my_select2; + +--echo # +--echo # Add GRANT OPTION db_datadict.* to testuser1; +GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +eval $my_select1; +eval $my_select2; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , db_datadict); +eval $my_select1; +eval $my_select2; +eval $my_show; + +--echo +--echo # Now add SELECT on *.* to testuser1; + +--echo # Switch to connection default +connection default; +GRANT SELECT ON *.* TO 'testuser1'@'localhost'; +--echo # +--echo # Here is shown correctly for testuser1; +eval $my_select1; +eval $my_select2; + +--echo # Switch to connection testuser1 +# check that this appears +connection testuser1; +eval $my_select1; +eval $my_select2; +eval $my_show; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , db_datadict); +eval $my_select1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_select2; +eval $my_show; + +--echo # Establish connection testuser3 (user=testuser3) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser3, localhost, testuser3, , test); +eval $my_select1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_select2; +eval $my_show; + +--echo +--echo # Revoke privileges from testuser1; +--echo # Switch to connection default +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; +eval $my_select1; +eval $my_select2; + +--echo # Switch to connection testuser1 +# check for changes +connection testuser1; +eval $my_select1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_select2; +eval $my_show; + +# OK, testuser1 has no privs here +--error ER_TABLEACCESS_DENIED_ERROR +CREATE TABLE db_datadict.tb_55 ( c1 TEXT ); +eval $my_select1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_select2; +eval $my_show; +# OK, testuser1 has no privs here +--error ER_TABLEACCESS_DENIED_ERROR +CREATE TABLE db_datadict.tb_66 ( c1 TEXT ); + +--echo +--echo # Add ALL on db_datadict.* (and select on mysql.user) to testuser1; +--echo # Switch to connection default +connection default; +GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; +GRANT SELECT ON mysql.user TO 'testuser1'@'localhost'; +eval $my_select1; +eval $my_select2; + +--echo # Switch to connection testuser1 +connection testuser1; +eval $my_select1; +eval $my_select2; +eval $my_show; + +# OK, testuser1 has no privs here +--error ER_TABLEACCESS_DENIED_ERROR +CREATE TABLE db_datadict.tb_56 ( c1 TEXT ); + +# using 'USE' lets the server read the privileges new, so now the CREATE works +USE db_datadict; +eval $my_select1; +eval $my_select2; +eval $my_show; +--replace_result $other_engine_type +eval +CREATE TABLE tb_57 ( c1 TEXT ) +ENGINE = $other_engine_type; + +--echo +--echo # Revoke privileges from testuser1; +--echo # Switch to connection default +connection default; +REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'testuser1'@'localhost'; +eval $my_select1; +eval $my_select2; + +--echo # Switch to connection testuser1 +# check for changes +connection testuser1; +eval $my_select1; +--error ER_TABLEACCESS_DENIED_ERROR +eval $my_select2; +eval $my_show; +# WORKS, as the existing old privileges are used! +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.tb_58 ( c1 TEXT ) +ENGINE = $other_engine_type; +# existing privileges are "read" new when USE is called, user has no privileges +--error ER_DBACCESS_DENIED_ERROR +USE db_datadict; +#FIXME 3.2.16: check that it is correct that this now 'works': --error ER_TABLEACCESS_DENIED_ERROR +--replace_result $other_engine_type +eval +CREATE TABLE db_datadict.tb_59 ( c1 TEXT ) +ENGINE = $other_engine_type; + +# Cleanup +--echo # Switch to connection default and close connections testuser1,testuser2,testuser3 +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect testuser3; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'testuser3'@'localhost'; +DROP DATABASE IF EXISTS db_datadict; + + +--echo ######################################################################################## +--echo # Testcases 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.USER_PRIVILEGES modifications +--echo ######################################################################################## +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +let $my_select = SELECT * FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +let $my_show = SHOW GRANTS FOR 'testuser1'@'localhost'; +eval $my_select; +--error ER_NONEXISTING_GRANT +eval $my_show; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; +GRANT SELECT, FILE ON *.* TO 'testuser1'@'localhost'; +eval $my_select; +eval $my_show; +DROP USER 'testuser1'@'localhost'; +eval $my_select; +--error ER_NONEXISTING_GRANT +eval $my_show; + + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA tables are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.user_privileges +SELECT * FROM information_schema.user_privileges; + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.user_privileges +SET PRIVILEGE_TYPE = 'gaming'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.user_privileges +WHERE grantee = '''testuser1''@''localhost'''; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.user_privileges; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX i1 ON information_schema.user_privileges(grantee); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.user_privileges ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.user_privileges; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.user_privileges +RENAME db_datadict.user_privileges; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.user_privileges +RENAME information_schema.xuser_privileges; + +# Cleanup +DROP USER 'testuser1'@'localhost'; + diff --git a/mysql-test/suite/funcs_1/t/is_views.test b/mysql-test/suite/funcs_1/t/is_views.test new file mode 100644 index 00000000000..9819fe1ffe0 --- /dev/null +++ b/mysql-test/suite/funcs_1/t/is_views.test @@ -0,0 +1,305 @@ +# suite/funcs_1/t/is_views.test +# +# Check the layout of information_schema.views and the impact of +# CREATE/ALTER/DROP TABLE/VIEW/SCHEMA ... on it. +# +# Note: +# - This test should not check storage engine properties. +# - Please do not change the storage engines used within this test +# except you know that the impact is acceptable. +# Some storage engines might not support the modification of +# properties like in the following tests. +# +# 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. +# + +# --source suite/funcs_1/datadict/datadict.pre + +let $engine_type = MEMORY; +let $other_engine_type = MyISAM; + +let $is_table = VIEWS; + +# The table INFORMATION_SCHEMA.VIEWS must exist +eval SHOW TABLES FROM information_schema LIKE '$is_table'; + +--echo ####################################################################### +--echo # Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +--echo ####################################################################### +# Ensure that every INFORMATION_SCHEMA table can be queried with a SELECT +# statement, just as if it were an ordinary user-defined table. +# +--source suite/funcs_1/datadict/is_table_query.inc + + +--echo ######################################################################### +--echo # Testcase 3.2.13.1: INFORMATION_SCHEMA.VIEWS layout +--echo ######################################################################### +# Ensure that the INFORMATION_SCHEMA.VIEWS table has the following columns, +# in the following order: +# +# TABLE_CATALOG (always shows NULL), +# TABLE_SCHEMA (shows the database, or schema, in which an accessible +# view resides), +# TABLE_NAME (shows the name of a view accessible to the current user), +# VIEW_DEFINITION (shows the SELECT statement that makes up the +# view's definition), +# CHECK_OPTION (shows the value of the WITH CHECK OPTION clause used to define +# the view, either NONE, LOCAL or CASCADED), +# IS_UPDATABLE (shows whether the view is an updatable view), +# DEFINER (added with 5.0.14), +# SECURITY_TYPE (added with 5.0.14). +# +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval DESCRIBE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW CREATE TABLE information_schema.$is_table; +--source suite/funcs_1/datadict/datadict_bug_12777.inc +eval SHOW COLUMNS FROM information_schema.$is_table; + +# Note: Retrieval of information within information_schema.columns about +# information_schema.views is in is_columns_is.test. + +# Show that TABLE_CATALOG is always NULL. +SELECT table_catalog, table_schema, table_name +FROM information_schema.views WHERE table_catalog IS NOT NULL; + + +--echo ################################################################################ +--echo # Testcase 3.2.13.2 + 3.2.13.3: INFORMATION_SCHEMA.VIEWS accessible information +--echo ################################################################################ +# 3.2.13.2: Ensure that the table shows the relevant information on every view for +# which the current user or PUBLIC has the SHOW CREATE VIEW privilege. +# 3.2.13.3: Ensure that the table does not show any information on any views for which +# the current user and PUBLIC have no SHOW CREATE VIEW privilege. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; + +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'testuser2'@'localhost'; +CREATE USER 'testuser2'@'localhost'; +--error 0,ER_CANNOT_USER +DROP USER 'test_no_views'@'localhost'; +CREATE USER 'test_no_views'@'localhost'; + +--replace_result $engine_type +eval +CREATE TABLE db_datadict.t1(f1 INT, f2 INT, f3 INT) +ENGINE = $engine_type; +CREATE VIEW db_datadict.v_granted_to_1 AS SELECT * FROM db_datadict.t1; +CREATE VIEW db_datadict.v_granted_glob AS SELECT f2, f3 FROM db_datadict.t1; + +GRANT SELECT ON db_datadict.t1 TO 'testuser1'@'localhost'; +GRANT SELECT ON db_datadict.v_granted_to_1 TO 'testuser1'@'localhost'; +GRANT SHOW VIEW, CREATE VIEW ON db_datadict.* TO 'testuser2'@'localhost'; + +let $select = SELECT * FROM information_schema.views +WHERE table_schema = 'db_datadict' ORDER BY table_name; +eval $select; + +--echo # Establish connection testuser1 (user=testuser1) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser1, localhost, testuser1, , test); +eval $select; + +--echo # Establish connection testuser2 (user=testuser2) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (testuser2, localhost, testuser2, , test); +eval $select; + +--echo # Establish connection test_no_views (user=test_no_views) +--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK +connect (test_no_views, localhost, test_no_views, , test); +eval $select; + +# Cleanup +--echo # Switch to connection default and close all other connections +connection default; +disconnect testuser1; +disconnect testuser2; +disconnect test_no_views; +DROP USER 'testuser1'@'localhost'; +DROP USER 'testuser2'@'localhost'; +DROP USER 'test_no_views'@'localhost'; +DROP DATABASE db_datadict; + +--echo ######################################################################### +--echo # 3.2.1.13+3.2.1.14+3.2.1.15: INFORMATION_SCHEMA.VIEWS modifications +--echo ######################################################################### +# 3.2.1.13: Ensure that the creation of any new database object (e.g. table or +# column) automatically inserts all relevant information on that +# object into every appropriate INFORMATION_SCHEMA table. +# 3.2.1.14: Ensure that the alteration of any existing database object +# automatically updates all relevant information on that object in +# every appropriate INFORMATION_SCHEMA table. +# 3.2.1.15: Ensure that the dropping of any existing database object +# automatically deletes all relevant information on that object from +# every appropriate INFORMATION_SCHEMA table. +# +--disable_warnings +DROP TABLE IF EXISTS test.t1_my_table; +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +--replace_result $engine_type +eval +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci +ENGINE = $engine_type; +--error 0,ER_CANNOT_USER +DROP USER 'testuser1'@'localhost'; +CREATE USER 'testuser1'@'localhost'; + +# Check just created VIEW +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +CREATE VIEW test.t1_view AS SELECT DISTINCT f1 FROM test.t1_table; +SELECT * FROM information_schema.views +WHERE table_name LIKE 't1_%'; +# +# Check modification of DEFINER, SECURITY_TYPE, IS_UPDATABLE, VIEW_DEFINITION, +# CHECK_OPTION +SELECT table_name,definer FROM information_schema.views +WHERE table_name = 't1_view'; +ALTER DEFINER = 'testuser1'@'localhost' VIEW test.t1_view AS +SELECT DISTINCT f1 FROM test.t1_table; +# The next result set could suffer from +# Bug#22763 Disrepancy between SHOW CREATE VIEW and I_S.VIEWS +# because the VIEW definition is missing. +# Therefore we exclude the problematic columns from the result set. +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +ALTER DEFINER = 'root'@'localhost' SQL SECURITY INVOKER VIEW test.t1_view AS +SELECT f1 FROM test.t1_table WITH LOCAL CHECK OPTION; +SELECT table_name,definer,security_type FROM information_schema.views +WHERE table_name LIKE 't1_%'; +# +# Check modification of TABLE_SCHEMA +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +--error ER_FORBID_SCHEMA_CHANGE +RENAME TABLE test.t1_view TO db_datadict.t1_view; +# Workaround for missing move to another database +DROP VIEW test.t1_view; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +SELECT table_schema,table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_schema,table_name; +# +# Check modification of TABLE_NAME +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +RENAME TABLE db_datadict.t1_view TO db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +# +# Check impact of DROP VIEW +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP VIEW db_datadict.t1_viewx; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +CREATE VIEW db_datadict.t1_view AS SELECT * FROM test.t1_table; +# +# Check impact of DROP base TABLE of VIEW +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP TABLE test.t1_table; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +--replace_result $engine_type +eval +CREATE TABLE test.t1_table (f1 BIGINT, f2 CHAR(10)) +DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci COMMENT = 'Initial Comment' +ENGINE = $engine_type; +# +# Check impact of DROP SCHEMA +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; +DROP DATABASE db_datadict; +SELECT table_name FROM information_schema.views +WHERE table_name LIKE 't1_%' +ORDER BY table_name; + +# Cleanup +DROP USER 'testuser1'@'localhost'; +DROP TABLE test.t1_table; + +--echo ######################################################################## +--echo # Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +--echo # DDL on INFORMATION_SCHEMA table are not supported +--echo ######################################################################## +# 3.2.1.3: Ensure that no user may execute an INSERT statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.4: Ensure that no user may execute an UPDATE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.5: Ensure that no user may execute a DELETE statement on any +# INFORMATION_SCHEMA table. +# 3.2.1.8: Ensure that no user may create an index on an +# INFORMATION_SCHEMA table. +# 3.2.1.9: Ensure that no user may alter the definition of an +# INFORMATION_SCHEMA table. +# 3.2.1.10: Ensure that no user may drop an INFORMATION_SCHEMA table. +# 3.2.1.11: Ensure that no user may move an INFORMATION_SCHEMA table to any +# other database. +# 3.2.1.12: Ensure that no user may directly add to, alter, or delete any data +# in an INFORMATION_SCHEMA table. +# +--disable_warnings +DROP DATABASE IF EXISTS db_datadict; +--enable_warnings +CREATE DATABASE db_datadict; +CREATE VIEW db_datadict.v1 AS SELECT 1; + +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.views +SELECT * FROM information_schema.views; +--error ER_DBACCESS_DENIED_ERROR +INSERT INTO information_schema.views(table_schema, table_name) +VALUES ('db2', 'v2'); + +--error ER_DBACCESS_DENIED_ERROR +UPDATE information_schema.views SET table_schema = 'test' +WHERE table_name = 't1'; + +--error ER_DBACCESS_DENIED_ERROR +DELETE FROM information_schema.views WHERE table_name = 't1'; +--error ER_DBACCESS_DENIED_ERROR +TRUNCATE information_schema.views; + +--error ER_DBACCESS_DENIED_ERROR +CREATE INDEX my_idx_on_views ON information_schema.views(table_schema); + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views DROP PRIMARY KEY; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views ADD f1 INT; + +--error ER_DBACCESS_DENIED_ERROR +DROP TABLE information_schema.views; + +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views RENAME db_datadict.views; +--error ER_DBACCESS_DENIED_ERROR +ALTER TABLE information_schema.views RENAME information_schema.xviews; + +# Cleanup +DROP DATABASE db_datadict; + diff --git a/mysql-test/suite/funcs_1/t/memory__datadict.test b/mysql-test/suite/funcs_1/t/memory__datadict.test deleted file mode 100644 index b78a2511f3c..00000000000 --- a/mysql-test/suite/funcs_1/t/memory__datadict.test +++ /dev/null @@ -1,9 +0,0 @@ -#### suite/funcs_1/t/datadict_memory.test -# -let $engine_type= memory; -# $OTHER_ENGINE_TYPE must be -# - <> $engine_type -# - all time available like MyISAM or MEMORY -let $OTHER_ENGINE_TYPE= MyISAM; - ---source suite/funcs_1/datadict/datadict_master.inc diff --git a/mysql-test/suite/funcs_1/t/memory__load.test b/mysql-test/suite/funcs_1/t/memory__load.test deleted file mode 100644 index 44bd054f420..00000000000 --- a/mysql-test/suite/funcs_1/t/memory__load.test +++ /dev/null @@ -1,45 +0,0 @@ -##### suite/funcs_1/funcs_1/t/memory__load.test - -# Memory tables should be used -# -# Set $engine_type -let $engine_type= memory; - -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means all objects have to be (re)created within the current script. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means the current script must not (re)create any object and every -# testscript/case (re)creates only the objects it needs. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb1.inc - --source suite/funcs_1/include/memory_tb2.inc - --source suite/funcs_1/include/memory_tb3.inc - --source suite/funcs_1/include/memory_tb4.inc - - # The database test1 is needed for the VIEW testcases - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/memory_tb2.inc - USE test; - - # These tables are needed for the stored procedure testscases - --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; -} - diff --git a/mysql-test/suite/funcs_1/t/memory_bitdata.test b/mysql-test/suite/funcs_1/t/memory_bitdata.test index 3aa30c2d835..af5d0a9c53b 100644 --- a/mysql-test/suite/funcs_1/t/memory_bitdata.test +++ b/mysql-test/suite/funcs_1/t/memory_bitdata.test @@ -5,28 +5,12 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: bitdata tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb4.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb4.inc --source suite/funcs_1/bitdata/bitdata_master.test - diff --git a/mysql-test/suite/funcs_1/t/memory_cursors.test b/mysql-test/suite/funcs_1/t/memory_cursors.test index 1361c83ecb0..dc38a3dd0a3 100644 --- a/mysql-test/suite/funcs_1/t/memory_cursors.test +++ b/mysql-test/suite/funcs_1/t/memory_cursors.test @@ -5,28 +5,13 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: cursor tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb1.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb1.inc --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_02.test b/mysql-test/suite/funcs_1/t/memory_storedproc_02.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_03.test b/mysql-test/suite/funcs_1/t/memory_storedproc_03.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_06.test b/mysql-test/suite/funcs_1/t/memory_storedproc_06.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_07.test b/mysql-test/suite/funcs_1/t/memory_storedproc_07.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_08.test b/mysql-test/suite/funcs_1/t/memory_storedproc_08.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_storedproc_10.test b/mysql-test/suite/funcs_1/t/memory_storedproc_10.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0102.test b/mysql-test/suite/funcs_1/t/memory_trig_0102.test index efa739cfb14..c7b07cedfad 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0102.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_0102.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_trig_03.test b/mysql-test/suite/funcs_1/t/memory_trig_03.test index 76980b6b1b0..b7205ce15d2 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_03.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_03.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_03.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_trig_0407.test b/mysql-test/suite/funcs_1/t/memory_trig_0407.test index 05217a7f97f..01b4bc39159 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_0407.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_0407.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_trig_08.test b/mysql-test/suite/funcs_1/t/memory_trig_08.test index 8caae1ec45f..bc09d4f3943 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_08.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_08.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_08.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_trig_09.test b/mysql-test/suite/funcs_1/t/memory_trig_09.test index 95a7fefbe90..682e07f9fad 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_09.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_09.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_09.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test index 726b878854e..c6dfe54b64d 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_1011ext.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb3.inc --source suite/funcs_1/triggers/triggers_1011ext.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/memory_views.test b/mysql-test/suite/funcs_1/t/memory_views.test index 303d0bb2ac1..b506f08cf31 100644 --- a/mysql-test/suite/funcs_1/t/memory_views.test +++ b/mysql-test/suite/funcs_1/t/memory_views.test @@ -5,40 +5,18 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/memory_tb2.inc - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/memory_tb2.inc - USE test; - -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/memory_tb2.inc +--disable_warnings +DROP DATABASE IF EXISTS test1; +--enable_warnings +CREATE DATABASE test1; +USE test1; +--source suite/funcs_1/include/memory_tb2.inc +USE test; --source suite/funcs_1/views/views_master.inc - -# If we created the database in the above loop we now need to drop it -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - DROP DATABASE IF EXISTS test1; -} +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/myisam__datadict.test b/mysql-test/suite/funcs_1/t/myisam__datadict.test deleted file mode 100644 index e4baba1de3a..00000000000 --- a/mysql-test/suite/funcs_1/t/myisam__datadict.test +++ /dev/null @@ -1,10 +0,0 @@ -#### suite/funcs_1/t/datadict_myisam.test -# - -let $engine_type= myisam; -# $OTHER_ENGINE_TYPE must be -# - <> $engine_type -# - all time available like MyISAM or MEMORY -let $OTHER_ENGINE_TYPE= MEMORY; - ---source suite/funcs_1/datadict/datadict_master.inc diff --git a/mysql-test/suite/funcs_1/t/myisam__load.test b/mysql-test/suite/funcs_1/t/myisam__load.test deleted file mode 100644 index b63044f128c..00000000000 --- a/mysql-test/suite/funcs_1/t/myisam__load.test +++ /dev/null @@ -1,45 +0,0 @@ -##### suite/funcs_1/funcs_1/t/myisam__load.test - -# MyISAM tables should be used -# -# Set $engine_type -let $engine_type= myisam; - -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means all objects have to be (re)created within the current script. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means the current script must not (re)create any object and every -# testscript/case (re)creates only the objects it needs. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb1.inc - --source suite/funcs_1/include/myisam_tb2.inc - --source suite/funcs_1/include/myisam_tb3.inc - --source suite/funcs_1/include/myisam_tb4.inc - - # The database test1 is needed for the VIEW testcases - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/myisam_tb2.inc - USE test; - - # These tables are needed for the stored procedure testscases - --source suite/funcs_1/include/sp_tb.inc - - let $run= 0; -} - diff --git a/mysql-test/suite/funcs_1/t/myisam_bitdata.test b/mysql-test/suite/funcs_1/t/myisam_bitdata.test index 7ee15e02ea0..fc00cf478c7 100644 --- a/mysql-test/suite/funcs_1/t/myisam_bitdata.test +++ b/mysql-test/suite/funcs_1/t/myisam_bitdata.test @@ -5,28 +5,12 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: bitdata tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb4.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb4.inc --source suite/funcs_1/bitdata/bitdata_master.test - diff --git a/mysql-test/suite/funcs_1/t/myisam_cursors.test b/mysql-test/suite/funcs_1/t/myisam_cursors.test index 841903148cd..390d6cc1896 100644 --- a/mysql-test/suite/funcs_1/t/myisam_cursors.test +++ b/mysql-test/suite/funcs_1/t/myisam_cursors.test @@ -5,28 +5,13 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: cursor tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb1.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb1.inc --source suite/funcs_1/cursors/cursors_master.test diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_02.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_03.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_06.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_07.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_08.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test b/mysql-test/suite/funcs_1/t/myisam_storedproc_10.test old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test index 77bde5f99ef..fd326b2f061 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0102.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_0102.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03.test b/mysql-test/suite/funcs_1/t/myisam_trig_03.test index 6edaaf7d14c..77b2d16a2a6 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_03.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_03.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_03.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test index a28959b407e..e1e9b6fd230 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_0407.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_0407.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_08.test b/mysql-test/suite/funcs_1/t/myisam_trig_08.test index dda01314052..225d994a732 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_08.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_08.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_08.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_09.test b/mysql-test/suite/funcs_1/t/myisam_trig_09.test index 9f2c932e608..f5c53f48adb 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_09.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_09.test @@ -5,28 +5,10 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_09.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test index b4d29476aa5..bbf226cdea6 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test @@ -14,19 +14,10 @@ let $engine_type= myisam; # - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) # That means all objects have to be (re)created within the current script. -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -# FIXME Replace the following, when "if" for mysqltest is available -let $run= `SELECT @NO_REFRESH = 0`; -while ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb3.inc - - let $run= 0; -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb3.inc --source suite/funcs_1/triggers/triggers_1011ext.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/myisam_views.test b/mysql-test/suite/funcs_1/t/myisam_views.test index 3fa50a3a2a0..7fc1b991dc6 100644 --- a/mysql-test/suite/funcs_1/t/myisam_views.test +++ b/mysql-test/suite/funcs_1/t/myisam_views.test @@ -5,33 +5,16 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/myisam_tb2.inc - --disable_warnings - DROP DATABASE IF EXISTS test1; - --enable_warnings - CREATE DATABASE test1; - USE test1; - --source suite/funcs_1/include/myisam_tb2.inc - USE test; - -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/myisam_tb2.inc +--disable_warnings +DROP DATABASE IF EXISTS test1; +--enable_warnings +CREATE DATABASE test1; +USE test1; +--source suite/funcs_1/include/myisam_tb2.inc +USE test; let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6 (Complicated nested VIEWs) has to be limited to 20 because of @@ -40,10 +23,6 @@ let $message= Attention: The nesting level @max_level in Testcase 3.3.1.A6 SET @limit1 = 20; --source suite/funcs_1/views/views_master.inc -# If we created the database in the above loop we now need to drop it -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - DROP DATABASE IF EXISTS test1; -} +DROP DATABASE test1; +DROP TABLE test.tb2; From 0ba100d3031d78631b9d56d439f0845887fc880e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 21:14:34 +0300 Subject: [PATCH 394/527] Fix for bug #34650: Test suite without cluster fails on Mac OS X Leopard. The change_user test failed because results of some statements depended on platform and server build flags. subselect_notembedded failure was a result of a bad merge from 5.0. Fixed the corresponding test cases. mysql-test/r/change_user.result: Fixed the test case. mysql-test/r/subselect.result: Fixed the test case. mysql-test/r/subselect_notembedded.result: Fixed the test case. mysql-test/t/change_user.test: Fixed the test case. mysql-test/t/subselect.test: Fixed the test case. mysql-test/t/subselect_notembedded.test: Fixed the test case. --- mysql-test/r/change_user.result | 4 +- mysql-test/r/subselect.result | 35 ------ mysql-test/r/subselect_notembedded.result | 129 ++++++---------------- mysql-test/t/change_user.test | 7 ++ mysql-test/t/subselect.test | 46 -------- mysql-test/t/subselect_notembedded.test | 126 +++++++-------------- 6 files changed, 80 insertions(+), 267 deletions(-) diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result index 28b55dfd5e5..a075c01fe61 100644 --- a/mysql-test/r/change_user.result +++ b/mysql-test/r/change_user.result @@ -4,14 +4,14 @@ SELECT @@session.sql_big_selects; 1 SELECT @@global.max_join_size; @@global.max_join_size -18446744073709551615 +HA_POS_ERROR change_user SELECT @@session.sql_big_selects; @@session.sql_big_selects 1 SELECT @@global.max_join_size; @@global.max_join_size -18446744073709551615 +HA_POS_ERROR SET @@global.max_join_size = 10000; SET @@session.max_join_size = default; change_user diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index fe8374d665b..20d44933128 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4155,41 +4155,6 @@ SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1; 0 0 DROP TABLE t1, t2; -create table t1(a int,b int,key(a),key(b)); -insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), -(6,7),(7,4),(5,3); -5 -4 -3 -2 -1 -26 -25 -24 -23 -22 -21 -20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 -drop table t1; CREATE TABLE t1 (s1 BINARY(5), s2 VARBINARY(5)); INSERT INTO t1 VALUES (0x41,0x41), (0x42,0x42), (0x43,0x43); SELECT s1, s2 FROM t1 WHERE s2 IN (SELECT s1 FROM t1); diff --git a/mysql-test/r/subselect_notembedded.result b/mysql-test/r/subselect_notembedded.result index 90aadcae398..9ef8c492ee3 100644 --- a/mysql-test/r/subselect_notembedded.result +++ b/mysql-test/r/subselect_notembedded.result @@ -4,101 +4,36 @@ purge master logs before adddate(current_timestamp(), interval -4 day); create table t1(a int,b int,key(a),key(b)); insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), (6,7),(7,4),(5,3); -select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 -)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -sum(a) a -select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -ERROR HY000: Thread stack overrun detected -explain select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 -)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 index a a 5 NULL 9 Using where; Using index -2 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -3 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -4 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -5 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -6 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -7 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -8 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -9 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -10 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -11 SUBQUERY t1 index a b 5 NULL 9 Using where; Using filesort -12 SUBQUERY t1 range a a 5 NULL 1 Using where; Using temporary; Using filesort -13 SUBQUERY t1 index NULL a 5 NULL 9 Using index -explain select sum(a),a from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( -select sum(a) from t1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1 -)group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -ERROR HY000: Thread stack overrun detected +5 +4 +3 +2 +1 +26 +25 +24 +23 +22 +21 +20 +19 +18 +17 +16 +15 +14 +13 +12 +11 +10 +9 +8 +7 +6 +5 +4 +3 +2 +1 drop table t1; +End of 5.1 tests diff --git a/mysql-test/t/change_user.test b/mysql-test/t/change_user.test index d0cdfc8a741..bc29895eb47 100644 --- a/mysql-test/t/change_user.test +++ b/mysql-test/t/change_user.test @@ -4,17 +4,24 @@ --echo Bug#20023 SELECT @@session.sql_big_selects; +# The exact value depends on the server build flags +--replace_result 4294967295 HA_POS_ERROR 18446744073709551615 HA_POS_ERROR SELECT @@global.max_join_size; --echo change_user --change_user SELECT @@session.sql_big_selects; +# The exact value depends on the server build flags +--replace_result 4294967295 HA_POS_ERROR 18446744073709551615 HA_POS_ERROR SELECT @@global.max_join_size; SET @@global.max_join_size = 10000; SET @@session.max_join_size = default; --echo change_user --change_user SELECT @@session.sql_big_selects; +# May produce a warning depending on server build flags +--disable_warnings SET @@global.max_join_size = -1; +--enable_warnings SET @@session.max_join_size = default; --echo change_user --change_user diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index fb3e59cc9d6..c86b0fefbdc 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3015,52 +3015,6 @@ INSERT INTO t2 VALUES (103, 203); SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1; DROP TABLE t1, t2; -# -# Bug31048: Many nested subqueries may cause server crash. -# -create table t1(a int,b int,key(a),key(b)); -insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), - (6,7),(7,4),(5,3); - -let $nesting= 26; -let $should_work_nesting= 5; -let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ; -let $end= )group by a ; -let $start_app= where a> ( select sum(a) from t1 ; -let $end_pre= )group by b limit 1 ; - ---disable_result_log ---disable_query_log -# At least 4 level nesting should work without errors -while ($should_work_nesting) -{ ---echo $should_work_nesting - eval $start $end; - eval explain $start $end; - let $start= $start - $start_app; - let $end= $end_pre - $end; - dec $should_work_nesting; -} -# Other may fail with the 'stack overrun error' -while ($nesting) -{ ---echo $nesting ---error 0,1436 - eval $start $end; ---error 0,1436 - eval explain $start $end; - let $start= $start - $start_app; - let $end= $end_pre - $end; - dec $nesting; -} ---enable_result_log ---enable_query_log -drop table t1; - # # Bug #28076: inconsistent binary/varbinary comparison # diff --git a/mysql-test/t/subselect_notembedded.test b/mysql-test/t/subselect_notembedded.test index 040c90452b9..2f1cc261f56 100644 --- a/mysql-test/t/subselect_notembedded.test +++ b/mysql-test/t/subselect_notembedded.test @@ -14,92 +14,44 @@ purge master logs before adddate(current_timestamp(), interval -4 day); create table t1(a int,b int,key(a),key(b)); insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5), (6,7),(7,4),(5,3); -# test for the stack overflow bug -select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 - )group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; ---replace_regex /overrun.*$/overrun detected/ ---error 1436 -select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; -# test for the memory consumption & subquery slowness bug -explain select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 - )group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; ---replace_regex /overrun.*$/overrun detected/ ---error 1436 -explain select sum(a),a from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 where a> ( select sum(a) from t1 where a> ( - select sum(a) from t1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1 - )group by b limit 1)group by b limit 1)group by b limit 1) -group by a; + +let $nesting= 26; +let $should_work_nesting= 5; +let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ; +let $end= )group by a ; +let $start_app= where a> ( select sum(a) from t1 ; +let $end_pre= )group by b limit 1 ; + +--disable_result_log +--disable_query_log +# At least 4 level nesting should work without errors +while ($should_work_nesting) +{ +--echo $should_work_nesting + eval $start $end; + eval explain $start $end; + let $start= $start + $start_app; + let $end= $end_pre + $end; + dec $should_work_nesting; +} +# Other may fail with the 'stack overrun error' +while ($nesting) +{ +--echo $nesting +--error 0,1436 + eval $start $end; +--error 0,1436 + eval explain $start $end; + let $start= $start + $start_app; + let $end= $end_pre + $end; + dec $nesting; +} +--enable_result_log +--enable_query_log drop table t1; - +--echo End of 5.1 tests From 0e679ab782e6968b159bcca8cdf307e5602dd3ea Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 21:14:28 +0200 Subject: [PATCH 395/527] Bug #26622 MASTER_POS_WAIT does not work as documented Affected tests fixing. After the fix for st_relay_log_info::wait_for_pos() that handles widely used select('master-bin.xxxx',pos) invoked by mysqltest there appeared to be four tests that either tried synchronizing when the slave was stopped or used incorrect synchronization method like to call `sync_with_master' from the current connection being to the master itself. Fixed with correcting the current connection or/and using the correct synchronization macro when possible. mysql-test/r/rpl_loaddata.result: results changed mysql-test/r/rpl_slave_status.result: results changed mysql-test/t/rpl_loaddata.test: fixing cleanup for two tests mysql-test/t/rpl_skip_error.test: fixing cleanup for two tests mysql-test/t/rpl_slave_status.test: fixing cleanup mysql-test/t/rpl_temporary.test: fixing synchronizations to use the intended correct macro. --- mysql-test/r/rpl_loaddata.result | 3 ++- mysql-test/r/rpl_slave_status.result | 1 + mysql-test/t/rpl_loaddata.test | 13 +++++++++++-- mysql-test/t/rpl_skip_error.test | 5 +++-- mysql-test/t/rpl_slave_status.test | 6 +++++- mysql-test/t/rpl_temporary.test | 5 +++-- 6 files changed, 25 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index be137079c7a..e704ada657b 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -77,7 +77,8 @@ load data infile '../std_data_ln/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 1 -drop table t2; +set @@global.sql_slave_skip_counter=1; +start slave; drop table t2; drop table t1; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result index 9a4ec4131b0..641a65f5ed7 100644 --- a/mysql-test/r/rpl_slave_status.result +++ b/mysql-test/r/rpl_slave_status.result @@ -53,3 +53,4 @@ Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master NULL drop table t1; +drop table t1; diff --git a/mysql-test/t/rpl_loaddata.test b/mysql-test/t/rpl_loaddata.test index a4781ed4faa..ee80bdfde45 100644 --- a/mysql-test/t/rpl_loaddata.test +++ b/mysql-test/t/rpl_loaddata.test @@ -147,12 +147,20 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines; connection slave; wait_for_slave_to_stop; -drop table t2; + +# cleanup: + +set @@global.sql_slave_skip_counter=1; +start slave; + connection master; drop table t2; drop table t1; +sync_slave_with_master; + # BUG#17233 LOAD DATA INFILE: failure causes mysqld dbug_assert, binlog not flushed +connection master; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; --error 1062 @@ -160,5 +168,6 @@ LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1; DROP TABLE t1; -sync_with_master; +sync_slave_with_master; + # End of 4.1 tests diff --git a/mysql-test/t/rpl_skip_error.test b/mysql-test/t/rpl_skip_error.test index baa7a88b8bb..0e3fd5d9e0d 100644 --- a/mysql-test/t/rpl_skip_error.test +++ b/mysql-test/t/rpl_skip_error.test @@ -15,12 +15,13 @@ select * from t1; connection master; drop table t1; -sync_with_master; +sync_slave_with_master; # End of 4.1 tests # # #28839 Errors in strict mode silently stop SQL thread if --slave-skip-errors exists # +connection master; create table t1(a int primary key); insert into t1 values (1),(2); delete from t1 where @@server_id=1; @@ -36,5 +37,5 @@ select * from t1; show slave status; connection master; drop table t1; -sync_with_master; +sync_slave_with_master; # End of 5.0 tests diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test index b97b769d181..527e230854a 100644 --- a/mysql-test/t/rpl_slave_status.test +++ b/mysql-test/t/rpl_slave_status.test @@ -29,8 +29,12 @@ start slave; --vertical_results show slave status; +# cleanup: slave io thread has been stopped "irrecoverably" +# so we clean up mess manually + connection master; drop table t1; -sync_with_master; +connection slave; +drop table t1; # end of 4.1 tests diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test index a7a15aebe7a..516f3a026c9 100644 --- a/mysql-test/t/rpl_temporary.test +++ b/mysql-test/t/rpl_temporary.test @@ -130,7 +130,7 @@ drop table t1,t2; # don't get any memory leaks for this create temporary table t3 (f int); -sync_with_master; +sync_slave_with_master; # The server will now close done @@ -141,7 +141,8 @@ sync_with_master; connection master; create temporary table t4 (f int); create table t5 (f int); -sync_with_master; +sync_slave_with_master; +connection master; # find dumper's $id source include/get_binlog_dump_thread_id.inc; insert into t4 values (1); From 633cc34ca7349e2f77dec460db081bf8ba469e87 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Mar 2008 20:18:14 +0100 Subject: [PATCH 396/527] Post merge fixes after ChangeSet@1.2561, 2008-03-07 17:44:03+01:00, mleich@five.local.lan +132 -0 Merge five.local.lan:/work/merge/mysql-5.0-funcs_1 into five.local.lan:/work/merge/mysql-5.1-funcs_1 MERGE: 1.1810.3473.24 ChangeSet@1.1810.3473.24, 2008-03-07 WL#4203 Reorganize and fix the data dictionary tests of testsuite funcs_1 1. Adjustment of expected results to modified server properties 2. Add some tests of information_schema views 3. Minor corrections and improvements BitKeeper/deleted/.del-ndb__datadict.result: Delete: mysql-test/suite/funcs_1/r/ndb__datadict.result BitKeeper/deleted/.del-ndb__datadict.test: Delete: mysql-test/suite/funcs_1/t/ndb__datadict.test BitKeeper/deleted/.del-ndb__load.test: Delete: mysql-test/suite/funcs_1/t/ndb__load.test BitKeeper/deleted/.del-ndb__load.result: Delete: mysql-test/suite/funcs_1/r/ndb__load.result mysql-test/suite/funcs_1/r/memory_storedproc_07.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/memory_storedproc_02.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/memory_storedproc_03.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/memory_storedproc_08.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/memory_storedproc_10.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/innodb_storedproc_02.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/innodb_storedproc_03.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/innodb_storedproc_07.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/innodb_storedproc_08.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/innodb_storedproc_10.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/myisam_storedproc_02.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/myisam_storedproc_03.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/myisam_storedproc_07.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/myisam_storedproc_08.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/r/myisam_storedproc_10.result: Change mode to -rw-rw-r-- mysql-test/suite/funcs_1/datadict/processlist_priv.inc: Make the results independend of amount of preceding tests. mysql-test/suite/funcs_1/datadict/processlist_val.inc: Correct the cleanup mysql-test/suite/funcs_1/r/charset_collation_1.result: Updated results mysql-test/suite/funcs_1/r/charset_collation_2.result: Updated results mysql-test/suite/funcs_1/r/innodb_func_view.result: Updated results mysql-test/suite/funcs_1/r/innodb_storedproc.result: Updated results mysql-test/suite/funcs_1/r/is_basics_mixed.result: Updated results mysql-test/suite/funcs_1/r/is_character_sets.result: Updated results mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result: Updated results mysql-test/suite/funcs_1/r/is_collations.result: Updated results mysql-test/suite/funcs_1/r/is_column_privileges.result: Updated results mysql-test/suite/funcs_1/r/is_columns.result: Updated results mysql-test/suite/funcs_1/r/is_columns_innodb.result: Updated results mysql-test/suite/funcs_1/r/is_columns_is.result: Updated results mysql-test/suite/funcs_1/r/is_columns_memory.result: Updated results mysql-test/suite/funcs_1/r/is_columns_myisam.result: Updated results mysql-test/suite/funcs_1/r/is_columns_mysql.result: Updated results mysql-test/suite/funcs_1/r/is_key_column_usage.result: Updated results mysql-test/suite/funcs_1/r/is_routines.result: Updated results mysql-test/suite/funcs_1/r/is_schema_privileges.result: Updated results mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result: Updated results mysql-test/suite/funcs_1/r/is_schemata.result: Updated results mysql-test/suite/funcs_1/r/is_statistics.result: Updated results mysql-test/suite/funcs_1/r/is_statistics_mysql.result: Updated results mysql-test/suite/funcs_1/r/is_table_constraints.result: Updated results mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result: Updated results mysql-test/suite/funcs_1/r/is_table_privileges.result: Updated results mysql-test/suite/funcs_1/r/is_tables.result: Updated results mysql-test/suite/funcs_1/r/is_tables_is.result: Updated results mysql-test/suite/funcs_1/r/is_tables_mysql.result: Updated results mysql-test/suite/funcs_1/r/is_tables_ndb.result: Updated results mysql-test/suite/funcs_1/r/is_triggers.result: Updated results mysql-test/suite/funcs_1/r/is_user_privileges.result: Updated results mysql-test/suite/funcs_1/r/is_views.result: Updated results mysql-test/suite/funcs_1/r/memory_func_view.result: Updated results mysql-test/suite/funcs_1/r/memory_storedproc.result: Updated results mysql-test/suite/funcs_1/r/myisam_func_view.result: Updated results mysql-test/suite/funcs_1/r/myisam_storedproc.result: Updated results mysql-test/suite/funcs_1/r/myisam_views.result: Updated results mysql-test/suite/funcs_1/r/ndb_func_view.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc_02.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc_03.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc_07.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc_08.result: Updated results mysql-test/suite/funcs_1/r/ndb_storedproc_10.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_priv_ps.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_no_prot.result: Updated results mysql-test/suite/funcs_1/r/processlist_val_ps.result: Updated results mysql-test/suite/funcs_1/storedproc/storedproc_master.inc: Set subtest checking a no more reserved keyword to comment. mysql-test/suite/funcs_1/t/disabled.def: ndb__datadict is dropped. The checks are done in other scripts. mysql-test/suite/funcs_1/t/is_routines.test: Correction of comment mysql-test/suite/funcs_1/t/is_triggers.test: Adjustment to changes in privilege system between MySQL 5.0 and 5.1. mysql-test/suite/funcs_1/t/is_views.test: Correction of comment. mysql-test/suite/funcs_1/t/processlist_priv_no_prot.test: Correction of comment. mysql-test/suite/funcs_1/t/processlist_priv_ps.test: Correction of comment. mysql-test/suite/funcs_1/t/processlist_val_no_prot.test: Correction of comment. mysql-test/suite/funcs_1/t/processlist_val_ps.test: Correction of comment. mysql-test/suite/funcs_1/r/is_engines.result: Expected results mysql-test/suite/funcs_1/r/is_engines_archive.result: Expected results mysql-test/suite/funcs_1/r/is_engines_blackhole.result: Expected results mysql-test/suite/funcs_1/r/is_engines_csv.result: Expected results mysql-test/suite/funcs_1/r/is_engines_federated.result: Expected results mysql-test/suite/funcs_1/r/is_engines_innodb.result: Expected results mysql-test/suite/funcs_1/r/is_engines_memory.result: Expected results mysql-test/suite/funcs_1/r/is_engines_merge.result: Expected results mysql-test/suite/funcs_1/r/is_engines_myisam.result: Expected results mysql-test/suite/funcs_1/t/is_engines.test: Test of information_schema.engines mysql-test/suite/funcs_1/t/is_engines_archive.test: Test of information_schema.engines Variant for ARCHIVE mysql-test/suite/funcs_1/t/is_engines_blackhole.test: Test of information_schema.engines Variant for BLACKHOLE mysql-test/suite/funcs_1/t/is_engines_csv.test: Test of information_schema.engines Variant for CSV mysql-test/suite/funcs_1/t/is_engines_federated.test: Test of information_schema.engines Variant for FEDERATED mysql-test/suite/funcs_1/t/is_engines_innodb.test: Test of information_schema.engines Variant for InnoDB mysql-test/suite/funcs_1/t/is_engines_memory.test: Test of information_schema.engines Variant for MEMORY mysql-test/suite/funcs_1/t/is_engines_merge.test: Test of information_schema.engines Variant for MERGGE mysql-test/suite/funcs_1/t/is_engines_myisam.test: Test of information_schema.engines Variant for MyISAM mysql-test/suite/funcs_1/t/is_engines_ndb.test: Test of information_schema.engines Variant for NDB mysql-test/suite/funcs_1/t/is_events.test: Test for information_schema.events mysql-test/suite/funcs_1/r/is_engines_ndb.result: Expected results mysql-test/suite/funcs_1/r/is_events.result: Expected results --- .../funcs_1/datadict/processlist_priv.inc | 56 +- .../funcs_1/datadict/processlist_val.inc | 1 + .../funcs_1/r/charset_collation_1.result | 3 + .../funcs_1/r/charset_collation_2.result | 3 + .../suite/funcs_1/r/innodb_func_view.result | 106 +- .../suite/funcs_1/r/innodb_storedproc.result | 9 - .../funcs_1/r/innodb_storedproc_02.result | 0 .../funcs_1/r/innodb_storedproc_03.result | 0 .../funcs_1/r/innodb_storedproc_07.result | 0 .../funcs_1/r/innodb_storedproc_08.result | 0 .../funcs_1/r/innodb_storedproc_10.result | 0 .../suite/funcs_1/r/is_basics_mixed.result | 2 +- .../suite/funcs_1/r/is_character_sets.result | 8 +- ...llation_character_set_applicability.result | 4 +- .../suite/funcs_1/r/is_collations.result | 12 +- .../funcs_1/r/is_column_privileges.result | 16 +- mysql-test/suite/funcs_1/r/is_columns.result | 58 +- .../suite/funcs_1/r/is_columns_innodb.result | 2 +- .../suite/funcs_1/r/is_columns_is.result | 336 +- .../suite/funcs_1/r/is_columns_memory.result | 2 +- .../suite/funcs_1/r/is_columns_myisam.result | 2 +- .../suite/funcs_1/r/is_columns_mysql.result | 174 +- mysql-test/suite/funcs_1/r/is_engines.result | 84 + .../suite/funcs_1/r/is_engines_archive.result | 8 + .../funcs_1/r/is_engines_blackhole.result | 8 + .../suite/funcs_1/r/is_engines_csv.result | 8 + .../funcs_1/r/is_engines_federated.result | 8 + .../suite/funcs_1/r/is_engines_innodb.result | 8 + .../suite/funcs_1/r/is_engines_memory.result | 8 + .../suite/funcs_1/r/is_engines_merge.result | 8 + .../suite/funcs_1/r/is_engines_myisam.result | 8 + .../suite/funcs_1/r/is_engines_ndb.result | 8 + mysql-test/suite/funcs_1/r/is_events.result | 148 + .../funcs_1/r/is_key_column_usage.result | 24 +- mysql-test/suite/funcs_1/r/is_routines.result | 84 +- .../funcs_1/r/is_schema_privileges.result | 10 +- .../is_schema_privileges_is_mysql_test.result | 2 + mysql-test/suite/funcs_1/r/is_schemata.result | 10 +- .../suite/funcs_1/r/is_statistics.result | 30 +- .../funcs_1/r/is_statistics_mysql.result | 5 + .../funcs_1/r/is_table_constraints.result | 12 +- .../r/is_table_constraints_mysql.result | 4 + .../funcs_1/r/is_table_privileges.result | 16 +- mysql-test/suite/funcs_1/r/is_tables.result | 78 +- .../suite/funcs_1/r/is_tables_is.result | 570 +- .../suite/funcs_1/r/is_tables_mysql.result | 138 + .../suite/funcs_1/r/is_tables_ndb.result | 23 - mysql-test/suite/funcs_1/r/is_triggers.result | 100 +- .../suite/funcs_1/r/is_user_privileges.result | 96 +- mysql-test/suite/funcs_1/r/is_views.result | 46 +- .../suite/funcs_1/r/memory_func_view.result | 106 +- .../suite/funcs_1/r/memory_storedproc.result | 9 - .../funcs_1/r/memory_storedproc_02.result | 0 .../funcs_1/r/memory_storedproc_03.result | 0 .../funcs_1/r/memory_storedproc_07.result | 0 .../funcs_1/r/memory_storedproc_08.result | 0 .../funcs_1/r/memory_storedproc_10.result | 0 .../suite/funcs_1/r/myisam_func_view.result | 106 +- .../suite/funcs_1/r/myisam_storedproc.result | 9 - .../funcs_1/r/myisam_storedproc_02.result | 0 .../funcs_1/r/myisam_storedproc_03.result | 0 .../funcs_1/r/myisam_storedproc_07.result | 0 .../funcs_1/r/myisam_storedproc_08.result | 0 .../funcs_1/r/myisam_storedproc_10.result | 0 .../suite/funcs_1/r/myisam_views.result | 4 +- .../suite/funcs_1/r/ndb__datadict.result | 14787 ---------------- mysql-test/suite/funcs_1/r/ndb__load.result | 1 - .../suite/funcs_1/r/ndb_func_view.result | 106 +- .../suite/funcs_1/r/ndb_storedproc.result | 9 - .../suite/funcs_1/r/ndb_storedproc_02.result | 2 - .../suite/funcs_1/r/ndb_storedproc_03.result | 2 - .../suite/funcs_1/r/ndb_storedproc_07.result | 2 - .../suite/funcs_1/r/ndb_storedproc_08.result | 2 - .../suite/funcs_1/r/ndb_storedproc_10.result | 2 - ...result => processlist_priv_no_prot.result} | 222 +- ...v_ps.result => processlist_priv_ps.result} | 222 +- ....result => processlist_val_no_prot.result} | 1 + ...al_ps.result => processlist_val_ps.result} | 1 + .../funcs_1/storedproc/storedproc_master.inc | 14 +- mysql-test/suite/funcs_1/t/disabled.def | 1 - mysql-test/suite/funcs_1/t/is_engines.test | 126 + .../suite/funcs_1/t/is_engines_archive.test | 15 + .../suite/funcs_1/t/is_engines_blackhole.test | 15 + .../suite/funcs_1/t/is_engines_csv.test | 15 + .../suite/funcs_1/t/is_engines_federated.test | 15 + .../suite/funcs_1/t/is_engines_innodb.test | 15 + .../suite/funcs_1/t/is_engines_memory.test | 14 + .../suite/funcs_1/t/is_engines_merge.test | 14 + .../suite/funcs_1/t/is_engines_myisam.test | 14 + .../suite/funcs_1/t/is_engines_ndb.test | 15 + mysql-test/suite/funcs_1/t/is_events.test | 169 + mysql-test/suite/funcs_1/t/is_routines.test | 4 + mysql-test/suite/funcs_1/t/is_triggers.test | 18 +- mysql-test/suite/funcs_1/t/is_views.test | 3 + mysql-test/suite/funcs_1/t/ndb__datadict.test | 11 - mysql-test/suite/funcs_1/t/ndb__load.test | 43 - ...rot.test => processlist_priv_no_prot.test} | 8 +- ..._priv_ps.test => processlist_priv_ps.test} | 8 +- ...prot.test => processlist_val_no_prot.test} | 8 +- ...st_val_ps.test => processlist_val_ps.test} | 8 +- 100 files changed, 2716 insertions(+), 15776 deletions(-) mode change 100755 => 100644 mysql-test/suite/funcs_1/r/innodb_storedproc_02.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/innodb_storedproc_03.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/innodb_storedproc_07.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/innodb_storedproc_08.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/innodb_storedproc_10.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_archive.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_blackhole.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_csv.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_federated.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_innodb.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_memory.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_merge.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_myisam.result create mode 100644 mysql-test/suite/funcs_1/r/is_engines_ndb.result create mode 100644 mysql-test/suite/funcs_1/r/is_events.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/memory_storedproc_02.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/memory_storedproc_03.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/memory_storedproc_07.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/memory_storedproc_08.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/memory_storedproc_10.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/myisam_storedproc_02.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/myisam_storedproc_03.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/myisam_storedproc_07.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/myisam_storedproc_08.result mode change 100755 => 100644 mysql-test/suite/funcs_1/r/myisam_storedproc_10.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb__datadict.result delete mode 100644 mysql-test/suite/funcs_1/r/ndb__load.result rename mysql-test/suite/funcs_1/r/{a_processlist_priv_no_prot.result => processlist_priv_no_prot.result} (74%) rename mysql-test/suite/funcs_1/r/{b_processlist_priv_ps.result => processlist_priv_ps.result} (74%) rename mysql-test/suite/funcs_1/r/{a_processlist_val_no_prot.result => processlist_val_no_prot.result} (99%) rename mysql-test/suite/funcs_1/r/{b_processlist_val_ps.result => processlist_val_ps.result} (99%) create mode 100644 mysql-test/suite/funcs_1/t/is_engines.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_archive.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_blackhole.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_csv.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_federated.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_innodb.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_memory.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_merge.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_myisam.test create mode 100644 mysql-test/suite/funcs_1/t/is_engines_ndb.test create mode 100644 mysql-test/suite/funcs_1/t/is_events.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb__datadict.test delete mode 100644 mysql-test/suite/funcs_1/t/ndb__load.test rename mysql-test/suite/funcs_1/t/{a_processlist_priv_no_prot.test => processlist_priv_no_prot.test} (76%) rename mysql-test/suite/funcs_1/t/{b_processlist_priv_ps.test => processlist_priv_ps.test} (75%) rename mysql-test/suite/funcs_1/t/{a_processlist_val_no_prot.test => processlist_val_no_prot.test} (73%) rename mysql-test/suite/funcs_1/t/{b_processlist_val_ps.test => processlist_val_ps.test} (72%) diff --git a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc index 337ddf5df60..24df7ef8948 100644 --- a/mysql-test/suite/funcs_1/datadict/processlist_priv.inc +++ b/mysql-test/suite/funcs_1/datadict/processlist_priv.inc @@ -112,11 +112,11 @@ connect (con100,localhost,ddicttestuser1,ddictpass,information_schema); --echo #################################################################################### connection default; eval SHOW CREATE TABLE $table; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SHOW $table; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SELECT * FROM $table $select_where ORDER BY id; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SELECT $columns FROM $table $select_where ORDER BY id; --source suite/funcs_1/datadict/datadict_priv.inc --real_sleep 0.3 @@ -128,11 +128,11 @@ connection con100; --echo SHOW/SELECT shows only the processes (1) of the user. --echo #################################################################################### eval SHOW CREATE TABLE $table; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SHOW $table; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SELECT * FROM $table $select_where ORDER BY id; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME eval SELECT $columns FROM $table $select_where ORDER BY id; --source suite/funcs_1/datadict/datadict_priv.inc --real_sleep 0.3 @@ -154,9 +154,9 @@ GRANT PROCESS ON *.* TO ddicttestuser1@'localhost' IDENTIFIED BY 'ddictpass'; --echo #################################################################################### connection con100; SHOW GRANTS; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -166,9 +166,9 @@ SELECT * FROM information_schema.processlist; --echo #################################################################################### connect (con101,localhost,ddicttestuser1,ddictpass,information_schema); SHOW GRANTS; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -188,9 +188,9 @@ GRANT PROCESS ON *.* TO ''@'localhost'; --echo #################################################################################### connect (anonymous1,localhost,'',,information_schema); SHOW GRANTS; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -210,9 +210,9 @@ connect (con102,localhost,ddicttestuser1,ddictpass,information_schema); --echo ddicttestuser1 are visible. --echo #################################################################################### SHOW GRANTS; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -235,10 +235,10 @@ SHOW GRANTS FOR ''@'localhost'; if ($fixed_bug_30395) { # Bug#30395 strange results after REVOKE PROCESS ON *.* FROM ... ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; } ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -257,9 +257,9 @@ connect (con103,localhost,ddicttestuser1,ddictpass,information_schema); --echo Only the processes of ddicttestuser1 user are visible. --echo #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -279,9 +279,9 @@ connect (con104,localhost,ddicttestuser1,ddictpass,information_schema); --echo Only the processes of ddicttestuser1 are visible. --echo #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -326,9 +326,9 @@ connect (con200,localhost,ddicttestuser2,ddictpass,information_schema); --echo ddicttestuser2 has now the PROCESS privilege and sees all connections --echo #################################################################################### SHOW GRANTS FOR 'ddicttestuser2'@'localhost'; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -347,9 +347,9 @@ connect (con201,localhost,ddicttestuser2,ddictpass,information_schema); --echo ddicttestuser2 has no more the PROCESS privilege and can only see own connects --echo #################################################################################### SHOW GRANTS; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -370,9 +370,9 @@ connect (con107,localhost,ddicttestuser1,ddictpass,information_schema); SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; --error ER_ACCESS_DENIED_ERROR GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 @@ -394,9 +394,9 @@ connect (con108,localhost,ddicttestuser1,ddictpass,information_schema); --echo Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST. --echo #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SHOW processlist; ---replace_column 6 TIME +--replace_column 1 ID 6 TIME SELECT * FROM information_schema.processlist; --real_sleep 0.3 diff --git a/mysql-test/suite/funcs_1/datadict/processlist_val.inc b/mysql-test/suite/funcs_1/datadict/processlist_val.inc index f383cf20405..69a32553f65 100644 --- a/mysql-test/suite/funcs_1/datadict/processlist_val.inc +++ b/mysql-test/suite/funcs_1/datadict/processlist_val.inc @@ -306,3 +306,4 @@ connection default; --echo ----- close connection ddicttestuser1 ----- disconnect ddicttestuser1; DROP USER ddicttestuser1@'localhost'; +DROP TABLE test.t1; diff --git a/mysql-test/suite/funcs_1/r/charset_collation_1.result b/mysql-test/suite/funcs_1/r/charset_collation_1.result index d397c671321..55ed4b4704c 100644 --- a/mysql-test/suite/funcs_1/r/charset_collation_1.result +++ b/mysql-test/suite/funcs_1/r/charset_collation_1.result @@ -58,6 +58,7 @@ cp1250_bin cp1250 66 Yes 1 cp1250_croatian_ci cp1250 44 Yes 1 cp1250_czech_cs cp1250 34 Yes 2 cp1250_general_ci cp1250 26 Yes Yes 1 +cp1250_polish_ci cp1250 99 Yes 1 cp1251_bin cp1251 50 0 cp1251_bulgarian_ci cp1251 14 0 cp1251_general_ci cp1251 51 Yes 0 @@ -190,6 +191,7 @@ cp1250_bin cp1250 cp1250_croatian_ci cp1250 cp1250_czech_cs cp1250 cp1250_general_ci cp1250 +cp1250_polish_ci cp1250 cp1251_bin cp1251 cp1251_bulgarian_ci cp1251 cp1251_general_ci cp1251 @@ -214,6 +216,7 @@ eucjpms_bin eucjpms eucjpms_japanese_ci eucjpms euckr_bin euckr euckr_korean_ci euckr +filename filename gb2312_bin gb2312 gb2312_chinese_ci gb2312 gbk_bin gbk diff --git a/mysql-test/suite/funcs_1/r/charset_collation_2.result b/mysql-test/suite/funcs_1/r/charset_collation_2.result index 0035da13c56..a9fb15a588c 100644 --- a/mysql-test/suite/funcs_1/r/charset_collation_2.result +++ b/mysql-test/suite/funcs_1/r/charset_collation_2.result @@ -58,6 +58,7 @@ cp1250_bin cp1250 66 Yes 1 cp1250_croatian_ci cp1250 44 Yes 1 cp1250_czech_cs cp1250 34 Yes 2 cp1250_general_ci cp1250 26 Yes Yes 1 +cp1250_polish_ci cp1250 99 Yes 1 cp1251_bin cp1251 50 0 cp1251_bulgarian_ci cp1251 14 0 cp1251_general_ci cp1251 51 Yes 0 @@ -191,6 +192,7 @@ cp1250_bin cp1250 cp1250_croatian_ci cp1250 cp1250_czech_cs cp1250 cp1250_general_ci cp1250 +cp1250_polish_ci cp1250 cp1251_bin cp1251 cp1251_bulgarian_ci cp1251 cp1251_general_ci cp1251 @@ -215,6 +217,7 @@ eucjpms_bin eucjpms eucjpms_japanese_ci eucjpms euckr_bin euckr euckr_korean_ci euckr +filename filename gb2312_bin gb2312 gb2312_chinese_ci gb2312 gbk_bin gbk diff --git a/mysql-test/suite/funcs_1/r/innodb_func_view.result b/mysql-test/suite/funcs_1/r/innodb_func_view.result index 14568643665..69295414f07 100644 --- a/mysql-test/suite/funcs_1/r/innodb_func_view.result +++ b/mysql-test/suite/funcs_1/r/innodb_func_view.result @@ -307,7 +307,7 @@ 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(_latin1'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 +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; @@ -439,7 +439,7 @@ 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(_latin1'-',_latin1' - -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 +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; @@ -453,7 +453,7 @@ 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(_latin1'-',_latin1' - -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 +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; @@ -467,7 +467,7 @@ 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(_latin1'-',_latin1' - -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 +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; @@ -481,7 +481,7 @@ 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(_latin1'-',`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 +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; @@ -495,7 +495,7 @@ 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(_latin1'-',`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 +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; @@ -509,7 +509,7 @@ 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(_latin1'-',`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 +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; @@ -523,7 +523,7 @@ 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(_latin1'-',`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 +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; @@ -761,7 +761,7 @@ 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(_latin1'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 +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; @@ -775,7 +775,7 @@ 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(_latin1'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 +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; @@ -789,7 +789,7 @@ 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(_latin1'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 +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; @@ -803,7 +803,7 @@ 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(_latin1'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 +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; @@ -826,7 +826,7 @@ LOAD_FILE('../tmp/func_view.dat') id 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(_latin1'../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`t1_values`.`id` AS `id` from `t1_values` latin1 latin1_swedish_ci +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select load_file('../tmp/func_view.dat') AS `LOAD_FILE('../tmp/func_view.dat')`,`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; @@ -914,7 +914,7 @@ Warning 1292 Truncated incorrect INTEGER value: '-1.7976931348623e+308' Warning 1292 Truncated incorrect INTEGER value: '1.7976931348623e+308' 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(_latin1'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 +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; @@ -944,7 +944,7 @@ Error 1292 Truncated incorrect DECIMAL value: '' Error 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(_latin1'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 +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; @@ -971,7 +971,7 @@ AaBbCcDdEeFfGgHhIiJjÄäÜüÖö 9223372036854775807 3 -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(_latin1'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 +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; @@ -1101,7 +1101,7 @@ 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(_latin1'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 +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; @@ -1225,7 +1225,7 @@ IS_NULL NULL 1 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`,_latin1'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 +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; @@ -1251,7 +1251,7 @@ IS_NULL NULL 1 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`,_latin1'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 +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; @@ -1277,7 +1277,7 @@ IFNULL(my_timestamp,'IS_NULL') my_timestamp id 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`,_latin1'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 +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; @@ -1303,7 +1303,7 @@ IS_NULL NULL 1 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`,_latin1'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 +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; @@ -1329,7 +1329,7 @@ IS_NULL NULL 1 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`,_latin1'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 +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; @@ -1355,7 +1355,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1381,7 +1381,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1407,7 +1407,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1433,7 +1433,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1459,7 +1459,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1485,7 +1485,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1511,7 +1511,7 @@ IS_NULL NULL 1 -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`,_latin1'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 +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; @@ -1538,7 +1538,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_year IS NULL, 'IS NULL', +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 @@ -1567,7 +1567,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_time IS NULL, 'IS NULL', +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 @@ -1596,7 +1596,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_timestamp IS NULL, 'IS NULL', +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 @@ -1625,7 +1625,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_date IS NULL, 'IS NULL', +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 @@ -1654,7 +1654,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_datetime IS NULL, 'IS NULL', +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 @@ -1683,7 +1683,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_double IS NULL, 'IS NULL', +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 @@ -1712,7 +1712,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_decimal IS NULL, 'IS NULL', +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 @@ -1741,7 +1741,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_bigint IS NULL, 'IS NULL', +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 @@ -1770,7 +1770,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varbinary_1000 IS NULL, 'IS NULL', +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 @@ -1799,7 +1799,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_binary_30 IS NULL, 'IS NULL', +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 @@ -1828,7 +1828,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_varchar_1000 IS NULL, 'IS NULL', +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 @@ -1857,7 +1857,7 @@ 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`),_latin1'IS NULL',_latin1'IS NOT NULL') AS `IF(my_char_30 IS NULL, 'IS NULL', +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 @@ -1885,7 +1885,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -1911,7 +1911,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -1937,7 +1937,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -1963,7 +1963,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -1989,7 +1989,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -2015,7 +2015,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -2041,7 +2041,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -2067,7 +2067,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; @@ -2093,7 +2093,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 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_varbinary_1000`,_latin1'IS TRUE',_latin1'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 +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; @@ -2124,7 +2124,7 @@ Warning 1292 Truncated incorrect DOUBLE value: ' --- Warning 1292 Truncated incorrect DOUBLE 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 if(`t1_values`.`my_binary_30`,_latin1'IS TRUE',_latin1'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 +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; @@ -2155,7 +2155,7 @@ IS NOT TRUE ---äÖüß@µ*$-- 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_varchar_1000`,_latin1'IS TRUE',_latin1'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 +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; @@ -2184,7 +2184,7 @@ 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`,_latin1'IS TRUE',_latin1'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 +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; diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc.result b/mysql-test/suite/funcs_1/r/innodb_storedproc.result index 4ffafaa22be..c20276b1937 100644 --- a/mysql-test/suite/funcs_1/r/innodb_storedproc.result +++ b/mysql-test/suite/funcs_1/r/innodb_storedproc.result @@ -1,8 +1,6 @@ --source suite/funcs_1/storedproc/load_sp_tb.inc -------------------------------------------------------------------------------- -SET @@global.max_heap_table_size=4294967295; -SET @@session.max_heap_table_size=4294967295; --source suite/funcs_1/storedproc/cleanup_sp_tb.inc -------------------------------------------------------------------------------- @@ -4902,13 +4900,6 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp SELECT @x; END' at line 2 DROP PROCEDURE IF EXISTS sp1; -CREATE PROCEDURE sp1() -read_only:BEGIN -SELECT @x; -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 'read_only:BEGIN -SELECT @x; -END' at line 2 DROP PROCEDURE IF EXISTS sp1; CREATE PROCEDURE sp1() read_write:BEGIN diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result old mode 100755 new mode 100644 diff --git a/mysql-test/suite/funcs_1/r/is_basics_mixed.result b/mysql-test/suite/funcs_1/r/is_basics_mixed.result index d20e5750403..2ae4f96c400 100644 --- a/mysql-test/suite/funcs_1/r/is_basics_mixed.result +++ b/mysql-test/suite/funcs_1/r/is_basics_mixed.result @@ -328,7 +328,7 @@ ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_ SELECT table_schema,table_name FROM information_schema.tables WHERE table_schema = 'information_schema' AND table_name = 'tables'; table_schema table_name -information_schema TABLES +information_schema tables SELECT * FROM information_schema.table_privileges WHERE table_schema = 'information_schema'; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE diff --git a/mysql-test/suite/funcs_1/r/is_character_sets.result b/mysql-test/suite/funcs_1/r/is_character_sets.result index b6fee4444b9..4c24a4a829a 100644 --- a/mysql-test/suite/funcs_1/r/is_character_sets.result +++ b/mysql-test/suite/funcs_1/r/is_character_sets.result @@ -35,10 +35,10 @@ MAXLEN bigint(3) NO 0 SHOW CREATE TABLE information_schema.CHARACTER_SETS; Table Create Table CHARACTER_SETS CREATE TEMPORARY TABLE `CHARACTER_SETS` ( - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL default '', - `DESCRIPTION` varchar(60) NOT NULL default '', - `MAXLEN` bigint(3) NOT NULL default '0' + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_COLLATE_NAME` varchar(64) NOT NULL DEFAULT '', + `DESCRIPTION` varchar(60) NOT NULL DEFAULT '', + `MAXLEN` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.CHARACTER_SETS; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result b/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result index b85ba039478..43dc14784f4 100644 --- a/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result +++ b/mysql-test/suite/funcs_1/r/is_collation_character_set_applicability.result @@ -33,8 +33,8 @@ CHARACTER_SET_NAME varchar(64) NO SHOW CREATE TABLE information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; Table Create Table COLLATION_CHARACTER_SET_APPLICABILITY CREATE TEMPORARY TABLE `COLLATION_CHARACTER_SET_APPLICABILITY` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '' + `COLLATION_NAME` varchar(64) NOT NULL DEFAULT '', + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLLATION_CHARACTER_SET_APPLICABILITY; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_collations.result b/mysql-test/suite/funcs_1/r/is_collations.result index 64e9c41eaa8..ca9259b67eb 100644 --- a/mysql-test/suite/funcs_1/r/is_collations.result +++ b/mysql-test/suite/funcs_1/r/is_collations.result @@ -37,12 +37,12 @@ SORTLEN bigint(3) NO 0 SHOW CREATE TABLE information_schema.COLLATIONS; Table Create Table COLLATIONS CREATE TEMPORARY TABLE `COLLATIONS` ( - `COLLATION_NAME` varchar(64) NOT NULL default '', - `CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `ID` bigint(11) NOT NULL default '0', - `IS_DEFAULT` varchar(3) NOT NULL default '', - `IS_COMPILED` varchar(3) NOT NULL default '', - `SORTLEN` bigint(3) NOT NULL default '0' + `COLLATION_NAME` varchar(64) NOT NULL DEFAULT '', + `CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `ID` bigint(11) NOT NULL DEFAULT '0', + `IS_DEFAULT` varchar(3) NOT NULL DEFAULT '', + `IS_COMPILED` varchar(3) NOT NULL DEFAULT '', + `SORTLEN` bigint(3) NOT NULL DEFAULT '0' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLLATIONS; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_column_privileges.result b/mysql-test/suite/funcs_1/r/is_column_privileges.result index 56ddbaf02c7..7b12cf8142d 100644 --- a/mysql-test/suite/funcs_1/r/is_column_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_column_privileges.result @@ -38,13 +38,13 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.COLUMN_PRIVILEGES; Table Create Table COLUMN_PRIVILEGES CREATE TEMPORARY TABLE `COLUMN_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' + `GRANTEE` varchar(81) NOT NULL DEFAULT '', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', + `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLUMN_PRIVILEGES; Field Type Null Key Default Extra @@ -141,6 +141,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' NULL db_datadict CREATE VIEW NO 'testuser3'@'localhost' NULL db_datadict DELETE NO 'testuser3'@'localhost' NULL db_datadict DROP NO +'testuser3'@'localhost' NULL db_datadict EVENT NO 'testuser3'@'localhost' NULL db_datadict EXECUTE NO 'testuser3'@'localhost' NULL db_datadict INDEX NO 'testuser3'@'localhost' NULL db_datadict INSERT NO @@ -148,6 +149,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' NULL db_datadict REFERENCES NO 'testuser3'@'localhost' NULL db_datadict SELECT NO 'testuser3'@'localhost' NULL db_datadict SHOW VIEW NO +'testuser3'@'localhost' NULL db_datadict TRIGGER NO 'testuser3'@'localhost' NULL db_datadict UPDATE NO SELECT * FROM information_schema.column_privileges WHERE grantee LIKE '''testuser%''' diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result index 4b0ee86a81b..99a497d806d 100644 --- a/mysql-test/suite/funcs_1/r/is_columns.result +++ b/mysql-test/suite/funcs_1/r/is_columns.result @@ -32,43 +32,43 @@ TABLE_CATALOG varchar(512) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO NULL COLUMN_KEY varchar(3) NO -EXTRA varchar(20) NO +EXTRA varchar(27) NO PRIVILEGES varchar(80) NO COLUMN_COMMENT varchar(255) NO SHOW CREATE TABLE information_schema.COLUMNS; Table Create Table COLUMNS CREATE TEMPORARY TABLE `COLUMNS` ( - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(21) NOT NULL default '0', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', + `ORDINAL_POSITION` bigint(21) unsigned NOT NULL DEFAULT '0', `COLUMN_DEFAULT` longtext, - `IS_NULLABLE` varchar(3) NOT NULL default '', - `DATA_TYPE` varchar(64) NOT NULL default '', - `CHARACTER_MAXIMUM_LENGTH` bigint(21) default NULL, - `CHARACTER_OCTET_LENGTH` bigint(21) default NULL, - `NUMERIC_PRECISION` bigint(21) default NULL, - `NUMERIC_SCALE` bigint(21) default NULL, - `CHARACTER_SET_NAME` varchar(64) default NULL, - `COLLATION_NAME` varchar(64) default NULL, + `IS_NULLABLE` varchar(3) NOT NULL DEFAULT '', + `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', + `CHARACTER_MAXIMUM_LENGTH` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_OCTET_LENGTH` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_PRECISION` bigint(21) unsigned DEFAULT NULL, + `NUMERIC_SCALE` bigint(21) unsigned DEFAULT NULL, + `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, + `COLLATION_NAME` varchar(64) DEFAULT NULL, `COLUMN_TYPE` longtext NOT NULL, - `COLUMN_KEY` varchar(3) NOT NULL default '', - `EXTRA` varchar(20) NOT NULL default '', - `PRIVILEGES` varchar(80) NOT NULL default '', - `COLUMN_COMMENT` varchar(255) NOT NULL default '' + `COLUMN_KEY` varchar(3) NOT NULL DEFAULT '', + `EXTRA` varchar(27) NOT NULL DEFAULT '', + `PRIVILEGES` varchar(80) NOT NULL DEFAULT '', + `COLUMN_COMMENT` varchar(255) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.COLUMNS; Field Type Null Key Default Extra @@ -76,19 +76,19 @@ TABLE_CATALOG varchar(512) YES NULL TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO COLUMN_NAME varchar(64) NO -ORDINAL_POSITION bigint(21) NO 0 +ORDINAL_POSITION bigint(21) unsigned NO 0 COLUMN_DEFAULT longtext YES NULL IS_NULLABLE varchar(3) NO DATA_TYPE varchar(64) NO -CHARACTER_MAXIMUM_LENGTH bigint(21) YES NULL -CHARACTER_OCTET_LENGTH bigint(21) YES NULL -NUMERIC_PRECISION bigint(21) YES NULL -NUMERIC_SCALE bigint(21) YES NULL +CHARACTER_MAXIMUM_LENGTH bigint(21) unsigned YES NULL +CHARACTER_OCTET_LENGTH bigint(21) unsigned YES NULL +NUMERIC_PRECISION bigint(21) unsigned YES NULL +NUMERIC_SCALE bigint(21) unsigned YES NULL CHARACTER_SET_NAME varchar(64) YES NULL COLLATION_NAME varchar(64) YES NULL COLUMN_TYPE longtext NO NULL COLUMN_KEY varchar(3) NO -EXTRA varchar(20) NO +EXTRA varchar(27) NO PRIVILEGES varchar(80) NO COLUMN_COMMENT varchar(255) NO SELECT table_catalog, table_schema, table_name, column_name diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index d7f801f2dcd..e634243899c 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -629,7 +629,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result index 52566152f54..e2081af7e00 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_is.result +++ b/mysql-test/suite/funcs_1/r/is_columns_is.result @@ -15,8 +15,8 @@ NULL information_schema COLLATIONS IS_DEFAULT 4 NO varchar 3 9 NULL NULL utf8 u NULL information_schema COLLATIONS SORTLEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(3) select NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY CHARACTER_SET_NAME 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLLATION_CHARACTER_SET_APPLICABILITY COLLATION_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS CHARACTER_SET_NAME 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLLATION_NAME 14 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_COMMENT 19 NO varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select @@ -25,11 +25,11 @@ NULL information_schema COLUMNS COLUMN_KEY 16 NO varchar 3 9 NULL NULL utf8 utf NULL information_schema COLUMNS COLUMN_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMNS COLUMN_TYPE 15 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema COLUMNS DATA_TYPE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema COLUMNS EXTRA 17 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema COLUMNS EXTRA 17 NO varchar 27 81 NULL NULL utf8 utf8_general_ci varchar(27) select NULL information_schema COLUMNS IS_NULLABLE 7 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select -NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema COLUMNS NUMERIC_PRECISION 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS NUMERIC_SCALE 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema COLUMNS ORDINAL_POSITION 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema COLUMNS PRIVILEGES 18 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema COLUMNS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema COLUMNS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -41,6 +41,78 @@ NULL information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE 6 NO varchar 64 192 NU NULL information_schema COLUMN_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema COLUMN_PRIVILEGES TABLE_NAME 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema COLUMN_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ENGINES COMMENT 3 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema ENGINES ENGINE 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ENGINES SAVEPOINTS 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ENGINES SUPPORT 2 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema ENGINES TRANSACTIONS 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema ENGINES XA 5 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select +NULL information_schema EVENTS CHARACTER_SET_CLIENT 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select +NULL information_schema EVENTS COLLATION_CONNECTION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select +NULL information_schema EVENTS CREATED 17 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS DATABASE_COLLATION 24 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select +NULL information_schema EVENTS DEFINER 4 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select +NULL information_schema EVENTS ENDS 14 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS EVENT_BODY 6 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema EVENTS EVENT_CATALOG 1 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_COMMENT 20 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_DEFINITION 7 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS EVENT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema EVENTS EVENT_TYPE 8 NO varchar 9 27 NULL NULL utf8 utf8_general_ci varchar(9) select +NULL information_schema EVENTS EXECUTE_AT 9 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS INTERVAL_FIELD 11 NULL YES varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS INTERVAL_VALUE 10 NULL YES varchar 256 768 NULL NULL utf8 utf8_general_ci varchar(256) select +NULL information_schema EVENTS LAST_ALTERED 18 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS LAST_EXECUTED 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS ON_COMPLETION 16 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema EVENTS ORIGINATOR 21 0 NO bigint NULL NULL 19 0 NULL NULL bigint(10) select +NULL information_schema EVENTS SQL_MODE 12 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema EVENTS STARTS 13 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema EVENTS STATUS 15 NO varchar 18 54 NULL NULL utf8 utf8_general_ci varchar(18) select +NULL information_schema EVENTS TIME_ZONE 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES AUTOEXTEND_SIZE 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES AVG_ROW_LENGTH 28 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES CHECKSUM 36 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES CHECK_TIME 35 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES CREATE_TIME 33 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES CREATION_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES DATA_FREE 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DATA_LENGTH 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES DELETED_ROWS 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES ENGINE 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES EXTENT_SIZE 16 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES EXTRA 38 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select +NULL information_schema FILES FILE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES FILE_NAME 2 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES FILE_TYPE 3 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema FILES FREE_EXTENTS 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES FULLTEXT_KEYS 11 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES INDEX_LENGTH 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES INITIAL_SIZE 17 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES LAST_ACCESS_TIME 22 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES LAST_UPDATE_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES LOGFILE_GROUP_NAME 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES LOGFILE_GROUP_NUMBER 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES MAXIMUM_SIZE 18 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES MAX_DATA_LENGTH 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES RECOVER_TIME 23 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES ROW_FORMAT 26 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select +NULL information_schema FILES STATUS 37 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema FILES TABLESPACE_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES TABLE_CATALOG 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES TABLE_NAME 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES TABLE_ROWS 27 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema FILES TABLE_SCHEMA 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema FILES TOTAL_EXTENTS 15 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES TRANSACTION_COUNTER 24 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES UPDATE_COUNT 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema FILES UPDATE_TIME 34 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema FILES VERSION 25 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema GLOBAL_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema GLOBAL_STATUS VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select +NULL information_schema GLOBAL_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema GLOBAL_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select NULL information_schema KEY_COLUMN_USAGE COLUMN_NAME 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -53,7 +125,64 @@ NULL information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA 10 NULL YES var NULL information_schema KEY_COLUMN_USAGE TABLE_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema KEY_COLUMN_USAGE TABLE_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema KEY_COLUMN_USAGE TABLE_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS AVG_ROW_LENGTH 14 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS CHECKSUM 22 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS CHECK_TIME 21 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema PARTITIONS CREATE_TIME 19 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema PARTITIONS DATA_FREE 18 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS DATA_LENGTH 15 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS INDEX_LENGTH 17 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS MAX_DATA_LENGTH 16 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS NODEGROUP 24 NO varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema PARTITIONS PARTITION_COMMENT 23 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema PARTITIONS PARTITION_DESCRIPTION 12 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema PARTITIONS PARTITION_EXPRESSION 10 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema PARTITIONS PARTITION_METHOD 8 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema PARTITIONS PARTITION_NAME 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS SUBPARTITION_EXPRESSION 11 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema PARTITIONS SUBPARTITION_METHOD 9 NULL YES varchar 12 36 NULL NULL utf8 utf8_general_ci varchar(12) select +NULL information_schema PARTITIONS SUBPARTITION_NAME 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION 7 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS TABLESPACE_NAME 25 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema PARTITIONS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS TABLE_ROWS 13 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema PARTITIONS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PARTITIONS UPDATE_TIME 20 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema PLUGINS PLUGIN_AUTHOR 8 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PLUGINS PLUGIN_DESCRIPTION 9 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema PLUGINS PLUGIN_LIBRARY 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PLUGINS PLUGIN_LIBRARY_VERSION 7 NULL YES varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema PLUGINS PLUGIN_LICENSE 10 NULL YES varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema PLUGINS PLUGIN_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PLUGINS PLUGIN_STATUS 3 NO varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select +NULL information_schema PLUGINS PLUGIN_TYPE 4 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select +NULL information_schema PLUGINS PLUGIN_TYPE_VERSION 5 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema PLUGINS PLUGIN_VERSION 2 NO varchar 20 60 NULL NULL utf8 utf8_general_ci varchar(20) select +NULL information_schema PROCESSLIST COMMAND 5 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select +NULL information_schema PROCESSLIST DB 4 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PROCESSLIST HOST 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PROCESSLIST ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(4) select +NULL information_schema PROCESSLIST INFO 8 NULL YES longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select +NULL information_schema PROCESSLIST STATE 7 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema PROCESSLIST TIME 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(7) select +NULL information_schema PROCESSLIST USER 2 NO varchar 16 48 NULL NULL utf8 utf8_general_ci varchar(16) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE 9 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION 7 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME 11 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME 10 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG 4 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME 6 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA 5 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema ROUTINES CHARACTER_SET_CLIENT 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select +NULL information_schema ROUTINES COLLATION_CONNECTION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema ROUTINES CREATED 16 0000-00-00 00:00:00 NO datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema ROUTINES DATABASE_COLLATION 23 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema ROUTINES DEFINER 20 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select NULL information_schema ROUTINES DTD_IDENTIFIER 6 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema ROUTINES EXTERNAL_LANGUAGE 10 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -83,6 +212,10 @@ NULL information_schema SCHEMA_PRIVILEGES IS_GRANTABLE 5 NO varchar 3 9 NULL NU NULL information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema SCHEMA_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SESSION_STATUS VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SESSION_STATUS VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select +NULL information_schema SESSION_VARIABLES VARIABLE_NAME 1 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select +NULL information_schema SESSION_VARIABLES VARIABLE_VALUE 2 NULL YES varchar 20480 61440 NULL NULL utf8 utf8_general_ci varchar(20480) select NULL information_schema STATISTICS CARDINALITY 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select NULL information_schema STATISTICS COLLATION 9 NULL YES varchar 1 3 NULL NULL utf8 utf8_general_ci varchar(1) select NULL information_schema STATISTICS COLUMN_NAME 8 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -98,27 +231,27 @@ NULL information_schema STATISTICS SUB_PART 11 NULL YES bigint NULL NULL 19 0 NU NULL information_schema STATISTICS TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema STATISTICS TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema STATISTICS TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES AUTO_INCREMENT 14 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES AVG_ROW_LENGTH 9 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES CHECKSUM 19 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES CHECK_TIME 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select NULL information_schema TABLES CREATE_OPTIONS 20 NULL YES varchar 255 765 NULL NULL utf8 utf8_general_ci varchar(255) select NULL information_schema TABLES CREATE_TIME 15 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES DATA_FREE 13 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES DATA_LENGTH 10 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ENGINE 5 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select -NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES INDEX_LENGTH 12 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select +NULL information_schema TABLES MAX_DATA_LENGTH 11 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES ROW_FORMAT 7 NULL YES varchar 10 30 NULL NULL utf8 utf8_general_ci varchar(10) select NULL information_schema TABLES TABLE_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema TABLES TABLE_COLLATION 18 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_COMMENT 21 NO varchar 80 240 NULL NULL utf8 utf8_general_ci varchar(80) select NULL information_schema TABLES TABLE_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select -NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES TABLE_ROWS 8 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLES TABLE_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES TABLE_TYPE 4 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLES UPDATE_TIME 16 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select -NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) select +NULL information_schema TABLES VERSION 6 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG 1 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_NAME 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TABLE_CONSTRAINTS CONSTRAINT_SCHEMA 2 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select @@ -140,7 +273,10 @@ NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_ROW 15 NO varchar 3 9 NUL NULL information_schema TRIGGERS ACTION_REFERENCE_OLD_TABLE 13 NULL YES varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema TRIGGERS ACTION_STATEMENT 10 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema TRIGGERS ACTION_TIMING 12 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select +NULL information_schema TRIGGERS CHARACTER_SET_CLIENT 20 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select +NULL information_schema TRIGGERS COLLATION_CONNECTION 21 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema TRIGGERS CREATED 17 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select +NULL information_schema TRIGGERS DATABASE_COLLATION 22 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema TRIGGERS DEFINER 19 NULL NO longtext 4294967295 4294967295 NULL NULL utf8 utf8_general_ci longtext select NULL information_schema TRIGGERS EVENT_MANIPULATION 4 NO varchar 6 18 NULL NULL utf8 utf8_general_ci varchar(6) select NULL information_schema TRIGGERS EVENT_OBJECT_CATALOG 5 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select @@ -154,7 +290,9 @@ NULL information_schema USER_PRIVILEGES GRANTEE 1 NO varchar 81 243 NULL NULL u NULL information_schema USER_PRIVILEGES IS_GRANTABLE 4 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema USER_PRIVILEGES PRIVILEGE_TYPE 3 NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select NULL information_schema USER_PRIVILEGES TABLE_CATALOG 2 NULL YES varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select +NULL information_schema VIEWS CHARACTER_SET_CLIENT 9 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema VIEWS CHECK_OPTION 5 NO varchar 8 24 NULL NULL utf8 utf8_general_ci varchar(8) select +NULL information_schema VIEWS COLLATION_CONNECTION 10 NO varchar 32 96 NULL NULL utf8 utf8_general_ci varchar(32) select NULL information_schema VIEWS DEFINER 7 NO varchar 77 231 NULL NULL utf8 utf8_general_ci varchar(77) select NULL information_schema VIEWS IS_UPDATABLE 6 NO varchar 3 9 NULL NULL utf8 utf8_general_ci varchar(3) select NULL information_schema VIEWS SECURITY_TYPE 8 NO varchar 7 21 NULL NULL utf8 utf8_general_ci varchar(7) select @@ -235,19 +373,19 @@ NULL information_schema COLLATIONS SORTLEN bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema COLUMNS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned 1.0000 information_schema COLUMNS COLUMN_DEFAULT longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS IS_NULLABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema COLUMNS DATA_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) -NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) +NULL information_schema COLUMNS CHARACTER_MAXIMUM_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS CHARACTER_OCTET_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_PRECISION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema COLUMNS CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMNS COLLATION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 1.0000 information_schema COLUMNS COLUMN_TYPE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema COLUMNS COLUMN_KEY varchar 3 9 utf8 utf8_general_ci varchar(3) -3.0000 information_schema COLUMNS EXTRA varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema COLUMNS EXTRA varchar 27 81 utf8 utf8_general_ci varchar(27) 3.0000 information_schema COLUMNS PRIVILEGES varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema COLUMNS COLUMN_COMMENT varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema COLUMN_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) @@ -257,6 +395,78 @@ NULL information_schema COLUMNS NUMERIC_SCALE bigint NULL NULL NULL NULL bigint( 3.0000 information_schema COLUMN_PRIVILEGES COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMN_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema COLUMN_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema ENGINES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema ENGINES SUPPORT varchar 8 24 utf8 utf8_general_ci varchar(8) +3.0000 information_schema ENGINES COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema ENGINES TRANSACTIONS varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema ENGINES XA varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema ENGINES SAVEPOINTS varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema EVENTS EVENT_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema EVENTS EVENT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema EVENTS EVENT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema EVENTS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema EVENTS TIME_ZONE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema EVENTS EVENT_BODY varchar 8 24 utf8 utf8_general_ci varchar(8) +1.0000 information_schema EVENTS EVENT_DEFINITION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema EVENTS EVENT_TYPE varchar 9 27 utf8 utf8_general_ci varchar(9) +NULL information_schema EVENTS EXECUTE_AT datetime NULL NULL NULL NULL datetime +3.0000 information_schema EVENTS INTERVAL_VALUE varchar 256 768 utf8 utf8_general_ci varchar(256) +3.0000 information_schema EVENTS INTERVAL_FIELD varchar 18 54 utf8 utf8_general_ci varchar(18) +1.0000 information_schema EVENTS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +NULL information_schema EVENTS STARTS datetime NULL NULL NULL NULL datetime +NULL information_schema EVENTS ENDS datetime NULL NULL NULL NULL datetime +3.0000 information_schema EVENTS STATUS varchar 18 54 utf8 utf8_general_ci varchar(18) +3.0000 information_schema EVENTS ON_COMPLETION varchar 12 36 utf8 utf8_general_ci varchar(12) +NULL information_schema EVENTS CREATED datetime NULL NULL NULL NULL datetime +NULL information_schema EVENTS LAST_ALTERED datetime NULL NULL NULL NULL datetime +NULL information_schema EVENTS LAST_EXECUTED datetime NULL NULL NULL NULL datetime +3.0000 information_schema EVENTS EVENT_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema EVENTS ORIGINATOR bigint NULL NULL NULL NULL bigint(10) +3.0000 information_schema EVENTS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema EVENTS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema EVENTS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) +NULL information_schema FILES FILE_ID bigint NULL NULL NULL NULL bigint(4) +3.0000 information_schema FILES FILE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES FILE_TYPE varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema FILES TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES TABLE_CATALOG varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES LOGFILE_GROUP_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema FILES LOGFILE_GROUP_NUMBER bigint NULL NULL NULL NULL bigint(4) +3.0000 information_schema FILES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema FILES FULLTEXT_KEYS varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema FILES DELETED_ROWS bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES UPDATE_COUNT bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES FREE_EXTENTS bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES TOTAL_EXTENTS bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES EXTENT_SIZE bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES INITIAL_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAXIMUM_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AUTOEXTEND_SIZE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES CREATION_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES LAST_UPDATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES LAST_ACCESS_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES RECOVER_TIME bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES TRANSACTION_COUNTER bigint NULL NULL NULL NULL bigint(4) +NULL information_schema FILES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned +3.0000 information_schema FILES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) +NULL information_schema FILES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema FILES CREATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES UPDATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES CHECK_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema FILES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned +3.0000 information_schema FILES STATUS varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema FILES EXTRA varchar 255 765 utf8 utf8_general_ci varchar(255) +3.0000 information_schema GLOBAL_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema GLOBAL_STATUS VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480) +3.0000 information_schema GLOBAL_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema GLOBAL_VARIABLES VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480) 3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema KEY_COLUMN_USAGE CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -269,6 +479,60 @@ NULL information_schema KEY_COLUMN_USAGE POSITION_IN_UNIQUE_CONSTRAINT bigint NU 3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema KEY_COLUMN_USAGE REFERENCED_COLUMN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PARTITIONS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema PARTITIONS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PARTITIONS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PARTITIONS PARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PARTITIONS SUBPARTITION_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +NULL information_schema PARTITIONS PARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS SUBPARTITION_ORDINAL_POSITION bigint NULL NULL NULL NULL bigint(21) unsigned +3.0000 information_schema PARTITIONS PARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) +3.0000 information_schema PARTITIONS SUBPARTITION_METHOD varchar 12 36 utf8 utf8_general_ci varchar(12) +1.0000 information_schema PARTITIONS PARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema PARTITIONS SUBPARTITION_EXPRESSION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +1.0000 information_schema PARTITIONS PARTITION_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +NULL information_schema PARTITIONS TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema PARTITIONS CREATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema PARTITIONS UPDATE_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema PARTITIONS CHECK_TIME datetime NULL NULL NULL NULL datetime +NULL information_schema PARTITIONS CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned +3.0000 information_schema PARTITIONS PARTITION_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema PARTITIONS NODEGROUP varchar 12 36 utf8 utf8_general_ci varchar(12) +3.0000 information_schema PARTITIONS TABLESPACE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PLUGINS PLUGIN_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PLUGINS PLUGIN_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema PLUGINS PLUGIN_STATUS varchar 10 30 utf8 utf8_general_ci varchar(10) +3.0000 information_schema PLUGINS PLUGIN_TYPE varchar 80 240 utf8 utf8_general_ci varchar(80) +3.0000 information_schema PLUGINS PLUGIN_TYPE_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema PLUGINS PLUGIN_LIBRARY varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PLUGINS PLUGIN_LIBRARY_VERSION varchar 20 60 utf8 utf8_general_ci varchar(20) +3.0000 information_schema PLUGINS PLUGIN_AUTHOR varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema PLUGINS PLUGIN_DESCRIPTION longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema PLUGINS PLUGIN_LICENSE varchar 80 240 utf8 utf8_general_ci varchar(80) +NULL information_schema PROCESSLIST ID bigint NULL NULL NULL NULL bigint(4) +3.0000 information_schema PROCESSLIST USER varchar 16 48 utf8 utf8_general_ci varchar(16) +3.0000 information_schema PROCESSLIST HOST varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PROCESSLIST DB varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema PROCESSLIST COMMAND varchar 16 48 utf8 utf8_general_ci varchar(16) +NULL information_schema PROCESSLIST TIME bigint NULL NULL NULL NULL bigint(7) +3.0000 information_schema PROCESSLIST STATE varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 information_schema PROCESSLIST INFO longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) +3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS MATCH_OPTION varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS UPDATE_RULE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS DELETE_RULE varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema ROUTINES SPECIFIC_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema ROUTINES ROUTINE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema ROUTINES ROUTINE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -289,6 +553,9 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet 1.0000 information_schema ROUTINES SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 3.0000 information_schema ROUTINES ROUTINE_COMMENT varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema ROUTINES DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) +3.0000 information_schema ROUTINES CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema ROUTINES COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema ROUTINES DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema SCHEMATA CATALOG_NAME varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema SCHEMATA SCHEMA_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema SCHEMATA DEFAULT_CHARACTER_SET_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -299,6 +566,10 @@ NULL information_schema ROUTINES LAST_ALTERED datetime NULL NULL NULL NULL datet 3.0000 information_schema SCHEMA_PRIVILEGES TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema SCHEMA_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema SCHEMA_PRIVILEGES IS_GRANTABLE varchar 3 9 utf8 utf8_general_ci varchar(3) +3.0000 information_schema SESSION_STATUS VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SESSION_STATUS VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480) +3.0000 information_schema SESSION_VARIABLES VARIABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) +3.0000 information_schema SESSION_VARIABLES VARIABLE_VALUE varchar 20480 61440 utf8 utf8_general_ci varchar(20480) 3.0000 information_schema STATISTICS TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema STATISTICS TABLE_SCHEMA varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema STATISTICS TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -319,20 +590,20 @@ NULL information_schema STATISTICS SUB_PART bigint NULL NULL NULL NULL bigint(3) 3.0000 information_schema TABLES TABLE_NAME varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES TABLE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) 3.0000 information_schema TABLES ENGINE varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES VERSION bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES ROW_FORMAT varchar 10 30 utf8 utf8_general_ci varchar(10) -NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) -NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES TABLE_ROWS bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AVG_ROW_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES MAX_DATA_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES INDEX_LENGTH bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES DATA_FREE bigint NULL NULL NULL NULL bigint(21) unsigned +NULL information_schema TABLES AUTO_INCREMENT bigint NULL NULL NULL NULL bigint(21) unsigned NULL information_schema TABLES CREATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES UPDATE_TIME datetime NULL NULL NULL NULL datetime NULL information_schema TABLES CHECK_TIME datetime NULL NULL NULL NULL datetime 3.0000 information_schema TABLES TABLE_COLLATION varchar 64 192 utf8 utf8_general_ci varchar(64) -NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) +NULL information_schema TABLES CHECKSUM bigint NULL NULL NULL NULL bigint(21) unsigned 3.0000 information_schema TABLES CREATE_OPTIONS varchar 255 765 utf8 utf8_general_ci varchar(255) 3.0000 information_schema TABLES TABLE_COMMENT varchar 80 240 utf8 utf8_general_ci varchar(80) 3.0000 information_schema TABLE_CONSTRAINTS CONSTRAINT_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) @@ -366,6 +637,9 @@ NULL information_schema TRIGGERS ACTION_ORDER bigint NULL NULL NULL NULL bigint( NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime 1.0000 information_schema TRIGGERS SQL_MODE longtext 4294967295 4294967295 utf8 utf8_general_ci longtext 1.0000 information_schema TRIGGERS DEFINER longtext 4294967295 4294967295 utf8 utf8_general_ci longtext +3.0000 information_schema TRIGGERS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema TRIGGERS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema TRIGGERS DATABASE_COLLATION varchar 32 96 utf8 utf8_general_ci varchar(32) 3.0000 information_schema USER_PRIVILEGES GRANTEE varchar 81 243 utf8 utf8_general_ci varchar(81) 3.0000 information_schema USER_PRIVILEGES TABLE_CATALOG varchar 512 1536 utf8 utf8_general_ci varchar(512) 3.0000 information_schema USER_PRIVILEGES PRIVILEGE_TYPE varchar 64 192 utf8 utf8_general_ci varchar(64) @@ -378,3 +652,5 @@ NULL information_schema TRIGGERS CREATED datetime NULL NULL NULL NULL datetime 3.0000 information_schema VIEWS IS_UPDATABLE varchar 3 9 utf8 utf8_general_ci varchar(3) 3.0000 information_schema VIEWS DEFINER varchar 77 231 utf8 utf8_general_ci varchar(77) 3.0000 information_schema VIEWS SECURITY_TYPE varchar 7 21 utf8 utf8_general_ci varchar(7) +3.0000 information_schema VIEWS CHARACTER_SET_CLIENT varchar 32 96 utf8 utf8_general_ci varchar(32) +3.0000 information_schema VIEWS COLLATION_CONNECTION varchar 32 96 utf8 utf8_general_ci varchar(32) diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index 154ad27e403..cf5e3b13d8c 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -604,7 +604,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index 2365dda1b24..b1e96b9e2ad 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -666,7 +666,7 @@ NULL test tb4 f217 42 NULL YES double unsigned zerofill NULL NULL 22 NULL NULL N NULL test tb4 f218 43 NULL YES date NULL NULL NULL NULL NULL NULL date select,insert,update,references NULL test tb4 f219 44 NULL YES time NULL NULL NULL NULL NULL NULL time select,insert,update,references NULL test tb4 f220 45 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references -NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL test tb4 f221 46 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL test tb4 f222 47 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f223 48 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references NULL test tb4 f224 49 NULL YES year NULL NULL NULL NULL NULL NULL year(4) select,insert,update,references diff --git a/mysql-test/suite/funcs_1/r/is_columns_mysql.result b/mysql-test/suite/funcs_1/r/is_columns_mysql.result index 75960091e90..9d1f316a9bf 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_columns_mysql.result @@ -7,7 +7,7 @@ NULL mysql columns_priv Column_priv 7 NO set 31 93 NULL NULL utf8 utf8_general_ NULL mysql columns_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql columns_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NULL mysql columns_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL mysql columns_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references NULL mysql db Alter_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references @@ -18,6 +18,7 @@ NULL mysql db Create_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci e NULL mysql db Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql db Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Event_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Execute_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Grant_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references @@ -27,12 +28,41 @@ NULL mysql db Lock_tables_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci e NULL mysql db References_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Show_view_priv 17 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql db Trigger_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql db User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql event body 3 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql event body_utf8 22 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql event character_set_client 19 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references +NULL mysql event collation_connection 20 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references +NULL mysql event comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references +NULL mysql event created 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references +NULL mysql event db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql event db_collation 21 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references +NULL mysql event definer 4 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references +NULL mysql event ends 12 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL mysql event execute_at 5 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL mysql event interval_field 7 NULL YES enum 18 54 NULL NULL utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') select,insert,update,references +NULL mysql event interval_value 6 NULL YES int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql event last_executed 10 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL mysql event modified 9 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql event name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references +NULL mysql event on_completion 14 DROP NO enum 8 24 NULL NULL utf8 utf8_general_ci enum('DROP','PRESERVE') select,insert,update,references +NULL mysql event originator 17 NULL NO int NULL NULL 10 0 NULL NULL int(10) select,insert,update,references +NULL mysql event sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references +NULL mysql event starts 11 NULL YES datetime NULL NULL NULL NULL NULL NULL datetime select,insert,update,references +NULL mysql event status 13 ENABLED NO enum 18 54 NULL NULL utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') select,insert,update,references +NULL mysql event time_zone 18 SYSTEM NO char 64 64 NULL NULL latin1 latin1_swedish_ci char(64) select,insert,update,references NULL mysql func dl 3 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references NULL mysql func name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql func ret 2 0 NO tinyint NULL NULL 3 0 NULL NULL tinyint(1) select,insert,update,references NULL mysql func type 4 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('function','aggregate') select,insert,update,references +NULL mysql general_log argument 6 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references +NULL mysql general_log command_type 5 NULL NO varchar 64 192 NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references +NULL mysql general_log event_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references +NULL mysql general_log server_id 4 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql general_log thread_id 3 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql general_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NULL mysql help_category help_category_id 1 NULL NO smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned PRI select,insert,update,references NULL mysql help_category name 2 NULL NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) UNI select,insert,update,references NULL mysql help_category parent_category_id 3 NULL YES smallint NULL NULL 5 0 NULL NULL smallint(5) unsigned select,insert,update,references @@ -65,22 +95,36 @@ NULL mysql host Lock_tables_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci NULL mysql host References_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI select,insert,update,references +NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references +NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned select,insert,update,references +NULL mysql plugin dl 2 NO char 128 384 NULL NULL utf8 utf8_bin char(128) select,insert,update,references +NULL mysql plugin name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc body_utf8 20 NULL YES longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references +NULL mysql proc character_set_client 17 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references +NULL mysql proc collation_connection 18 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references NULL mysql proc comment 16 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references -NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql proc created 13 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL mysql proc db 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references +NULL mysql proc db_collation 19 NULL YES char 32 96 NULL NULL utf8 utf8_bin char(32) select,insert,update,references NULL mysql proc definer 12 NO char 77 231 NULL NULL utf8 utf8_bin char(77) select,insert,update,references NULL mysql proc is_deterministic 7 NO NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NULL mysql proc language 5 SQL NO enum 3 9 NULL NULL utf8 utf8_general_ci enum('SQL') select,insert,update,references NULL mysql proc modified 14 0000-00-00 00:00:00 NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references NULL mysql proc name 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references NULL mysql proc param_list 9 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql proc returns 10 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql proc returns 10 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob select,insert,update,references NULL mysql proc security_type 8 DEFINER NO enum 7 21 NULL NULL utf8 utf8_general_ci enum('INVOKER','DEFINER') select,insert,update,references NULL mysql proc specific_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references NULL mysql proc sql_data_access 6 CONTAINS_SQL NO enum 17 51 NULL NULL utf8 utf8_general_ci enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') select,insert,update,references -NULL mysql proc sql_mode 15 NO set 431 1293 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') select,insert,update,references +NULL mysql proc sql_mode 15 NO set 478 1434 NULL NULL utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') select,insert,update,references NULL mysql proc type 3 NULL NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') PRI select,insert,update,references NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references @@ -88,15 +132,35 @@ NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PR NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') select,insert,update,references NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI select,insert,update,references -NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references +NULL mysql servers Db 3 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Host 2 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Owner 9 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Password 5 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Port 6 0 NO int NULL NULL 10 0 NULL NULL int(4) select,insert,update,references +NULL mysql servers Server_name 1 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI select,insert,update,references +NULL mysql servers Socket 7 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Username 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql servers Wrapper 8 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) select,insert,update,references +NULL mysql slow_log db 7 NULL NO varchar 512 1536 NULL NULL utf8 utf8_general_ci varchar(512) select,insert,update,references +NULL mysql slow_log insert_id 9 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log last_insert_id 8 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log lock_time 4 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL mysql slow_log query_time 3 NULL NO time NULL NULL NULL NULL NULL NULL time select,insert,update,references +NULL mysql slow_log rows_examined 6 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log rows_sent 5 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log server_id 10 NULL NO int NULL NULL 10 0 NULL NULL int(11) select,insert,update,references +NULL mysql slow_log sql_text 11 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references +NULL mysql slow_log start_time 1 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references +NULL mysql slow_log user_host 2 NULL NO mediumtext 16777215 16777215 NULL NULL utf8 utf8_general_ci mediumtext select,insert,update,references NULL mysql tables_priv Column_priv 8 NO set 31 93 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','References') select,insert,update,references NULL mysql tables_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references NULL mysql tables_priv Grantor 5 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL select,insert,update,references NULL mysql tables_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI select,insert,update,references NULL mysql tables_priv Table_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references -NULL mysql tables_priv Table_priv 7 NO set 90 270 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') select,insert,update,references -NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp select,insert,update,references +NULL mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references +NULL mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references NULL mysql tables_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references NULL mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references NULL mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references @@ -121,6 +185,7 @@ NULL mysql user Create_user_priv 29 N NO enum 1 3 NULL NULL utf8 utf8_general_ci NULL mysql user Create_view_priv 25 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Delete_priv 7 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Drop_priv 9 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Event_priv 30 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Execute_priv 22 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user File_priv 13 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Grant_priv 14 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references @@ -128,10 +193,10 @@ NULL mysql user Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI sel NULL mysql user Index_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Insert_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Lock_tables_priv 21 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user max_connections 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_questions 34 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_updates 35 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references -NULL mysql user max_user_connections 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_connections 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_questions 36 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_updates 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references +NULL mysql user max_user_connections 39 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references NULL mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references NULL mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references @@ -142,13 +207,14 @@ NULL mysql user Select_priv 4 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum( NULL mysql user Show_db_priv 18 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Show_view_priv 26 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Shutdown_priv 11 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references -NULL mysql user ssl_cipher 31 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user ssl_type 30 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references +NULL mysql user ssl_cipher 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql user ssl_type 32 NO enum 9 27 NULL NULL utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') select,insert,update,references NULL mysql user Super_priv 19 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references +NULL mysql user Trigger_priv 31 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user Update_priv 6 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references NULL mysql user User 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references -NULL mysql user x509_issuer 32 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references -NULL mysql user x509_subject 33 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql user x509_issuer 34 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references +NULL mysql user x509_subject 35 NULL NO blob 65535 65535 NULL NULL NULL NULL blob select,insert,update,references ########################################################################## # Show the quotient of CHARACTER_OCTET_LENGTH and CHARACTER_MAXIMUM_LENGTH ########################################################################## @@ -165,6 +231,9 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 1.0000 blob NULL NULL 1.0000 longblob NULL NULL 1.0000 char latin1 latin1_bin +1.0000 char latin1 latin1_swedish_ci +1.0000 varchar latin1 latin1_swedish_ci +1.0000 mediumtext utf8 utf8_general_ci 1.0000 text utf8 utf8_general_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, @@ -181,6 +250,7 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME 3.0000 char utf8 utf8_general_ci 3.0000 enum utf8 utf8_general_ci 3.0000 set utf8 utf8_general_ci +3.0000 varchar utf8 utf8_general_ci SELECT DISTINCT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML, DATA_TYPE, @@ -192,8 +262,10 @@ 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 bigint NULL NULL +NULL datetime NULL NULL NULL int NULL NULL NULL smallint NULL NULL +NULL time NULL NULL NULL timestamp NULL NULL NULL tinyint NULL NULL --> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values @@ -239,10 +311,40 @@ NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp 3.0000 mysql db Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql db Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql db Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql event db char 64 192 utf8 utf8_bin char(64) +3.0000 mysql event name char 64 192 utf8 utf8_general_ci char(64) +1.0000 mysql event body longblob 4294967295 4294967295 NULL NULL longblob +3.0000 mysql event definer char 77 231 utf8 utf8_bin char(77) +NULL mysql event execute_at datetime NULL NULL NULL NULL datetime +NULL mysql event interval_value int NULL NULL NULL NULL int(11) +3.0000 mysql event interval_field enum 18 54 utf8 utf8_general_ci enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') +NULL mysql event created timestamp NULL NULL NULL NULL timestamp +NULL mysql event modified timestamp NULL NULL NULL NULL timestamp +NULL mysql event last_executed datetime NULL NULL NULL NULL datetime +NULL mysql event starts datetime NULL NULL NULL NULL datetime +NULL mysql event ends datetime NULL NULL NULL NULL datetime +3.0000 mysql event status enum 18 54 utf8 utf8_general_ci enum('ENABLED','DISABLED','SLAVESIDE_DISABLED') +3.0000 mysql event on_completion enum 8 24 utf8 utf8_general_ci enum('DROP','PRESERVE') +3.0000 mysql event sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') +3.0000 mysql event comment char 64 192 utf8 utf8_bin char(64) +NULL mysql event originator int NULL NULL NULL NULL int(10) +1.0000 mysql event time_zone char 64 64 latin1 latin1_swedish_ci char(64) +3.0000 mysql event character_set_client char 32 96 utf8 utf8_bin char(32) +3.0000 mysql event collation_connection char 32 96 utf8 utf8_bin char(32) +3.0000 mysql event db_collation char 32 96 utf8 utf8_bin char(32) +1.0000 mysql event body_utf8 longblob 4294967295 4294967295 NULL NULL longblob 3.0000 mysql func name char 64 192 utf8 utf8_bin char(64) NULL mysql func ret tinyint NULL NULL NULL NULL tinyint(1) 3.0000 mysql func dl char 128 384 utf8 utf8_bin char(128) 3.0000 mysql func type enum 9 27 utf8 utf8_general_ci enum('function','aggregate') +NULL mysql general_log event_time timestamp NULL NULL NULL NULL timestamp +1.0000 mysql general_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext +NULL mysql general_log thread_id int NULL NULL NULL NULL int(11) +NULL mysql general_log server_id int NULL NULL NULL NULL int(11) +3.0000 mysql general_log command_type varchar 64 192 utf8 utf8_general_ci varchar(64) +1.0000 mysql general_log argument mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext NULL mysql help_category help_category_id smallint NULL NULL NULL NULL smallint(5) unsigned 3.0000 mysql help_category name char 64 192 utf8 utf8_general_ci char(64) NULL mysql help_category parent_category_id smallint NULL NULL NULL NULL smallint(5) unsigned @@ -276,6 +378,16 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) 3.0000 mysql host Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned +1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255) +NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql ndb_binlog_index inserts bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql ndb_binlog_index updates bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql ndb_binlog_index deletes bigint NULL NULL NULL NULL bigint(20) unsigned +NULL mysql ndb_binlog_index schemaops bigint NULL NULL NULL NULL bigint(20) unsigned +3.0000 mysql plugin name char 64 192 utf8 utf8_bin char(64) +3.0000 mysql plugin dl char 128 384 utf8 utf8_bin char(128) 3.0000 mysql proc db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql proc name char 64 192 utf8 utf8_general_ci char(64) 3.0000 mysql proc type enum 9 27 utf8 utf8_general_ci enum('FUNCTION','PROCEDURE') @@ -285,13 +397,17 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) 3.0000 mysql proc is_deterministic enum 3 9 utf8 utf8_general_ci enum('YES','NO') 3.0000 mysql proc security_type enum 7 21 utf8 utf8_general_ci enum('INVOKER','DEFINER') 1.0000 mysql proc param_list blob 65535 65535 NULL NULL blob -3.0000 mysql proc returns char 64 192 utf8 utf8_general_ci char(64) +1.0000 mysql proc returns longblob 4294967295 4294967295 NULL NULL longblob 1.0000 mysql proc body longblob 4294967295 4294967295 NULL NULL longblob 3.0000 mysql proc definer char 77 231 utf8 utf8_bin char(77) NULL mysql proc created timestamp NULL NULL NULL NULL timestamp NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp -3.0000 mysql proc sql_mode set 431 1293 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') +3.0000 mysql proc sql_mode set 478 1434 utf8 utf8_general_ci set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') 3.0000 mysql proc comment char 64 192 utf8 utf8_bin char(64) +3.0000 mysql proc character_set_client char 32 96 utf8 utf8_bin char(32) +3.0000 mysql proc collation_connection char 32 96 utf8 utf8_bin char(32) +3.0000 mysql proc db_collation char 32 96 utf8 utf8_bin char(32) +1.0000 mysql proc body_utf8 longblob 4294967295 4294967295 NULL NULL longblob 3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) @@ -300,13 +416,33 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp 3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) 3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') NULL mysql procs_priv Timestamp timestamp NULL NULL NULL NULL timestamp +3.0000 mysql servers Server_name char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Host char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Db char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Username char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Password char 64 192 utf8 utf8_general_ci char(64) +NULL mysql servers Port int NULL NULL NULL NULL int(4) +3.0000 mysql servers Socket char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Wrapper char 64 192 utf8 utf8_general_ci char(64) +3.0000 mysql servers Owner char 64 192 utf8 utf8_general_ci char(64) +NULL mysql slow_log start_time timestamp NULL NULL NULL NULL timestamp +1.0000 mysql slow_log user_host mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext +NULL mysql slow_log query_time time NULL NULL NULL NULL time +NULL mysql slow_log lock_time time NULL NULL NULL NULL time +NULL mysql slow_log rows_sent int NULL NULL NULL NULL int(11) +NULL mysql slow_log rows_examined int NULL NULL NULL NULL int(11) +3.0000 mysql slow_log db varchar 512 1536 utf8 utf8_general_ci varchar(512) +NULL mysql slow_log last_insert_id int NULL NULL NULL NULL int(11) +NULL mysql slow_log insert_id int NULL NULL NULL NULL int(11) +NULL mysql slow_log server_id int NULL NULL NULL NULL int(11) +1.0000 mysql slow_log sql_text mediumtext 16777215 16777215 utf8 utf8_general_ci mediumtext 3.0000 mysql tables_priv Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql tables_priv Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql tables_priv User char 16 48 utf8 utf8_bin char(16) 3.0000 mysql tables_priv Table_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql tables_priv Grantor char 77 231 utf8 utf8_bin char(77) NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp -3.0000 mysql tables_priv Table_priv set 90 270 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') +3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') 3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned 3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') @@ -351,6 +487,8 @@ NULL mysql time_zone_transition_type Is_DST tinyint NULL NULL NULL NULL tinyint( 3.0000 mysql user Create_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql user Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql user Create_user_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Event_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') +3.0000 mysql user Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql user ssl_type enum 9 27 utf8 utf8_general_ci enum('','ANY','X509','SPECIFIED') 1.0000 mysql user ssl_cipher blob 65535 65535 NULL NULL blob 1.0000 mysql user x509_issuer blob 65535 65535 NULL NULL blob diff --git a/mysql-test/suite/funcs_1/r/is_engines.result b/mysql-test/suite/funcs_1/r/is_engines.result new file mode 100644 index 00000000000..ba98ddd8f1e --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines.result @@ -0,0 +1,84 @@ +SHOW TABLES FROM information_schema LIKE 'ENGINES'; +Tables_in_information_schema (ENGINES) +ENGINES +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.ENGINES; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.ENGINES; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.ENGINES; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.ENGINES; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.ENGINES layout +######################################################################### +DESCRIBE information_schema.ENGINES; +Field Type Null Key Default Extra +ENGINE varchar(64) NO +SUPPORT varchar(8) NO +COMMENT varchar(80) NO +TRANSACTIONS varchar(3) NO +XA varchar(3) NO +SAVEPOINTS varchar(3) NO +SHOW CREATE TABLE information_schema.ENGINES; +Table Create Table +ENGINES CREATE TEMPORARY TABLE `ENGINES` ( + `ENGINE` varchar(64) NOT NULL DEFAULT '', + `SUPPORT` varchar(8) NOT NULL DEFAULT '', + `COMMENT` varchar(80) NOT NULL DEFAULT '', + `TRANSACTIONS` varchar(3) NOT NULL DEFAULT '', + `XA` varchar(3) NOT NULL DEFAULT '', + `SAVEPOINTS` varchar(3) NOT NULL DEFAULT '' +) ENGINE=MEMORY DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.ENGINES; +Field Type Null Key Default Extra +ENGINE varchar(64) NO +SUPPORT varchar(8) NO +COMMENT varchar(80) NO +TRANSACTIONS varchar(3) NO +XA varchar(3) NO +SAVEPOINTS varchar(3) NO +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.engines +SELECT * FROM information_schema.engines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.engines SET engine = '1234567'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.engines WHERE support IN ('DEFAULT','YES'); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.engines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_engines ON information_schema.engines(engine); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.engines DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.engines ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.engines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.engines RENAME db_datadict.engines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.engines RENAME information_schema.xengines; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_engines_archive.result b/mysql-test/suite/funcs_1/r/is_engines_archive.result new file mode 100644 index 00000000000..2772992495c --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_archive.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'ARCHIVE'; +ENGINE ARCHIVE +SUPPORT YES +COMMENT Archive storage engine +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_blackhole.result b/mysql-test/suite/funcs_1/r/is_engines_blackhole.result new file mode 100644 index 00000000000..021422e7a1f --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_blackhole.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'BLACKHOLE'; +ENGINE BLACKHOLE +SUPPORT YES +COMMENT /dev/null storage engine (anything you write to it disappears) +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_csv.result b/mysql-test/suite/funcs_1/r/is_engines_csv.result new file mode 100644 index 00000000000..2a7e61ee4d3 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_csv.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'CSV'; +ENGINE CSV +SUPPORT YES +COMMENT CSV storage engine +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_federated.result b/mysql-test/suite/funcs_1/r/is_engines_federated.result new file mode 100644 index 00000000000..f80fbbc7ece --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_federated.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'FEDERATED'; +ENGINE FEDERATED +SUPPORT YES +COMMENT Federated MySQL storage engine +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_innodb.result b/mysql-test/suite/funcs_1/r/is_engines_innodb.result new file mode 100644 index 00000000000..5713b417cd1 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_innodb.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'InnoDB'; +ENGINE InnoDB +SUPPORT YES +COMMENT Supports transactions, row-level locking, and foreign keys +TRANSACTIONS YES +XA YES +SAVEPOINTS YES diff --git a/mysql-test/suite/funcs_1/r/is_engines_memory.result b/mysql-test/suite/funcs_1/r/is_engines_memory.result new file mode 100644 index 00000000000..43114adfc56 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_memory.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'MEMORY'; +ENGINE MEMORY +SUPPORT YES +COMMENT Hash based, stored in memory, useful for temporary tables +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_merge.result b/mysql-test/suite/funcs_1/r/is_engines_merge.result new file mode 100644 index 00000000000..3bc7a498581 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_merge.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'MRG_MYISAM'; +ENGINE MRG_MYISAM +SUPPORT YES +COMMENT Collection of identical MyISAM tables +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_myisam.result b/mysql-test/suite/funcs_1/r/is_engines_myisam.result new file mode 100644 index 00000000000..2af9b3ce329 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_myisam.result @@ -0,0 +1,8 @@ +SELECT * FROM information_schema.engines +WHERE ENGINE = 'MyISAM'; +ENGINE MyISAM +SUPPORT DEFAULT +COMMENT Default engine as of MySQL 3.23 with great performance +TRANSACTIONS NO +XA NO +SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_ndb.result b/mysql-test/suite/funcs_1/r/is_engines_ndb.result new file mode 100644 index 00000000000..238609fc09e --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_engines_ndb.result @@ -0,0 +1,8 @@ +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_events.result b/mysql-test/suite/funcs_1/r/is_events.result new file mode 100644 index 00000000000..52673f1d285 --- /dev/null +++ b/mysql-test/suite/funcs_1/r/is_events.result @@ -0,0 +1,148 @@ +SHOW TABLES FROM information_schema LIKE 'EVENTS'; +Tables_in_information_schema (EVENTS) +EVENTS +####################################################################### +# Testcase 3.2.1.1: INFORMATION_SCHEMA tables can be queried via SELECT +####################################################################### +DROP VIEW IF EXISTS test.v1; +DROP PROCEDURE IF EXISTS test.p1; +DROP FUNCTION IF EXISTS test.f1; +CREATE VIEW test.v1 AS SELECT * FROM information_schema.EVENTS; +CREATE PROCEDURE test.p1() SELECT * FROM information_schema.EVENTS; +CREATE FUNCTION test.f1() returns BIGINT +BEGIN +DECLARE counter BIGINT DEFAULT NULL; +SELECT COUNT(*) INTO counter FROM information_schema.EVENTS; +RETURN counter; +END// +# Attention: The printing of the next result sets is disabled. +SELECT * FROM information_schema.EVENTS; +SELECT * FROM test.v1; +CALL test.p1; +SELECT test.f1(); +DROP VIEW test.v1; +DROP PROCEDURE test.p1; +DROP FUNCTION test.f1; +######################################################################### +# Testcase 3.2.12.1: INFORMATION_SCHEMA.EVENTS layout +######################################################################### +DESCRIBE information_schema.EVENTS; +Field Type Null Key Default Extra +EVENT_CATALOG varchar(64) YES NULL +EVENT_SCHEMA varchar(64) NO +EVENT_NAME varchar(64) NO +DEFINER varchar(77) NO +TIME_ZONE varchar(64) NO +EVENT_BODY varchar(8) NO +EVENT_DEFINITION longtext NO NULL +EVENT_TYPE varchar(9) NO +EXECUTE_AT datetime YES NULL +INTERVAL_VALUE varchar(256) YES NULL +INTERVAL_FIELD varchar(18) YES NULL +SQL_MODE longtext NO NULL +STARTS datetime YES NULL +ENDS datetime YES NULL +STATUS varchar(18) NO +ON_COMPLETION varchar(12) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +LAST_EXECUTED datetime YES NULL +EVENT_COMMENT varchar(64) NO +ORIGINATOR bigint(10) NO 0 +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO +SHOW CREATE TABLE information_schema.EVENTS; +Table Create Table +EVENTS CREATE TEMPORARY TABLE `EVENTS` ( + `EVENT_CATALOG` varchar(64) DEFAULT NULL, + `EVENT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `EVENT_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFINER` varchar(77) NOT NULL DEFAULT '', + `TIME_ZONE` varchar(64) NOT NULL DEFAULT '', + `EVENT_BODY` varchar(8) NOT NULL DEFAULT '', + `EVENT_DEFINITION` longtext NOT NULL, + `EVENT_TYPE` varchar(9) NOT NULL DEFAULT '', + `EXECUTE_AT` datetime DEFAULT NULL, + `INTERVAL_VALUE` varchar(256) DEFAULT NULL, + `INTERVAL_FIELD` varchar(18) DEFAULT NULL, + `SQL_MODE` longtext NOT NULL, + `STARTS` datetime DEFAULT NULL, + `ENDS` datetime DEFAULT NULL, + `STATUS` varchar(18) NOT NULL DEFAULT '', + `ON_COMPLETION` varchar(12) NOT NULL DEFAULT '', + `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `LAST_EXECUTED` datetime DEFAULT NULL, + `EVENT_COMMENT` varchar(64) NOT NULL DEFAULT '', + `ORIGINATOR` bigint(10) NOT NULL DEFAULT '0', + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', + `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', + `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 +SHOW COLUMNS FROM information_schema.EVENTS; +Field Type Null Key Default Extra +EVENT_CATALOG varchar(64) YES NULL +EVENT_SCHEMA varchar(64) NO +EVENT_NAME varchar(64) NO +DEFINER varchar(77) NO +TIME_ZONE varchar(64) NO +EVENT_BODY varchar(8) NO +EVENT_DEFINITION longtext NO NULL +EVENT_TYPE varchar(9) NO +EXECUTE_AT datetime YES NULL +INTERVAL_VALUE varchar(256) YES NULL +INTERVAL_FIELD varchar(18) YES NULL +SQL_MODE longtext NO NULL +STARTS datetime YES NULL +ENDS datetime YES NULL +STATUS varchar(18) NO +ON_COMPLETION varchar(12) NO +CREATED datetime NO 0000-00-00 00:00:00 +LAST_ALTERED datetime NO 0000-00-00 00:00:00 +LAST_EXECUTED datetime YES NULL +EVENT_COMMENT varchar(64) NO +ORIGINATOR bigint(10) NO 0 +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO +SELECT event_catalog, event_name, event_body, event_type, event_type, +status, on_completion +FROM information_schema.events +WHERE event_catalog IS NOT NULL or +event_body NOT IN ('SQL') or +event_type NOT IN ('ONE TIME','RECURRING') or +status NOT IN ('ENABLED','DISABLED','SLAVESIDE_DISABLED') or +on_completion NOT IN ('PRESERVE','NOT PRESERVE'); +event_catalog event_name event_body event_type event_type status on_completion +######################################################################## +# Testcases 3.2.1.3-3.2.1.5 + 3.2.1.8-3.2.1.12: INSERT/UPDATE/DELETE and +# DDL on INFORMATION_SCHEMA tables are not supported +######################################################################## +DROP DATABASE IF EXISTS db_datadict; +CREATE DATABASE db_datadict; +CREATE TABLE db_datadict.t1 (f1 BIGINT) +ENGINE = ; +INSERT INTO information_schema.events +SELECT * FROM information_schema.events; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +UPDATE information_schema.events SET event_name = '1234567' +WHERE table_name = 't1'; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DELETE FROM information_schema.events WHERE event_catalog IS NULL; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +TRUNCATE information_schema.events; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +CREATE INDEX my_idx_on_events ON information_schema.events(event_name); +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.events DROP PRIMARY KEY; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.events ADD f1 INT; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP TABLE information_schema.events; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.events RENAME db_datadict.events; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +ALTER TABLE information_schema.events RENAME information_schema.xevents; +ERROR 42000: Access denied for user 'root'@'localhost' to database 'information_schema' +DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_key_column_usage.result b/mysql-test/suite/funcs_1/r/is_key_column_usage.result index b4f222ff396..2b223d9b34f 100644 --- a/mysql-test/suite/funcs_1/r/is_key_column_usage.result +++ b/mysql-test/suite/funcs_1/r/is_key_column_usage.result @@ -43,18 +43,18 @@ REFERENCED_COLUMN_NAME varchar(64) YES NULL SHOW CREATE TABLE information_schema.KEY_COLUMN_USAGE; Table Create Table KEY_COLUMN_USAGE CREATE TEMPORARY TABLE `KEY_COLUMN_USAGE` ( - `CONSTRAINT_CATALOG` varchar(512) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `ORDINAL_POSITION` bigint(10) NOT NULL default '0', - `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) default NULL, - `REFERENCED_TABLE_SCHEMA` varchar(64) default NULL, - `REFERENCED_TABLE_NAME` varchar(64) default NULL, - `REFERENCED_COLUMN_NAME` varchar(64) default NULL + `CONSTRAINT_CATALOG` varchar(512) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', + `ORDINAL_POSITION` bigint(10) NOT NULL DEFAULT '0', + `POSITION_IN_UNIQUE_CONSTRAINT` bigint(10) DEFAULT NULL, + `REFERENCED_TABLE_SCHEMA` varchar(64) DEFAULT NULL, + `REFERENCED_TABLE_NAME` varchar(64) DEFAULT NULL, + `REFERENCED_COLUMN_NAME` varchar(64) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.KEY_COLUMN_USAGE; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_routines.result b/mysql-test/suite/funcs_1/r/is_routines.result index 497ebf946c0..ba564c42f91 100644 --- a/mysql-test/suite/funcs_1/r/is_routines.result +++ b/mysql-test/suite/funcs_1/r/is_routines.result @@ -48,29 +48,35 @@ LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE longtext NO NULL ROUTINE_COMMENT varchar(64) NO DEFINER varchar(77) NO +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO SHOW CREATE TABLE information_schema.ROUTINES; Table Create Table ROUTINES CREATE TEMPORARY TABLE `ROUTINES` ( - `SPECIFIC_NAME` varchar(64) NOT NULL default '', - `ROUTINE_CATALOG` varchar(512) default NULL, - `ROUTINE_SCHEMA` varchar(64) NOT NULL default '', - `ROUTINE_NAME` varchar(64) NOT NULL default '', - `ROUTINE_TYPE` varchar(9) NOT NULL default '', - `DTD_IDENTIFIER` varchar(64) default NULL, - `ROUTINE_BODY` varchar(8) NOT NULL default '', + `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', + `ROUTINE_CATALOG` varchar(512) DEFAULT NULL, + `ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '', + `ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT '', + `DTD_IDENTIFIER` varchar(64) DEFAULT NULL, + `ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '', `ROUTINE_DEFINITION` longtext, - `EXTERNAL_NAME` varchar(64) default NULL, - `EXTERNAL_LANGUAGE` varchar(64) default NULL, - `PARAMETER_STYLE` varchar(8) NOT NULL default '', - `IS_DETERMINISTIC` varchar(3) NOT NULL default '', - `SQL_DATA_ACCESS` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(64) default NULL, - `SECURITY_TYPE` varchar(7) NOT NULL default '', - `CREATED` datetime NOT NULL default '0000-00-00 00:00:00', - `LAST_ALTERED` datetime NOT NULL default '0000-00-00 00:00:00', + `EXTERNAL_NAME` varchar(64) DEFAULT NULL, + `EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL, + `PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '', + `IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '', + `SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '', + `SQL_PATH` varchar(64) DEFAULT NULL, + `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', + `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SQL_MODE` longtext NOT NULL, - `ROUTINE_COMMENT` varchar(64) NOT NULL default '', - `DEFINER` varchar(77) NOT NULL default '' + `ROUTINE_COMMENT` varchar(64) NOT NULL DEFAULT '', + `DEFINER` varchar(77) NOT NULL DEFAULT '', + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', + `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', + `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.ROUTINES; Field Type Null Key Default Extra @@ -94,6 +100,9 @@ LAST_ALTERED datetime NO 0000-00-00 00:00:00 SQL_MODE longtext NO NULL ROUTINE_COMMENT varchar(64) NO DEFINER varchar(77) NO +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO USE test; DROP PROCEDURE IF EXISTS sp_for_routines; DROP FUNCTION IF EXISTS function_for_routines; @@ -152,16 +161,16 @@ GRANT EXECUTE ON db_datadict_2.* TO 'testuser2'@'localhost'; FLUSH PRIVILEGES; # Establish connection testuser1 (user=testuser1) SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +sp_6_408002_1 NULL db_datadict sp_6_408002_1 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci # Establish connection testuser2 (user=testuser2) SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER -sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +sp_6_408002_2 NULL db_datadict_2 sp_6_408002_2 PROCEDURE NULL SQL NULL NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci # Establish connection testuser3 (user=testuser3) SELECT * FROM information_schema.routines; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION # Switch to connection default and close connections testuser1,testuser2,testuser3 DROP USER 'testuser1'@'localhost'; DROP USER 'testuser2'@'localhost'; @@ -175,7 +184,7 @@ DROP DATABASE db_datadict_2; DROP DATABASE IF EXISTS db_datadict; CREATE DATABASE db_datadict; SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION USE db_datadict; CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; @@ -201,6 +210,9 @@ 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_for_routines ROUTINE_CATALOG NULL ROUTINE_SCHEMA db_datadict @@ -221,6 +233,9 @@ LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER root@localhost +CHARACTER_SET_CLIENT latin1 +COLLATION_CONNECTION latin1_swedish_ci +DATABASE_COLLATION latin1_swedish_ci ALTER PROCEDURE sp_for_routines SQL SECURITY INVOKER; ALTER FUNCTION function_for_routines COMMENT 'updated comments'; SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' @@ -245,6 +260,9 @@ LAST_ALTERED SQL_MODE ROUTINE_COMMENT updated comments DEFINER root@localhost +CHARACTER_SET_CLIENT latin1 +COLLATION_CONNECTION latin1_swedish_ci +DATABASE_COLLATION latin1_swedish_ci SPECIFIC_NAME sp_for_routines ROUTINE_CATALOG NULL ROUTINE_SCHEMA db_datadict @@ -265,10 +283,13 @@ LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER root@localhost +CHARACTER_SET_CLIENT latin1 +COLLATION_CONNECTION latin1_swedish_ci +DATABASE_COLLATION latin1_swedish_ci DROP PROCEDURE sp_for_routines; DROP FUNCTION function_for_routines; SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION CREATE PROCEDURE sp_for_routines() SELECT 'db_datadict'; CREATE FUNCTION function_for_routines() RETURNS INT RETURN 0; SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict' @@ -293,6 +314,9 @@ 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_for_routines ROUTINE_CATALOG NULL ROUTINE_SCHEMA db_datadict @@ -313,10 +337,13 @@ LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER root@localhost +CHARACTER_SET_CLIENT latin1 +COLLATION_CONNECTION latin1_swedish_ci +DATABASE_COLLATION latin1_swedish_ci use test; DROP DATABASE db_datadict; SELECT * FROM information_schema.routines WHERE routine_schema = 'db_datadict'; -SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER +SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION ######################################################################### # 3.2.8.4: INFORMATION_SCHEMA.ROUTINES routine body too big for # ROUTINE_DEFINITION column @@ -569,6 +596,9 @@ LAST_ALTERED YYYY-MM-DD hh:mm:ss SQL_MODE ROUTINE_COMMENT DEFINER root@localhost +CHARACTER_SET_CLIENT latin1 +COLLATION_CONNECTION latin1_swedish_ci +DATABASE_COLLATION latin1_swedish_ci LENGTH(routine_definition) 2549 DROP DATABASE db_datadict; ######################################################################## diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges.result b/mysql-test/suite/funcs_1/r/is_schema_privileges.result index b99ef8dd684..64cc887f18f 100644 --- a/mysql-test/suite/funcs_1/r/is_schema_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges.result @@ -36,11 +36,11 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.SCHEMA_PRIVILEGES; Table Create Table SCHEMA_PRIVILEGES CREATE TEMPORARY TABLE `SCHEMA_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' + `GRANTEE` varchar(81) NOT NULL DEFAULT '', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', + `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMA_PRIVILEGES; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result index 36f365a6054..9e2a835d45b 100644 --- a/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result +++ b/mysql-test/suite/funcs_1/r/is_schema_privileges_is_mysql_test.result @@ -17,12 +17,14 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE ''@'%' NULL test CREATE VIEW NO ''@'%' NULL test DELETE NO ''@'%' NULL test DROP NO +''@'%' NULL test EVENT NO ''@'%' NULL test INDEX NO ''@'%' NULL test INSERT NO ''@'%' NULL test LOCK TABLES NO ''@'%' NULL test REFERENCES NO ''@'%' NULL test SELECT NO ''@'%' NULL test SHOW VIEW NO +''@'%' NULL test TRIGGER NO ''@'%' NULL test UPDATE NO SHOW DATABASES LIKE 'information_schema'; Database (information_schema) diff --git a/mysql-test/suite/funcs_1/r/is_schemata.result b/mysql-test/suite/funcs_1/r/is_schemata.result index 7230e967cf0..33ab912efce 100644 --- a/mysql-test/suite/funcs_1/r/is_schemata.result +++ b/mysql-test/suite/funcs_1/r/is_schemata.result @@ -36,11 +36,11 @@ SQL_PATH varchar(512) YES NULL SHOW CREATE TABLE information_schema.SCHEMATA; Table Create Table SCHEMATA CREATE TEMPORARY TABLE `SCHEMATA` ( - `CATALOG_NAME` varchar(512) default NULL, - `SCHEMA_NAME` varchar(64) NOT NULL default '', - `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL default '', - `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL default '', - `SQL_PATH` varchar(512) default NULL + `CATALOG_NAME` varchar(512) DEFAULT NULL, + `SCHEMA_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_CHARACTER_SET_NAME` varchar(64) NOT NULL DEFAULT '', + `DEFAULT_COLLATION_NAME` varchar(64) NOT NULL DEFAULT '', + `SQL_PATH` varchar(512) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.SCHEMATA; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index b2ca2fb2cb7..989fd9dc4e6 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -46,21 +46,21 @@ COMMENT varchar(16) YES NULL SHOW CREATE TABLE information_schema.STATISTICS; Table Create Table STATISTICS CREATE TEMPORARY TABLE `STATISTICS` ( - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `NON_UNIQUE` bigint(1) NOT NULL default '0', - `INDEX_SCHEMA` varchar(64) NOT NULL default '', - `INDEX_NAME` varchar(64) NOT NULL default '', - `SEQ_IN_INDEX` bigint(2) NOT NULL default '0', - `COLUMN_NAME` varchar(64) NOT NULL default '', - `COLLATION` varchar(1) default NULL, - `CARDINALITY` bigint(21) default NULL, - `SUB_PART` bigint(3) default NULL, - `PACKED` varchar(10) default NULL, - `NULLABLE` varchar(3) NOT NULL default '', - `INDEX_TYPE` varchar(16) NOT NULL default '', - `COMMENT` varchar(16) default NULL + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `NON_UNIQUE` bigint(1) NOT NULL DEFAULT '0', + `INDEX_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `INDEX_NAME` varchar(64) NOT NULL DEFAULT '', + `SEQ_IN_INDEX` bigint(2) NOT NULL DEFAULT '0', + `COLUMN_NAME` varchar(64) NOT NULL DEFAULT '', + `COLLATION` varchar(1) DEFAULT NULL, + `CARDINALITY` bigint(21) DEFAULT NULL, + `SUB_PART` bigint(3) DEFAULT NULL, + `PACKED` varchar(10) DEFAULT NULL, + `NULLABLE` varchar(3) NOT NULL DEFAULT '', + `INDEX_TYPE` varchar(16) NOT NULL DEFAULT '', + `COMMENT` varchar(16) DEFAULT NULL ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.STATISTICS; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result index 83425b4dd4e..ee37f6ef222 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_statistics_mysql.result @@ -16,6 +16,8 @@ NULL mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NULL mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NULL mysql db 1 mysql User 1 User A #CARD# NULL NULL BTREE +NULL mysql event 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE +NULL mysql event 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NULL mysql func 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NULL mysql help_category 0 mysql name 1 name A #CARD# NULL NULL BTREE NULL mysql help_category 0 mysql PRIMARY 1 help_category_id A #CARD# NULL NULL BTREE @@ -27,6 +29,8 @@ NULL mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE NULL mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE NULL mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NULL mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE +NULL mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE +NULL mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE NULL mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE NULL mysql proc 0 mysql PRIMARY 2 name A #CARD# NULL NULL BTREE NULL mysql proc 0 mysql PRIMARY 3 type A #CARD# NULL NULL BTREE @@ -36,6 +40,7 @@ NULL mysql procs_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 4 Routine_name A #CARD# NULL NULL BTREE NULL mysql procs_priv 0 mysql PRIMARY 5 Routine_type A #CARD# NULL NULL BTREE +NULL mysql servers 0 mysql PRIMARY 1 Server_name A #CARD# NULL NULL BTREE NULL mysql tables_priv 1 mysql Grantor 1 Grantor A #CARD# NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE NULL mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints.result b/mysql-test/suite/funcs_1/r/is_table_constraints.result index d2ca58aade6..56c2f6ff076 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints.result @@ -37,12 +37,12 @@ CONSTRAINT_TYPE varchar(64) NO SHOW CREATE TABLE information_schema.TABLE_CONSTRAINTS; Table Create Table TABLE_CONSTRAINTS CREATE TEMPORARY TABLE `TABLE_CONSTRAINTS` ( - `CONSTRAINT_CATALOG` varchar(512) default NULL, - `CONSTRAINT_SCHEMA` varchar(64) NOT NULL default '', - `CONSTRAINT_NAME` varchar(64) NOT NULL default '', - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `CONSTRAINT_TYPE` varchar(64) NOT NULL default '' + `CONSTRAINT_CATALOG` varchar(512) DEFAULT NULL, + `CONSTRAINT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_NAME` varchar(64) NOT NULL DEFAULT '', + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `CONSTRAINT_TYPE` varchar(64) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLE_CONSTRAINTS; Field Type Null Key Default Extra diff --git a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result index 0be4f0a6e95..ba5da23f069 100644 --- a/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_table_constraints_mysql.result @@ -9,6 +9,7 @@ ORDER BY table_schema,table_name,constraint_name; CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE NULL mysql PRIMARY mysql columns_priv PRIMARY KEY NULL mysql PRIMARY mysql db PRIMARY KEY +NULL mysql PRIMARY mysql event PRIMARY KEY NULL mysql PRIMARY mysql func PRIMARY KEY NULL mysql name mysql help_category UNIQUE NULL mysql PRIMARY mysql help_category PRIMARY KEY @@ -18,8 +19,11 @@ NULL mysql PRIMARY mysql help_relation PRIMARY KEY NULL mysql name mysql help_topic UNIQUE NULL mysql PRIMARY mysql help_topic PRIMARY KEY NULL mysql PRIMARY mysql host PRIMARY KEY +NULL mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY +NULL mysql PRIMARY mysql plugin PRIMARY KEY NULL mysql PRIMARY mysql proc PRIMARY KEY NULL mysql PRIMARY mysql procs_priv PRIMARY KEY +NULL mysql PRIMARY mysql servers PRIMARY KEY NULL mysql PRIMARY mysql tables_priv PRIMARY KEY NULL mysql PRIMARY mysql time_zone PRIMARY KEY NULL mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index 9bf04949710..c7b8e2630aa 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -37,12 +37,12 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.TABLE_PRIVILEGES; Table Create Table TABLE_PRIVILEGES CREATE TEMPORARY TABLE `TABLE_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' + `GRANTEE` varchar(81) NOT NULL DEFAULT '', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', + `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLE_PRIVILEGES; Field Type Null Key Default Extra @@ -102,6 +102,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser2'@'localhost' NULL db_datadict tb1 REFERENCES YES 'testuser2'@'localhost' NULL db_datadict tb1 SELECT YES 'testuser2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 TRIGGER YES 'testuser2'@'localhost' NULL db_datadict tb1 UPDATE YES SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost @@ -133,6 +134,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser2'@'localhost' NULL db_datadict tb1 REFERENCES YES 'testuser2'@'localhost' NULL db_datadict tb1 SELECT YES 'testuser2'@'localhost' NULL db_datadict tb1 SHOW VIEW YES +'testuser2'@'localhost' NULL db_datadict tb1 TRIGGER YES 'testuser2'@'localhost' NULL db_datadict tb1 UPDATE YES 'testuser3'@'localhost' NULL db_datadict tb3 SELECT NO SHOW GRANTS FOR 'testuser1'@'localhost'; @@ -185,6 +187,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser1'@'localhost' NULL test t1_table REFERENCES NO 'testuser1'@'localhost' NULL test t1_table SELECT NO 'testuser1'@'localhost' NULL test t1_table SHOW VIEW NO +'testuser1'@'localhost' NULL test t1_table TRIGGER NO 'testuser1'@'localhost' NULL test t1_table UPDATE NO 'testuser1'@'localhost' NULL test t1_view ALTER NO 'testuser1'@'localhost' NULL test t1_view CREATE NO @@ -196,6 +199,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'testuser1'@'localhost' NULL test t1_view REFERENCES NO 'testuser1'@'localhost' NULL test t1_view SELECT NO 'testuser1'@'localhost' NULL test t1_view SHOW VIEW NO +'testuser1'@'localhost' NULL test t1_view TRIGGER NO 'testuser1'@'localhost' NULL test t1_view UPDATE NO SELECT DISTINCT grantee, table_name FROM information_schema.table_privileges WHERE table_name LIKE 't1_%' diff --git a/mysql-test/suite/funcs_1/r/is_tables.result b/mysql-test/suite/funcs_1/r/is_tables.result index 45662b2b03f..1ed97e52c6c 100644 --- a/mysql-test/suite/funcs_1/r/is_tables.result +++ b/mysql-test/suite/funcs_1/r/is_tables.result @@ -33,46 +33,46 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SHOW CREATE TABLE information_schema.TABLES; Table Create Table TABLES CREATE TEMPORARY TABLE `TABLES` ( - `TABLE_CATALOG` varchar(512) default NULL, - `TABLE_SCHEMA` varchar(64) NOT NULL default '', - `TABLE_NAME` varchar(64) NOT NULL default '', - `TABLE_TYPE` varchar(64) NOT NULL default '', - `ENGINE` varchar(64) default NULL, - `VERSION` bigint(21) default NULL, - `ROW_FORMAT` varchar(10) default NULL, - `TABLE_ROWS` bigint(21) default NULL, - `AVG_ROW_LENGTH` bigint(21) default NULL, - `DATA_LENGTH` bigint(21) default NULL, - `MAX_DATA_LENGTH` bigint(21) default NULL, - `INDEX_LENGTH` bigint(21) default NULL, - `DATA_FREE` bigint(21) default NULL, - `AUTO_INCREMENT` bigint(21) default NULL, - `CREATE_TIME` datetime default NULL, - `UPDATE_TIME` datetime default NULL, - `CHECK_TIME` datetime default NULL, - `TABLE_COLLATION` varchar(64) default NULL, - `CHECKSUM` bigint(21) default NULL, - `CREATE_OPTIONS` varchar(255) default NULL, - `TABLE_COMMENT` varchar(80) NOT NULL default '' + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TABLE_NAME` varchar(64) NOT NULL DEFAULT '', + `TABLE_TYPE` varchar(64) NOT NULL DEFAULT '', + `ENGINE` varchar(64) DEFAULT NULL, + `VERSION` bigint(21) unsigned DEFAULT NULL, + `ROW_FORMAT` varchar(10) DEFAULT NULL, + `TABLE_ROWS` bigint(21) unsigned DEFAULT NULL, + `AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL, + `INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL, + `DATA_FREE` bigint(21) unsigned DEFAULT NULL, + `AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL, + `CREATE_TIME` datetime DEFAULT NULL, + `UPDATE_TIME` datetime DEFAULT NULL, + `CHECK_TIME` datetime DEFAULT NULL, + `TABLE_COLLATION` varchar(64) DEFAULT NULL, + `CHECKSUM` bigint(21) unsigned DEFAULT NULL, + `CREATE_OPTIONS` varchar(255) DEFAULT NULL, + `TABLE_COMMENT` varchar(80) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TABLES; Field Type Null Key Default Extra @@ -81,20 +81,20 @@ TABLE_SCHEMA varchar(64) NO TABLE_NAME varchar(64) NO TABLE_TYPE varchar(64) NO ENGINE varchar(64) YES NULL -VERSION bigint(21) YES NULL +VERSION bigint(21) unsigned YES NULL ROW_FORMAT varchar(10) YES NULL -TABLE_ROWS bigint(21) YES NULL -AVG_ROW_LENGTH bigint(21) YES NULL -DATA_LENGTH bigint(21) YES NULL -MAX_DATA_LENGTH bigint(21) YES NULL -INDEX_LENGTH bigint(21) YES NULL -DATA_FREE bigint(21) YES NULL -AUTO_INCREMENT bigint(21) YES NULL +TABLE_ROWS bigint(21) unsigned YES NULL +AVG_ROW_LENGTH bigint(21) unsigned YES NULL +DATA_LENGTH bigint(21) unsigned YES NULL +MAX_DATA_LENGTH bigint(21) unsigned YES NULL +INDEX_LENGTH bigint(21) unsigned YES NULL +DATA_FREE bigint(21) unsigned YES NULL +AUTO_INCREMENT bigint(21) unsigned YES NULL CREATE_TIME datetime YES NULL UPDATE_TIME datetime YES NULL CHECK_TIME datetime YES NULL TABLE_COLLATION varchar(64) YES NULL -CHECKSUM bigint(21) YES NULL +CHECKSUM bigint(21) unsigned YES NULL CREATE_OPTIONS varchar(255) YES NULL TABLE_COMMENT varchar(80) NO SELECT table_catalog, table_schema, table_name diff --git a/mysql-test/suite/funcs_1/r/is_tables_is.result b/mysql-test/suite/funcs_1/r/is_tables_is.result index 78193155e22..afef91f9e6b 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_is.result +++ b/mysql-test/suite/funcs_1/r/is_tables_is.result @@ -18,7 +18,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -41,7 +41,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -64,7 +64,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -87,7 +87,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -110,7 +110,122 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME ENGINES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME EVENTS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME FILES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME GLOBAL_STATUS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME GLOBAL_VARIABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -133,7 +248,99 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PARTITIONS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PLUGINS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PROCESSLIST +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME REFERENTIAL_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -156,7 +363,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -179,7 +386,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -202,7 +409,53 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SESSION_STATUS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SESSION_VARIABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -225,7 +478,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -248,7 +501,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -271,7 +524,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -294,7 +547,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -317,7 +570,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -340,7 +593,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -363,7 +616,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -403,7 +656,7 @@ TABLE_SCHEMA information_schema TABLE_NAME CHARACTER_SETS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -426,7 +679,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATIONS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -449,7 +702,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLLATION_CHARACTER_SET_APPLICABILITY TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -472,7 +725,7 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMNS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -495,7 +748,122 @@ TABLE_SCHEMA information_schema TABLE_NAME COLUMN_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME ENGINES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME EVENTS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME FILES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME GLOBAL_STATUS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME GLOBAL_VARIABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -518,7 +886,99 @@ TABLE_SCHEMA information_schema TABLE_NAME KEY_COLUMN_USAGE TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PARTITIONS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PLUGINS +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME PROCESSLIST +TABLE_TYPE SYSTEM VIEW +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME REFERENTIAL_CONSTRAINTS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -541,7 +1001,7 @@ TABLE_SCHEMA information_schema TABLE_NAME ROUTINES TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -564,7 +1024,7 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMATA TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -587,7 +1047,53 @@ TABLE_SCHEMA information_schema TABLE_NAME SCHEMA_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SESSION_STATUS +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA information_schema +TABLE_NAME SESSION_VARIABLES +TABLE_TYPE SYSTEM VIEW +ENGINE MEMORY +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -610,7 +1116,7 @@ TABLE_SCHEMA information_schema TABLE_NAME STATISTICS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -633,7 +1139,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -656,7 +1162,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_CONSTRAINTS TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -679,7 +1185,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TABLE_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -702,7 +1208,7 @@ TABLE_SCHEMA information_schema TABLE_NAME TRIGGERS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -725,7 +1231,7 @@ TABLE_SCHEMA information_schema TABLE_NAME USER_PRIVILEGES TABLE_TYPE SYSTEM VIEW ENGINE MEMORY -VERSION 0 +VERSION 10 ROW_FORMAT Fixed TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# @@ -748,7 +1254,7 @@ TABLE_SCHEMA information_schema TABLE_NAME VIEWS TABLE_TYPE SYSTEM VIEW ENGINE MyISAM -VERSION 0 +VERSION 10 ROW_FORMAT Dynamic TABLE_ROWS #TBLR# AVG_ROW_LENGTH #ARL# diff --git a/mysql-test/suite/funcs_1/r/is_tables_mysql.result b/mysql-test/suite/funcs_1/r/is_tables_mysql.result index d407f224b7d..689f0ef89d0 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_mysql.result +++ b/mysql-test/suite/funcs_1/r/is_tables_mysql.result @@ -60,6 +60,29 @@ user_comment Database privileges Separator ----------------------------------------------------- TABLE_CATALOG NULL TABLE_SCHEMA mysql +TABLE_NAME event +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Events +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql TABLE_NAME func TABLE_TYPE BASE TABLE ENGINE MyISAM @@ -83,6 +106,29 @@ user_comment User defined functions Separator ----------------------------------------------------- TABLE_CATALOG NULL TABLE_SCHEMA mysql +TABLE_NAME general_log +TABLE_TYPE BASE TABLE +ENGINE CSV +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment General log +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql TABLE_NAME help_category TABLE_TYPE BASE TABLE ENGINE MyISAM @@ -198,6 +244,52 @@ user_comment Host privileges; Merged with database privileges Separator ----------------------------------------------------- TABLE_CATALOG NULL TABLE_SCHEMA mysql +TABLE_NAME ndb_binlog_index +TABLE_TYPE BASE TABLE +ENGINE MyISAM +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 NULL +TABLE_SCHEMA mysql +TABLE_NAME plugin +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_bin +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment MySQL plugins +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql TABLE_NAME proc TABLE_TYPE BASE TABLE ENGINE MyISAM @@ -244,6 +336,52 @@ user_comment Procedure privileges Separator ----------------------------------------------------- TABLE_CATALOG NULL TABLE_SCHEMA mysql +TABLE_NAME servers +TABLE_TYPE BASE TABLE +ENGINE MyISAM +VERSION 10 +ROW_FORMAT Fixed +TABLE_ROWS #TBLR# +AVG_ROW_LENGTH #ARL# +DATA_LENGTH #DL# +MAX_DATA_LENGTH #MDL# +INDEX_LENGTH #IL# +DATA_FREE #DF# +AUTO_INCREMENT NULL +CREATE_TIME #CRT# +UPDATE_TIME #UT# +CHECK_TIME #CT# +TABLE_COLLATION utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment MySQL Foreign Servers table +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql +TABLE_NAME slow_log +TABLE_TYPE BASE TABLE +ENGINE CSV +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 utf8_general_ci +CHECKSUM NULL +CREATE_OPTIONS #CO# +TABLE_COMMENT #TC# +user_comment Slow log +Separator ----------------------------------------------------- +TABLE_CATALOG NULL +TABLE_SCHEMA mysql TABLE_NAME tables_priv TABLE_TYPE BASE TABLE ENGINE MyISAM diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result index 5b9863a4673..7150ab9d580 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_ndb.result @@ -521,29 +521,6 @@ CREATE_OPTIONS #CO# TABLE_COMMENT #TC# user_comment Separator ----------------------------------------------------- -TABLE_CATALOG NULL -TABLE_SCHEMA test4 -TABLE_NAME t6 -TABLE_TYPE BASE TABLE -ENGINE ndbcluster -VERSION 10 -ROW_FORMAT Fixed -TABLE_ROWS #TBLR# -AVG_ROW_LENGTH #ARL# -DATA_LENGTH #DL# -MAX_DATA_LENGTH #MDL# -INDEX_LENGTH #IL# -DATA_FREE #DF# -AUTO_INCREMENT NULL -CREATE_TIME #CRT# -UPDATE_TIME #UT# -CHECK_TIME #CT# -TABLE_COLLATION latin1_swedish_ci -CHECKSUM NULL -CREATE_OPTIONS #CO# -TABLE_COMMENT #TC# -user_comment -Separator ----------------------------------------------------- # Switch to connection default and close connection testuser1 DROP USER testuser1@localhost; DROP DATABASE db_datadict; diff --git a/mysql-test/suite/funcs_1/r/is_triggers.result b/mysql-test/suite/funcs_1/r/is_triggers.result index 77bd2d8b670..ca62bd26e80 100644 --- a/mysql-test/suite/funcs_1/r/is_triggers.result +++ b/mysql-test/suite/funcs_1/r/is_triggers.result @@ -47,28 +47,34 @@ ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime YES NULL SQL_MODE longtext NO NULL DEFINER longtext NO NULL +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO SHOW CREATE TABLE information_schema.TRIGGERS; Table Create Table TRIGGERS CREATE TEMPORARY TABLE `TRIGGERS` ( - `TRIGGER_CATALOG` varchar(512) default NULL, - `TRIGGER_SCHEMA` varchar(64) NOT NULL default '', - `TRIGGER_NAME` varchar(64) NOT NULL default '', - `EVENT_MANIPULATION` varchar(6) NOT NULL default '', - `EVENT_OBJECT_CATALOG` varchar(512) default NULL, - `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL default '', - `EVENT_OBJECT_TABLE` varchar(64) NOT NULL default '', - `ACTION_ORDER` bigint(4) NOT NULL default '0', + `TRIGGER_CATALOG` varchar(512) DEFAULT NULL, + `TRIGGER_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `TRIGGER_NAME` varchar(64) NOT NULL DEFAULT '', + `EVENT_MANIPULATION` varchar(6) NOT NULL DEFAULT '', + `EVENT_OBJECT_CATALOG` varchar(512) DEFAULT NULL, + `EVENT_OBJECT_SCHEMA` varchar(64) NOT NULL DEFAULT '', + `EVENT_OBJECT_TABLE` varchar(64) NOT NULL DEFAULT '', + `ACTION_ORDER` bigint(4) NOT NULL DEFAULT '0', `ACTION_CONDITION` longtext, `ACTION_STATEMENT` longtext NOT NULL, - `ACTION_ORIENTATION` varchar(9) NOT NULL default '', - `ACTION_TIMING` varchar(6) NOT NULL default '', - `ACTION_REFERENCE_OLD_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_NEW_TABLE` varchar(64) default NULL, - `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL default '', - `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL default '', - `CREATED` datetime default NULL, + `ACTION_ORIENTATION` varchar(9) NOT NULL DEFAULT '', + `ACTION_TIMING` varchar(6) NOT NULL DEFAULT '', + `ACTION_REFERENCE_OLD_TABLE` varchar(64) DEFAULT NULL, + `ACTION_REFERENCE_NEW_TABLE` varchar(64) DEFAULT NULL, + `ACTION_REFERENCE_OLD_ROW` varchar(3) NOT NULL DEFAULT '', + `ACTION_REFERENCE_NEW_ROW` varchar(3) NOT NULL DEFAULT '', + `CREATED` datetime DEFAULT NULL, `SQL_MODE` longtext NOT NULL, - `DEFINER` longtext NOT NULL + `DEFINER` longtext NOT NULL, + `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', + `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', + `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.TRIGGERS; Field Type Null Key Default Extra @@ -91,11 +97,14 @@ ACTION_REFERENCE_NEW_ROW varchar(3) NO CREATED datetime YES NULL SQL_MODE longtext NO NULL DEFINER longtext NO NULL +CHARACTER_SET_CLIENT varchar(32) NO +COLLATION_CONNECTION varchar(32) NO +DATABASE_COLLATION varchar(32) NO SELECT * FROM information_schema.triggers WHERE trigger_catalog IS NOT NULL OR event_object_catalog IS NOT NULL OR action_condition IS NOT NULL OR action_reference_old_table IS NOT NULL OR action_reference_new_table IS NOT NULL; -TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER +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 ################################################################################## # Testcase 3.2.18.2 + 3.2.18.3: INFORMATION_SCHEMA.TRIGGERS accessible information ################################################################################## @@ -109,9 +118,9 @@ DROP USER 'testuser3'@'localhost'; CREATE USER 'testuser3'@'localhost'; DROP USER 'testuser4'@'localhost'; CREATE USER 'testuser4'@'localhost'; -GRANT SUPER ON *.* TO 'testuser1'@'localhost'; -GRANT SUPER ON *.* TO 'testuser3'@'localhost'; -GRANT SUPER ON *.* TO 'testuser4'@'localhost'; +GRANT TRIGGER ON *.* TO 'testuser1'@'localhost'; +GRANT TRIGGER ON *.* TO 'testuser3'@'localhost'; +GRANT TRIGGER ON *.* TO 'testuser4'@'localhost'; GRANT ALL ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; # Establish connection testuser1 (user=testuser1) CREATE TABLE db_datadict.t1 (f1 INT, f2 INT, f3 INT) @@ -119,56 +128,63 @@ ENGINE = ; CREATE TRIGGER trg1 BEFORE INSERT ON db_datadict.t1 FOR EACH ROW SET @test_before = 2, new.f1 = @test_before; GRANT ALL ON db_datadict.t1 TO 'testuser2'@'localhost'; +REVOKE TRIGGER ON db_datadict.t1 FROM 'testuser2'@'localhost'; GRANT SELECT ON db_datadict.t1 TO 'testuser3'@'localhost'; SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; -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 -NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci SHOW TRIGGERS FROM db_datadict; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci # Establish connection testuser2 (user=testuser2) SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost GRANT USAGE ON *.* TO 'testuser2'@'localhost' -GRANT ALL PRIVILEGES ON `db_datadict`.`t1` TO 'testuser2'@'localhost' -# No SUPER Privilege --> no result for query +GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW ON `db_datadict`.`t1` TO 'testuser2'@'localhost' +# No TRIGGER Privilege --> no result for query SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; -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 +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 SHOW TRIGGERS FROM db_datadict; -Trigger Event Table Statement Timing Created sql_mode Definer +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation # Establish connection testuser3 (user=testuser3) SHOW GRANTS FOR 'testuser3'@'localhost'; Grants for testuser3@localhost -GRANT SUPER ON *.* TO 'testuser3'@'localhost' +GRANT TRIGGER ON *.* TO 'testuser3'@'localhost' GRANT SELECT ON `db_datadict`.`t1` TO 'testuser3'@'localhost' -# SUPER Privilege + SELECT Privilege on t1 --> result for query +# TRIGGER Privilege + SELECT Privilege on t1 --> result for query SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; -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 -NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci SHOW TRIGGERS FROM db_datadict; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci # Establish connection testuser4 (user=testuser4) SHOW GRANTS FOR 'testuser4'@'localhost'; Grants for testuser4@localhost -GRANT SUPER ON *.* TO 'testuser4'@'localhost' -# SUPER Privilege + no SELECT Privilege on t1 --> no result for query +GRANT TRIGGER ON *.* TO 'testuser4'@'localhost' +# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query +SELECT * FROM db_datadict.t1; +ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1' +DESC db_datadict.t1; +ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1' SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; -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 +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci SHOW TRIGGERS FROM db_datadict; -Trigger Event Table Statement Timing Created sql_mode Definer +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci # Switch to connection default and close connections testuser1 - testuser4 SELECT * FROM information_schema.triggers WHERE trigger_name = 'trg1'; -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 -NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost +TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION +NULL db_datadict trg1 INSERT NULL db_datadict t1 0 NULL SET @test_before = 2, new.f1 = @test_before ROW BEFORE NULL NULL OLD NEW NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci SHOW TRIGGERS FROM db_datadict; -Trigger Event Table Statement Timing Created sql_mode Definer -trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost +Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation +trg1 INSERT t1 SET @test_before = 2, new.f1 = @test_before BEFORE NULL testuser1@localhost latin1 latin1_swedish_ci latin1_swedish_ci DROP USER 'testuser1'@'localhost'; DROP USER 'testuser2'@'localhost'; DROP USER 'testuser3'@'localhost'; diff --git a/mysql-test/suite/funcs_1/r/is_user_privileges.result b/mysql-test/suite/funcs_1/r/is_user_privileges.result index f5fa1f858a1..03865f59c2c 100644 --- a/mysql-test/suite/funcs_1/r/is_user_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_user_privileges.result @@ -35,10 +35,10 @@ IS_GRANTABLE varchar(3) NO SHOW CREATE TABLE information_schema.USER_PRIVILEGES; Table Create Table USER_PRIVILEGES CREATE TEMPORARY TABLE `USER_PRIVILEGES` ( - `GRANTEE` varchar(81) NOT NULL default '', - `TABLE_CATALOG` varchar(512) default NULL, - `PRIVILEGE_TYPE` varchar(64) NOT NULL default '', - `IS_GRANTABLE` varchar(3) NOT NULL default '' + `GRANTEE` varchar(81) NOT NULL DEFAULT '', + `TABLE_CATALOG` varchar(512) DEFAULT NULL, + `PRIVILEGE_TYPE` varchar(64) NOT NULL DEFAULT '', + `IS_GRANTABLE` varchar(3) NOT NULL DEFAULT '' ) ENGINE=MEMORY DEFAULT CHARSET=utf8 SHOW COLUMNS FROM information_schema.USER_PRIVILEGES; Field Type Null Key Default Extra @@ -76,10 +76,10 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' NULL USAGE NO SELECT * FROM mysql.user WHERE user LIKE 'testuser%' ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 # # Add GRANT OPTION db_datadict.* to testuser1; GRANT UPDATE ON db_datadict.* TO 'testuser1'@'localhost' WITH GRANT OPTION; @@ -93,10 +93,10 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' NULL USAGE NO SELECT * FROM mysql.user WHERE user LIKE 'testuser%' ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 # Establish connection testuser1 (user=testuser1) SELECT * FROM information_schema.user_privileges WHERE grantee LIKE '''testuser%''' @@ -105,10 +105,10 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'testuser1'@'localhost' NULL USAGE NO SELECT * FROM mysql.user WHERE user LIKE 'testuser%' ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 SHOW GRANTS; Grants for testuser1@localhost GRANT USAGE ON *.* TO 'testuser1'@'localhost' @@ -130,10 +130,10 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE 'testuser3'@'localhost' NULL USAGE NO SELECT * FROM mysql.user WHERE user LIKE 'testuser%' ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost testuser1 Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections +localhost testuser1 Y N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 +localhost testuser3 N N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 GRANT SELECT ON *.* TO 'testuser1'@'localhost' WITH GRANT OPTION; # # Here is shown correctly for user_1 ----------------------------------------------- -SELECT * FROM information_schema.user_privileges -WHERE grantee LIKE "%user%" - ORDER BY grantee, table_catalog, privilege_type; -GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE -'user_1'@'localhost' NULL SELECT NO -'user_2'@'localhost' NULL INSERT NO -'user_2'@'localhost' NULL UPDATE NO -'user_3'@'localhost' NULL USAGE NO -SELECT * FROM mysql.user WHERE user LIKE "%user%" ORDER BY host, user; -Host User Password Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Reload_priv Shutdown_priv Process_priv File_priv Grant_priv References_priv Index_priv Alter_priv Show_db_priv Super_priv Create_tmp_table_priv Lock_tables_priv Execute_priv Repl_slave_priv Repl_client_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Create_user_priv Event_priv Trigger_priv ssl_type ssl_cipher x509_issuer x509_subject max_questions max_updates max_connections max_user_connections -localhost user_1 Y N N N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_2 N Y Y N N N N N N N N N N N N N N N N N N N N N N N N N 0 0 0 0 -localhost user_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 N N N 0 0 0 0 -SHOW GRANTS; -Grants for root@localhost -GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION -GRANT SELECT ON *.* TO 'user_1'@'localhost' WITH GRANT OPTION; - -Here
. ############################################################################### -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 5 ; -if ($have_bug_11589) +CREATE VIEW test.v1 AS SELECT * FROM test.tb2; +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM test.v1 ; +--vertical_results +SELECT * FROM test.v1 order by f59,f60,f61 ; +--horizontal_results --enable_ps_protocol drop view test.v1 ; ############################################################################### @@ -2307,8 +2334,8 @@ drop view test.v1 ; # that is semantically equivalent to CREATE VIEW # AS SELECT col1, col3 FROM
. ############################################################################### -CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2 limit 50 ; -SELECT * FROM test.v1 ; +CREATE VIEW test.v1 AS SELECT F59,F61 FROM test.tb2; +SELECT * FROM test.v1 order by F59, F61 limit 50; drop view test.v1 ; ############################################################################### # Testcase 3.3.1.52: Ensure that a view that is a subset of every column and @@ -2317,12 +2344,14 @@ drop view test.v1 ; # that is semantically equivalent to CREATE VIEW # AS SELECT * FROM
WHERE .... ############################################################################### -CREATE VIEW test.v1 AS SELECT * FROM test.tb2 limit 20 ; +CREATE VIEW test.v1 AS SELECT * FROM test.tb2 order by f59, f60, f61; if ($have_bug_11589) { --disable_ps_protocol } -SELECT * FROM test.v1; +--vertical_results +SELECT * FROM test.v1 order by f59,f60,f61 ; +--horizontal_results --enable_ps_protocol drop view test.v1 ; ############################################################################### @@ -2332,8 +2361,8 @@ drop view test.v1 ; # definition that is semantically equivalent to CREATE VIEW # AS SELECT col1, col3 FROM
WHERE .. ############################################################################### -CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2 limit 20 ; -SELECT * FROM test.v1 limit 50; +CREATE VIEW test.v1 AS SELECT F59,f61 FROM test.tb2; +SELECT * FROM test.v1 order by f59,f61 desc limit 20; drop view test.v1 ; @@ -2361,17 +2390,17 @@ 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 limit 50 ; +Select * from test.v1 order by f59 limit 50 ; drop table test.t1 ; drop table test.t2 ; drop view test.v1 ; -# FIXME(ML): Implement an automatic check for 3.3.1.50 - 3.3.1.54 -# CREATE VIEW ... AS -# Comparison of the VIEW with the temporary table +# FIXME(mleich): Implement an automatic check for 3.3.1.50 - 3.3.1.54 +# CREATE VIEW ... AS +# Comparison of the VIEW with the temporary table let $message= Testcase 3.3.1.50 - 3.3.1.54 additional implementation; --source include/show_msg80.inc @@ -2464,7 +2493,7 @@ 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; +select * from test.v1 order by t1_f59 ; 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; @@ -2473,7 +2502,7 @@ from t1 inner join t2 where t1.f59 = t2.f59; 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; +Select * from v1 order by t1_f59,t2_f59; Select t1.f59 AS t1_f59, t2.f59 AS t2_f59 FROM t2 cross join t1; @@ -2481,7 +2510,7 @@ FROM t2 cross join t1; 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; +Select * from v1 order by t1_f59,t2_f59; Select straight_join t1.f59 AS t1_f59, t2.f59 AS t2_f59 FROM t2,t1; @@ -2489,7 +2518,7 @@ FROM t2,t1; Create or replace view test.v1 as Select f59, f60, f61, a, b FROM t2 natural join t1; -Select * from v1; +Select * from v1 order by f59; Select f59, f60, f61, a, b FROM t2 natural join t1; @@ -2498,7 +2527,7 @@ 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; +Select * from v1 order by t1_f59; 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; @@ -2507,7 +2536,7 @@ FROM t2 left outer join t1 on t2.f59=t1.f59; 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; +Select * from v1 order by f59; Select f59, f60, f61, t1.a, t2.b FROM t2 natural left outer join t1; @@ -2516,7 +2545,7 @@ 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; +Select * from v1 order by t1_f59; 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; @@ -2525,7 +2554,7 @@ FROM t2 right outer join t1 on t2.f59=t1.f59; Create or replace view test.v1 as Select f59, f60, a, b FROM t2 natural right outer join t1; -Select * from v1; +Select * from v1 order by f59 desc; Select f59, f60, a, b FROM t2 natural right outer join t1; @@ -2558,7 +2587,7 @@ 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; Drop view if exists test.v1 ; # Testcase 3.3.1.A2 ; @@ -2573,7 +2602,7 @@ 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; Drop view if exists test.v1 ; # Testcase 3.3.1.A3 ; @@ -2588,7 +2617,7 @@ 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; Drop view test.v1 ; @@ -2614,15 +2643,15 @@ 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; 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 limit 0,10; +Select * from test.v1 order by f59 limit 0,10; Drop view test.v1 ; @@ -2638,25 +2667,25 @@ 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 limit 0,10; +select * from test.v1 order by f59 limit 0,10; 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 limit 0,10; +select * from test.v1 order by f59 limit 0,10; 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 limit 0,10; +select * from test.v1 order by f59 limit 0,10; 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 limit 0,10; +select * from test.v1 order by f59 limit 0,10; drop view if exists test.v1 ; drop table t1; @@ -2675,15 +2704,17 @@ 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 limit 0,10; +SELECT * FROM test.v1 order by f59 limit 0,10; ALTER VIEW test.v1 AS SELECT * FROM test.tb2 WHERE test.tb2.f59 = 242 ; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM test.v1 limit 0,10; +--vertical_results +SELECT * FROM test.v1 order by f59 limit 0,10; +--horizontal_results --enable_ps_protocol Drop view test.v1 ; @@ -2711,7 +2742,7 @@ CREATE VIEW v1 AS SELECT f1 FROM t1; # DROP VIEW DROP VIEW v1; ---error 1051 +--error ER_BAD_TABLE_ERROR DROP VIEW v1; CREATE VIEW v1 AS SELECT f1 FROM t1; @@ -2758,7 +2789,7 @@ while ($num1) # DROP VIEW v1_top < |RESTRICD|CASCADE> must be successful. eval $aux1 ; # Check, that v1_top really no more exists + cleanup for the second sub test - --error 1051 + --error ER_BAD_TABLE_ERROR DROP VIEW v1_top; CREATE VIEW v1_top AS SELECT * FROM v1_base; @@ -2788,8 +2819,8 @@ let $message= Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5 ; # 3.3.1.A5 SHOW COLUMNS, SHOW FIELDS, DESCRIBE, EXPLAIN # statement is executed ############################################################################### -# Note(ML): There will be no non failing sub testcases with SHOW here. -# They will be done in 3.3.11 ff. +# Note(mleich): There will be no non failing sub testcases with SHOW here. +# They will be done in 3.3.11 ff. --disable_warnings DROP TABLE IF EXISTS t1 ; DROP VIEW IF EXISTS v1 ; @@ -2800,24 +2831,24 @@ DROP VIEW v1 ; # The negative tests: # SELECT ---error 1146 +--error ER_NO_SUCH_TABLE SELECT * FROM v1 ; # ---error 1146 +--error ER_NO_SUCH_TABLE SHOW CREATE VIEW v1 ; ---error 1146 +--error ER_NO_SUCH_TABLE SHOW CREATE TABLE v1 ; # Attention: Like is a filter. So we will get an empty result set here. SHOW TABLE STATUS like 'v1' ; SHOW TABLES LIKE 'v1'; ---error 1146 +--error ER_NO_SUCH_TABLE SHOW COLUMNS FROM v1; ---error 1146 +--error ER_NO_SUCH_TABLE SHOW FIELDS FROM v1; CHECK TABLE v1; ---error 1146 +--error ER_NO_SUCH_TABLE DESCRIBE v1; ---error 1146 +--error ER_NO_SUCH_TABLE EXPLAIN SELECT * FROM v1; Use test; @@ -2886,30 +2917,34 @@ eval EXPLAIN SELECT * FROM test3.v$toplevel; # 1.2 Check the top level view when a base VIEW is dropped DROP VIEW test3.v0; eval SHOW CREATE VIEW test3.v$toplevel; ---error 1356 +--error ER_VIEW_INVALID eval SELECT * FROM test3.v$toplevel; ---error 1356 +--error ER_VIEW_INVALID eval EXPLAIN SELECT * FROM test3.v$toplevel; # 2. Complicated nested VIEWs # parameter @max_level = nesting level # There is a limit(@join_limit = 61) for the number of tables which -# could be joined. This limit will be reached, when we set +# could be joined. This limit will be reached, when we set # @max_level = @join_limit - 1 . --disable_query_log #++++++++++++++++++++++++++++++++++++++++++++++ # OBN - Reduced the value of join limit to 30 # Above seems to hang - FIXME -# ML - Reason unclear why it hangs for OBN on innodb and memory. -# Hypothesis: Maybe the consumption of virtual memory is high -# and OBN's box performs excessive paging. -# (RAM: OBN ~384MB RAM, ML 1 GB) +# mleich - Reason unclear why it hangs for OBN on innodb and memory. +# Hypothesis: Maybe the consumption of virtual memory is high +# and OBN's box performs excessive paging. +# (RAM: OBN ~384MB RAM, mleich 1 GB) #++++++++++++++++++++++++++++++++++++++++++++++ -let $message= FIXME - Setting join_limit to 30 - hangs for higher values; +let $message= FIXME - Setting join_limit to 28 - hangs for higher values; --source include/show_msg.inc +# OBN - Reduced from 30 in 5.1.21 to avoid hitting the ndbcluster limit +# of "ERROR HY000: Got temporary error 4006 'Connect failure +# - out of connection objects (increase MaxNoOfConcurrentTransactions)' +# from NDBCLUSTER " to early; #SET @join_limit = 61; -SET @join_limit = 30; +SET @join_limit = 28; # OBN - see above SET @max_level = @join_limit - 1; --enable_query_log @@ -3045,9 +3080,9 @@ let $sublevel= `SELECT @max_level`; eval CREATE VIEW test1.v$level AS SELECT f1, f2 FROM test3.t1 tab1 NATURAL JOIN test1.v$sublevel tab2; eval SHOW CREATE VIEW test1.v$level; -# the following line as written as '--eror 1116' and the command +# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command # is successful so assuming no expected error was intended -# --error 1116 +# --error ER_TOO_MANY_TABLES eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; let $message= The output of following EXPLAIN is deactivated, because the result @@ -3058,9 +3093,9 @@ if (1) { --disable_result_log } -# the following line as written as '--eror 1116' and the command +# the following line as written as '--eror ER_TOO_MANY_TABLES' and the command # is successful so assuming no expected error was intended -# --error 1116 +# --error ER_TOO_MANY_TABLES eval EXPLAIN SELECT CAST(f1 AS SIGNED INTEGER) AS f1, CAST(f2 AS CHAR) AS f2 FROM test1.v$level; if (1) @@ -3073,10 +3108,10 @@ eval DROP VIEW IF EXISTS test1.v$level; # and check the behaviour of the top level view. # 2.3.1 Exchange numeric and string column --disable_result_log -CREATE OR REPLACE VIEW test1.v0 AS +CREATE OR REPLACE VIEW test1.v0 AS SELECT f1 as f2, f2 as f1 FROM test2.t1; # 2.3.2 DATE instead of numeric -CREATE OR REPLACE VIEW test2.v0 AS +CREATE OR REPLACE VIEW test2.v0 AS SELECT CAST('0001-01-01' AS DATE) as f1, f2 FROM test3.t1; eval SHOW CREATE VIEW test1.v$toplevel; eval SELECT CAST(f1 AS SIGNED INTEGER) AS f1, @@ -3156,11 +3191,13 @@ Create view test.v1 AS SELECT f59,f60,f61 FROM tb2 ; INSERT INTO test.v1 ( f59 , f60 ) values (2005,0101) ; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 2005 and f60 = 0101 ; +--horizontal_results --enable_ps_protocol SELECT f59,f60 FROM test.v1 where f59 = 2005 and f60 = 0101 ; DELETE FROM tb2 where f59 = 2005 and f60 = 0101 ; @@ -3185,13 +3222,15 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; UPDATE test.v1 SET f59 = 8 WHERE f59 = 780 and f60 = 105; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 8 and f60 = 105; +--horizontal_results --enable_ps_protocol -SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105; +SELECT f59,f60 FROM test.v1 where f59 = 8 and f60 = 105 ; Drop view test.v1 ; @@ -3213,13 +3252,15 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 ; UPDATE test.v1 SET f59 = 891 WHERE f60 = 105 ; --disable_info -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } +--vertical_results SELECT * FROM tb2 where f59 = 891 and f60 = 105; +--horizontal_results --enable_ps_protocol -SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105; +SELECT f59,f60 FROM test.v1 where f59 = 891 and f60 = 105 ; Drop view test.v1 ; @@ -3240,7 +3281,7 @@ CREATE VIEW test.v1 AS SELECT f59,f60,f61 FROM tb2 where f59 = 789 ; DELETE FROM test.v1 where f59 = 789 ; --disable_info SELECT * FROM tb2 where f59 = 789 ; -SELECT f59,f60 FROM test.v1 where f59 = 789; +SELECT f59,f60 FROM test.v1 where f59 = 789 order by f60 ; Drop view test.v1 ; @@ -3263,7 +3304,7 @@ DELETE FROM test.v1 where f59 = 711 ; --disable_info SELECT * FROM tb2 where f59 = 711 ; -SELECT f59,f60 FROM test.v1 where f59 = 711; +SELECT f59,f60 FROM test.v1 where f59 = 711 order by f60 ; Drop view test.v1 ; @@ -3296,7 +3337,8 @@ DELETE FROM t1; # f1 gets the default 0, because we are in the native sql_mode INSERT INTO v1 SET f2 = 'ABC'; # f1 gets the default 0, but this value is already exists ---error 1062 +# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME +--error ER_DUP_ENTRY INSERT INTO v1 SET f2 = 'ABC'; SELECT * from t1; DELETE FROM t1; @@ -3384,7 +3426,8 @@ CREATE VIEW v1 AS SELECT f2, f3 FROM t1; # f1 gets the default 0, because we are in the native sql_mode INSERT INTO v1 SET f2 = 'ABC'; # f1 gets the default 0 and this value is already exists ---error 1062 +# OBN change for 5.1.21 --error ER_DUP_ENTRY_WITH_KEY_NAME +--error ER_DUP_ENTRY INSERT INTO v1 SET f2 = 'ABC'; SELECT * from t1; DELETE FROM t1; @@ -3537,25 +3580,25 @@ DELETE FROM t1; #------------------------------------------------ INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); # UPDATE my_greeting - f1 ---error 1348 +--error ER_NONUPDATEABLE_COLUMN UPDATE v1 SET my_greeting = 'Hej' WHERE f1 = 1; SELECT * from t1; DELETE FROM t1; INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); # UPDATE my_greeting - f2 ---error 1348 +--error ER_NONUPDATEABLE_COLUMN UPDATE v1 SET my_greeting = 'Hej' WHERE f2 = 'ABC'; SELECT * from t1; DELETE FROM t1; INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); # UPDATE my_greeting - my_greeting ---error 1348 +--error ER_NONUPDATEABLE_COLUMN UPDATE v1 SET my_greeting = 'Hej' WHERE my_greeting = 'HELLO'; SELECT * from t1; DELETE FROM t1; INSERT INTO t1 VALUES(1, 'ABC', -1.2E-3, 'X'); # UPDATE my_greeting - none ---error 1348 +--error ER_NONUPDATEABLE_COLUMN UPDATE v1 SET my_greeting = 'Hej'; SELECT * from t1; DELETE FROM t1; @@ -3578,7 +3621,7 @@ DROP VIEW v1; CREATE VIEW v1 AS SELECT f1, f2, f4 FROM t1; # This INSERT must fail ---error 1423 +--error ER_NO_DEFAULT_FOR_VIEW_FIELD INSERT INTO v1 SET f1 = 1; SELECT * from t1; DELETE FROM t1; @@ -3631,10 +3674,10 @@ let $message= Testcases 3.3.2.7 - 3.3.2.9, # Summary of 3.3.2.7 - 3.3.2.11 # Ensure that a view with a definition that includes # UNION or UNION DISTINCT or UNION ALL or EXCEPT or INTERSECT -# rejects any INSERT or UPDATE or DELETE statement with an +# rejects any INSERT or UPDATE or DELETE statement with an # appropriate error message # -# ML: I assume the type of the storage engine does not play any role. +# mleich: I assume the type of the storage engine does not play any role. ############################################################################### INSERT INTO tb2 (f59,f60,f61) VALUES (77,185,126) ; INSERT INTO tb2 (f59,f60,f61) VALUES (59,58,54) ; @@ -3669,9 +3712,9 @@ while ($num) eval $aux; --error ER_NON_INSERTABLE_TABLE INSERT INTO v1 VALUES (3000); - --error 1288 + --error ER_NON_UPDATABLE_TABLE UPDATE v1 SET f61 = 100 WHERE f61 = 32; - --error 1288 + --error ER_NON_UPDATABLE_TABLE DELETE FROM v1; DROP VIEW v1 ; @@ -3768,19 +3811,6 @@ SET @variant6= 'CREATE VIEW v1 AS SELECT (SELECT f60 FROM t2 WHERE f59=19) AS f6 # For a WHERE clause sub query that refers to a table also referenced in a # FROM clause 3.3.2.18 SET @variant7= 'CREATE VIEW v1 AS SELECT f61 FROM v2'; -# Attention: The attempt to UPDATE the next VIEW fails like expected, -# but the error message -# ERROR 1093 (HY000) : You can't specify target table 'v1' for -# update in FORM clause" -# is wrong. The server must deliver ERROR 1288. -# Bug#10773 Incorrect message is displayed while updating a view -# ML FIXME (remove the comment above, replace --error 1288,1093 with -# --error 1288 and update the file with expected results) -# when Bug#10773 is solved -# For a reference to a non-updateable view 3.3.2.19 -let $message= Some server responses suffer from -Bug#10773 Incorrect message is displayed while updating a view; ---source include/show_msg80.inc SET @variant8= 'CREATE VIEW v1 AS SELECT f59 AS f61 FROM t1 WHERE f60 IN (SELECT f59 FROM t1)'; # For ALGORITHM = TEMPTABLE 3.3.2.20 SET @variant9= 'CREATE ALGORITHM = TEMPTABLE VIEW v1 (f61) AS select f60 from t1'; @@ -3799,17 +3829,12 @@ while ($num) --error ER_NON_INSERTABLE_TABLE INSERT INTO v1 VALUES (1002); - --error 1288, 1093 + # --error ER_NON_UPDATABLE_TABLE, ER_UPDATE_TABLE_USED + --error ER_NON_UPDATABLE_TABLE UPDATE v1 SET f61=1007; - --error 1288 + --error ER_NON_UPDATABLE_TABLE DELETE FROM v1; - - # The following "--error 0" will be no more needed, when - # Bug#12471: mysqltest, --error within loop affects wrong statement - # is fixed. - --error 0 DROP VIEW v1; - dec $num; } @@ -3828,7 +3853,7 @@ let $message= Testcases 3.3.A1; # # There is no specification of the intended behaviour within # the MySQL manual. That means I assume the observed effects are -# no bug as long we do not get a crash or obviously non +# no bug as long we do not get a crash or obviously non # reasonable results. ############################################################################### --disable_warnings @@ -3847,25 +3872,25 @@ INSERT INTO v1 SET f1 = -1, f4 = 'ABC', report = 'v1 0'; # 0. Initial state DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 1. Name of one base table column is altered ALTER TABLE t1 CHANGE COLUMN f4 f4x CHAR(5); INSERT INTO t1 SET f1 = 0, f4x = 'ABC', report = 't1 1'; ---error 1356 +--error ER_VIEW_INVALID INSERT INTO v1 SET f1 = 0, f4 = 'ABC', report = 'v1 1'; ---error 1054 +--error ER_BAD_FIELD_ERROR INSERT INTO v1 SET f1 = 0, f4x = 'ABC', report = 'v1 1a'; ---error 1356 +--error ER_VIEW_INVALID INSERT INTO v1 SET f1 = 0, report = 'v1 1b'; DESCRIBE t1; # Bug#12533 crash on DESCRIBE after renaming base table column; ---error 1356 +--error ER_VIEW_INVALID DESCRIBE v1; -SELECT * FROM t1; ---error 1356 -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +--error ER_VIEW_INVALID +SELECT * FROM v1 order by f1, report; ALTER TABLE t1 CHANGE COLUMN f4x f4 CHAR(5); # # 2. Length of one base table column is increased @@ -3874,8 +3899,8 @@ INSERT INTO t1 SET f1 = 2, f4 = '<-- 10 -->', report = 't1 2'; INSERT INTO v1 SET f1 = 2, f4 = '<-- 10 -->', report = 'v1 2'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 3. Length of one base table column is reduced ALTER TABLE t1 CHANGE COLUMN f4 f4 CHAR(8); @@ -3883,8 +3908,8 @@ INSERT INTO t1 SET f1 = 3, f4 = '<-- 10 -->', report = 't1 3'; INSERT INTO v1 SET f1 = 3, f4 = '<-- 10 -->', report = 'v1 3'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 4. Type of one base table column is altered string -> string ALTER TABLE t1 CHANGE COLUMN f4 f4 VARCHAR(20); @@ -3892,31 +3917,31 @@ INSERT INTO t1 SET f1 = 4, f4 = '<------ 20 -------->', report = 't1 4'; INSERT INTO v1 SET f1 = 4, f4 = '<------ 20 -------->', report = 'v1 4'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # -# 5. Type of one base table column altered numeric -> string +# 5. Type of one base table column altered numeric -> string ALTER TABLE t1 CHANGE COLUMN f1 f1 VARCHAR(30); -INSERT INTO t1 SET f1 = '<------------- 30 ----------->', +INSERT INTO t1 SET f1 = '<------------- 30 ----------->', f4 = '<------ 20 -------->', report = 't1 5'; -INSERT INTO v1 SET f1 = '<------------- 30 ----------->', +INSERT INTO v1 SET f1 = '<------------- 30 ----------->', f4 = '<------ 20 -------->', report = 'v1 5'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 6. DROP of one base table column ALTER TABLE t1 DROP COLUMN f2; INSERT INTO t1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 't1 6'; ---error 1356 +--error ER_VIEW_INVALID INSERT INTO v1 SET f1 = 'ABC', f4 = '<------ 20 -------->', report = 'v1 6'; DESCRIBE t1; ---error 1356 +--error ER_VIEW_INVALID DESCRIBE v1; -SELECT * FROM t1; ---error 1356 -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +--error ER_VIEW_INVALID +SELECT * FROM v1 order by f1, report; # # 7. Recreation of dropped base table column with the same data type like before ALTER TABLE t1 ADD COLUMN f2 DATE DEFAULT NULL; @@ -3926,8 +3951,8 @@ INSERT INTO v1 SET f1 = 'ABC', f2 = '1500-12-04', f4 = '<------ 20 -------->', report = 'v1 7'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 8. Recreation of dropped base table column with a different data type # like before @@ -3939,22 +3964,22 @@ INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, f4 = '<------ 20 -------->', report = 'v1 8'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 9. Add a column to the base table ALTER TABLE t1 ADD COLUMN f3 NUMERIC(7,2); INSERT INTO t1 SET f1 = 'ABC', f2 = -3.3E-4, f3 = -2.2, f4 = '<------ 20 -------->', report = 't1 9'; ---error 1054 +--error ER_BAD_FIELD_ERROR INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, f3 = -2.2, f4 = '<------ 20 -------->', report = 'v1 9'; INSERT INTO v1 SET f1 = 'ABC', f2 = -3.3E-4, f4 = '<------ 20 -------->', report = 'v1 9a'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, report; +SELECT * FROM v1 order by f1, report; # # 10. VIEW with numeric function is "victim" of data type change DROP TABLE t1; @@ -3964,48 +3989,54 @@ INSERT INTO t1 SET f1 = 'ABC', f2 = 3; CREATE VIEW v1 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, f2; +SELECT * FROM v1 order by 2; ALTER TABLE t1 CHANGE COLUMN f2 f2 VARCHAR(30); INSERT INTO t1 SET f1 = 'ABC', f2 = 'DEF'; DESCRIBE t1; DESCRIBE v1; -SELECT * FROM t1; -SELECT * FROM v1; +SELECT * FROM t1 order by f1, f2; +SELECT * FROM v1 order by 2; # Some statements for comparison # - the ugly SQRT('DEF) as constant SELECT SQRT('DEF'); # - Will a VIEW based on the same definition show the same result ? CREATE VIEW v2 AS SELECT SQRT('DEF'); -SELECT * FROM v2; +SELECT * FROM v2 order by 1; # - Will a VIEW v2 created after the base table column recreation show the same # result set like v1 ? CREATE OR REPLACE VIEW v2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; DESCRIBE v2; -SELECT * FROM v2; +SELECT * FROM v2 order by 2; # - What will be the content of base table created with AS SELECT ? CREATE TABLE t2 AS SELECT f1, SQRT(f2) my_sqrt FROM t1; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM t2; +--vertical_results +SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v1; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM t2; +--vertical_results +SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol DROP TABLE t2; CREATE TABLE t2 AS SELECT * FROM v2; -if ($have_bug_11589) +if ($have_bug_32285) { --disable_ps_protocol } -SELECT * FROM t2; +--vertical_results +SELECT * FROM t2 order by 2; +--horizontal_results --enable_ps_protocol # DROP TABLE t1; From 615db68d85ae1cac0723f76206359391a21f1a64 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 12:13:41 +0300 Subject: [PATCH 408/527] Re-enabled the test for mysql_insert_id() after merging from main. --- tests/mysql_client_test.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index c30f329a967..d8015a4d2e0 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15214,11 +15214,6 @@ static void test_bug14169() /* Test that mysql_insert_id() behaves as documented in our manual */ - -#if 0 - - Commented out because of Bug#34889. - static void test_mysql_insert_id() { my_ulonglong res; @@ -15410,7 +15405,6 @@ static void test_mysql_insert_id() rc= mysql_query(mysql, "drop table t1,t2"); myquery(rc); } -#endif /* @@ -16548,7 +16542,7 @@ static struct my_tests_st my_tests[]= { { "test_bug17667", test_bug17667 }, { "test_bug19671", test_bug19671 }, { "test_bug15752", test_bug15752 }, - /* { "test_mysql_insert_id", test_mysql_insert_id }, Bug#34889 */ + { "test_mysql_insert_id", test_mysql_insert_id }, { "test_bug21206", test_bug21206 }, { "test_bug21726", test_bug21726 }, { "test_bug15518", test_bug15518 }, From fe8463783f2ad711b559e5aea24efcc4fb0407b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 13:22:58 +0300 Subject: [PATCH 409/527] Post-merge fix. --- mysql-test/r/compare.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/compare.result b/mysql-test/r/compare.result index b4e0dd6536d..44c258d7611 100644 --- a/mysql-test/r/compare.result +++ b/mysql-test/r/compare.result @@ -64,7 +64,7 @@ EXPLAIN EXTENDED SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; id select_type table type possible_keys key key_len ref rows filtered Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where Warnings: -Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat(_binary'01',`test`.`t1`.`c`) = _latin1'0101')) +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t1`.`c` AS `c` from `test`.`t1` where ((`test`.`t1`.`b` = 1) and (concat('01',`test`.`t1`.`c`) = '0101')) SELECT b,c FROM t1 WHERE b = 1 AND CONCAT(b,c) = '0101'; b c 01 01 @@ -88,6 +88,6 @@ id select_type table type possible_keys key key_len ref rows filtered Extra Warnings: Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1 -Note 1003 select `test`.`t2`.`a` AS `a`,(select count(0) AS `COUNT(*)` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t2`.`a`) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = concat(_latin1'0',`test`.`t2`.`a`,_latin1'01')))) AS `x` from `test`.`t2` order by `test`.`t2`.`a` +Note 1003 select `test`.`t2`.`a` AS `a`,(select count(0) AS `COUNT(*)` from `test`.`t1` where ((`test`.`t1`.`b` = `test`.`t2`.`a`) and (concat(`test`.`t1`.`b`,`test`.`t1`.`c`) = concat('0',`test`.`t2`.`a`,'01')))) AS `x` from `test`.`t2` order by `test`.`t2`.`a` DROP TABLE t1,t2; End of 5.0 tests From 7c2a6ceb8b1a30a8a5c786dd6387b8e2902a9eb2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 12:56:07 +0100 Subject: [PATCH 410/527] Post merge fix for ChangeSet@1.2565, 2008-03-11 20:20:49+01:00 Merge five.local.lan:/work/merge/mysql-5.0-funcs_1 into five.local.lan:/work/merge/mysql-5.1-funcs_1 MERGE: 1.1810.3473.26 ChangeSet@1.1810.3473.26, 2008-03-11 19:54:35+01:00 Post fix for WL#4203 Reorganize and fix the data dictionary tests of testsuite funcs_1 The final fix of Bug#34532 Some funcs_1 tests do not clean up at end of testing and some minor additional modifications are for happens here mysql-test/suite/funcs_1/r/innodb_trig_03e.result: Updated results mysql-test/suite/funcs_1/r/is_columns_innodb.result: Updated results mysql-test/suite/funcs_1/r/is_columns_memory.result: Updated results mysql-test/suite/funcs_1/r/is_columns_myisam.result: Updated results mysql-test/suite/funcs_1/r/is_tables_ndb.result: Updated results mysql-test/suite/funcs_1/r/memory_trig_03e.result: Updated results mysql-test/suite/funcs_1/r/myisam_trig_03e.result: Updated results mysql-test/suite/funcs_1/r/ndb_bitdata.result: Updated results mysql-test/suite/funcs_1/r/ndb_cursors.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_0102.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_03.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_03e.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_0407.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_08.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_09.result: Updated results mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result: Updated results mysql-test/suite/funcs_1/r/ndb_views.result: Updated results mysql-test/suite/funcs_1/t/innodb_trig_03e.test: Cleanup mysql-test/suite/funcs_1/t/memory_trig_03e.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_03e.test: Cleanup mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/ndb_bitdata.test: Cleanup mysql-test/suite/funcs_1/t/ndb_cursors.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_0102.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_03.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_03e.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_0407.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_08.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_09.test: Cleanup mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test: Cleanup mysql-test/suite/funcs_1/t/ndb_views.test: Cleanup --- .../suite/funcs_1/r/innodb_trig_03e.result | 1 - .../suite/funcs_1/r/is_columns_innodb.result | 1 - .../suite/funcs_1/r/is_columns_memory.result | 1 - .../suite/funcs_1/r/is_columns_myisam.result | 1 - .../suite/funcs_1/r/is_tables_ndb.result | 1 - .../suite/funcs_1/r/memory_trig_03e.result | 1 - .../suite/funcs_1/r/myisam_trig_03e.result | 1 - mysql-test/suite/funcs_1/r/ndb_bitdata.result | 64 --------------- mysql-test/suite/funcs_1/r/ndb_cursors.result | 79 ------------------- .../suite/funcs_1/r/ndb_trig_0102.result | 2 +- mysql-test/suite/funcs_1/r/ndb_trig_03.result | 2 +- .../suite/funcs_1/r/ndb_trig_03e.result | 1 - .../suite/funcs_1/r/ndb_trig_0407.result | 2 +- mysql-test/suite/funcs_1/r/ndb_trig_08.result | 2 +- mysql-test/suite/funcs_1/r/ndb_trig_09.result | 2 +- .../suite/funcs_1/r/ndb_trig_1011ext.result | 2 +- mysql-test/suite/funcs_1/r/ndb_views.result | 4 +- .../suite/funcs_1/t/innodb_trig_03e.test | 21 +---- .../suite/funcs_1/t/memory_trig_03e.test | 22 +----- .../suite/funcs_1/t/myisam_trig_03e.test | 23 +----- .../suite/funcs_1/t/myisam_trig_1011ext.test | 9 --- mysql-test/suite/funcs_1/t/ndb_bitdata.test | 24 ++---- mysql-test/suite/funcs_1/t/ndb_cursors.test | 23 ++---- mysql-test/suite/funcs_1/t/ndb_trig_0102.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_trig_03.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_trig_03e.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_trig_0407.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_trig_08.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_trig_09.test | 22 +----- .../suite/funcs_1/t/ndb_trig_1011ext.test | 22 +----- mysql-test/suite/funcs_1/t/ndb_views.test | 44 +++-------- 31 files changed, 64 insertions(+), 423 deletions(-) diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index 0b3c0098658..048c070ea96 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; Testcase for db level: diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result index e634243899c..829b0b1bd30 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result +++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_memory.result b/mysql-test/suite/funcs_1/r/is_columns_memory.result index cf5e3b13d8c..f448752755e 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_memory.result +++ b/mysql-test/suite/funcs_1/r/is_columns_memory.result @@ -1,5 +1,4 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -SET @NO_REFRESH = IF( '' = '', 0, 1); DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_columns_myisam.result b/mysql-test/suite/funcs_1/r/is_columns_myisam.result index b1e96b9e2ad..c8d3f0e175b 100644 --- a/mysql-test/suite/funcs_1/r/is_columns_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_columns_myisam.result @@ -1,5 +1,4 @@ SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION'; -SET @NO_REFRESH = IF( '' = '', 0, 1); DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test; diff --git a/mysql-test/suite/funcs_1/r/is_tables_ndb.result b/mysql-test/suite/funcs_1/r/is_tables_ndb.result index 7150ab9d580..5b6d29f5fc2 100644 --- a/mysql-test/suite/funcs_1/r/is_tables_ndb.result +++ b/mysql-test/suite/funcs_1/r/is_tables_ndb.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); DROP DATABASE IF EXISTS test1; CREATE DATABASE test1; USE test; diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index 6078c48c8d7..fad778ce7c0 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; Testcase for db level: diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index 58b3a37ee3f..bcd50198fca 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; Testcase for db level: diff --git a/mysql-test/suite/funcs_1/r/ndb_bitdata.result b/mysql-test/suite/funcs_1/r/ndb_bitdata.result index bb0c170e43a..917157fcdae 100644 --- a/mysql-test/suite/funcs_1/r/ndb_bitdata.result +++ b/mysql-test/suite/funcs_1/r/ndb_bitdata.result @@ -1,67 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb4; -create table tb4 ( -f176 numeric (0) unsigned not null DEFAULT 9, -f177 numeric (64) unsigned not null DEFAULT 9, -f178 numeric (0) zerofill not null DEFAULT 9, -f179 numeric (64) zerofill not null DEFAULT 9, -f180 numeric (0) unsigned zerofill not null DEFAULT 9, -f181 numeric (64) unsigned zerofill not null DEFAULT 9, -f182 numeric (0,0) not null DEFAULT 9, -f183 numeric (63,30) not null DEFAULT 9, -f184 numeric (0,0) unsigned not null DEFAULT 9, -f185 numeric (63,30) unsigned not null DEFAULT 9, -f186 numeric (0,0) zerofill not null DEFAULT 9, -f187 numeric (63,30) zerofill not null DEFAULT 9, -f188 numeric (0,0) unsigned zerofill not null DEFAULT 9, -f189 numeric (63,30) unsigned zerofill not null DEFAULT 9, -f190 real not null DEFAULT 88.8, -f191 real unsigned not null DEFAULT 88.8, -f192 real zerofill not null DEFAULT 88.8, -f193 real unsigned zerofill not null DEFAULT 88.8, -f194 double not null DEFAULT 55.5, -f195 double unsigned not null DEFAULT 55.5, -f196 double zerofill not null DEFAULT 55.5, -f197 double unsigned zerofill not null DEFAULT 55.5, -f198 float, -f199 float unsigned, -f200 float zerofill, -f201 float unsigned zerofill, -f202 float(0), -f203 float(23), -f204 float(0) unsigned, -f205 float(23) unsigned, -f206 float(0) zerofill, -f207 float(23) zerofill, -f208 float(0) unsigned zerofill, -f209 float(23) unsigned zerofill, -f210 float(24), -f211 float(53), -f212 float(24) unsigned, -f213 float(53) unsigned, -f214 float(24) zerofill, -f215 float(53) zerofill, -f216 float(24) unsigned zerofill, -f217 float(53) unsigned zerofill, -f218 date, -f219 time, -f220 datetime, -f221 timestamp, -f222 year, -f223 year(3), -f224 year(4), -f225 enum("1enum","2enum"), -f226 set("1set","2set"), -f235 char(0) unicode, -f236 char(90), -f237 char(255) ascii, -f238 varchar(0), -f239 varchar(3000) binary, -f240 varchar(2000) unicode, -f241 char(100) unicode -) engine = ndb; -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb4.txt' into table tb4 ; 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 index ac1eb46e974..9f20e51204b 100644 --- a/mysql-test/suite/funcs_1/r/ndb_cursors.result +++ b/mysql-test/suite/funcs_1/r/ndb_cursors.result @@ -1,82 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); -USE test; -drop table if exists tb1 ; -create table tb1 ( -f1 char(0), -f2 char(0) binary, -f3 char(0) ascii, -f4 tinytext unicode, -f5 text, -f6 mediumtext, -f7 longtext, -f8 tinyblob, -f9 blob, -f10 mediumblob, -f11 longblob, -f12 binary, -f13 tinyint, -f14 tinyint unsigned, -f15 tinyint zerofill, -f16 tinyint unsigned zerofill, -f17 smallint, -f18 smallint unsigned, -f19 smallint zerofill, -f20 smallint unsigned zerofill, -f21 mediumint, -f22 mediumint unsigned, -f23 mediumint zerofill, -f24 mediumint unsigned zerofill, -f25 int, -f26 int unsigned, -f27 int zerofill, -f28 int unsigned zerofill, -f29 bigint, -f30 bigint unsigned, -f31 bigint zerofill, -f32 bigint unsigned zerofill, -f33 decimal, -f34 decimal unsigned, -f35 decimal zerofill, -f36 decimal unsigned zerofill not null DEFAULT 9.9, -f37 decimal (0) not null DEFAULT 9.9, -f38 decimal (64) not null DEFAULT 9.9, -f39 decimal (0) unsigned not null DEFAULT 9.9, -f40 decimal (64) unsigned not null DEFAULT 9.9, -f41 decimal (0) zerofill not null DEFAULT 9.9, -f42 decimal (64) zerofill not null DEFAULT 9.9, -f43 decimal (0) unsigned zerofill not null DEFAULT 9.9, -f44 decimal (64) unsigned zerofill not null DEFAULT 9.9, -f45 decimal (0,0) not null DEFAULT 9.9, -f46 decimal (63,30) not null DEFAULT 9.9, -f47 decimal (0,0) unsigned not null DEFAULT 9.9, -f48 decimal (63,30) unsigned not null DEFAULT 9.9, -f49 decimal (0,0) zerofill not null DEFAULT 9.9, -f50 decimal (63,30) zerofill not null DEFAULT 9.9, -f51 decimal (0,0) unsigned zerofill not null DEFAULT 9.9, -f52 decimal (63,30) unsigned zerofill not null DEFAULT 9.9, -f53 numeric not null DEFAULT 99, -f54 numeric unsigned not null DEFAULT 99, -f55 numeric zerofill not null DEFAULT 99, -f56 numeric unsigned zerofill not null DEFAULT 99, -f57 numeric (0) not null DEFAULT 99, -f58 numeric (64) not null DEFAULT 99 -) engine = ndb; -Warnings: -Note 1265 Data truncated for column 'f36' at row 1 -Note 1265 Data truncated for column 'f37' at row 1 -Note 1265 Data truncated for column 'f38' at row 1 -Note 1265 Data truncated for column 'f39' at row 1 -Note 1265 Data truncated for column 'f40' at row 1 -Note 1265 Data truncated for column 'f41' at row 1 -Note 1265 Data truncated for column 'f42' at row 1 -Note 1265 Data truncated for column 'f43' at row 1 -Note 1265 Data truncated for column 'f44' at row 1 -Note 1265 Data truncated for column 'f45' at row 1 -Note 1265 Data truncated for column 'f47' at row 1 -Note 1265 Data truncated for column 'f49' at row 1 -Note 1265 Data truncated for column 'f51' at row 1 -Error 1478 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' -load data infile 'MYSQL_TEST_DIR/suite/funcs_1/data/ndb_tb1.txt' into table tb1 ; NOT YET IMPLEMENTED: cursor tests -------------------------------------------------------------------------------- diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result index b67b0e2afe0..7b144631252 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0102.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_0102.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -368,3 +367,4 @@ select @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 index f69ffd20597..6363bce5e41 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_03.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -699,3 +698,4 @@ drop database if exists priv_db; drop user test_yesprivs@localhost; drop user test_noprivs@localhost; drop user test_noprivs; +DROP TABLE test.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 index 32757a844aa..0d097d6cd7c 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_03e.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; Testcase for db level: diff --git a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result index e21a2b312e4..526b5cc80cb 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_0407.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_0407.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -479,3 +478,4 @@ 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 index ae84a31b170..8648bf8f630 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_08.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_08.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -535,3 +534,4 @@ ERROR HY000: Explicit or implicit commit is not allowed in stored function or tr 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 index ab106f6d772..a274484e72c 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_09.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_09.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -271,3 +270,4 @@ 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 index a371d2d4fda..6ee30ab036b 100644 --- a/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result +++ b/mysql-test/suite/funcs_1/r/ndb_trig_1011ext.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb3 ; create table tb3 ( @@ -401,3 +400,4 @@ 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 index 486887686c9..a58cb440595 100644 --- a/mysql-test/suite/funcs_1/r/ndb_views.result +++ b/mysql-test/suite/funcs_1/r/ndb_views.result @@ -1,4 +1,3 @@ -SET @NO_REFRESH = IF( '' = '', 0, 1); USE test; drop table if exists tb2 ; create table tb2 ( @@ -22895,4 +22894,5 @@ DROP VIEW IF EXISTS v1_secondview; DROP VIEW IF EXISTS v2; DROP DATABASE IF EXISTS test2; DROP DATABASE IF EXISTS test3; -DROP DATABASE IF EXISTS test1; +DROP DATABASE test1; +DROP TABLE test.tb2; diff --git a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test index 56024e422fe..6295e88de18 100644 --- a/mysql-test/suite/funcs_1/t/innodb_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/innodb_trig_03e.test @@ -7,24 +7,9 @@ # 2. Set $engine_type let $engine_type= innodb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # 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 @@ -34,5 +19,3 @@ if ($run) --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/memory_trig_03e.test b/mysql-test/suite/funcs_1/t/memory_trig_03e.test index 6a172df4580..769aa005946 100644 --- a/mysql-test/suite/funcs_1/t/memory_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/memory_trig_03e.test @@ -5,23 +5,8 @@ # Set $engine_type let $engine_type= memory; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; -} +# 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 @@ -31,6 +16,3 @@ if ($run) --source suite/funcs_1/triggers/triggers_03e_definer.inc --source suite/funcs_1/triggers/triggers_03e_columns.inc - - - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test index a299f226a9a..d906cff16b9 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_03e.test @@ -5,23 +5,8 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; -} +# 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 @@ -31,7 +16,3 @@ if ($run) --source suite/funcs_1/triggers/triggers_03e_definer.inc --source suite/funcs_1/triggers/triggers_03e_columns.inc - - - - diff --git a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test index bbf226cdea6..e7e36c39706 100644 --- a/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/myisam_trig_1011ext.test @@ -5,15 +5,6 @@ # Set $engine_type let $engine_type= myisam; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - # Create some objects needed in many testcases USE test; --source suite/funcs_1/include/myisam_tb3.inc diff --git a/mysql-test/suite/funcs_1/t/ndb_bitdata.test b/mysql-test/suite/funcs_1/t/ndb_bitdata.test index 26c454d70f7..f685a4abc6d 100644 --- a/mysql-test/suite/funcs_1/t/ndb_bitdata.test +++ b/mysql-test/suite/funcs_1/t/ndb_bitdata.test @@ -7,24 +7,12 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: bitdata tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb4.inc -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # 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 index fd9060b3e8f..6aeeb3f298d 100644 --- a/mysql-test/suite/funcs_1/t/ndb_cursors.test +++ b/mysql-test/suite/funcs_1/t/ndb_cursors.test @@ -7,24 +7,13 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +let $message= NOT YET IMPLEMENTED: cursor tests; +--source include/show_msg80.inc +exit; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb1.inc -} +# 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_trig_0102.test b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test index b5add9d9806..c8bb5b04b24 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0102.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0102.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} - --source suite/funcs_1/triggers/triggers_0102.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03.test b/mysql-test/suite/funcs_1/t/ndb_trig_03.test index 65aa138495d..a7ab95460f4 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_03.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc --source suite/funcs_1/triggers/triggers_03.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test b/mysql-test/suite/funcs_1/t/ndb_trig_03e.test index 118ea99e890..fd6db782c62 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_03e.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_03e.test @@ -7,24 +7,9 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # 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 @@ -34,6 +19,3 @@ if ($run) --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 index 2c07cf329d9..53c24790c7c 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_0407.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_0407.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} - --source suite/funcs_1/triggers/triggers_0407.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_08.test b/mysql-test/suite/funcs_1/t/ndb_trig_08.test index 497ea523027..4b79a2c3a19 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_08.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_08.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc --source suite/funcs_1/triggers/triggers_08.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_09.test b/mysql-test/suite/funcs_1/t/ndb_trig_09.test index d735d125fd0..ff26a0cbf21 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_09.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_09.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} - --source suite/funcs_1/triggers/triggers_09.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test index 4d298da3260..2adcf0747b7 100644 --- a/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test +++ b/mysql-test/suite/funcs_1/t/ndb_trig_1011ext.test @@ -7,24 +7,10 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. +# Create some objects needed in many testcases +USE test; +--source suite/funcs_1/include/ndb_tb3.inc -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # Create some objects needed in many testcases - USE test; - --source suite/funcs_1/include/ndb_tb3.inc -} - --source suite/funcs_1/triggers/triggers_1011ext.inc +DROP TABLE test.tb3; diff --git a/mysql-test/suite/funcs_1/t/ndb_views.test b/mysql-test/suite/funcs_1/t/ndb_views.test index 317c8ffff23..43d3415de60 100644 --- a/mysql-test/suite/funcs_1/t/ndb_views.test +++ b/mysql-test/suite/funcs_1/t/ndb_views.test @@ -7,38 +7,18 @@ # 2. Set $engine_type let $engine_type= ndb; -# Decide, if the objects are to be (re)created -# -# - once at the beginning of a set of testcases ('$NO_REFRESH' <> '' --> TRUE) -# That means the current script must not (re)create any object. -# It can expect, that the objects already exist. -# -# - per every testscript/case ('$NO_REFRESH' = '' --> FALSE) -# That means all objects have to be (re)created within the current script. - -eval SET @NO_REFRESH = IF( '$NO_REFRESH' = '', 0, 1); - -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - # 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; -} +# 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 - -# If we created the database in the above loop we now need to drop it -let $run= `SELECT @NO_REFRESH = 0`; -if ($run) -{ - DROP DATABASE IF EXISTS test1; -} +DROP DATABASE test1; +DROP TABLE test.tb2; From 326c4e90589dd87792eacfa6e8746bc486a10ba0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 16:13:33 +0300 Subject: [PATCH 411/527] A fix for Bug#34643: TRUNCATE crash if trigger and foreign key. In cases when TRUNCATE was executed by invoking mysql_delete() rather than by table recreation (for example, when TRUNCATE was issued on InnoDB table with is referenced by foreign key) triggers were invoked. In debug builds this also led to crash because of an assertion, which assumes that some preliminary actions take place before trigger invocation, which doesn't happen in case of TRUNCATE. The fix is not to execute triggers in mysql_delete() when this function is used by TRUNCATE. mysql-test/r/trigger-trans.result: Update result file. mysql-test/t/trigger-trans.test: A test case for Bug#34643: TRUNCATE crash if trigger and foreign key. sql/sql_delete.cc: Do not process triggers in TRUNCATE. --- mysql-test/r/trigger-trans.result | 19 ++++++++++++++++++ mysql-test/t/trigger-trans.test | 32 +++++++++++++++++++++++++++++++ sql/sql_delete.cc | 15 ++++++++++----- 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/trigger-trans.result b/mysql-test/r/trigger-trans.result index cd5f629564f..dccaa27c5fd 100644 --- a/mysql-test/r/trigger-trans.result +++ b/mysql-test/r/trigger-trans.result @@ -140,4 +140,23 @@ select * from t3; c 1 drop table t1, t2, t3; +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2(b INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=innodb; +INSERT INTO t1 VALUES (1); +CREATE TRIGGER t1_bd BEFORE DELETE ON t1 FOR EACH ROW SET @a = 1; +CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1; +SET @a = 0; +SET @b = 0; +TRUNCATE t1; +SELECT @a, @b; +@a @b +0 0 +INSERT INTO t1 VALUES (1); +DELETE FROM t1; +SELECT @a, @b; +@a @b +1 1 +DROP TABLE t2, t1; End of 5.0 tests diff --git a/mysql-test/t/trigger-trans.test b/mysql-test/t/trigger-trans.test index 8103a1ba0b1..5db5b982773 100644 --- a/mysql-test/t/trigger-trans.test +++ b/mysql-test/t/trigger-trans.test @@ -128,5 +128,37 @@ drop table t1, t2, t3; disconnect connection_update; disconnect connection_aux; +# +# Bug#34643: TRUNCATE crash if trigger and foreign key. +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t2; +--enable_warnings + +CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=innodb; +CREATE TABLE t2(b INT, FOREIGN KEY(b) REFERENCES t1(a)) ENGINE=innodb; + +INSERT INTO t1 VALUES (1); + +CREATE TRIGGER t1_bd BEFORE DELETE ON t1 FOR EACH ROW SET @a = 1; +CREATE TRIGGER t1_ad AFTER DELETE ON t1 FOR EACH ROW SET @b = 1; + +SET @a = 0; +SET @b = 0; + +TRUNCATE t1; + +SELECT @a, @b; + +INSERT INTO t1 VALUES (1); + +DELETE FROM t1; + +SELECT @a, @b; + +DROP TABLE t2, t1; + --echo End of 5.0 tests diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index a28a39a769d..3019b68d6f1 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -35,6 +35,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, READ_RECORD info; bool using_limit=limit != HA_POS_ERROR; bool transactional_table, safe_update, const_cond; + bool triggers_applicable; ha_rows deleted; uint usable_index= MAX_KEY; SELECT_LEX *select_lex= &thd->lex->select_lex; @@ -93,6 +94,11 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, select_lex->no_error= thd->lex->ignore; + /* NOTE: TRUNCATE must not invoke triggers. */ + + triggers_applicable= table->triggers && + thd->lex->sql_command != SQLCOM_TRUNCATE; + /* Test if the user wants to delete all rows and deletion doesn't have any side-effects (because of triggers), so we can use optimized @@ -102,8 +108,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, */ if (!using_limit && const_cond && (!conds || conds->val_int()) && !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && - (thd->lex->sql_command == SQLCOM_TRUNCATE || - !(table->triggers && table->triggers->has_delete_triggers())) + !(triggers_applicable && table->triggers->has_delete_triggers()) ) { deleted= table->file->records; @@ -217,7 +222,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, init_ftfuncs(thd, select_lex, 1); thd->proc_info="updating"; - if (table->triggers) + if (triggers_applicable) { table->triggers->mark_fields_used(thd, TRG_EVENT_DELETE); if (table->triggers->has_triggers(TRG_EVENT_DELETE, @@ -239,7 +244,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, if (!(select && select->skip_record())&& !thd->net.report_error ) { - if (table->triggers && + if (triggers_applicable && table->triggers->process_triggers(thd, TRG_EVENT_DELETE, TRG_ACTION_BEFORE, FALSE)) { @@ -250,7 +255,7 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, if (!(error=table->file->delete_row(table->record[0]))) { deleted++; - if (table->triggers && + if (triggers_applicable && table->triggers->process_triggers(thd, TRG_EVENT_DELETE, TRG_ACTION_AFTER, FALSE)) { From d80e7ce4e5e8aaae3473c617baaed5454bb520ed Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 16:50:24 +0300 Subject: [PATCH 412/527] Fix manual merge. --- sql/sql_delete.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 24eb109e6d9..7c3a046cb20 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -129,9 +129,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, */ if (!using_limit && const_cond_result && !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && - !triggers_applicable && - !thd->current_stmt_binlog_row_based && - !table->triggers->has_delete_triggers()) + !(triggers_applicable && + thd->current_stmt_binlog_row_based && + table->triggers->has_delete_triggers())) { /* Update the table->file->stats.records number */ table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); From 3155a88d6cffc2222c711dc7136db085c3e64faa Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 16:52:29 +0300 Subject: [PATCH 413/527] Fixed test failures caused by insufficient cleanups in the tests for bug12713. --- mysql-test/include/commit.inc | 2 +- mysql-test/r/commit_1innodb.result | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 9bd11bf33c1..0d2e3425141 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -732,6 +732,6 @@ call p_verify_status_increment(0, 0, 0, 0); --echo # --echo # Cleanup --echo # -drop table t1; +drop table t1, t2, t3; drop procedure p_verify_status_increment; drop function f1; diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index 8598e231861..196d65a48ad 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -878,6 +878,6 @@ SUCCESS # # Cleanup # -drop table t1; +drop table t1, t2, t3; drop procedure p_verify_status_increment; drop function f1; From b80afe52011ff8edc22298cc96f86eabe8f69a8a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 15:38:57 +0100 Subject: [PATCH 414/527] Bug#35247 - rpl_transaction.test produces warnings files The test file tried to use a mysqltest command '--warning' but there is no such command. Changed '--warning' to '#--warning'. mysql-test/t/rpl_transaction.test: Bug#35247 - rpl_transaction.test produces warnings files Changed '--warning' to '#--warning'. --- mysql-test/t/rpl_transaction.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/rpl_transaction.test b/mysql-test/t/rpl_transaction.test index 07ba2ea8281..ee9de3b5a5e 100644 --- a/mysql-test/t/rpl_transaction.test +++ b/mysql-test/t/rpl_transaction.test @@ -39,7 +39,7 @@ COMMIT; BEGIN; INSERT INTO tmyisam VALUES (5); INSERT INTO tmyisam VALUES (6); ---warning 1196 +#--warning 1196 ROLLBACK; SELECT * FROM tmyisam ORDER BY a; From b279be388e1d8208396ada701d3015b9d7cbbc4c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 17:44:40 +0300 Subject: [PATCH 415/527] Fix for Bug#33507: Event scheduler creates more threads than max_connections -- which results in user lockout. The problem was that the variable thread_count that contains the number of active threads was interpreted as a number of active connections. The fix is to introduce a new counter for active connections. mysql-test/r/connect.result: A test case for Bug#33507: Event scheduler creates more threads than max_connections -- which results in user lockout. mysql-test/t/connect.test: A test case for Bug#33507: Event scheduler creates more threads than max_connections -- which results in user lockout. sql/mysql_priv.h: 1. Polishing: login_connection() and end_connection() need not to be public. 2. Introduce connection_count -- a variable to contain the number of active connections. It is protected by LOCK_connection_count. sql/mysqld.cc: Use connection_count to count active connections. sql/sql_connect.cc: 1. Use connection_count to count active connections. 2. Make login_connection(), end_connection() private for the module as they had to be. --- mysql-test/r/connect.result | 58 ++++++++++++++++ mysql-test/t/connect.test | 127 +++++++++++++++++++++++++++++++++++- sql/mysql_priv.h | 5 +- sql/mysqld.cc | 42 ++++++++++-- sql/sql_connect.cc | 13 ++-- 5 files changed, 231 insertions(+), 14 deletions(-) diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index 25cf4f90e6d..de4eb28c500 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -115,3 +115,61 @@ create temporary table t2(id integer not null auto_increment primary key); set @id := 1; delete from t1 where id like @id; drop table t1; +# ------------------------------------------------------------------ +# -- End of 4.1 tests +# ------------------------------------------------------------------ + +# -- Bug#33507: Event scheduler creates more threads than max_connections +# -- which results in user lockout. + +GRANT USAGE ON *.* TO mysqltest_u1@localhost; + +SET GLOBAL max_connections = 3; +SET GLOBAL event_scheduler = ON; + +# -- Waiting for old connections to close... + + +# -- Disconnecting default connection... + +# -- Check that we allow exactly three user connections, no matter how +# -- many threads are running. + +# -- Connecting (1)... + +# -- Waiting for root connection to close... + +# -- Connecting (2)... +# -- Connecting (3)... +# -- Connecting (4)... +ERROR 08004: Too many connections + +# -- Waiting for the last connection to close... + +# -- Check that we allow one extra SUPER-user connection. + +# -- Connecting super (1)... +# -- Connecting super (2)... +ERROR 00000: Too many connections + +SELECT user FROM information_schema.processlist ORDER BY id; +user +event_scheduler +mysqltest_u1 +mysqltest_u1 +mysqltest_u1 +root + +# -- Resetting variables... +SET GLOBAL max_connections = 151; +SET GLOBAL event_scheduler = OFF; + +# -- That's it. Closing connections... + +# -- Restoring default connection... + +# -- End of Bug#33507. + +# ------------------------------------------------------------------ +# -- End of 5.1 tests +# ------------------------------------------------------------------ diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index 2e66c24d877..9e8f0d9b115 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -102,4 +102,129 @@ disconnect con7; connection default; drop table t1; -# End of 4.1 tests +--disconnect con1 +--disconnect con2 +--disconnect con3 +--disconnect con4 +--disconnect con5 +--disconnect con6 +--disconnect con10 + +--echo # ------------------------------------------------------------------ +--echo # -- End of 4.1 tests +--echo # ------------------------------------------------------------------ + +--echo +--echo # -- Bug#33507: Event scheduler creates more threads than max_connections +--echo # -- which results in user lockout. +--echo + +GRANT USAGE ON *.* TO mysqltest_u1@localhost; + +# NOTE: if the test case fails sporadically due to spurious connections, +# consider disabling all users. + +--echo + +let $saved_max_connections = `SELECT @@global.max_connections`; + +SET GLOBAL max_connections = 3; +SET GLOBAL event_scheduler = ON; + +--echo +--echo # -- Waiting for old connections to close... +let $wait_condition = + SELECT COUNT(*) = 1 + FROM information_schema.processlist + WHERE db = 'test'; +--source include/wait_condition.inc + +--echo +let $wait_condition = + SELECT COUNT(*) = 1 + FROM information_schema.processlist + WHERE user = 'event_scheduler'; +--source include/wait_condition.inc +--echo + +--echo # -- Disconnecting default connection... +--disconnect default + +--echo +--echo # -- Check that we allow exactly three user connections, no matter how +--echo # -- many threads are running. +--echo + +--echo # -- Connecting (1)... +--connect (con_1,localhost,mysqltest_u1) + +--echo +--echo # -- Waiting for root connection to close... +let $wait_condition = + SELECT COUNT(*) = 1 + FROM information_schema.processlist + WHERE db = 'test'; +--source include/wait_condition.inc +--echo + +--echo # -- Connecting (2)... +--connect (con_2,localhost,mysqltest_u1) + +--echo # -- Connecting (3)... +--connect (con_3,localhost,mysqltest_u1) + +--echo # -- Connecting (4)... +--disable_query_log +--error ER_CON_COUNT_ERROR +--connect (con_4,localhost,mysqltest_u1) +--enable_query_log + +--echo +--echo # -- Waiting for the last connection to close... +let $wait_condition = + SELECT COUNT(*) = 3 + FROM information_schema.processlist + WHERE db = 'test'; +--source include/wait_condition.inc + +--echo +--echo # -- Check that we allow one extra SUPER-user connection. +--echo + +--echo # -- Connecting super (1)... +--connect (con_super_1,localhost,root) + +--echo # -- Connecting super (2)... +--disable_query_log +--error ER_CON_COUNT_ERROR +--connect (con_super_2,localhost,root) +--enable_query_log + +--echo +# Ensure that we have Event Scheduler thread, 3 ordinary user connections and +# one extra super-user connection. +SELECT user FROM information_schema.processlist ORDER BY id; + +--echo +--echo # -- Resetting variables... + +--eval SET GLOBAL max_connections = $saved_max_connections +SET GLOBAL event_scheduler = OFF; + +--echo +--echo # -- That's it. Closing connections... +--disconnect con_1 +--disconnect con_2 +--disconnect con_super_1 + +--echo +--echo # -- Restoring default connection... +--connect (default,localhost,root,,test) + +--echo +--echo # -- End of Bug#33507. +--echo + +--echo # ------------------------------------------------------------------ +--echo # -- End of 5.1 tests +--echo # ------------------------------------------------------------------ diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index b52e5aa745c..de40004fc6d 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -974,8 +974,6 @@ void time_out_user_resource_limits(THD *thd, USER_CONN *uc); void decrease_user_connections(USER_CONN *uc); void thd_init_client_charset(THD *thd, uint cs_number); bool setup_connection_thread_globals(THD *thd); -bool login_connection(THD *thd); -void end_connection(THD *thd); bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent); bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create); @@ -1895,6 +1893,7 @@ extern bool opt_disable_networking, opt_skip_show_db; extern my_bool opt_character_set_client_handshake; extern bool volatile abort_loop, shutdown_in_progress; extern uint volatile thread_count, thread_running, global_read_lock; +extern uint connection_count; extern my_bool opt_sql_bin_update, opt_safe_user_create, opt_no_mix_types; extern my_bool opt_safe_show_db, opt_local_infile, opt_myisam_use_mmap; extern my_bool opt_slave_compressed_protocol, use_temp_pool; @@ -1933,7 +1932,7 @@ extern pthread_mutex_t LOCK_mysql_create_db,LOCK_Acl,LOCK_open, LOCK_lock_db, LOCK_slave_list, LOCK_active_mi, LOCK_manager, LOCK_global_read_lock, LOCK_global_system_variables, LOCK_user_conn, LOCK_prepared_stmt_count, - LOCK_bytes_sent, LOCK_bytes_received; + LOCK_bytes_sent, LOCK_bytes_received, LOCK_connection_count; #ifdef HAVE_OPENSSL extern pthread_mutex_t LOCK_des_key_file; #endif diff --git a/sql/mysqld.cc b/sql/mysqld.cc index cdd08be6573..fd9ce9e1cea 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -584,7 +584,8 @@ pthread_mutex_t LOCK_mysql_create_db, LOCK_Acl, LOCK_open, LOCK_thread_count, LOCK_delayed_insert, LOCK_delayed_status, LOCK_delayed_create, LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received, LOCK_global_system_variables, - LOCK_user_conn, LOCK_slave_list, LOCK_active_mi; + LOCK_user_conn, LOCK_slave_list, LOCK_active_mi, + LOCK_connection_count; /** The below lock protects access to two global server variables: max_prepared_stmt_count and prepared_stmt_count. These variables @@ -720,6 +721,11 @@ char *des_key_file; struct st_VioSSLFd *ssl_acceptor_fd; #endif /* HAVE_OPENSSL */ +/** + Number of currently active user connections. The variable is protected by + LOCK_connection_count. +*/ +uint connection_count= 0; /* Function declarations */ @@ -1341,6 +1347,7 @@ static void clean_up_mutexes() (void) pthread_mutex_destroy(&LOCK_bytes_sent); (void) pthread_mutex_destroy(&LOCK_bytes_received); (void) pthread_mutex_destroy(&LOCK_user_conn); + (void) pthread_mutex_destroy(&LOCK_connection_count); Events::destroy_mutexes(); #ifdef HAVE_OPENSSL (void) pthread_mutex_destroy(&LOCK_des_key_file); @@ -1783,6 +1790,11 @@ void unlink_thd(THD *thd) DBUG_ENTER("unlink_thd"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); thd->cleanup(); + + pthread_mutex_lock(&LOCK_connection_count); + --connection_count; + pthread_mutex_unlock(&LOCK_connection_count); + (void) pthread_mutex_lock(&LOCK_thread_count); thread_count--; delete thd; @@ -3453,6 +3465,7 @@ static int init_thread_environment() (void) pthread_mutex_init(&LOCK_global_read_lock, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_prepared_stmt_count, MY_MUTEX_INIT_FAST); (void) pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST); + (void) pthread_mutex_init(&LOCK_connection_count, MY_MUTEX_INIT_FAST); #ifdef HAVE_OPENSSL (void) pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST); #ifndef HAVE_YASSL @@ -4700,6 +4713,11 @@ void create_thread_to_handle_connection(THD *thd) thread_count--; thd->killed= THD::KILL_CONNECTION; // Safety (void) pthread_mutex_unlock(&LOCK_thread_count); + + pthread_mutex_lock(&LOCK_connection_count); + --connection_count; + pthread_mutex_unlock(&LOCK_connection_count); + statistic_increment(aborted_connects,&LOCK_status); /* Can't use my_error() since store_globals has not been called. */ my_snprintf(error_message_buff, sizeof(error_message_buff), @@ -4739,15 +4757,31 @@ static void create_new_thread(THD *thd) if (protocol_version > 9) net->return_errno=1; - /* don't allow too many connections */ - if (thread_count - delayed_insert_threads >= max_connections+1 || abort_loop) + /* + Don't allow too many connections. We roughly check here that we allow + only (max_connections + 1) connections. + */ + + pthread_mutex_lock(&LOCK_connection_count); + + if (connection_count >= max_connections + 1 || abort_loop) { + pthread_mutex_unlock(&LOCK_connection_count); + DBUG_PRINT("error",("Too many connections")); close_connection(thd, ER_CON_COUNT_ERROR, 1); delete thd; DBUG_VOID_RETURN; } + + ++connection_count; + + pthread_mutex_unlock(&LOCK_connection_count); + + /* Start a new thread to handle connection. */ + pthread_mutex_lock(&LOCK_thread_count); + /* The initialization of thread_id is done in create_embedded_thd() for the embedded library. @@ -4755,13 +4789,13 @@ static void create_new_thread(THD *thd) */ thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; - /* Start a new thread to handle connection */ thread_count++; if (thread_count - delayed_insert_threads > max_used_connections) max_used_connections= thread_count - delayed_insert_threads; thread_scheduler.add_connection(thd); + DBUG_VOID_RETURN; } #endif /* EMBEDDED_LIBRARY */ diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index b22a33e3e92..6f8cd6494cd 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -402,10 +402,11 @@ check_user(THD *thd, enum enum_server_command command, if (check_count) { - VOID(pthread_mutex_lock(&LOCK_thread_count)); - bool count_ok= thread_count <= max_connections + delayed_insert_threads - || (thd->main_security_ctx.master_access & SUPER_ACL); - VOID(pthread_mutex_unlock(&LOCK_thread_count)); + pthread_mutex_lock(&LOCK_connection_count); + bool count_ok= connection_count <= max_connections || + (thd->main_security_ctx.master_access & SUPER_ACL); + VOID(pthread_mutex_unlock(&LOCK_connection_count)); + if (!count_ok) { // too many connections my_error(ER_CON_COUNT_ERROR, MYF(0)); @@ -930,7 +931,7 @@ bool setup_connection_thread_globals(THD *thd) */ -bool login_connection(THD *thd) +static bool login_connection(THD *thd) { NET *net= &thd->net; int error; @@ -968,7 +969,7 @@ bool login_connection(THD *thd) This mainly updates status variables */ -void end_connection(THD *thd) +static void end_connection(THD *thd) { NET *net= &thd->net; plugin_thdvar_cleanup(thd); From b5978a9424c6213a8282713feb3734c2f92968c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 12:40:12 -0400 Subject: [PATCH 416/527] Bug#26703: DROP DATABASE fails if database contains a #mysql50# \ table with backticks (Thanks to Lu Jingdong, though I did not take his patch directly, as it contained a significant flaw.) It wasn't a backtick/parsing problem. We merely didn't anticipate and allocate enough space to handle the optional "#mysql50#" table- name prefix. Now, allocate that extra space in case we need it when we look up a legacy table to get its file's name. mysql-test/r/drop.result: Verify that databases with old-style files can be removed. mysql-test/t/drop.test: Verify that databases with old-style files can be removed. sql/sql_db.cc: Extend the size of the memory that holds the table's name, so that the legacy "mysql50" prefix fits. --- mysql-test/r/drop.result | 11 +++++++++++ mysql-test/t/drop.test | 15 +++++++++++++++ sql/sql_db.cc | 9 +++++++-- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 71d6fcc7cd0..03445c51e38 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -91,4 +91,15 @@ create table mysql_test.`#sql-347f_7` (f1 int); create table mysql_test.`#sql-347f_8` (f1 int); drop table mysql_test.`#sql-347f_8`; drop database mysql_test; +create database mysqltestbug26703; +use mysqltestbug26703; +create table `#mysql50#abc``def` ( id int ); +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +ERROR 42000: Incorrect table name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +ERROR 42000: Incorrect table name '#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +use test; +drop database mysqltestbug26703; End of 5.1 tests diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index a79044436eb..ad26287a666 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -134,4 +134,19 @@ drop table mysql_test.`#sql-347f_8`; copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm; drop database mysql_test; +# +# Bug#26703: DROP DATABASE fails if database contains a #mysql50# table with backticks +# +create database mysqltestbug26703; +use mysqltestbug26703; +create table `#mysql50#abc``def` ( id int ); +--error ER_WRONG_TABLE_NAME +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +--error ER_WRONG_TABLE_NAME +create table `#mysql50#aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (a int); +use test; +drop database mysqltestbug26703; + --echo End of 5.1 tests diff --git a/sql/sql_db.cc b/sql/sql_db.cc index d03ac7921ac..75f9f5e847d 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -1111,12 +1111,17 @@ static long mysql_rm_known_files(THD *thd, MY_DIR *dirp, const char *db, /* Drop the table nicely */ *extension= 0; // Remove extension TABLE_LIST *table_list=(TABLE_LIST*) - thd->calloc(sizeof(*table_list)+ strlen(db)+strlen(file->name)+2); + thd->calloc(sizeof(*table_list) + + strlen(db) + 1 + + MYSQL50_TABLE_NAME_PREFIX_LENGTH + + strlen(file->name) + 1); + if (!table_list) - goto err; + goto err; table_list->db= (char*) (table_list+1); table_list->table_name= strmov(table_list->db, db) + 1; VOID(filename_to_tablename(file->name, table_list->table_name, + MYSQL50_TABLE_NAME_PREFIX_LENGTH + strlen(file->name) + 1)); table_list->alias= table_list->table_name; // If lower_case_table_names=2 table_list->internal_tmp_table= is_prefix(file->name, tmp_file_prefix); From 054341a6d07110dac1d05f023abd98bf7eaad39e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 23:07:10 +0300 Subject: [PATCH 417/527] Fix manual merge. --- sql/sql_delete.cc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 7c3a046cb20..b9a7cd12662 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -103,10 +103,6 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, /* Error evaluating val_int(). */ DBUG_RETURN(TRUE); } - /* NOTE: TRUNCATE must not invoke triggers. */ - - triggers_applicable= table->triggers && - thd->lex->sql_command != SQLCOM_TRUNCATE; /* Test if the user wants to delete all rows and deletion doesn't have @@ -129,9 +125,9 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, */ if (!using_limit && const_cond_result && !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && - !(triggers_applicable && - thd->current_stmt_binlog_row_based && - table->triggers->has_delete_triggers())) + (thd->lex->sql_command == SQLCOM_TRUNCATE || + (!thd->current_stmt_binlog_row_based && + !(table->triggers && table->triggers->has_delete_triggers())))) { /* Update the table->file->stats.records number */ table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); @@ -255,6 +251,12 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, init_ftfuncs(thd, select_lex, 1); thd_proc_info(thd, "updating"); + + /* NOTE: TRUNCATE must not invoke triggers. */ + + triggers_applicable= table->triggers && + thd->lex->sql_command != SQLCOM_TRUNCATE; + if (triggers_applicable && table->triggers->has_triggers(TRG_EVENT_DELETE, TRG_ACTION_AFTER)) From a54e3fa2c5b49601c25eb6ab82b00f79ab157f8a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 Mar 2008 17:03:50 -0400 Subject: [PATCH 418/527] Bug#34192: mysqldump from mysql 5.0.51 silently fails on dumping \ databases from 4.0 server mysqldump treated a failure to set the results charset as a severe error. Now, don't try to set the charset for the SHOW CREATE TABLE statement, if remote server's version is earlier than 4.1, which means it doesn't support changing charsets. client/mysqldump.c: Don't set the charset for receiving results if the server doesn't support it. --- client/mysqldump.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 980013d539a..fdaf8a9727b 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -109,6 +109,8 @@ static char *opt_password=0,*current_user=0, *log_error_file= NULL; static char **defaults_argv= 0; static char compatible_mode_normal_str[255]; +/* Server supports character_set_results session variable? */ +static my_bool server_supports_switching_charsets= TRUE; static ulong opt_compatible_mode= 0; #define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1 #define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2 @@ -1011,11 +1013,27 @@ static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res, } +/** + Switch charset for results to some specified charset. If the server does not + support character_set_results variable, nothing can be done here. As for + whether something should be done here, future new callers of this function + should be aware that the server lacking the facility of switching charsets is + treated as success. + + @note If the server lacks support, then nothing is changed and no error + condition is returned. + + @returns whether there was an error or not +*/ static int switch_character_set_results(MYSQL *mysql, const char *cs_name) { char query_buffer[QUERY_LENGTH]; size_t query_length; + /* Server lacks facility. This is not an error, by arbitrary decision . */ + if (!server_supports_switching_charsets) + return FALSE; + query_length= my_snprintf(query_buffer, sizeof (query_buffer), "SET SESSION character_set_results = '%s'", @@ -1111,11 +1129,14 @@ static int connect_to_db(char *host, char *user,char *passwd) DB_error(&mysql_connection, "when trying to connect"); DBUG_RETURN(1); } - /* - Don't dump SET NAMES with a pre-4.1 server (bug#7997). - */ if (mysql_get_server_version(&mysql_connection) < 40100) + { + /* Don't dump SET NAMES with a pre-4.1 server (bug#7997). */ opt_set_charset= 0; + + /* Don't switch charsets for 4.1 and earlier. (bug#34192). */ + server_supports_switching_charsets= FALSE; + } /* As we're going to set SQL_MODE, it would be lost on reconnect, so we cannot reconnect. From c167501bfb10d21a72bdf61ff59dc155280bc45e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2008 12:02:12 +0300 Subject: [PATCH 419/527] Fix for Bug#35074: max_used_connections is not correct. The problem was that number of threads was used to calculate max_used_connections. The fix is to use number of active connections. mysql-test/r/connect.result: Update result file. mysql-test/t/connect.test: - Add a test case for Bug#35074: max_used_connections is not correct; - Make a test case for Bug#33507 more stable. sql/mysqld.cc: Use number of connections insetad of threads to calculate max_used_connections. --- mysql-test/r/connect.result | 34 +++++++++++++++++ mysql-test/t/connect.test | 75 +++++++++++++++++++++++++++++++++++++ sql/mysqld.cc | 6 +-- 3 files changed, 112 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index de4eb28c500..c323bdf5998 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -162,14 +162,48 @@ root # -- Resetting variables... SET GLOBAL max_connections = 151; + +# -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF; +# -- Waiting for Event Scheduler to stop... # -- That's it. Closing connections... # -- Restoring default connection... +# -- Waiting for connections to close... + +DROP USER mysqltest_u1@localhost; + # -- End of Bug#33507. +# -- Bug#35074: max_used_connections is not correct. + +FLUSH STATUS; + +SHOW STATUS LIKE 'max_used_connections'; +Variable_name Value +Max_used_connections 1 + +# -- Starting Event Scheduler... +SET GLOBAL event_scheduler = ON; +# -- Waiting for Event Scheduler to start... + +# -- Opening a new connection to check max_used_connections... + +# -- Check that max_used_connections hasn't changed. +SHOW STATUS LIKE 'max_used_connections'; +Variable_name Value +Max_used_connections 2 + +# -- Closing new connection... + +# -- Stopping Event Scheduler... +SET GLOBAL event_scheduler = OFF; +# -- Waiting for Event Scheduler to stop... + +# -- End of Bug#35074. + # ------------------------------------------------------------------ # -- End of 5.1 tests # ------------------------------------------------------------------ diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index 9e8f0d9b115..c8b69a050ba 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -209,22 +209,97 @@ SELECT user FROM information_schema.processlist ORDER BY id; --echo # -- Resetting variables... --eval SET GLOBAL max_connections = $saved_max_connections + +--echo +--echo # -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF; +--echo # -- Waiting for Event Scheduler to stop... +let $wait_condition = + SELECT COUNT(*) = 0 + FROM information_schema.processlist + WHERE user = 'event_scheduler'; +--source include/wait_condition.inc + --echo --echo # -- That's it. Closing connections... --disconnect con_1 --disconnect con_2 +--disconnect con_3 --disconnect con_super_1 --echo --echo # -- Restoring default connection... --connect (default,localhost,root,,test) +--echo +--echo # -- Waiting for connections to close... +let $wait_condition = + SELECT COUNT(*) = 1 + FROM information_schema.processlist + WHERE db = 'test'; +--source include/wait_condition.inc + +--echo +DROP USER mysqltest_u1@localhost; + --echo --echo # -- End of Bug#33507. --echo +########################################################################### + +--echo # -- Bug#35074: max_used_connections is not correct. +--echo + +FLUSH STATUS; + +--echo +SHOW STATUS LIKE 'max_used_connections'; + +--echo +--echo # -- Starting Event Scheduler... +SET GLOBAL event_scheduler = ON; + +--echo # -- Waiting for Event Scheduler to start... +let $wait_condition = + SELECT COUNT(*) = 1 + FROM information_schema.processlist + WHERE user = 'event_scheduler'; +--source include/wait_condition.inc + +# NOTE: We should use a new connection here instead of reconnect in order to +# avoid races (we can not for sure when the connection being disconnected is +# actually disconnected on the server). + +--echo +--echo # -- Opening a new connection to check max_used_connections... +--connect (con_1,localhost,root) + +--echo +--echo # -- Check that max_used_connections hasn't changed. +SHOW STATUS LIKE 'max_used_connections'; + +--echo +--echo # -- Closing new connection... +--disconnect con_1 +--connection default + +--echo +--echo # -- Stopping Event Scheduler... +SET GLOBAL event_scheduler = OFF; + +--echo # -- Waiting for Event Scheduler to stop... +let $wait_condition = + SELECT COUNT(*) = 0 + FROM information_schema.processlist + WHERE user = 'event_scheduler'; +--source include/wait_condition.inc + +--echo +--echo # -- End of Bug#35074. +--echo + --echo # ------------------------------------------------------------------ --echo # -- End of 5.1 tests --echo # ------------------------------------------------------------------ diff --git a/sql/mysqld.cc b/sql/mysqld.cc index fd9ce9e1cea..05f616dcd44 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4776,6 +4776,9 @@ static void create_new_thread(THD *thd) ++connection_count; + if (connection_count > max_used_connections) + max_used_connections= connection_count; + pthread_mutex_unlock(&LOCK_connection_count); /* Start a new thread to handle connection. */ @@ -4791,9 +4794,6 @@ static void create_new_thread(THD *thd) thread_count++; - if (thread_count - delayed_insert_threads > max_used_connections) - max_used_connections= thread_count - delayed_insert_threads; - thread_scheduler.add_connection(thd); DBUG_VOID_RETURN; From f20fe94b55727fbc69b1cb86af5dc96f216bdd87 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2008 12:14:14 +0300 Subject: [PATCH 420/527] Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures Disable test case for bug 29948, which is causing sporadically failures in other tests inside mysql_client_test. tests/mysql_client_test.c: Disable test case. --- tests/mysql_client_test.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index d8015a4d2e0..dbe22f2a9e4 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -15952,6 +15952,7 @@ static void test_bug27592() DBUG_VOID_RETURN; } +#if 0 static void test_bug29948() { @@ -16027,6 +16028,8 @@ static void test_bug29948() mysql_close(dbc); } +#endif + /** Bug#29306 Truncated data in MS Access with decimal (3,1) columns in a VIEW */ @@ -16553,7 +16556,7 @@ static struct my_tests_st my_tests[]= { { "test_bug28505", test_bug28505 }, { "test_bug28934", test_bug28934 }, { "test_bug27592", test_bug27592 }, - { "test_bug29948", test_bug29948 }, + /* { "test_bug29948", test_bug29948 }, Bug#35103 */ { "test_bug29306", test_bug29306 }, { "test_bug31669", test_bug31669 }, { "test_bug32265", test_bug32265 }, From e85d6a915d242e8d39f021f4933c450323cec953 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2008 16:39:27 +0100 Subject: [PATCH 421/527] Bug#33756 - query cache with concurrent_insert=0 appears broken When concurrent inserts were disabled, statements after an INSERT were not put into the query cache. This happened because we do not save the current data file length at statement start when concurrent inserts are disabled. But we checked the always zero local length against the real file length anyway. Fixed by doing the check only if concurrent inserts are not diabled. mysql-test/r/query_cache.result: Bug#33756 - query cache with concurrent_insert=0 appears broken Added test result. mysql-test/t/query_cache.test: Bug#33756 - query cache with concurrent_insert=0 appears broken Added test. sql/ha_myisam.cc: Bug#33756 - query cache with concurrent_insert=0 appears broken Changed code so that file length check is done only when concurrent inserts are possible. --- mysql-test/r/query_cache.result | 27 +++++++++++++ mysql-test/t/query_cache.test | 20 ++++++++++ sql/ha_myisam.cc | 70 +++++++++++++++++++-------------- 3 files changed, 87 insertions(+), 30 deletions(-) diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 68f18d1b0b2..fa80a44c177 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1654,3 +1654,30 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size=default; +use test; +FLUSH STATUS; +SET GLOBAL query_cache_size=10*1024*1024; +SET @save_concurrent_insert= @@concurrent_insert; +SET GLOBAL concurrent_insert= 0; +CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 (c1) VALUES (1), (2); +SHOW GLOBAL VARIABLES LIKE 'concurrent_insert'; +Variable_name Value +concurrent_insert 0 +SHOW STATUS LIKE 'Qcache_hits'; +Variable_name Value +Qcache_hits 0 +SELECT * FROM t1; +c1 +1 +2 +SELECT * FROM t1; +c1 +1 +2 +SHOW STATUS LIKE 'Qcache_hits'; +Variable_name Value +Qcache_hits 1 +DROP TABLE t1; +SET GLOBAL concurrent_insert= @save_concurrent_insert; +SET GLOBAL query_cache_size= default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 44b63df9739..ebd24bf2b89 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1255,5 +1255,25 @@ set GLOBAL query_cache_type=default; set GLOBAL query_cache_limit=default; set GLOBAL query_cache_min_res_unit=default; set GLOBAL query_cache_size=default; +use test; + +# +# Bug#33756 - query cache with concurrent_insert=0 appears broken +# +FLUSH STATUS; +SET GLOBAL query_cache_size=10*1024*1024; +SET @save_concurrent_insert= @@concurrent_insert; +SET GLOBAL concurrent_insert= 0; +CREATE TABLE t1 (c1 INT NOT NULL) ENGINE=MyISAM; +INSERT INTO t1 (c1) VALUES (1), (2); +# +SHOW GLOBAL VARIABLES LIKE 'concurrent_insert'; +SHOW STATUS LIKE 'Qcache_hits'; +SELECT * FROM t1; +SELECT * FROM t1; +SHOW STATUS LIKE 'Qcache_hits'; +DROP TABLE t1; +SET GLOBAL concurrent_insert= @save_concurrent_insert; +SET GLOBAL query_cache_size= default; # End of 5.0 tests diff --git a/sql/ha_myisam.cc b/sql/ha_myisam.cc index 46afa7a8f45..8c8f027bb6b 100644 --- a/sql/ha_myisam.cc +++ b/sql/ha_myisam.cc @@ -1954,6 +1954,7 @@ my_bool ha_myisam::register_query_cache_table(THD *thd, char *table_name, *engine_callback, ulonglong *engine_data) { + DBUG_ENTER("ha_myisam::register_query_cache_table"); /* No call back function is needed to determine if a cached statement is valid or not. @@ -1965,39 +1966,48 @@ my_bool ha_myisam::register_query_cache_table(THD *thd, char *table_name, */ *engine_data= 0; - /* - If a concurrent INSERT has happened just before the currently processed - SELECT statement, the total size of the table is unknown. - - To determine if the table size is known, the current thread's snap shot of - the table size with the actual table size are compared. - - If the table size is unknown the SELECT statement can't be cached. - */ - ulonglong actual_data_file_length; - ulonglong current_data_file_length; - - /* - POSIX visibility rules specify that "2. Whatever memory values a - thread can see when it unlocks a mutex <...> can also be seen by any - thread that later locks the same mutex". In this particular case, - concurrent insert thread had modified the data_file_length in - MYISAM_SHARE before it has unlocked (or even locked) - structure_guard_mutex. So, here we're guaranteed to see at least that - value after we've locked the same mutex. We can see a later value - (modified by some other thread) though, but it's ok, as we only want - to know if the variable was changed, the actual new value doesn't matter - */ - actual_data_file_length= file->s->state.state.data_file_length; - current_data_file_length= file->save_state.data_file_length; - - if (current_data_file_length != actual_data_file_length) + if (file->s->concurrent_insert) { - /* Don't cache current statement. */ - return FALSE; + /* + If a concurrent INSERT has happened just before the currently + processed SELECT statement, the total size of the table is + unknown. + + To determine if the table size is known, the current thread's snap + shot of the table size with the actual table size are compared. + + If the table size is unknown the SELECT statement can't be cached. + + When concurrent inserts are disabled at table open, mi_open() + does not assign a get_status() function. In this case the local + ("current") status is never updated. We would wrongly think that + we cannot cache the statement. + */ + ulonglong actual_data_file_length; + ulonglong current_data_file_length; + + /* + POSIX visibility rules specify that "2. Whatever memory values a + thread can see when it unlocks a mutex <...> can also be seen by any + thread that later locks the same mutex". In this particular case, + concurrent insert thread had modified the data_file_length in + MYISAM_SHARE before it has unlocked (or even locked) + structure_guard_mutex. So, here we're guaranteed to see at least that + value after we've locked the same mutex. We can see a later value + (modified by some other thread) though, but it's ok, as we only want + to know if the variable was changed, the actual new value doesn't matter + */ + actual_data_file_length= file->s->state.state.data_file_length; + current_data_file_length= file->save_state.data_file_length; + + if (current_data_file_length != actual_data_file_length) + { + /* Don't cache current statement. */ + DBUG_RETURN(FALSE); + } } /* It is ok to try to cache current statement. */ - return TRUE; + DBUG_RETURN(TRUE); } #endif From 416ab8532e6ee39de48c75aca49aa665cc8d2a2a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 13 Mar 2008 14:54:29 -0300 Subject: [PATCH 422/527] Bug#34891 sp_notembedded.test fails sporadically The problem is that since MyISAM's concurrent_insert is on by default some concurrent SELECT statements might not see changes made by INSERT statements in other connections, even if the INSERT statement has returned. The solution is to disable concurrent_insert so that INSERT statements returns after the data is actually visible to other statements. mysql-test/r/flush_read_lock_kill.result: Restore old value of @@global.concurrent_insert mysql-test/r/kill.result: Restore old value of @@global.concurrent_insert mysql-test/r/sp_notembedded.result: Update test case result mysql-test/t/flush_read_lock_kill.test: Restore old value of @@global.concurrent_insert so it doesn't affect other tests. mysql-test/t/kill.test: Restore old value of @@global.concurrent_insert so it doesn't affect other tests. mysql-test/t/sp_notembedded.test: Disable and restore concurrent_insert value at the end of the test case. The test case for Bug 29936 requires that the inserted rows need to be visible before a SELECT statement is queued in another connection. Remove sleep at the start of the test, it's not necessary to log the result of the processlist command, showing the warnings has the same end result. --- mysql-test/r/flush_read_lock_kill.result | 2 + mysql-test/r/kill.result | 2 + mysql-test/r/sp_notembedded.result | 36 +++++- mysql-test/t/flush_read_lock_kill.test | 5 + mysql-test/t/kill.test | 7 ++ mysql-test/t/sp_notembedded.test | 141 ++++++++++++----------- 6 files changed, 122 insertions(+), 71 deletions(-) diff --git a/mysql-test/r/flush_read_lock_kill.result b/mysql-test/r/flush_read_lock_kill.result index f69656806da..0b599f343f7 100644 --- a/mysql-test/r/flush_read_lock_kill.result +++ b/mysql-test/r/flush_read_lock_kill.result @@ -1,3 +1,4 @@ +set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; drop table if exists t1; create table t1 (kill_id int); @@ -8,3 +9,4 @@ select ((@id := kill_id) - kill_id) from t1; 0 kill connection @id; drop table t1; +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/kill.result b/mysql-test/r/kill.result index a522d18f36b..8b6830d4798 100644 --- a/mysql-test/r/kill.result +++ b/mysql-test/r/kill.result @@ -1,3 +1,4 @@ +set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; drop table if exists t1, t2, t3; create table t1 (kill_id int); @@ -137,3 +138,4 @@ KILL CONNECTION_ID(); # of close of the connection socket SELECT 1; Got one of the listed errors +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 0b1fa565d28..3efb01fdb94 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -1,3 +1,5 @@ +set @old_concurrent_insert= @@global.concurrent_insert; +set @@global.concurrent_insert= 0; drop table if exists t1,t3; drop procedure if exists bug4902| create procedure bug4902() @@ -17,11 +19,11 @@ begin show processlist; end| call bug4902_2()| -Id User Host db Command Time State Info -# root localhost test Query # NULL show processlist +show warnings| +Level Code Message call bug4902_2()| -Id User Host db Command Time State Info -# root localhost test Query # NULL show processlist +show warnings| +Level Code Message drop procedure bug4902_2| drop table if exists t1| create table t1 ( @@ -68,7 +70,7 @@ c 2 show status like 'Qcache_hits'| Variable_name Value -Qcache_hits 2 +Qcache_hits 0 set global query_cache_size = @x| flush status| flush query cache| @@ -208,3 +210,27 @@ GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION drop user mysqltest_1@localhost; drop procedure 15298_1; drop procedure 15298_2; +drop table if exists t1; +drop procedure if exists p1; +create table t1 (value varchar(15)); +create procedure p1() update t1 set value='updated' where value='old'; +call p1(); +insert into t1 (value) values ("old"); +select get_lock('b26162',120); +get_lock('b26162',120) +1 +select 'rl_acquirer', value from t1 where get_lock('b26162',120);; +set session low_priority_updates=on; +call p1();; +select 'rl_contender', value from t1; +rl_contender value +rl_contender old +select release_lock('b26162'); +release_lock('b26162') +1 +rl_acquirer value +rl_acquirer old +drop procedure p1; +drop table t1; +set session low_priority_updates=default; +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/t/flush_read_lock_kill.test b/mysql-test/t/flush_read_lock_kill.test index c3926d09205..c03f3be2534 100644 --- a/mysql-test/t/flush_read_lock_kill.test +++ b/mysql-test/t/flush_read_lock_kill.test @@ -14,6 +14,7 @@ # Disable concurrent inserts to avoid test failures when reading the # connection id which was inserted into a table by another thread. +set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; connect (con1,localhost,root,,); @@ -58,3 +59,7 @@ reap; connection con2; drop table t1; +connection default; + +# Restore global concurrent_insert value +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test index b7e1e82fe5d..8ef668f542b 100644 --- a/mysql-test/t/kill.test +++ b/mysql-test/t/kill.test @@ -8,6 +8,7 @@ # Disable concurrent inserts to avoid test failures when reading the # connection id which was inserted into a table by another thread. +set @old_concurrent_insert= @@global.concurrent_insert; set @@global.concurrent_insert= 0; connect (con1, localhost, root,,); @@ -326,3 +327,9 @@ KILL CONNECTION_ID(); --echo # of close of the connection socket --error 2013, 2006 SELECT 1; +--connection default + +########################################################################### + +# Restore global concurrent_insert value. Keep in the end of the test file. +set @@global.concurrent_insert= @old_concurrent_insert; diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test index 4e298b2076a..16ebb710f25 100644 --- a/mysql-test/t/sp_notembedded.test +++ b/mysql-test/t/sp_notembedded.test @@ -1,7 +1,9 @@ # Can't test with embedded server -- source include/not_embedded.inc +# Disable concurrent inserts to avoid test failures +set @old_concurrent_insert= @@global.concurrent_insert; +set @@global.concurrent_insert= 0; ---sleep 2 --disable_warnings drop table if exists t1,t3; --enable_warnings @@ -39,10 +41,14 @@ create procedure bug4902_2() begin show processlist; end| ---replace_column 1 # 6 # 3 localhost +--disable_result_log call bug4902_2()| ---replace_column 1 # 6 # 3 localhost +--enable_result_log +show warnings| +--disable_result_log call bug4902_2()| +--enable_result_log +show warnings| drop procedure bug4902_2| # @@ -268,69 +274,72 @@ drop procedure 15298_1; drop procedure 15298_2; # -# Test case disabled due to Bug#34891: sp_notembedded.test fails sporadically. +# Bug#29936 Stored Procedure DML ignores low_priority_updates setting # -# # -# # Bug#29936 Stored Procedure DML ignores low_priority_updates setting -# # + +--disable_warnings +drop table if exists t1; +drop procedure if exists p1; +--enable_warnings + +create table t1 (value varchar(15)); +create procedure p1() update t1 set value='updated' where value='old'; + +# load the procedure into sp cache and execute once +call p1(); + +insert into t1 (value) values ("old"); + +connect (rl_holder, localhost, root,,); +connect (rl_acquirer, localhost, root,,); +connect (rl_contender, localhost, root,,); +connect (rl_wait, localhost, root,,); + +connection rl_holder; +select get_lock('b26162',120); + +connection rl_acquirer; +--send select 'rl_acquirer', value from t1 where get_lock('b26162',120); + +# we must wait till this select opens and locks the tables +connection rl_wait; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "User lock" and + info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)"; +--source include/wait_condition.inc + +connection default; +set session low_priority_updates=on; +--send call p1(); + +connection rl_wait; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = "Locked" and + info = "update t1 set value='updated' where value='old'"; +--source include/wait_condition.inc + +connection rl_contender; +select 'rl_contender', value from t1; + +connection rl_holder; +select release_lock('b26162'); + +connection rl_acquirer; +--reap +connection default; +--reap + +disconnect rl_holder; +disconnect rl_acquirer; +disconnect rl_wait; +drop procedure p1; +drop table t1; +set session low_priority_updates=default; + # -# --disable_warnings -# drop table if exists t1; -# drop procedure if exists p1; -# --enable_warnings +# Restore global concurrent_insert value. Keep in the end of the test file. # -# create table t1 (value varchar(15)); -# create procedure p1() update t1 set value='updated' where value='old'; -# -# # load the procedure into sp cache and execute once -# call p1(); -# -# insert into t1 (value) values ("old"); -# -# connect (rl_holder, localhost, root,,); -# connect (rl_acquirer, localhost, root,,); -# connect (rl_contender, localhost, root,,); -# connect (rl_wait, localhost, root,,); -# -# connection rl_holder; -# select get_lock('b26162',120); -# -# connection rl_acquirer; -# --send select 'rl_acquirer', value from t1 where get_lock('b26162',120); -# -# # we must wait till this select opens and locks the tables -# connection rl_wait; -# let $wait_condition= -# select count(*) = 1 from information_schema.processlist -# where state = "User lock" and -# info = "select 'rl_acquirer', value from t1 where get_lock('b26162',120)"; -# --source include/wait_condition.inc -# -# connection default; -# set session low_priority_updates=on; -# --send call p1(); -# -# connection rl_wait; -# let $wait_condition= -# select count(*) = 1 from information_schema.processlist -# where state = "Locked" and -# info = "update t1 set value='updated' where value='old'"; -# --source include/wait_condition.inc -# -# connection rl_contender; -# select 'rl_contender', value from t1; -# -# connection rl_holder; -# select release_lock('b26162'); -# -# connection rl_acquirer; -# --reap -# connection default; -# --reap -# -# disconnect rl_holder; -# disconnect rl_acquirer; -# disconnect rl_wait; -# drop procedure p1; -# drop table t1; -# set session low_priority_updates=default; + +set @@global.concurrent_insert= @old_concurrent_insert; From d5f09a13def2462127a1b3c3f268866136f748d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 10:03:01 +0800 Subject: [PATCH 423/527] BUG#33029 5.0 to 5.1 replication fails on dup key when inserting using a trig in SP For all 5.0 and up to 5.1.12 exclusive, when a stored routine or trigger caused an INSERT into an AUTO_INCREMENT column, the generated AUTO_INCREMENT value should not be written into the binary log, which means if a statement does not generate AUTO_INCREMENT value itself, there will be no Intvar event (SET INSERT_ID) associated with it even if one of the stored routine or trigger caused generation of such a value. And meanwhile, when executing a stored routine or trigger, it would ignore the INSERT_ID value even if there is a INSERT_ID value available set by a SET INSERT_ID statement. Starting from MySQL 5.1.12, the generated AUTO_INCREMENT value is written into the binary log, and the value will be used if available when executing the stored routine or trigger. Prior fix of this bug in MySQL 5.0 and prior MySQL 5.1.12 (referenced as the buggy versions in the text below), when a statement that generates AUTO_INCREMENT value by the top statement was executed in the body of a SP, all statements in the SP after this statement would be treated as if they had generated AUTO_INCREMENT by the top statement. When a statement that did not generate AUTO_INCREMENT value by the top statement but by a function/trigger called by it, an erroneous Intvar event would be associated with the statement, this erroneous INSERT_ID value wouldn't cause problem when replicating between masters and slaves of 5.0.x or prior 5.1.12, because the erroneous INSERT_ID value was not used when executing functions/triggers. But when replicating from buggy versions to 5.1.12 or newer, which will use the INSERT_ID value in functions/triggers, the erroneous value will be used, which would cause duplicate entry error and cause the slave to stop. The patch for 5.0 fixed it not to generate the erroneous Intvar event, another patch for 5.1 fixed it to ignore the SET INSERT_ID value when executing functions/triggers if it is replicating from a master of buggy versions. mysql-test/include/show_binlog_events.inc: add $binlog_start parameter to set the start position when show binlog events, if not set a default value will be used. mask out column 2(Pos), 4(Server_id), table_id, and file_id sql/sql_class.cc: Reset insert_id_used after each query in SP mysql-test/r/rpl_auto_increment_bug33029.result: Add test for bug33029, test if the master generate the erroneous event or not mysql-test/t/rpl_auto_increment_bug33029.test: Add test for bug33029, test if the master generate the erroneous event or not --- mysql-test/include/show_binlog_events.inc | 12 +- .../r/rpl_auto_increment_bug33029.result | 167 ++++++++++++++++++ mysql-test/t/rpl_auto_increment_bug33029.test | 107 +++++++++++ sql/sql_class.cc | 7 + 4 files changed, 290 insertions(+), 3 deletions(-) create mode 100644 mysql-test/r/rpl_auto_increment_bug33029.result create mode 100644 mysql-test/t/rpl_auto_increment_bug33029.test diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index 5d60fb19cb5..50b910b553b 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -1,4 +1,10 @@ ---let $binlog_start=98 ---replace_column 5 # ---replace_regex /\/\* xid=.* \*\//\/* XID *\// +# $binlog_start can be set by caller or take a default value + +if (!$binlog_start) +{ + let $binlog_start=98; +} +--replace_result $binlog_start +--replace_column 2 # 4 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ --eval show binlog events from $binlog_start diff --git a/mysql-test/r/rpl_auto_increment_bug33029.result b/mysql-test/r/rpl_auto_increment_bug33029.result new file mode 100644 index 00000000000..b1512a6ec1d --- /dev/null +++ b/mysql-test/r/rpl_auto_increment_bug33029.result @@ -0,0 +1,167 @@ +stop slave; +drop table if exists t1,t2,t3,t4,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; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP TRIGGER IF EXISTS tr1; +DROP FUNCTION IF EXISTS f1; +CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY); +CREATE TABLE t2 (id INT AUTO_INCREMENT PRIMARY KEY); +CREATE PROCEDURE p1() +BEGIN +DECLARE ins_count INT DEFAULT 10; +WHILE ins_count > 0 DO +INSERT INTO t1 VALUES (NULL); +SET ins_count = ins_count - 1; +END WHILE; +DELETE FROM t1 WHERE id = 1; +DELETE FROM t1 WHERE id = 2; +DELETE FROM t2 WHERE id = 1; +DELETE FROM t2 WHERE id = 2; +END// +CREATE PROCEDURE p2() +BEGIN +INSERT INTO t1 VALUES (NULL); +DELETE FROM t1 WHERE id = f1(3); +DELETE FROM t1 WHERE id = f1(4); +DELETE FROM t2 WHERE id = 3; +DELETE FROM t2 WHERE id = 4; +END// +CREATE TRIGGER tr1 BEFORE DELETE +ON t1 FOR EACH ROW +BEGIN +INSERT INTO t2 VALUES (NULL); +END// +CREATE FUNCTION f1 (i int) RETURNS int +BEGIN +INSERT INTO t2 VALUES (NULL); +RETURN i; +END// +CALL p1(); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Intvar # # INSERT_ID=1 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=2 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=3 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=4 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=5 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=6 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=7 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=8 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=9 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=10 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 1 +master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 2 +master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 1 +master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 2 +# Result on master +SELECT * FROM t1; +id +3 +4 +5 +6 +7 +8 +9 +10 +SELECT * FROM t2; +id +# Result on slave +SELECT * FROM t1; +id +3 +4 +5 +6 +7 +8 +9 +10 +SELECT * FROM t2; +id +DROP TRIGGER tr1; +CALL p2(); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Intvar # # INSERT_ID=11 +master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(3) +master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(4) +master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 3 +master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 4 +# Result on master +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 +# 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; +Warnings: +Note 1360 Trigger does not exist diff --git a/mysql-test/t/rpl_auto_increment_bug33029.test b/mysql-test/t/rpl_auto_increment_bug33029.test new file mode 100644 index 00000000000..a4f716d8411 --- /dev/null +++ b/mysql-test/t/rpl_auto_increment_bug33029.test @@ -0,0 +1,107 @@ +# BUG#33029 5.0 to 5.1 replication fails on dup key when inserting +# using a trig in SP + +# For all 5.0 up to 5.0.58 exclusive, and 5.1 up to 5.1.12 exclusive, +# if one statement in a SP generated AUTO_INCREMENT value by the top +# statement, all statements after it would be considered generated +# AUTO_INCREMENT value by the top statement, and a erroneous INSERT_ID +# value might be associated with these statement, which could cause +# duplicate entry error and stop the slave. + +source include/master-slave.inc; + +--disable_warnings +DROP TABLE IF EXISTS t1, t2; +DROP PROCEDURE IF EXISTS p1; +DROP PROCEDURE IF EXISTS p2; +DROP TRIGGER IF EXISTS tr1; +DROP FUNCTION IF EXISTS f1; +--enable_warnings + +CREATE TABLE t1 (id INT AUTO_INCREMENT PRIMARY KEY); +CREATE TABLE t2 (id INT AUTO_INCREMENT PRIMARY KEY); + +delimiter //; + +CREATE PROCEDURE p1() +BEGIN + DECLARE ins_count INT DEFAULT 10; + + WHILE ins_count > 0 DO + INSERT INTO t1 VALUES (NULL); + SET ins_count = ins_count - 1; + END WHILE; + + DELETE FROM t1 WHERE id = 1; + DELETE FROM t1 WHERE id = 2; + DELETE FROM t2 WHERE id = 1; + DELETE FROM t2 WHERE id = 2; +END// + +CREATE PROCEDURE p2() +BEGIN + INSERT INTO t1 VALUES (NULL); + DELETE FROM t1 WHERE id = f1(3); + DELETE FROM t1 WHERE id = f1(4); + DELETE FROM t2 WHERE id = 3; + DELETE FROM t2 WHERE id = 4; +END// + +CREATE TRIGGER tr1 BEFORE DELETE + ON t1 FOR EACH ROW + BEGIN + INSERT INTO t2 VALUES (NULL); + END// + +CREATE FUNCTION f1 (i int) RETURNS int + BEGIN + INSERT INTO t2 VALUES (NULL); + RETURN i; + END// + +delimiter ;// + +# the $binlog_start will be used by the show_binlog_events.inc, so +# that we can skip binlog events we don't care +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +CALL p1(); +source include/show_binlog_events.inc; + +echo # Result on master; +SELECT * FROM t1; +SELECT * FROM t2; + +sync_slave_with_master; + +echo # Result on slave; +SELECT * FROM t1; +SELECT * FROM t2; + +connection master; + +DROP TRIGGER tr1; + +# the $binlog_start will be used by the show_binlog_events.inc, so +# that we can skip binlog events we don't care +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); +CALL p2(); +source include/show_binlog_events.inc; + +echo # Result on master; +SELECT * FROM t1; +SELECT * FROM t2; + +sync_slave_with_master; + +echo # Result on slave; +SELECT * FROM t1; +SELECT * FROM t2; + +# clean up +connection master; +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; +sync_slave_with_master; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index e36ed0c425f..f541c8b3677 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -622,6 +622,13 @@ void THD::cleanup_after_query() { clear_next_insert_id= 0; next_insert_id= 0; + + /* + BUG#33029, if one statement in a SP set this member to 1, all + statment after this statement in the SP would be considered used + INSERT_ID value, reset this member after each query to fix this. + */ + insert_id_used= 0; } /* Reset rand_used so that detection of calls to rand() will save random From f21ee5d00dd67e95a86e2c1776cd187a16760528 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 11:35:41 +0800 Subject: [PATCH 424/527] BUG#33029 5.0 to 5.1 replication fails on dup key when inserting using a trig in SP For all 5.0 and up to 5.1.12 exclusive, when a stored routine or trigger caused an INSERT into an AUTO_INCREMENT column, the generated AUTO_INCREMENT value should not be written into the binary log, which means if a statement does not generate AUTO_INCREMENT value itself, there will be no Intvar event (SET INSERT_ID) associated with it even if one of the stored routine or trigger caused generation of such a value. And meanwhile, when executing a stored routine or trigger, it would ignore the INSERT_ID value even if there is a INSERT_ID value available set by a SET INSERT_ID statement. Starting from MySQL 5.1.12, the generated AUTO_INCREMENT value is written into the binary log, and the value will be used if available when executing the stored routine or trigger. Prior fix of this bug in MySQL 5.0 and prior MySQL 5.1.12 (referenced as the buggy versions in the text below), when a statement that generates AUTO_INCREMENT value by the top statement was executed in the body of a SP, all statements in the SP after this statement would be treated as if they had generated AUTO_INCREMENT by the top statement. When a statement that did not generate AUTO_INCREMENT value by the top statement but by a function/trigger called by it, an erroneous Intvar event would be associated with the statement, this erroneous INSERT_ID value wouldn't cause problem when replicating between masters and slaves of 5.0.x or prior 5.1.12, because the erroneous INSERT_ID value was not used when executing functions/triggers. But when replicating from buggy versions to 5.1.12 or newer, which will use the INSERT_ID value in functions/triggers, the erroneous value will be used, which would cause duplicate entry error and cause the slave to stop. The patch for 5.1 fixed it to ignore the SET INSERT_ID value when executing functions/triggers if it is replicating from a master of buggy versions, another patch for 5.0 fixed it not to generate the erroneous Intvar event. mysql-test/include/show_binlog_events.inc: add $binlog_start parameter to show binlog events from a given position sql/slave.cc: Add function to check for bug#33029 sql/slave.h: Add function to check for bug#33029 sql/sql_class.cc: if master has bug#33029, reset auto_inc_intervals_forced for sub statements add a new function Discrete_intervals_list::append that takes a Discrete_interval as argument sql/sql_class.h: Add member to save and restore auto_inc_intervals_forced sql/structs.h: add copy constructor and assignment operator for Discrete_intervals_list add a new function Discrete_intervals_list::append that takes a Discrete_interval as argument mysql-test/std_data/bug33029-slave-relay-bin.000001: relay logs from a buggy 5.0 master for test case of BUG#33029 mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result: Test if the slave can process relay logs from a buggy master of BUG#33029 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt: Test if the slave can process relay logs from a buggy master of BUG#33029 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: Test if the slave can process relay logs from a buggy master of BUG#33029 --- mysql-test/include/show_binlog_events.inc | 7 ++- .../std_data/bug33029-slave-relay-bin.000001 | Bin 0 -> 3933 bytes .../r/binlog_auto_increment_bug33029.result | 33 ++++++++++++ .../binlog_auto_increment_bug33029-master.opt | 1 + .../t/binlog_auto_increment_bug33029.test | 36 +++++++++++++ sql/slave.cc | 30 ++++++++++- sql/slave.h | 3 +- sql/sql_class.cc | 50 ++++++++++++++---- sql/sql_class.h | 1 + sql/structs.h | 21 ++++++++ 10 files changed, 169 insertions(+), 13 deletions(-) create mode 100644 mysql-test/std_data/bug33029-slave-relay-bin.000001 create mode 100644 mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result create mode 100644 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029-master.opt create mode 100644 mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc index fcdf84102aa..a80dc75df7d 100644 --- a/mysql-test/include/show_binlog_events.inc +++ b/mysql-test/include/show_binlog_events.inc @@ -1,4 +1,9 @@ ---let $binlog_start=106 +# $binlog_start can be set by caller or take a default value + +if (!$binlog_start) +{ + let $binlog_start=106; +} --replace_result $binlog_start --replace_column 2 # 4 # 5 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /file_id=[0-9]+/file_id=#/ diff --git a/mysql-test/std_data/bug33029-slave-relay-bin.000001 b/mysql-test/std_data/bug33029-slave-relay-bin.000001 new file mode 100644 index 0000000000000000000000000000000000000000..326d3bb62ab1635401fad810db2789569a45185d GIT binary patch literal 3933 zcmcJS&rcIU6vsy>SXYq*;>CEFcxn?$x}_u}6~od_%ZBYP*&kvxKxxa5CP+=Y#28{c z`X6}of6$8;5B>uly%=MR@uGi$8bW+;wr)Ec3bwG5>~?p4ywCf-c{?*buGIH`)IJu* zhX^6-a8=+UBtmAVlhdU?;KH*x}V@-X`b9NR&*F2$TszmPzC$H+Ko{Q~u~k z`{~hU%iU@wz=i1~7MXj3eb46!nmNG}tR6z^58!&oeL&S%z$0{Yfe>uxWpudZ)*?}m z6D96e%OyF}SfRGEs4=SMDZ8&)wnbfein=M^atVgs;3oRFY^sF z_Y=If#vIG5Iy2|X%|^p5FO>Hh)y=)#M$0XOJR{3;j>+g_ITn`|SwYpM9Ls77RMq!e z8`Z|azRLpxRuo6GshrGEX?013x$bnhOOrHbNUClz)5h)wOh3J+Xb!VzOm{Rbo{=nO zcMX~EdQMO|BQZTkx!nwSpfQ-7ylE8C&gv3FcWQJV`}J;21sYSQjT9PTB;frCo`i58 z@=r0eaHsrmpB}W{YPaRs3`F(R4(VVALG?^vw9uFqL-H1KFEw)U8ECh^ZMP}YMV2>U zqCG{Dq2t^`4P{DpiJHbLZ6~M@u@nvFS@%r70gu0j;C9~8v$hH@ZsXDcsqDt7$!y2e zEqpoI(ZKiM^`~_|&?C5}+`<@-;*GCv_~7Sd6<(@d8`eXCB)ttk3q4lnkx{E;*{sM{ zX(4QZuM-hI{<(+vm-_<#Tln~655bo^&?ewFFGEfDB6#uYpLvLXJF$TO8b1EWL-3pp zs^5r)uKv(N@F@u5zl4wf;~{tqg7~#7p{sxDA-EGk{O9oTzdQuL2k{T3(A7Wj5d0p* ze+muHm$?e??pz&IVedV#b4*0Ss}KmC6D|_SwF}W8?8KsmN(h9G1_RuG9VGnc`Mrelay_log.description_event_for_exec->server_version_split; @@ -4054,6 +4057,9 @@ bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id) (memcmp(introduced_in, master_ver, 3) <= 0) && (memcmp(fixed_in, master_ver, 3) > 0)) { + if (!report) + return TRUE; + // a short message for SHOW SLAVE STATUS (message length constraints) my_printf_error(ER_UNKNOWN_ERROR, "master may suffer from" " http://bugs.mysql.com/bug.php?id=%u" @@ -4085,6 +4091,26 @@ bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id) return FALSE; } +/** + BUG#33029, For all 5.0 up to 5.0.58 exclusive, and 5.1 up to 5.1.12 + exclusive, if one statement in a SP generated AUTO_INCREMENT value + by the top statement, all statements after it would be considered + generated AUTO_INCREMENT value by the top statement, and a + erroneous INSERT_ID value might be associated with these statement, + which could cause duplicate entry error and stop the slave. + + Detect buggy master to work around. + */ +bool rpl_master_erroneous_autoinc(THD *thd) +{ + if (active_mi && active_mi->rli.sql_thd == thd) + { + Relay_log_info *rli= &active_mi->rli; + return rpl_master_has_bug(rli, 33029, FALSE); + } + return FALSE; +} + #ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION template class I_List_iterator; template class I_List_iterator; diff --git a/sql/slave.h b/sql/slave.h index b4f1b7f7467..80d267e5b27 100644 --- a/sql/slave.h +++ b/sql/slave.h @@ -165,7 +165,8 @@ int fetch_master_table(THD* thd, const char* db_name, const char* table_name, bool show_master_info(THD* thd, Master_info* mi); bool show_binlog_info(THD* thd); -bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id); +bool rpl_master_has_bug(Relay_log_info *rli, uint bug_id, bool report=TRUE); +bool rpl_master_erroneous_autoinc(THD* thd); const char *print_slave_db_safe(const char *db); int check_expected_error(THD* thd, Relay_log_info const *rli, int error_code); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 044ea70e994..10c65f18a35 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -28,6 +28,7 @@ #include "mysql_priv.h" #include "rpl_rli.h" #include "rpl_record.h" +#include "slave.h" #include #include "log_event.h" #include @@ -2827,6 +2828,18 @@ extern "C" void thd_mark_transaction_to_rollback(MYSQL_THD thd, bool all) void THD::reset_sub_statement_state(Sub_statement_state *backup, uint new_state) { +#ifndef EMBEDDED_LIBRARY + /* BUG#33029, if we are replicating from a buggy master, reset + auto_inc_intervals_forced to prevent substatement + (triggers/functions) from using erroneous INSERT_ID value + */ + if (rpl_master_erroneous_autoinc(this)) + { + backup->auto_inc_intervals_forced= auto_inc_intervals_forced; + auto_inc_intervals_forced.empty(); + } +#endif + backup->options= options; backup->in_sub_stmt= in_sub_stmt; backup->enable_slow_log= enable_slow_log; @@ -2864,6 +2877,18 @@ void THD::reset_sub_statement_state(Sub_statement_state *backup, void THD::restore_sub_statement_state(Sub_statement_state *backup) { +#ifndef EMBEDDED_LIBRARY + /* BUG#33029, if we are replicating from a buggy master, restore + auto_inc_intervals_forced so that the top statement can use the + INSERT_ID value set before this statement. + */ + if (rpl_master_erroneous_autoinc(this)) + { + auto_inc_intervals_forced= backup->auto_inc_intervals_forced; + backup->auto_inc_intervals_forced.empty(); + } +#endif + /* To save resources we want to release savepoints which were created during execution of function or trigger before leaving their savepoint @@ -3569,17 +3594,24 @@ bool Discrete_intervals_list::append(ulonglong start, ulonglong val, { /* it cannot, so need to add a new interval */ Discrete_interval *new_interval= new Discrete_interval(start, val, incr); - if (unlikely(new_interval == NULL)) // out of memory - DBUG_RETURN(1); - DBUG_PRINT("info",("adding new auto_increment interval")); - if (head == NULL) - head= current= new_interval; - else - tail->next= new_interval; - tail= new_interval; - elements++; + DBUG_RETURN(append(new_interval)); } DBUG_RETURN(0); } +bool Discrete_intervals_list::append(Discrete_interval *new_interval) +{ + DBUG_ENTER("Discrete_intervals_list::append"); + if (unlikely(new_interval == NULL)) + DBUG_RETURN(1); + DBUG_PRINT("info",("adding new auto_increment interval")); + if (head == NULL) + head= current= new_interval; + else + tail->next= new_interval; + tail= new_interval; + elements++; + DBUG_RETURN(0); +} + #endif /* !defined(MYSQL_CLIENT) */ diff --git a/sql/sql_class.h b/sql/sql_class.h index b660c615920..dfd9879b98f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -911,6 +911,7 @@ public: ulonglong first_successful_insert_id_in_prev_stmt; ulonglong first_successful_insert_id_in_cur_stmt, insert_id_for_cur_row; Discrete_interval auto_inc_interval_for_cur_row; + Discrete_intervals_list auto_inc_intervals_forced; ulonglong limit_found_rows; ha_rows cuted_fields, sent_row_count, examined_row_count; ulong client_capabilities; diff --git a/sql/structs.h b/sql/structs.h index f14cca3c5db..809175fdde4 100644 --- a/sql/structs.h +++ b/sql/structs.h @@ -314,8 +314,27 @@ private: */ Discrete_interval *current; uint elements; // number of elements + + /* helper function for copy construct and assignment operator */ + void copy_(const Discrete_intervals_list& from) + { + for (Discrete_interval *i= from.head; i; i= i->next) + { + Discrete_interval j= *i; + append(&j); + } + } public: Discrete_intervals_list() : head(NULL), current(NULL), elements(0) {}; + Discrete_intervals_list(const Discrete_intervals_list& from) + { + copy_(from); + } + void operator=(const Discrete_intervals_list& from) + { + empty(); + copy_(from); + } void empty_no_free() { head= current= NULL; @@ -331,6 +350,7 @@ public: } empty_no_free(); } + const Discrete_interval* get_next() { Discrete_interval *tmp= current; @@ -340,6 +360,7 @@ public: } ~Discrete_intervals_list() { empty(); }; bool append(ulonglong start, ulonglong val, ulonglong incr); + bool append(Discrete_interval *interval); ulonglong minimum() const { return (head ? head->minimum() : 0); }; ulonglong maximum() const { return (head ? tail->maximum() : 0); }; uint nb_elements() const { return elements; } From 45b4d937c6bb7e1483c1fdbaf15bcb20a08ae683 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 14:12:39 +0400 Subject: [PATCH 425/527] Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes referenced_key_name field can be uninitialized in the case when referenced table is dropped. Added codition which allows to handle this situation. mysql-test/r/information_schema_inno.result: test result mysql-test/t/information_schema_inno.test: test result sql/sql_show.cc: referenced_key_name field can be uninitialized in the case when referenced table is dropped. Added codition which allows to handle this situation. --- mysql-test/r/information_schema_inno.result | 11 +++++++++++ mysql-test/t/information_schema_inno.test | 13 +++++++++++++ sql/sql_show.cc | 14 ++++++++++---- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/information_schema_inno.result b/mysql-test/r/information_schema_inno.result index 2ea2a0bec0b..4f36fd2b8b5 100644 --- a/mysql-test/r/information_schema_inno.result +++ b/mysql-test/r/information_schema_inno.result @@ -78,3 +78,14 @@ NULL NULL db-1 t-2 NULL NULL drop database `db-1`; +create table t1(id int primary key) engine = Innodb; +create table t2(pid int, foreign key (pid) references t1(id)) engine = Innodb; +set foreign_key_checks = 0; +drop table t1; +select UNIQUE_CONSTRAINT_NAME +from information_schema.referential_constraints +where constraint_schema = schema(); +UNIQUE_CONSTRAINT_NAME +NULL +drop table t2; +set foreign_key_checks = 1; diff --git a/mysql-test/t/information_schema_inno.test b/mysql-test/t/information_schema_inno.test index e73f4ba2792..1a537d740b7 100644 --- a/mysql-test/t/information_schema_inno.test +++ b/mysql-test/t/information_schema_inno.test @@ -76,3 +76,16 @@ select referenced_table_schema, referenced_table_name from information_schema.key_column_usage where constraint_schema = 'db-1'; drop database `db-1`; + +# +# Bug#35108 SELECT FROM REFERENTIAL_CONSTRAINTS crashes +# +create table t1(id int primary key) engine = Innodb; +create table t2(pid int, foreign key (pid) references t1(id)) engine = Innodb; +set foreign_key_checks = 0; +drop table t1; +select UNIQUE_CONSTRAINT_NAME +from information_schema.referential_constraints +where constraint_schema = schema(); +drop table t2; +set foreign_key_checks = 1; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 6e61ee6da5f..6becbe12ed4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -5276,8 +5276,14 @@ get_referential_constraints_record(THD *thd, TABLE_LIST *tables, f_key_info->referenced_db->length, cs); table->field[10]->store(f_key_info->referenced_table->str, f_key_info->referenced_table->length, cs); - table->field[5]->store(f_key_info->referenced_key_name->str, - f_key_info->referenced_key_name->length, cs); + if (f_key_info->referenced_key_name) + { + table->field[5]->store(f_key_info->referenced_key_name->str, + f_key_info->referenced_key_name->length, cs); + table->field[5]->set_notnull(); + } + else + table->field[5]->set_null(); table->field[6]->store(STRING_WITH_LEN("NONE"), cs); table->field[7]->store(f_key_info->update_method->str, f_key_info->update_method->length, cs); @@ -6480,8 +6486,8 @@ ST_FIELD_INFO referential_constraints_fields_info[]= OPEN_FULL_TABLE}, {"UNIQUE_CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE}, - {"UNIQUE_CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, - OPEN_FULL_TABLE}, + {"UNIQUE_CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, + MY_I_S_MAYBE_NULL, 0, OPEN_FULL_TABLE}, {"MATCH_OPTION", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE}, {"UPDATE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE}, {"DELETE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0, OPEN_FULL_TABLE}, From 2ebee313b5c4aed3a667b07bc93147eb9087f227 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 15:58:27 +0300 Subject: [PATCH 426/527] A fix for Bug#35289: Too many connections -- wrong SQL state in some case. ER_CON_COUNT_ERROR is defined with SQL state 08004. However, this SQL state is not always returned. This error can be thrown in two cases: 1. when an ordinary user (a user w/o SUPER privilege) is connecting, and the number of active user connections is equal or greater than max_connections. 2. when a user is connecting and the number of active user connections is already (max_connections + 1) -- that means that no more connections will be accepted regardless of the user credentials. In the 1-st case, SQL state is correct. The bug happens in the 2-nd case -- on UNIX the client gets 00000 SQL state, which is absolutely wrong (00000 means "not error SQL state); on Windows the client accidentally gets HY000 (which means "unknown SQL state). The cause of the problem is that the server rejects extra connection prior to read a packet with client capabilities. Thus, the server does not know if the client supports SQL states or not (if the client supports 4.1 protocol or not). So, the server supposes the worst and does not send SQL state at all. The difference in behavior on UNIX and Windows occurs because on Windows CLI_MYSQL_REAL_CONNECT() invokes create_shared_memory(), which returns an error (in default configuration, where shared memory is not configured). Then, the client does not reset this error, so when the connection is rejected, SQL state is HY000 (from the error from create_shared_memory()). The bug appeared after test case for Bug#33507 -- before that, this behavior just had not been tested. The fix is to 1) reset the error after create_shared_memory(); 2) set SQL state to 'unknown error' if it was not received from the server. A separate test case is not required, since the behavior is already tested in connect.test. Note for doc-team: the manual should be updated to say that under some circumstances, 'Too many connections' has HY000 SQL state. mysql-test/r/connect.result: Update result file. sql-common/client.c: 1. Reset an error from create_shared_memory(); 2. Set SQL state to 'unknown error' if it was not received from the server. --- mysql-test/r/connect.result | 2 +- sql-common/client.c | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index c323bdf5998..f2bacf92cc8 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -150,7 +150,7 @@ ERROR 08004: Too many connections # -- Connecting super (1)... # -- Connecting super (2)... -ERROR 00000: Too many connections +ERROR HY000: Too many connections SELECT user FROM information_schema.processlist ORDER BY id; user diff --git a/sql-common/client.c b/sql-common/client.c index b1728f0f74f..e7cf30c1a35 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -684,6 +684,16 @@ cli_safe_read(MYSQL *mysql) strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH); pos+= SQLSTATE_LENGTH+1; } + else + { + /* + The SQL state hasn't been received -- it should be reset to HY000 + (unknown error sql state). + */ + + strmov(net->sqlstate, unknown_sqlstate); + } + (void) strmake(net->last_error,(char*) pos, min((uint) len,(uint) sizeof(net->last_error)-1)); } @@ -1897,7 +1907,13 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, (int) have_tcpip)); if (mysql->options.protocol == MYSQL_PROTOCOL_MEMORY) goto error; - /* Try also with PIPE or TCP/IP */ + + /* + Try also with PIPE or TCP/IP. Clear the error from + create_shared_memory(). + */ + + net_clear_error(net); } else { From 9fa2d50559383785c72656dcdffa878cc3563da9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 14:03:47 +0100 Subject: [PATCH 427/527] Post-merge fix. Moved the symlink handling from sql_parse.cc here. mysql-test/r/symlink.result: Post-merge fix mysql-test/t/symlink.test: Post-merge fix --- mysql-test/r/symlink.result | 4 ++-- mysql-test/t/symlink.test | 7 +++++-- sql/sql_table.cc | 20 +++++++++++++++++++- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 68cc893e507..e95466271fd 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -146,10 +146,10 @@ DATA DIRECTORY='TEST_DIR/master-data/test'; ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/master-data/'; -DROP TABLE t1; +ERROR HY000: Incorrect arguments to DATA DIRECORY CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data'; -DROP TABLE t1; +ERROR HY000: Incorrect arguments to INDEX DIRECORY CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data_var'; ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 5802e65df1e..1323451d984 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -126,6 +126,9 @@ drop table t1; --write_file $MYSQLTEST_VARDIR/tmp/t1.MYI EOF --replace_result $MYSQLTEST_VARDIR TEST_DIR +# If $MYSQLTEST_VARDIR is a symbolic link, the low level MyISAm error +# message contains the real path of $MYSQLTEST_VARDIR. Try to catch this. +--replace_regex /write to file '\/.*\/tmp/write to file 'TEST_DIR\/tmp/ --error 1 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' @@ -209,13 +212,13 @@ INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data/mysql'; eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/test'; --replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/master-data/'; -DROP TABLE t1; --replace_result $MYSQLTEST_VARDIR TEST_DIR +--error 1210 eval CREATE TABLE t1(a INT) INDEX DIRECTORY='$MYSQLTEST_VARDIR/master-data'; -DROP TABLE t1; --replace_result $MYSQLTEST_VARDIR TEST_DIR --error 1 eval CREATE TABLE t1(a INT) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 18d8ae68008..b42045446d3 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3517,8 +3517,26 @@ bool mysql_create_table_no_lock(THD *thd, create_info->table_existed= 0; // Mark that table is created #ifdef HAVE_READLINK + if (test_if_data_home_dir(create_info->data_file_name)) + { + my_error(ER_WRONG_ARGUMENTS, MYF(0), "DATA DIRECTORY"); + goto unlock_and_end; + } + if (test_if_data_home_dir(create_info->index_file_name)) + { + my_error(ER_WRONG_ARGUMENTS, MYF(0), "INDEX DIRECTORY"); + goto unlock_and_end; + } + +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (check_partition_dirs(thd->lex->part_info)) + { + goto unlock_and_end; + } +#endif /* WITH_PARTITION_STORAGE_ENGINE */ + if (!my_use_symdir || (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) -#endif +#endif /* HAVE_READLINK */ { if (create_info->data_file_name) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0, From 3ec867679a12e6a14bed745bc76752d5e2691774 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 17:17:03 +0400 Subject: [PATCH 428/527] BUG#13861 - START SLAVE UNTIL may stop 1 evnt too late if log-slave-updates and circul repl This is a test case fix for BUG#13861. mysql-test/r/rpl_dual_pos_advance.result: Fix for a test case for BUG#13861. mysql-test/t/rpl_dual_pos_advance.test: Fix for a test case for BUG#13861. master_pos_wait() requires slave sql thread running. But it is not guaranteed for this test case. As we use start slave until it may execute all events and shutdown before master_pos_wait() is started. On the other hand it is safe just to wait for slave to stop here, as start slave returns _after_ sql thread is started. --- mysql-test/r/rpl_dual_pos_advance.result | 3 --- mysql-test/t/rpl_dual_pos_advance.test | 6 ------ 2 files changed, 9 deletions(-) diff --git a/mysql-test/r/rpl_dual_pos_advance.result b/mysql-test/r/rpl_dual_pos_advance.result index 97ca8101c33..4c6323a61db 100644 --- a/mysql-test/r/rpl_dual_pos_advance.result +++ b/mysql-test/r/rpl_dual_pos_advance.result @@ -25,9 +25,6 @@ insert into t3 values(4); start slave until master_log_file="slave-bin.000001",master_log_pos=195; 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 -select master_pos_wait("slave-bin.000001",137); -master_pos_wait("slave-bin.000001",137) -0 show tables; Tables_in_test t1 diff --git a/mysql-test/t/rpl_dual_pos_advance.test b/mysql-test/t/rpl_dual_pos_advance.test index 5e08284a2f2..6a3cf9e4f97 100644 --- a/mysql-test/t/rpl_dual_pos_advance.test +++ b/mysql-test/t/rpl_dual_pos_advance.test @@ -65,12 +65,6 @@ connection master; # asking it to stop before creation of t3. start slave until master_log_file="slave-bin.000001",master_log_pos=195; - -# wait until it's started (the position below is the start of "CREATE -# TABLE t2") (otherwise wait_for_slave_to_stop may return at once) - -select master_pos_wait("slave-bin.000001",137); - wait_for_slave_to_stop; # then BUG#13861 causes t3 to show up below (because stopped too From 196b616accbc73d212f21e2ec84353931a2f286b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 19:38:22 +0400 Subject: [PATCH 429/527] BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed When there are no underlying tables specified for a merge table, SHOW CREATE TABLE outputs a statement that cannot be executed. The same is true for mysqldump (it generates dumps that cannot be executed). This happens because SQL parser does not accept empty UNION() clause. This patch changes the following: - it is now possible to execute CREATE/ALTER statement with empty UNION() clause. - the same as above, but still worth noting: it is now possible to remove underlying tables mapping using ALTER TABLE ... UNION=(). - SHOW CREATE TABLE does not output UNION() clause if there are no underlying tables specified for a merge table. This makes mysqldump slightly smaller. mysql-test/r/merge.result: A test case for BUG#28248. mysql-test/t/merge.test: A test case for BUG#28248. sql/ha_myisammrg.cc: Do not output UNION clause in SHOW CREATE TABLE, when there are no underlying tables defined. sql/sql_yacc.yy: Make underlying table list for MERGE engine optional. As for MERGE engine empty underlying tables list is valid, it should be valid for the parser as well. This change is mostly needed to restore dumps made by earlier MySQL versions. Also with this fix it is possible to remove underlying tables mapping by using ALTER TABLE ... UNION=(). --- mysql-test/r/merge.result | 22 ++++++++++++++++++++++ mysql-test/t/merge.test | 13 +++++++++++++ sql/ha_myisammrg.cc | 6 ++++++ sql/sql_yacc.yy | 2 +- 4 files changed, 42 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 2ceae95dfca..f8ef4f23180 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -918,4 +918,26 @@ id ref 3 2 4 5 DROP TABLE t1, t2, t3; +CREATE TABLE t1(a INT); +CREATE TABLE m1(a INT) ENGINE=MERGE; +SHOW CREATE TABLE m1; +Table Create Table +m1 CREATE TABLE `m1` ( + `a` int(11) default NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 +DROP TABLE m1; +CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(); +SHOW CREATE TABLE m1; +Table Create Table +m1 CREATE TABLE `m1` ( + `a` int(11) default NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 +ALTER TABLE m1 UNION=(t1); +ALTER TABLE m1 UNION=(); +SHOW CREATE TABLE m1; +Table Create Table +m1 CREATE TABLE `m1` ( + `a` int(11) default NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, m1; End of 5.0 tests diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index 35443987858..e5cc4d703f2 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -542,5 +542,18 @@ SELECT * FROM t3; DROP TABLE t1, t2, t3; +# +# BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed +# +CREATE TABLE t1(a INT); +CREATE TABLE m1(a INT) ENGINE=MERGE; +SHOW CREATE TABLE m1; +DROP TABLE m1; +CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(); +SHOW CREATE TABLE m1; +ALTER TABLE m1 UNION=(t1); +ALTER TABLE m1 UNION=(); +SHOW CREATE TABLE m1; +DROP TABLE t1, m1; --echo End of 5.0 tests diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 78492d2843d..b796978f352 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -602,6 +602,12 @@ void ha_myisammrg::append_create_info(String *packet) packet->append(STRING_WITH_LEN(" INSERT_METHOD=")); packet->append(get_type(&merge_insert_method,file->merge_insert_method-1)); } + /* + There is no sence adding UNION clause in case there is no underlying + tables specified. + */ + if (file->open_tables == file->end_table) + return; packet->append(STRING_WITH_LEN(" UNION=(")); MYRG_TABLE *open_table,*first; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 04285fea227..b877a789732 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2932,7 +2932,7 @@ create_table_option: my_error(ER_WARN_DEPRECATED_SYNTAX, MYF(0), "RAID_CHUNKSIZE", "PARTITION"); MYSQL_YYABORT; } - | UNION_SYM opt_equal '(' table_list ')' + | UNION_SYM opt_equal '(' opt_table_list ')' { /* Move the union list to the merge_list */ LEX *lex=Lex; From 0c9946bcfdc869053576b049d5f407021a8449d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 17:45:14 +0100 Subject: [PATCH 430/527] Post-merge fixes mysql-test/r/partition_not_windows.result: Post-merge fixes New warnings mysql-test/r/symlink.result: Post-merge fixes Typo mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test: Post-merge fixes Defeated creation of a warnings file. mysql-test/t/partition_symlink.test: Post-merge fixes Fixed directory to an allowed one. mysql-test/t/type_set.test: Post-merge fixes Defeated creation of a warnings file. --- mysql-test/r/partition_not_windows.result | 3 +++ mysql-test/r/symlink.result | 8 ++++---- mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test | 4 ++-- mysql-test/t/partition_symlink.test | 4 ++-- mysql-test/t/type_set.test | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index 501d3a469a1..e16cd5e8845 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -23,6 +23,9 @@ partition p01 values less than (1000) data directory='/not/existing' index directory='/not/existing' ); +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index e95466271fd..de3a19ea102 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -140,16 +140,16 @@ DROP TABLE t1; End of 5.0 tests CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data/mysql'; -ERROR HY000: Incorrect arguments to INDEX DIRECORY +ERROR HY000: Incorrect arguments to INDEX DIRECTORY CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/master-data/test'; -ERROR HY000: Incorrect arguments to DATA DIRECORY +ERROR HY000: Incorrect arguments to DATA DIRECTORY CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/master-data/'; -ERROR HY000: Incorrect arguments to DATA DIRECORY +ERROR HY000: Incorrect arguments to DATA DIRECTORY CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data'; -ERROR HY000: Incorrect arguments to INDEX DIRECORY +ERROR HY000: Incorrect arguments to INDEX DIRECTORY CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data_var'; ERROR HY000: Can't create/write to file 'TEST_DIR/master-data_var/t1.MYI' (Errcode: 2) diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test index 3c7c15926a4..5700e0fa422 100644 --- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test +++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test @@ -52,13 +52,13 @@ ROLLBACK; BEGIN; INSERT INTO tmyisam VALUES (5); INSERT INTO tmyisam VALUES (6); ---warning 1196 +#--warning 1196 ROLLBACK; BEGIN; INSERT INTO tndb VALUES (7); INSERT INTO tmyisam VALUES (7); ---warning 1196 +#--warning 1196 ROLLBACK; SELECT * FROM tndb ORDER BY a; diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test index cf8ba2d2a5f..ea6d4f214bd 100644 --- a/mysql-test/t/partition_symlink.test +++ b/mysql-test/t/partition_symlink.test @@ -134,8 +134,8 @@ eval create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" + data directory="$MYSQLTEST_VARDIR/tmp/" + index directory="$MYSQLTEST_VARDIR/tmp/" ); enable_query_log; diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test index c7f8c59de28..9586c87571d 100644 --- a/mysql-test/t/type_set.test +++ b/mysql-test/t/type_set.test @@ -75,4 +75,4 @@ INSERT INTO t1 VALUES(9223372036854775808); SELECT * FROM t1; DROP TABLE t1; ---# echo End of 5.0 tests +-- echo End of 5.0 tests From 4597814717f4ae503923ad5ea7aacae3a95b6435 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 17:52:57 +0100 Subject: [PATCH 431/527] Post-merge fixes. mysql-test/extra/rpl_tests/rpl_loaddata.test: Removing SHOW MASTER STATUS that does not seem to make sense. mysql-test/extra/rpl_tests/rpl_log.test: Correcting test case to sync slave with master. mysql-test/suite/binlog/r/binlog_unsafe.result: Result change. mysql-test/suite/binlog/t/binlog_unsafe.test: Removing unsafe variable from list of safe variables. mysql-test/suite/rpl/r/rpl_loaddata.result: Result change. mysql-test/suite/rpl/r/rpl_skip_error.result: Result change. mysql-test/suite/rpl/t/rpl_skip_error.test: Correcting bad manual+automatic merge. Test is now only relevant for statement- based replication. sql/rpl_rli.cc: Correcting automerge undoing previous change of return value. Relay_log_info::wait_for_pos() should return -2 when not initialized to work correctly. --- mysql-test/extra/rpl_tests/rpl_loaddata.test | 7 --- mysql-test/extra/rpl_tests/rpl_log.test | 2 +- .../suite/binlog/r/binlog_unsafe.result | 2 - mysql-test/suite/binlog/t/binlog_unsafe.test | 1 - mysql-test/suite/rpl/r/rpl_loaddata.result | 6 +- mysql-test/suite/rpl/r/rpl_skip_error.result | 62 ++++++++++++++++++- mysql-test/suite/rpl/t/rpl_skip_error.test | 21 +++++-- sql/rpl_rli.cc | 2 +- 8 files changed, 78 insertions(+), 25 deletions(-) diff --git a/mysql-test/extra/rpl_tests/rpl_loaddata.test b/mysql-test/extra/rpl_tests/rpl_loaddata.test index bb6afd73034..8f32ee674f8 100644 --- a/mysql-test/extra/rpl_tests/rpl_loaddata.test +++ b/mysql-test/extra/rpl_tests/rpl_loaddata.test @@ -39,13 +39,6 @@ sync_with_master; select * from t1; select * from t3; -# We want to be sure that LOAD DATA is in the slave's binlog. -# But we can't simply read this binlog, because as the slave has not been -# restarted for this test, the file_id is uncertain (would cause test -# failures). So instead, we test if the binlog looks long enough to -# contain LOAD DATA. Since 5.0.3 we assume that binlog of 1292 is ok. -# If LOAD DATA was not logged, the binlog would be shorter. -show master status; connection master; diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index a5db4dfab4d..078d3d4557d 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -148,5 +148,5 @@ drop table t1; # End of 4.1 tests -sync_with_master; +sync_slave_with_master; diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 1c155cd0876..a384364b730 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -153,7 +153,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id); INSERT INTO t1 VALUES (@@session.foreign_key_checks); INSERT INTO t1 VALUES (@@session.sql_auto_is_null); INSERT INTO t1 VALUES (@@session.unique_checks); -INSERT INTO t2 VALUES (@@session.sql_mode); INSERT INTO t1 VALUES (@@session.auto_increment_increment); INSERT INTO t1 VALUES (@@session.auto_increment_offset); INSERT INTO t2 VALUES (@@session.character_set_client); @@ -179,4 +178,3 @@ DROP PROCEDURE proc4; DROP FUNCTION func5; DROP PREPARE prep6; DROP TABLE t1, t2, t3, trigger_table, trigger_table2; -DROP VIEW v1; diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index 5aa20a6947d..1baab141b44 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -200,7 +200,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id); INSERT INTO t1 VALUES (@@session.foreign_key_checks); INSERT INTO t1 VALUES (@@session.sql_auto_is_null); INSERT INTO t1 VALUES (@@session.unique_checks); -INSERT INTO t2 VALUES (@@session.sql_mode); INSERT INTO t1 VALUES (@@session.auto_increment_increment); INSERT INTO t1 VALUES (@@session.auto_increment_offset); INSERT INTO t2 VALUES (@@session.character_set_client); diff --git a/mysql-test/suite/rpl/r/rpl_loaddata.result b/mysql-test/suite/rpl/r/rpl_loaddata.result index 6bca1708297..070c50db3d5 100644 --- a/mysql-test/suite/rpl/r/rpl_loaddata.result +++ b/mysql-test/suite/rpl/r/rpl_loaddata.result @@ -26,9 +26,6 @@ day id category name 2003-02-22 2461 b a a a @ %  ' " a 2003-03-22 2161 c asdf 2003-03-22 2416 a bbbbb -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -slave-bin.000001 1280 drop table t1; drop table t2; drop table t3; @@ -83,8 +80,7 @@ load data infile '../std_data_ln/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' -set @@global.sql_slave_skip_counter=1; -start slave; +drop table t2; drop table t2; drop table t1; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; diff --git a/mysql-test/suite/rpl/r/rpl_skip_error.result b/mysql-test/suite/rpl/r/rpl_skip_error.result index 0421df81b42..b90d8113e8e 100644 --- a/mysql-test/suite/rpl/r/rpl_skip_error.result +++ b/mysql-test/suite/rpl/r/rpl_skip_error.result @@ -13,18 +13,18 @@ insert into t1 values (1); insert into t1 values (1); insert into t1 values (2),(3); [on slave] -select * from t1 ORDER BY n; +select * from t1 order by n; n 1 2 3 ==== Test With sql_mode=strict_trans_tables ==== -insert into t1 values (7), (8); +insert into t1 values (7),(8); [on master] set sql_mode=strict_trans_tables; insert into t1 values (7), (8), (9); [on slave] -select * from t1; +select * from t1 order by n; n 1 2 @@ -72,3 +72,59 @@ Last_SQL_Errno 0 Last_SQL_Error ==== Clean Up ==== drop table t1; +create table t1(a int primary key); +insert into t1 values (1),(2); +delete from t1 where @@server_id=1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +set sql_mode=strict_trans_tables; +insert into t1 values (7), (8), (9); +[on slave] +select * from t1; +a +1 +2 +7 +8 +9 +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 Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File +Master_SSL_CA_Path +Master_SSL_Cert +Master_SSL_Cipher +Master_SSL_Key +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +Last_IO_Errno # +Last_IO_Error # +Last_SQL_Errno 0 +Last_SQL_Error +==== Clean Up ==== +drop table t1; diff --git a/mysql-test/suite/rpl/t/rpl_skip_error.test b/mysql-test/suite/rpl/t/rpl_skip_error.test index a608c111701..cac797d3797 100644 --- a/mysql-test/suite/rpl/t/rpl_skip_error.test +++ b/mysql-test/suite/rpl/t/rpl_skip_error.test @@ -18,7 +18,7 @@ # bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic source include/master-slave.inc; -source include/have_binlog_format_mixed_or_statement.inc; +source include/have_binlog_format_statement.inc; --echo ==== Test Without sql_mode=strict_trans_tables ==== @@ -37,11 +37,22 @@ insert into t1 values (1); # These should work fine insert into t1 values (2),(3); -save_master_pos; -connection slave; -sync_with_master; -select * from t1; +sync_slave_with_master; +--echo [on slave] +select * from t1 order by n; +--echo ==== Test With sql_mode=strict_trans_tables ==== +insert into t1 values (7),(8); +--echo [on master] +connection master; +set sql_mode=strict_trans_tables; +insert into t1 values (7), (8), (9); +--echo [on slave] +sync_slave_with_master; +select * from t1 order by n; +source include/show_slave_status2.inc; + +--echo ==== Clean Up ==== connection master; drop table t1; sync_slave_with_master; diff --git a/sql/rpl_rli.cc b/sql/rpl_rli.cc index 03f790b934f..bd8246b066f 100644 --- a/sql/rpl_rli.cc +++ b/sql/rpl_rli.cc @@ -615,7 +615,7 @@ int Relay_log_info::wait_for_pos(THD* thd, String* log_name, DBUG_ENTER("Relay_log_info::wait_for_pos"); if (!inited) - DBUG_RETURN(-1); + DBUG_RETURN(-2); DBUG_PRINT("enter",("log_name: '%s' log_pos: %lu timeout: %lu", log_name->c_ptr(), (ulong) log_pos, (ulong) timeout)); From 9699767c952bf30ab4b18a15e131ba417745f855 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 23:11:59 +0400 Subject: [PATCH 432/527] Fixed bug #34763. Queries like: SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a or SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a lead to assertion failure in the Item_in_subselect::row_value_transformer method in debugging build, or to unexpected error message in release build: ERROR 1247 (42S22): Reference '' not supported (forward reference in item list) Unexpected error message and assertion failure have been eliminated. mysql-test/r/subselect3.result: Added test case for bug #34763. mysql-test/t/subselect3.test: Added test case for bug #34763. sql/item.cc: Fixed bug #34763. The Item_ref::fix_fields method has been modified to silently ignore not fixed outer references: by the definition, those references should be fixed later by the call to the fix_inner_refs function. sql/item_subselect.cc: Fixed bug #34763. The Item_in_subselect::row_value_transformer method has been modified to eliminate assertion failure on not fixed outer references: by the definition those references are allowed in this context and should be fixed later by the call to the fix_inner_refs function. --- mysql-test/r/subselect3.result | 13 ++++++++++++- mysql-test/t/subselect3.test | 19 ++++++++++++++++++- sql/item.cc | 15 +++++++++------ sql/item_subselect.cc | 12 ++++++++++-- 4 files changed, 49 insertions(+), 10 deletions(-) diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index bdf00e4c307..c194ba33756 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -758,5 +758,16 @@ EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 Using where 2 DEPENDENT SUBQUERY t2 unique_subquery PRIMARY PRIMARY 4 func 1 Using index; Using where -DROP TABLE t1; +DROP TABLE t1, t2; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES(1); +CREATE TABLE t2 (placeholder CHAR(11)); +INSERT INTO t2 VALUES("placeholder"); +SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a; +ROW(1, 2) IN (SELECT t1.a, 2) +1 +SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; +ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) +1 +DROP TABLE t1, t2; End of 5.0 tests diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index 2f844c9cc21..cfbde8c29cd 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -586,6 +586,23 @@ SELECT a FROM t1 WHERE a NOT IN (65,66); SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); EXPLAIN SELECT a FROM t1 WHERE a NOT IN (SELECT a FROM t2); -DROP TABLE t1; +DROP TABLE t1, t2; + +# +# Bug #34763: item_subselect.cc:1235:Item_in_subselect::row_value_transformer: +# Assertion failed, unexpected error message: +# ERROR 1247 (42S22): Reference '' not supported (forward +# reference in item list) +# +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES(1); + +CREATE TABLE t2 (placeholder CHAR(11)); +INSERT INTO t2 VALUES("placeholder"); + +SELECT ROW(1, 2) IN (SELECT t1.a, 2) FROM t1 GROUP BY t1.a; +SELECT ROW(1, 2) IN (SELECT t1.a, 2 FROM t2) FROM t1 GROUP BY t1.a; + +DROP TABLE t1, t2; --echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 53e7f124ccd..36612ddea44 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -5451,13 +5451,16 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) DBUG_ASSERT(*ref); /* Check if this is an incorrect reference in a group function or forward - reference. Do not issue an error if this is an unnamed reference inside an - aggregate function. + reference. Do not issue an error if this is: + 1. outer reference (will be fixed later by the fix_inner_refs function); + 2. an unnamed reference inside an aggregate function. */ - if (((*ref)->with_sum_func && name && - !(current_sel->linkage != GLOBAL_OPTIONS_TYPE && - current_sel->having_fix_field)) || - !(*ref)->fixed) + if (!((*ref)->type() == REF_ITEM && + ((Item_ref *)(*ref))->ref_type() == OUTER_REF) && + (((*ref)->with_sum_func && name && + !(current_sel->linkage != GLOBAL_OPTIONS_TYPE && + current_sel->having_fix_field)) || + !(*ref)->fixed)) { my_error(ER_ILLEGAL_REFERENCE, MYF(0), name, ((*ref)->with_sum_func? diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index b3710841dfb..a03a7d739b2 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1232,7 +1232,11 @@ Item_in_subselect::row_value_transformer(JOIN *join) Item *item_having_part2= 0; for (uint i= 0; i < cols_num; i++) { - DBUG_ASSERT(left_expr->fixed && select_lex->ref_pointer_array[i]->fixed); + DBUG_ASSERT(left_expr->fixed && + select_lex->ref_pointer_array[i]->fixed || + (select_lex->ref_pointer_array[i]->type() == REF_ITEM && + ((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() == + Item_ref::OUTER_REF)); if (select_lex->ref_pointer_array[i]-> check_cols(left_expr->element_index(i)->cols())) DBUG_RETURN(RES_ERROR); @@ -1306,7 +1310,11 @@ Item_in_subselect::row_value_transformer(JOIN *join) for (uint i= 0; i < cols_num; i++) { Item *item, *item_isnull; - DBUG_ASSERT(left_expr->fixed && select_lex->ref_pointer_array[i]->fixed); + DBUG_ASSERT(left_expr->fixed && + select_lex->ref_pointer_array[i]->fixed || + (select_lex->ref_pointer_array[i]->type() == REF_ITEM && + ((Item_ref*)(select_lex->ref_pointer_array[i]))->ref_type() == + Item_ref::OUTER_REF)); if (select_lex->ref_pointer_array[i]-> check_cols(left_expr->element_index(i)->cols())) DBUG_RETURN(RES_ERROR); From 451de554fcf32a7a7d42f0496b701fe4237403c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 20:51:32 +0100 Subject: [PATCH 433/527] Post-merge fix --- mysql-test/r/type_set.result | 1 + mysql-test/t/type_set.test | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 9829d4951c9..4722db1432f 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -93,3 +93,4 @@ c 1,2,3 64 DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test index c7f8c59de28..e98555e137b 100644 --- a/mysql-test/t/type_set.test +++ b/mysql-test/t/type_set.test @@ -75,4 +75,4 @@ INSERT INTO t1 VALUES(9223372036854775808); SELECT * FROM t1; DROP TABLE t1; ---# echo End of 5.0 tests +--echo End of 5.0 tests From 931558eefa63dcaf9e577b8d144327e618143b54 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 15 Mar 2008 00:24:10 +0400 Subject: [PATCH 434/527] BUG#28248 - mysqldump results with MERGE ... UNION=() cannot be executed After merge fix. --- mysql-test/r/merge.result | 10 +++++----- mysql-test/suite/rpl/r/rpl_row_create_table.result | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 170cffc13d5..4c05000573c 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -969,21 +969,21 @@ CREATE TABLE m1(a INT) ENGINE=MERGE; SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 DROP TABLE m1; CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(); SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 ALTER TABLE m1 UNION=(t1); ALTER TABLE m1 UNION=(); SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1, m1; End of 5.0 tests @@ -1151,7 +1151,7 @@ SHOW CREATE TABLE t4; Table Create Table t4 CREATE TABLE `t4` ( `c1` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT INTO t4 VALUES (4); ERROR HY000: Table 't4' is read only DROP TABLE t4; @@ -1168,7 +1168,7 @@ SHOW CREATE TABLE t4; Table Create Table t4 CREATE TABLE `t4` ( `c1` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT INTO t4 VALUES (4); ERROR HY000: Table 't4' is read only DROP TABLE t4; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index ba5a13a57bf..a8011756bbb 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -45,7 +45,7 @@ Table t2 Create Table CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( @@ -64,7 +64,7 @@ Table t2 Create Table CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( @@ -185,7 +185,7 @@ Table t8 Create Table CREATE TABLE `t8` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( @@ -205,7 +205,7 @@ Table t8 Create Table CREATE TABLE `t8` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( From 4e7979fe91a5341b3a07a0ef489e87b57e2686d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 21:37:19 +0100 Subject: [PATCH 435/527] Post-merge fixes --- mysql-test/r/merge.result | 10 +++++----- mysql-test/r/type_set.result | 1 + mysql-test/suite/rpl/r/rpl_row_create_table.result | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index 170cffc13d5..4c05000573c 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -969,21 +969,21 @@ CREATE TABLE m1(a INT) ENGINE=MERGE; SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 DROP TABLE m1; CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(); SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 ALTER TABLE m1 UNION=(t1); ALTER TABLE m1 UNION=(); SHOW CREATE TABLE m1; Table Create Table m1 CREATE TABLE `m1` ( - `a` int(11) default NULL + `a` int(11) DEFAULT NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1, m1; End of 5.0 tests @@ -1151,7 +1151,7 @@ SHOW CREATE TABLE t4; Table Create Table t4 CREATE TABLE `t4` ( `c1` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT INTO t4 VALUES (4); ERROR HY000: Table 't4' is read only DROP TABLE t4; @@ -1168,7 +1168,7 @@ SHOW CREATE TABLE t4; Table Create Table t4 CREATE TABLE `t4` ( `c1` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT INTO t4 VALUES (4); ERROR HY000: Table 't4' is read only DROP TABLE t4; diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index 659215eda33..e36f21f2996 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -93,3 +93,4 @@ c 1,2,3 64 DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index ba5a13a57bf..a8011756bbb 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -45,7 +45,7 @@ Table t2 Create Table CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( @@ -64,7 +64,7 @@ Table t2 Create Table CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 SHOW CREATE TABLE t3; Table t3 Create Table CREATE TABLE `t3` ( @@ -185,7 +185,7 @@ Table t8 Create Table CREATE TABLE `t8` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( @@ -205,7 +205,7 @@ Table t8 Create Table CREATE TABLE `t8` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL -) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 UNION=() +) ENGINE=MRG_MyISAM DEFAULT CHARSET=utf8 SHOW CREATE TABLE t9; Table t9 Create Table CREATE TABLE `t9` ( From 063b50477296f20b22e5cc5c1f50b8302ef55c19 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 17:40:12 -0300 Subject: [PATCH 436/527] Bug#35103 mysql_client_test::test_bug29948 causes sporadic failures The problem was that the COM_STMT_SEND_LONG_DATA was sending a response packet if the prepared statement wasn't found in the server (due to reconnection). The commands COM_STMT_SEND_LONG_DATA and COM_STMT_CLOSE should not send any packets, even error packets should not be sent since they are not expected by the client API. The solution is to clear generated during the execution of the aforementioned commands and to skip resend of prepared statement commands. Another fix is that if the connection breaks during the send of prepared statement command, the command is not sent again since the prepared statement is no longer in the server. libmysql/libmysql.c: The mysql handle might be reset after a reconnection. Pass the now used stmt argument to cli_advanced_command. sql-common/client.c: Don't resend command if the connection broke and it's a prepared statement command. If the session is broken, prepared statements on the server are gone, set the error accordanly. sql/sql_prepare.cc: Clear any error set during the execution of the request command. tests/mysql_client_test.c: Fix memory leak by freeing result associated with statement. Remove test case for Bug 29948 because it's not reliable in 5.0 (fixed in 5.1) due to KILL queries sending two packets for a thread that kills itself. --- libmysql/libmysql.c | 17 ++++++--- sql-common/client.c | 10 +++-- sql/sql_prepare.cc | 16 +++++--- tests/mysql_client_test.c | 79 +-------------------------------------- 4 files changed, 30 insertions(+), 92 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 4afc3ec5925..b4fc40bc78a 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2456,7 +2456,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) int4store(buff+5, 1); /* iteration count */ res= test(cli_advanced_command(mysql, COM_STMT_EXECUTE, buff, sizeof(buff), - packet, length, 1, NULL) || + packet, length, 1, stmt) || (*mysql->methods->read_query_result)(mysql)); stmt->affected_rows= mysql->affected_rows; stmt->server_status= mysql->server_status; @@ -2673,7 +2673,7 @@ stmt_read_row_from_cursor(MYSQL_STMT *stmt, unsigned char **row) int4store(buff + 4, stmt->prefetch_rows); /* number of rows to fetch */ if ((*mysql->methods->advanced_command)(mysql, COM_STMT_FETCH, buff, sizeof(buff), NullS, 0, - 1, NULL)) + 1, stmt)) { set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); return 1; @@ -3340,7 +3340,7 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number, */ if ((*mysql->methods->advanced_command)(mysql, COM_STMT_SEND_LONG_DATA, buff, sizeof(buff), data, - length, 1, NULL)) + length, 1, stmt)) { set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, mysql->net.sqlstate); @@ -4737,6 +4737,13 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt) MYSQL_DATA *result= &stmt->result; DBUG_ENTER("mysql_stmt_store_result"); + if (!mysql) + { + /* mysql can be reset in mysql_close called from mysql_reconnect */ + set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); + DBUG_RETURN(1); + } + mysql= mysql->last_used_con; if (!stmt->field_count) @@ -4762,7 +4769,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt) int4store(buff, stmt->stmt_id); int4store(buff + 4, (int)~0); /* number of rows to fetch */ if (cli_advanced_command(mysql, COM_STMT_FETCH, buff, sizeof(buff), - NullS, 0, 1, NULL)) + NullS, 0, 1, stmt)) { set_stmt_errmsg(stmt, net->last_error, net->last_errno, net->sqlstate); DBUG_RETURN(1); @@ -4949,7 +4956,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) char buff[MYSQL_STMT_HEADER]; /* packet header: 4 bytes for stmt id */ int4store(buff, stmt->stmt_id); if ((*mysql->methods->advanced_command)(mysql, COM_STMT_RESET, buff, - sizeof(buff), 0, 0, 0, NULL)) + sizeof(buff), 0, 0, 0, stmt)) { set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno, mysql->net.sqlstate); diff --git a/sql-common/client.c b/sql-common/client.c index 1fc73549520..8b619b5452d 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -665,11 +665,12 @@ my_bool cli_advanced_command(MYSQL *mysql, enum enum_server_command command, const char *header, ulong header_length, const char *arg, ulong arg_length, my_bool skip_check, - MYSQL_STMT *stmt __attribute__((unused))) + MYSQL_STMT *stmt) { NET *net= &mysql->net; my_bool result= 1; init_sigpipe_variables + my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE; DBUG_ENTER("cli_advanced_command"); /* Don't give sigpipe errors if the client doesn't want them */ @@ -677,7 +678,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, if (mysql->net.vio == 0) { /* Do reconnect if possible */ - if (mysql_reconnect(mysql)) + if (mysql_reconnect(mysql) || stmt_skip) DBUG_RETURN(1); } if (mysql->status != MYSQL_STATUS_READY || @@ -708,7 +709,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command, goto end; } end_server(mysql); - if (mysql_reconnect(mysql)) + if (mysql_reconnect(mysql) || stmt_skip) goto end; if (net_write_command(net,(uchar) command, header, header_length, arg, arg_length)) @@ -2503,6 +2504,9 @@ my_bool mysql_reconnect(MYSQL *mysql) if (stmt->state != MYSQL_STMT_INIT_DONE) { stmt->mysql= 0; + stmt->last_errno= CR_SERVER_LOST; + strmov(stmt->last_error, ER(CR_SERVER_LOST)); + strmov(stmt->sqlstate, unknown_sqlstate); } else { diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 18cfd8d7dfc..207183f567c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2516,7 +2516,7 @@ void mysql_stmt_close(THD *thd, char *packet) DBUG_ENTER("mysql_stmt_close"); if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_close"))) - DBUG_VOID_RETURN; + goto out; /* The only way currently a statement can be deallocated when it's @@ -2525,6 +2525,9 @@ void mysql_stmt_close(THD *thd, char *packet) DBUG_ASSERT(! (stmt->flags & (uint) Prepared_statement::IS_IN_USE)); (void) stmt->deallocate(); +out: + /* clear errors, response packet is not expected */ + thd->clear_error(); DBUG_VOID_RETURN; } @@ -2591,10 +2594,7 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length) #ifndef EMBEDDED_LIBRARY /* Minimal size of long data packet is 6 bytes */ if (packet_length <= MYSQL_LONG_DATA_HEADER) - { - my_error(ER_WRONG_ARGUMENTS, MYF(0), "mysql_stmt_send_long_data"); - DBUG_VOID_RETURN; - } + goto out; #endif stmt_id= uint4korr(packet); @@ -2614,7 +2614,7 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length) stmt->last_errno= ER_WRONG_ARGUMENTS; sprintf(stmt->last_error, ER(ER_WRONG_ARGUMENTS), "mysql_stmt_send_long_data"); - DBUG_VOID_RETURN; + goto out; } #endif @@ -2630,6 +2630,10 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length) stmt->last_errno= ER_OUTOFMEMORY; sprintf(stmt->last_error, ER(ER_OUTOFMEMORY), 0); } + +out: + /* clear errors, response packet is not expected */ + thd->clear_error(); DBUG_VOID_RETURN; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 0deb37d25c3..142fd741443 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -11746,6 +11746,7 @@ static void test_bug5194() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); + mysql_stmt_reset(stmt); } mysql_stmt_close(stmt); @@ -15942,83 +15943,6 @@ static void test_bug27592() DBUG_VOID_RETURN; } -#if 0 - -static void test_bug29948() -{ - MYSQL *dbc=NULL; - MYSQL_STMT *stmt=NULL; - MYSQL_BIND bind; - - int res=0; - my_bool auto_reconnect=1, error=0, is_null=0; - char kill_buf[20]; - const char *query; - int buf; - unsigned long length, cursor_type; - - dbc = mysql_init(NULL); - DIE_UNLESS(dbc); - - mysql_options(dbc, MYSQL_OPT_RECONNECT, (char*)&auto_reconnect); - if (!mysql_real_connect(dbc, opt_host, opt_user, - opt_password, current_db, opt_port, - opt_unix_socket, - (CLIENT_FOUND_ROWS | CLIENT_MULTI_STATEMENTS | - CLIENT_MULTI_RESULTS))) - { - printf("connection failed: %s (%d)", mysql_error(dbc), - mysql_errno(dbc)); - exit(1); - } - - bzero(&bind, sizeof(bind)); - bind.buffer_type= MYSQL_TYPE_LONG; - bind.buffer= (char *)&buf; - bind.is_null= &is_null; - bind.error= &error; - bind.length= &length; - - res= mysql_query(dbc, "DROP TABLE IF EXISTS t1"); - myquery(res); - res= mysql_query(dbc, "CREATE TABLE t1 (a INT)"); - myquery(res); - res= mysql_query(dbc, "INSERT INTO t1 VALUES(1)"); - myquery(res); - - stmt= mysql_stmt_init(dbc); - check_stmt(stmt); - - cursor_type= CURSOR_TYPE_READ_ONLY; - res= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void *)&cursor_type); - myquery(res); - - query= "SELECT * from t1 where a=?"; - res= mysql_stmt_prepare(stmt, query, strlen(query)); - myquery(res); - - res= mysql_stmt_bind_param(stmt, &bind); - myquery(res); - - res= mysql_stmt_execute(stmt); - check_execute(stmt, res); - - res= mysql_stmt_bind_result(stmt,&bind); - check_execute(stmt, res); - - sprintf(kill_buf, "kill %ld", dbc->thread_id); - mysql_query(dbc, kill_buf); - - res= mysql_stmt_store_result(stmt); - DIE_UNLESS(res); - - mysql_stmt_free_result(stmt); - mysql_stmt_close(stmt); - mysql_query(dbc, "DROP TABLE t1"); - mysql_close(dbc); -} - -#endif /** Bug#29306 Truncated data in MS Access with decimal (3,1) columns in a VIEW @@ -16546,7 +16470,6 @@ static struct my_tests_st my_tests[]= { { "test_bug28505", test_bug28505 }, { "test_bug28934", test_bug28934 }, { "test_bug27592", test_bug27592 }, - /* { "test_bug29948", test_bug29948 }, Bug#35103 */ { "test_bug29306", test_bug29306 }, { "test_bug31669", test_bug31669 }, { "test_bug32265", test_bug32265 }, From 6bc335e697064b860c8805bfa05e5e6fd1d40f6e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 18:45:50 -0700 Subject: [PATCH 437/527] fix results after merge mysql-test/r/partition_not_windows.result: fix results from merge mysql-test/t/disabled.def: disable test partition_symlink --- mysql-test/r/partition_not_windows.result | 3 +++ mysql-test/t/disabled.def | 1 + 2 files changed, 4 insertions(+) diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index 501d3a469a1..e16cd5e8845 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -23,6 +23,9 @@ partition p01 values less than (1000) data directory='/not/existing' index directory='/not/existing' ); +Warnings: +Warning 0 DATA DIRECTORY option ignored +Warning 0 INDEX DIRECTORY option ignored show create table t2; Table Create Table t2 CREATE TABLE `t2` ( diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 9e0b681528b..d1ef92441aa 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,3 +21,4 @@ ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables +partition_symlink : Make pushbuild green From 6bceb154a2bb89733f5bd52410c53a9f0f183131 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 14 Mar 2008 23:01:46 -0700 Subject: [PATCH 438/527] make pushbuild green --- mysql-test/t/disabled.def | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index d1ef92441aa..eabdb8be650 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,4 +21,6 @@ ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables -partition_symlink : Make pushbuild green +partition_symlink : Bug#35305 Make pushbuild green +partition_basic_symlink_innodb : Bug#35306 Make pushbuild green +partition_basic_symlink_myisam : Bug#35306 Make pushbuild green From d3a0f85227e8a699d7eca6f59c74a772e8df3554 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 15 Mar 2008 01:08:35 -0700 Subject: [PATCH 439/527] make pushbuild green mysql-test/t/disabled.def: make pushbuild green, entry added to wrong disabled.def file. --- mysql-test/suite/parts/t/disabled.def | 2 ++ mysql-test/t/disabled.def | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 408a624e707..75b19c3f25a 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -18,3 +18,5 @@ partition_value_ndb : cannot create t1 rpl_ndb_dd_partitions : cannot create t1 partition_alter4_myisam : Bug#20129 / WL#4176 partition_alter4_innodb : Bug#20129 / WL#4176 +partition_basic_symlink_innodb : Bug#35306 Make pushbuild green +partition_basic_symlink_myisam : Bug#35306 Make pushbuild green diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index eabdb8be650..2d73395cd18 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -22,5 +22,3 @@ status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables partition_symlink : Bug#35305 Make pushbuild green -partition_basic_symlink_innodb : Bug#35306 Make pushbuild green -partition_basic_symlink_myisam : Bug#35306 Make pushbuild green From 30d644f859ee65748f12e3861abaf1fbb2c3b2c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 13:39:56 +0300 Subject: [PATCH 440/527] A patch for Bug#35329: connect does not set mysql_errno variable. The problem was that 'connect' command didn't set mysql_errno variable, thus the script was unable to determine whether connection was opened or not. The fix is to set this variable. Test cases will be added in the scope of Bug33507 into connect.test file. client/mysqltest.c: Set 'mysql_errno' variable. --- client/mysqltest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/mysqltest.c b/client/mysqltest.c index 52e02789579..7ef184ae7e8 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -4221,11 +4221,13 @@ int connect_n_handle_errors(struct st_command *command, if (!mysql_real_connect(con, host, user, pass, db, port, sock ? sock: 0, CLIENT_MULTI_STATEMENTS)) { + var_set_errno(mysql_errno(con)); handle_error(command, mysql_errno(con), mysql_error(con), mysql_sqlstate(con), ds); return 0; /* Not connected */ } + var_set_errno(0); handle_no_error(command); return 1; /* Connected */ } From c1e69a77a6f6563214b5f5e8813db423c4f3a04c Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 14:26:00 +0300 Subject: [PATCH 441/527] Avoid races in connect.test. The problem was in a test case for Bug33507: - when the number of active connections reaches the limit, the server accepts only root connections. That's achieved by accepting a connection, negotiating with the client and checking user credentials. If it is not SUPER, the connection is dropped. - when the server accepts connection, it increases the counter; - when the server drops connection, it decreases the counter; - the race was in between of decreasing the counter and accepting new connection: - max_user_connections = 2; - 2 oridinary user connections accepted; - extra user connection is establishing; - server checked user credentials, and sent 'Too many connections' error; - the client receives the error and establishes extra SUPER user connection; - the server however didn't decrease the counter (the extra user connection still is "alive" in the server) -- so, the new SUPER-user connection, will be dropped, because it exceeds (max_user_connections + 1). The fix is to implement "safe connect", which makes several attempts to connect and use it in the test script. mysql-test/r/connect.result: Update test file. mysql-test/t/connect.test: Avoid races in connect.test. mysql-test/include/connect2.inc: Auxiliary routine to establish a connection reliably. --- mysql-test/include/connect2.inc | 56 +++++++++++++++++++++ mysql-test/r/connect.result | 31 ++++++++---- mysql-test/t/connect.test | 86 ++++++++++++++------------------- 3 files changed, 114 insertions(+), 59 deletions(-) create mode 100644 mysql-test/include/connect2.inc diff --git a/mysql-test/include/connect2.inc b/mysql-test/include/connect2.inc new file mode 100644 index 00000000000..6b830a909ed --- /dev/null +++ b/mysql-test/include/connect2.inc @@ -0,0 +1,56 @@ +# include/connect2.inc +# +# SUMMARY +# +# Make several attempts to connect. +# +# USAGE +# +# EXAMPLE +# +# connect.test +# + +--disable_query_log + +let $wait_counter= 300; +if ($wait_timeout) +{ + let $wait_counter= `SELECT $wait_timeout * 10`; +} +# Reset $wait_timeout so that its value won't be used on subsequent +# calls, and default will be used instead. +let $wait_timeout= 0; + +--echo # -- Establishing connection '$con_name' (user: $con_user_name)... + +while ($wait_counter) +{ + --disable_abort_on_error + --disable_result_log + --connect ($con_name,localhost,$con_user_name) + --enable_result_log + --enable_abort_on_error + + let $error = $mysql_errno; + + if (!$error) + { + let $wait_counter= 0; + } + if ($error) + { + real_sleep 0.1; + dec $wait_counter; + } +} +if ($error) +{ + --echo # -- Error: can not establish connection '$con_name'. +} +if (!$error) +{ + --echo # -- Connection '$con_name' has been established. +} + +--enable_query_log diff --git a/mysql-test/r/connect.result b/mysql-test/r/connect.result index f2bacf92cc8..727433d3032 100644 --- a/mysql-test/r/connect.result +++ b/mysql-test/r/connect.result @@ -127,8 +127,7 @@ GRANT USAGE ON *.* TO mysqltest_u1@localhost; SET GLOBAL max_connections = 3; SET GLOBAL event_scheduler = ON; -# -- Waiting for old connections to close... - +# -- Waiting for Event Scheduler to start... # -- Disconnecting default connection... @@ -136,22 +135,33 @@ SET GLOBAL event_scheduler = ON; # -- many threads are running. # -- Connecting (1)... - -# -- Waiting for root connection to close... +# -- Establishing connection 'con_1' (user: mysqltest_u1)... +# -- Connection 'con_1' has been established. # -- Connecting (2)... -# -- Connecting (3)... -# -- Connecting (4)... -ERROR 08004: Too many connections +# -- Establishing connection 'con_2' (user: mysqltest_u1)... +# -- Connection 'con_2' has been established. -# -- Waiting for the last connection to close... +# -- Connecting (3)... +# -- Establishing connection 'con_3' (user: mysqltest_u1)... +# -- Connection 'con_3' has been established. + +# -- Connecting (4) [should fail]... +# -- Establishing connection 'con_4' (user: mysqltest_u1)... +# -- Error: can not establish connection 'con_4'. # -- Check that we allow one extra SUPER-user connection. # -- Connecting super (1)... -# -- Connecting super (2)... -ERROR HY000: Too many connections +# -- Establishing connection 'con_super_1' (user: root)... +# -- Connection 'con_super_1' has been established. +# -- Connecting super (2) [should fail]... +# -- Establishing connection 'con_super_2' (user: root)... +# -- Error: can not establish connection 'con_super_2'. + +# -- Ensure that we have Event Scheduler thread, 3 ordinary user +# -- connections and one extra super-user connection. SELECT user FROM information_schema.processlist ORDER BY id; user event_scheduler @@ -165,6 +175,7 @@ SET GLOBAL max_connections = 151; # -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF; + # -- Waiting for Event Scheduler to stop... # -- That's it. Closing connections... diff --git a/mysql-test/t/connect.test b/mysql-test/t/connect.test index c8b69a050ba..0893bf9ad18 100644 --- a/mysql-test/t/connect.test +++ b/mysql-test/t/connect.test @@ -114,106 +114,94 @@ drop table t1; --echo # -- End of 4.1 tests --echo # ------------------------------------------------------------------ +########################################################################### + --echo --echo # -- Bug#33507: Event scheduler creates more threads than max_connections --echo # -- which results in user lockout. ---echo +--echo GRANT USAGE ON *.* TO mysqltest_u1@localhost; # NOTE: if the test case fails sporadically due to spurious connections, # consider disabling all users. --echo - let $saved_max_connections = `SELECT @@global.max_connections`; - SET GLOBAL max_connections = 3; SET GLOBAL event_scheduler = ON; --echo ---echo # -- Waiting for old connections to close... -let $wait_condition = - SELECT COUNT(*) = 1 - FROM information_schema.processlist - WHERE db = 'test'; ---source include/wait_condition.inc - ---echo +--echo # -- Waiting for Event Scheduler to start... let $wait_condition = SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE user = 'event_scheduler'; --source include/wait_condition.inc ---echo +--echo --echo # -- Disconnecting default connection... --disconnect default --echo --echo # -- Check that we allow exactly three user connections, no matter how --echo # -- many threads are running. + --echo - --echo # -- Connecting (1)... ---connect (con_1,localhost,mysqltest_u1) +let $con_name = con_1; +let $con_user_name = mysqltest_u1; +--source include/connect2.inc --echo ---echo # -- Waiting for root connection to close... -let $wait_condition = - SELECT COUNT(*) = 1 - FROM information_schema.processlist - WHERE db = 'test'; ---source include/wait_condition.inc ---echo - --echo # -- Connecting (2)... ---connect (con_2,localhost,mysqltest_u1) - ---echo # -- Connecting (3)... ---connect (con_3,localhost,mysqltest_u1) - ---echo # -- Connecting (4)... ---disable_query_log ---error ER_CON_COUNT_ERROR ---connect (con_4,localhost,mysqltest_u1) ---enable_query_log +let $con_name = con_2; +let $con_user_name = mysqltest_u1; +--source include/connect2.inc --echo ---echo # -- Waiting for the last connection to close... -let $wait_condition = - SELECT COUNT(*) = 3 - FROM information_schema.processlist - WHERE db = 'test'; ---source include/wait_condition.inc +--echo # -- Connecting (3)... +let $con_name = con_3; +let $con_user_name = mysqltest_u1; +--source include/connect2.inc + +--echo +--echo # -- Connecting (4) [should fail]... +let $con_name = con_4; +let $con_user_name = mysqltest_u1; +let $wait_timeout = 5; +--source include/connect2.inc --echo --echo # -- Check that we allow one extra SUPER-user connection. ---echo +--echo --echo # -- Connecting super (1)... ---connect (con_super_1,localhost,root) - ---echo # -- Connecting super (2)... ---disable_query_log ---error ER_CON_COUNT_ERROR ---connect (con_super_2,localhost,root) ---enable_query_log +let $con_name = con_super_1; +let $con_user_name = root; +--source include/connect2.inc --echo -# Ensure that we have Event Scheduler thread, 3 ordinary user connections and -# one extra super-user connection. +--echo # -- Connecting super (2) [should fail]... +let $con_name = con_super_2; +let $con_user_name = root; +let $wait_timeout = 5; +--source include/connect2.inc + +--echo +--echo # -- Ensure that we have Event Scheduler thread, 3 ordinary user +--echo # -- connections and one extra super-user connection. SELECT user FROM information_schema.processlist ORDER BY id; --echo --echo # -- Resetting variables... - --eval SET GLOBAL max_connections = $saved_max_connections --echo --echo # -- Stopping Event Scheduler... SET GLOBAL event_scheduler = OFF; +--echo --echo # -- Waiting for Event Scheduler to stop... let $wait_condition = SELECT COUNT(*) = 0 From 23d567aa7cb01811294a24ecda100d2a90fe8acf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 11:16:37 -0300 Subject: [PATCH 442/527] Post-merge fix for Bug 35103. sql/sql_prepare.cc: Don't send unexpected error to the client. --- sql/sql_prepare.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 207183f567c..b00606aba4a 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2602,7 +2602,7 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length) if (!(stmt=find_prepared_statement(thd, stmt_id, "mysql_stmt_send_long_data"))) - DBUG_VOID_RETURN; + goto out; param_number= uint2korr(packet); packet+= 2; From 1bb10ccfb1344ae00f3874e4a725d876e03463b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 15:56:53 +0100 Subject: [PATCH 443/527] Valgrind warnings found after bug#32943 and after merge from -main into -engines tree. hander::table_share was not updated after changing table->s. sql/ha_partition.cc: Valgrind warning after merge -main -> -engines, after bug#32943 change_table_ptr can happen in a middle of alter table rename/drop/... partition the newly created partitions must get the updated table_share too. sql/sql_base.cc: Bug#32943 was missing a call to change_table_ptr, this was found by valgrind after a merge from -main to -engines. --- sql/ha_partition.cc | 9 +++++++++ sql/sql_base.cc | 1 + 2 files changed, 10 insertions(+) diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 64bee07aa1c..ae7e2215517 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1646,6 +1646,15 @@ void ha_partition::change_table_ptr(TABLE *table_arg, TABLE_SHARE *share) { (*file_array)->change_table_ptr(table_arg, share); } while (*(++file_array)); + if (m_added_file && m_added_file[0]) + { + /* if in middle of a drop/rename etc */ + file_array= m_added_file; + do + { + (*file_array)->change_table_ptr(table_arg, share); + } while (*(++file_array)); + } } /* diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 01e0009ad0d..ba4f695dcb8 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -747,6 +747,7 @@ void close_handle_and_leave_table_as_lock(TABLE *table) table->db_stat= 0; // Mark file closed release_table_share(table->s, RELEASE_NORMAL); table->s= share; + table->file->change_table_ptr(table, table->s); DBUG_VOID_RETURN; } From 166357b552fe777bc509ffcaeafeeeb5f0e3deed Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 16:11:26 +0100 Subject: [PATCH 444/527] Bug#35305: partition_symlink test failures Updated the test due to bug 32167 Corrected spelling of error message mysql-test/r/partition_not_windows.result: Updated test result due to test case changes and corrected spelling error mysql-test/r/partition_symlink.result: Bug#35305: partition_symlink test failure Updated test result due to test case changes mysql-test/r/symlink.result: Updated test result due to test case changes and corrected spelling error mysql-test/t/disabled.def: Bug#35305: partition_symlink test failure Enable the test after it has been fixed mysql-test/t/partition_not_windows.test: Removed disable/enable_query_log for better result files mysql-test/t/partition_symlink.test: Bug#35305: partition_symlink test failure Changes due to bug 32167 mysql-test/t/symlink.test: using replace_result instead of disable_query_log sql/partition_info.cc: corrected spelling sql/sql_parse.cc: corrected spelling --- mysql-test/r/partition_not_windows.result | 40 ++++++++--- mysql-test/r/partition_symlink.result | 7 ++ mysql-test/r/symlink.result | 18 ++++- mysql-test/t/disabled.def | 1 - mysql-test/t/partition_not_windows.test | 84 ++++++++++++++++++----- mysql-test/t/partition_symlink.test | 14 ++-- mysql-test/t/symlink.test | 27 +++----- sql/partition_info.cc | 4 +- sql/sql_parse.cc | 4 +- 9 files changed, 135 insertions(+), 64 deletions(-) diff --git a/mysql-test/r/partition_not_windows.result b/mysql-test/r/partition_not_windows.result index e16cd5e8845..44afdea3855 100644 --- a/mysql-test/r/partition_not_windows.result +++ b/mysql-test/r/partition_not_windows.result @@ -3,13 +3,13 @@ partition by range (a) subpartition by hash (a) (partition p0 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart00, SUBPARTITION subpart01)); -Checking if file exists before alter +# Checking if file exists before alter ALTER TABLE t1 REORGANIZE PARTITION p0 INTO (partition p1 VALUES LESS THAN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart10, SUBPARTITION subpart11), partition p2 VALUES LESS THAN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/tmp' (SUBPARTITION subpart20, SUBPARTITION subpart21)); -Checking if file exists after alter +# Checking if file exists after alter drop table t1; set @org_mode=@@sql_mode; set @@sql_mode='NO_DIR_IN_CREATE'; @@ -36,11 +36,11 @@ set @@sql_mode=@org_mode; CREATE TABLE t1(a INT) PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY 'TEST_DIR/master-data/test'); -ERROR HY000: Incorrect arguments to DATA DIRECORY +ERROR HY000: Incorrect arguments to DATA DIRECTORY CREATE TABLE t1(a INT) PARTITION BY KEY (a) (PARTITION p0 INDEX DIRECTORY 'TEST_DIR/master-data/test'); -ERROR HY000: Incorrect arguments to INDEX DIRECORY +ERROR HY000: Incorrect arguments to INDEX DIRECTORY CREATE TABLE ts (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) ( @@ -50,7 +50,7 @@ DATA DIRECTORY = 'TEST_DIR/master-data/test', SUBPARTITION s0b DATA DIRECTORY = 'TEST_DIR/master-data/test' )); -ERROR HY000: Incorrect arguments to DATA DIRECORY +ERROR HY000: Incorrect arguments to DATA DIRECTORY CREATE TABLE ts (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) ( @@ -60,7 +60,7 @@ INDEX DIRECTORY = 'TEST_DIR/master-data/test', SUBPARTITION s0b INDEX DIRECTORY = 'TEST_DIR/master-data/test' )); -ERROR HY000: Incorrect arguments to INDEX DIRECORY +ERROR HY000: Incorrect arguments to INDEX DIRECTORY DROP TABLE IF EXISTS `example`; CREATE TABLE `example` ( `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, @@ -69,9 +69,27 @@ CREATE TABLE `example` ( PRIMARY KEY (`ID_EXAMPLE`) ) ENGINE = MYISAM PARTITION BY HASH(ID_EXAMPLE)( -PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data', -PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data', -PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data', -PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data' +PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p0Data' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p0Index', +PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p1Data' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p1Index', +PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p2Data' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p2Index', +PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/p3Data' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/p3Index' ); -ERROR HY000: Can't create/write to file '/build/5.1/data/partitiontest/p0Data/example#P#p0.MYD' (Errcode: 2) +# Checking that MyISAM .MYD and .MYI are in test db and data/idx dir +DROP TABLE example; +CREATE TABLE `example` ( +`ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, +`DESCRIPTION` varchar(30) NOT NULL, +`LEVEL` smallint(5) unsigned DEFAULT NULL, +PRIMARY KEY (`ID_EXAMPLE`) +) ENGINE = MYISAM +PARTITION BY HASH(ID_EXAMPLE)( +PARTITION p0 DATA DIRECTORY = '/not/existent/p0Data', +PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data', +PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data', +PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data' +); +Got one of the listed errors diff --git a/mysql-test/r/partition_symlink.result b/mysql-test/r/partition_symlink.result index bb81e4f34da..eb92a4f733d 100644 --- a/mysql-test/r/partition_symlink.result +++ b/mysql-test/r/partition_symlink.result @@ -81,6 +81,13 @@ Got one of the listed errors DROP DATABASE mysqltest2; USE test; DROP USER mysqltest_1@localhost; +create table t2 (i int ) +partition by range (i) +( +partition p01 values less than (1000) +data directory="MYSQLTEST_VARDIR/tmp" + index directory="MYSQLTEST_VARDIR/tmp" +); set @org_mode=@@sql_mode; set @@sql_mode='NO_DIR_IN_CREATE'; select @@sql_mode; diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result index 68cc893e507..98ccc9f6cff 100644 --- a/mysql-test/r/symlink.result +++ b/mysql-test/r/symlink.result @@ -22,6 +22,7 @@ insert into t1 (b) select b from t2; insert into t2 (b) select b from t1; insert into t1 (b) select b from t2; drop table t2; +create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp" index directory="MYSQLTEST_VARDIR/run"; insert into t9 select * from t1; check table t9; Table Op Msg_type Msg_text @@ -54,10 +55,16 @@ t9 CREATE TABLE `t9` ( `d` int(11) NOT NULL, PRIMARY KEY (`a`) ) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' +create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp"; Got one of the listed errors +create database mysqltest; +create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="/this-dir-does-not-exist"; Got one of the listed errors +create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path"; Got one of the listed errors +create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="MYSQLTEST_VARDIR/run"; Got one of the listed errors +create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="MYSQLTEST_VARDIR/tmp"; Got one of the listed errors alter table t9 rename mysqltest.t9; select count(*) from mysqltest.t9; @@ -74,6 +81,7 @@ t9 CREATE TABLE `t9` ( ) ENGINE=MyISAM AUTO_INCREMENT=16725 DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/tmp/' INDEX DIRECTORY='MYSQLTEST_VARDIR/run/' drop database mysqltest; create table t1 (a int not null) engine=myisam; +alter table t1 data directory="MYSQLTEST_VARDIR/tmp"; Warnings: Warning 0 DATA DIRECTORY option ignored show create table t1; @@ -82,6 +90,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 alter table t1 add b int; +alter table t1 data directory="MYSQLTEST_VARDIR/log"; Warnings: Warning 0 DATA DIRECTORY option ignored show create table t1; @@ -90,6 +99,7 @@ t1 CREATE TABLE `t1` ( `a` int(11) NOT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 index directory="MYSQLTEST_VARDIR/log"; Warnings: Warning 0 INDEX DIRECTORY option ignored show create table t1; @@ -102,18 +112,20 @@ drop table t1; CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/tmp' INDEX DIRECTORY='TEST_DIR/tmp'; -ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) +Got one of the listed errors CREATE TABLE t2(a INT) DATA DIRECTORY='TEST_DIR/tmp' INDEX DIRECTORY='TEST_DIR/tmp'; RENAME TABLE t2 TO t1; ERROR HY000: Can't create/write to file 'TEST_DIR/tmp/t1.MYI' (Errcode: 17) DROP TABLE t2; +create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 9 a; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/' +create temporary table t1 (a int) engine=myisam data directory="MYSQLTEST_VARDIR/log" select 99 a; show create table t1; Table Create Table t1 CREATE TEMPORARY TABLE `t1` ( @@ -140,10 +152,10 @@ DROP TABLE t1; End of 5.0 tests CREATE TABLE t1(a INT) INDEX DIRECTORY='TEST_DIR/master-data/mysql'; -ERROR HY000: Incorrect arguments to INDEX DIRECORY +ERROR HY000: Incorrect arguments to INDEX DIRECTORY CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/master-data/test'; -ERROR HY000: Incorrect arguments to DATA DIRECORY +ERROR HY000: Incorrect arguments to DATA DIRECTORY CREATE TABLE t1(a INT) DATA DIRECTORY='TEST_DIR/master-data/'; DROP TABLE t1; diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index 2d73395cd18..9e0b681528b 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -21,4 +21,3 @@ ctype_create : Bug#32965 main.ctype_create fails status : Bug#32966 main.status fails ps_ddl : Bug#12093 2007-12-14 pending WL#4165 / WL#4166 csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL columns in CSV tables -partition_symlink : Bug#35305 Make pushbuild green diff --git a/mysql-test/t/partition_not_windows.test b/mysql-test/t/partition_not_windows.test index 103fb05029e..d7108d5af98 100644 --- a/mysql-test/t/partition_not_windows.test +++ b/mysql-test/t/partition_not_windows.test @@ -11,13 +11,9 @@ # Bug 20770 Partitions: DATA DIRECTORY clause change in reorganize # doesn't remove old directory ---disable_query_log -eval SET @data_dir = 'DATA DIRECTORY = ''$MYSQLTEST_VARDIR/tmp'''; -let $data_directory = `select @data_dir`; +let $data_directory = DATA DIRECTORY = '$MYSQLTEST_VARDIR/tmp'; -eval SET @inx_dir = 'INDEX DIRECTORY = ''$MYSQLTEST_VARDIR/tmp'''; -let $inx_directory = `select @inx_dir`; ---enable_query_log +let $inx_directory = INDEX DIRECTORY = '$MYSQLTEST_VARDIR/tmp'; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create table t1 (a int) engine myisam @@ -26,7 +22,7 @@ subpartition by hash (a) (partition p0 VALUES LESS THAN (1) $data_directory $inx_directory (SUBPARTITION subpart00, SUBPARTITION subpart01)); ---echo Checking if file exists before alter +--echo # Checking if file exists before alter --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0#SP#subpart00.MYD @@ -45,7 +41,7 @@ eval ALTER TABLE t1 REORGANIZE PARTITION p0 INTO partition p2 VALUES LESS THAN (2) $data_directory $inx_directory (SUBPARTITION subpart20, SUBPARTITION subpart21)); ---echo Checking if file exists after alter +--echo # Checking if file exists after alter --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm --file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par --file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1#SP#subpart10.MYD @@ -98,18 +94,18 @@ set @@sql_mode=@org_mode; # Bug#32167: another privilege bypass with DATA/INDEX DIRECTORY # --replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 +--error ER_WRONG_ARGUMENTS eval CREATE TABLE t1(a INT) PARTITION BY KEY (a) (PARTITION p0 DATA DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); --replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 +--error ER_WRONG_ARGUMENTS eval CREATE TABLE t1(a INT) PARTITION BY KEY (a) (PARTITION p0 INDEX DIRECTORY '$MYSQLTEST_VARDIR/master-data/test'); --replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 +--error ER_WRONG_ARGUMENTS eval CREATE TABLE ts (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) ( @@ -121,7 +117,7 @@ SUBPARTITION s0b )); --replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1210 +--error ER_WRONG_ARGUMENTS eval CREATE TABLE ts (id INT, purchased DATE) PARTITION BY RANGE(YEAR(purchased)) SUBPARTITION BY HASH(TO_DAYS(purchased)) ( @@ -144,7 +140,59 @@ SUBPARTITION s0b DROP TABLE IF EXISTS `example`; --enable_warnings ---disable_abort_on_error +--mkdir $MYSQLTEST_VARDIR/p0Data +--mkdir $MYSQLTEST_VARDIR/p1Data +--mkdir $MYSQLTEST_VARDIR/p2Data +--mkdir $MYSQLTEST_VARDIR/p3Data +--mkdir $MYSQLTEST_VARDIR/p0Index +--mkdir $MYSQLTEST_VARDIR/p1Index +--mkdir $MYSQLTEST_VARDIR/p2Index +--mkdir $MYSQLTEST_VARDIR/p3Index +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE `example` ( + `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, + `DESCRIPTION` varchar(30) NOT NULL, + `LEVEL` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`ID_EXAMPLE`) +) ENGINE = MYISAM +PARTITION BY HASH(ID_EXAMPLE)( +PARTITION p0 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p0Data' +INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p0Index', +PARTITION p1 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p1Data' +INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p1Index', +PARTITION p2 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p2Data' +INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p2Index', +PARTITION p3 DATA DIRECTORY = '$MYSQLTEST_VARDIR/p3Data' +INDEX DIRECTORY = '$MYSQLTEST_VARDIR/p3Index' +); +--echo # Checking that MyISAM .MYD and .MYI are in test db and data/idx dir +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p0.MYD +--file_exists $MYSQLTEST_VARDIR/p0Data/example#P#p0.MYD +--file_exists $MYSQLTEST_VARDIR/p0Index/example#P#p0.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p1.MYD +--file_exists $MYSQLTEST_VARDIR/p1Data/example#P#p1.MYD +--file_exists $MYSQLTEST_VARDIR/p1Index/example#P#p1.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p2.MYD +--file_exists $MYSQLTEST_VARDIR/p2Data/example#P#p2.MYD +--file_exists $MYSQLTEST_VARDIR/p2Index/example#P#p2.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/example#P#p3.MYD +--file_exists $MYSQLTEST_VARDIR/p3Data/example#P#p3.MYD +--file_exists $MYSQLTEST_VARDIR/p3Index/example#P#p3.MYI +DROP TABLE example; +--rmdir $MYSQLTEST_VARDIR/p0Data +--rmdir $MYSQLTEST_VARDIR/p1Data +--rmdir $MYSQLTEST_VARDIR/p2Data +--rmdir $MYSQLTEST_VARDIR/p3Data +--rmdir $MYSQLTEST_VARDIR/p0Index +--rmdir $MYSQLTEST_VARDIR/p1Index +--rmdir $MYSQLTEST_VARDIR/p2Index +--rmdir $MYSQLTEST_VARDIR/p3Index + +--error ER_CANT_CREATE_TABLE,1 CREATE TABLE `example` ( `ID_EXAMPLE` int(10) unsigned NOT NULL AUTO_INCREMENT, `DESCRIPTION` varchar(30) NOT NULL, @@ -152,10 +200,8 @@ CREATE TABLE `example` ( PRIMARY KEY (`ID_EXAMPLE`) ) ENGINE = MYISAM PARTITION BY HASH(ID_EXAMPLE)( -PARTITION p0 DATA DIRECTORY = '/build/5.1/data/partitiontest/p0Data', -PARTITION p1 DATA DIRECTORY = '/build/5.1/data/partitiontest/p1Data', -PARTITION p2 DATA DIRECTORY = '/build/5.1/data/partitiontest/p2Data', -PARTITION p3 DATA DIRECTORY = '/build/5.1/data/partitiontest/p3Data' +PARTITION p0 DATA DIRECTORY = '/not/existent/p0Data', +PARTITION p1 DATA DIRECTORY = '/not/existent/p1Data', +PARTITION p2 DATA DIRECTORY = '/not/existent/p2Data', +PARTITION p3 DATA DIRECTORY = '/not/existent/p3Data' ); ---enable_abort_on_error - diff --git a/mysql-test/t/partition_symlink.test b/mysql-test/t/partition_symlink.test index dcb725b1cb6..e36e335c0dd 100644 --- a/mysql-test/t/partition_symlink.test +++ b/mysql-test/t/partition_symlink.test @@ -27,9 +27,6 @@ DROP DATABASE IF EXISTS mysqltest2; # directory or file that the mysqld-process can use, via DATA/INDEX DIR) # this is the security flaw that was used in bug#32091 and bug#32111 -#--exec mkdir $MYSQLTEST_VARDIR/tmp/test || true -#--exec mkdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true - -- echo # Creating two non colliding tables mysqltest2.t1 and test.t1 -- echo # test.t1 have partitions in mysqltest2-directory! -- echo # user root: @@ -125,22 +122,18 @@ connection default; DROP USER mysqltest_1@localhost; disconnect con1; -#--exec rmdir $MYSQLTEST_VARDIR/tmp/test || true -#--exec rmdir $MYSQLTEST_VARDIR/tmp/mysqltest2 || true - # # Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables # -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create table t2 (i int ) partition by range (i) ( partition p01 values less than (1000) - data directory="$MYSQLTEST_VARDIR/master-data/test/" - index directory="$MYSQLTEST_VARDIR/master-data/test/" + data directory="$MYSQLTEST_VARDIR/tmp" + index directory="$MYSQLTEST_VARDIR/tmp" ); -enable_query_log; set @org_mode=@@sql_mode; set @@sql_mode='NO_DIR_IN_CREATE'; @@ -153,6 +146,7 @@ partition by range (i) index directory='/not/existing' ); +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t2; DROP TABLE t1, t2; set @@sql_mode=@org_mode; diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test index 5802e65df1e..05d64f9104d 100644 --- a/mysql-test/t/symlink.test +++ b/mysql-test/t/symlink.test @@ -38,9 +38,8 @@ drop table t2; # We use t9 here to not crash with tables generated by the backup test # -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create table t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" index directory="$MYSQLTEST_VARDIR/run"; -enable_query_log; insert into t9 select * from t1; check table t9; @@ -66,7 +65,6 @@ drop table t1; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR SHOW CREATE TABLE t9; -disable_query_log; --error 1103,1103 create table t1 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="tmp"; @@ -81,13 +79,14 @@ create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, p create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="not-hard-path"; # Should fail becasue the file t9.MYI already exist in 'run' +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1,1,1105 eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam index directory="$MYSQLTEST_VARDIR/run"; # Should fail becasue the file t9.MYD already exist in 'tmp' +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --error 1,1 eval create table mysqltest.t9 (a int not null auto_increment, b char(16) not null, primary key (a)) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp"; -enable_query_log; # Check moving table t9 from default database to mysqltest; # In this case the symlinks should be removed. @@ -103,20 +102,17 @@ drop database mysqltest; # create table t1 (a int not null) engine=myisam; -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval alter table t1 data directory="$MYSQLTEST_VARDIR/tmp"; -enable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; alter table t1 add b int; -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval alter table t1 data directory="$MYSQLTEST_VARDIR/log"; -enable_query_log; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval alter table t1 index directory="$MYSQLTEST_VARDIR/log"; -enable_query_log; show create table t1; drop table t1; @@ -125,8 +121,9 @@ drop table t1; # --write_file $MYSQLTEST_VARDIR/tmp/t1.MYI EOF ---replace_result $MYSQLTEST_VARDIR TEST_DIR ---error 1 + +--replace_result $MYSQLTEST_VARDIR TEST_DIR $MYSQLTEST_VARDIR TEST_DIR +--error 1,1 eval CREATE TABLE t1(a INT) DATA DIRECTORY='$MYSQLTEST_VARDIR/tmp' INDEX DIRECTORY='$MYSQLTEST_VARDIR/tmp'; @@ -147,18 +144,16 @@ connect (session1,localhost,root,,); connect (session2,localhost,root,,); connection session1; -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a; -enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR show create table t1; connection session2; -disable_query_log; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a; -enable_query_log; # If running test suite with a non standard tmp dir, the "show create table" # will print "DATA_DIRECTORY=". Use replace_result to mask it out --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR diff --git a/sql/partition_info.cc b/sql/partition_info.cc index e7f4d6a62c1..8feac884c77 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1312,11 +1312,11 @@ bool check_partition_dirs(partition_info *part_info) return 0; dd_err: - my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); + my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECTORY"); return 1; id_err: - my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); + my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECTORY"); return 1; } diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index fb81718ff02..f2e0065f860 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2354,13 +2354,13 @@ mysql_execute_command(THD *thd) if (test_if_data_home_dir(lex->create_info.data_file_name)) { - my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECORY"); + my_error(ER_WRONG_ARGUMENTS,MYF(0),"DATA DIRECTORY"); res= -1; break; } if (test_if_data_home_dir(lex->create_info.index_file_name)) { - my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECORY"); + my_error(ER_WRONG_ARGUMENTS,MYF(0),"INDEX DIRECTORY"); res= -1; break; } From 7a22a8a965dbfb3e406f9c9d3ff6427c3ac18084 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 16:18:02 +0100 Subject: [PATCH 445/527] Bug#35306: partition_basic_symlink test failures Have changed the DATA/INDEX dir to not be a database dir. (and made some changes for better result files.) mysql-test/suite/parts/inc/partition_basic_symlink.inc: Bug#35306: partition_basic_symlink test failures after bug 32167 it is not allowed with DATA/INDEX DIR in any database directory. remade the inc-files to make better use of each other (less duplicate tests) mysql-test/suite/parts/inc/partition_directory.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_layout_check1.inc: changed DATA/INDEX DIR mysql-test/suite/parts/inc/partition_layout_check2.inc: added check with_directories mysql-test/suite/parts/inc/partition_methods1.inc: Removed disable/enable_query_log for better result files mysql-test/suite/parts/inc/partition_methods2.inc: Removed disable/enable_query_log for better result files Added with_directories for testing of DATA/INDEX DIR mysql-test/suite/parts/r/partition_basic_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_innodb.result: Updated test result due to test case changes mysql-test/suite/parts/r/partition_basic_symlink_myisam.result: Updated test result due to test case changes mysql-test/suite/parts/t/disabled.def: Bug#35306: parts.partition_basic_symlink test failures Enable the test again since the have been fixed mysql-test/suite/parts/t/partition_basic_innodb.test: Added check for table files. mysql-test/suite/parts/t/partition_basic_myisam.test: removing dependency of symlink (test exists now in parts.partition_basic_symlink_myisam) mysql-test/suite/parts/t/partition_basic_symlink_innodb.test: Bug#35306: partition_basic_symlink test failures Removed old test (since DATA/INDEX DIRECTORY is not supported in InnoDB) and replaced it with a simple test that altering a partitioned innodb with DATA/INDEX DIR to MyISAM, would use the DATA/INDEX DIR. --- .../parts/inc/partition_basic_symlink.inc | 159 +- .../suite/parts/inc/partition_directory.inc | 71 +- .../parts/inc/partition_layout_check1.inc | 3 +- .../parts/inc/partition_layout_check2.inc | 5 + .../suite/parts/inc/partition_methods1.inc | 164 +- .../suite/parts/inc/partition_methods2.inc | 199 +- .../parts/r/partition_basic_innodb.result | 4662 +- .../parts/r/partition_basic_myisam.result | 236 +- .../r/partition_basic_symlink_innodb.result | 37481 +--------------- .../r/partition_basic_symlink_myisam.result | 12143 ++--- mysql-test/suite/parts/t/disabled.def | 2 - .../suite/parts/t/partition_basic_innodb.test | 4 +- .../suite/parts/t/partition_basic_myisam.test | 3 - .../t/partition_basic_symlink_innodb.test | 79 + 14 files changed, 8162 insertions(+), 47049 deletions(-) diff --git a/mysql-test/suite/parts/inc/partition_basic_symlink.inc b/mysql-test/suite/parts/inc/partition_basic_symlink.inc index 22a61477388..94d48fcaf15 100644 --- a/mysql-test/suite/parts/inc/partition_basic_symlink.inc +++ b/mysql-test/suite/parts/inc/partition_basic_symlink.inc @@ -16,144 +16,29 @@ --enable_abort_on_error --echo ---echo #======================================================================== ---echo # Check partitioning methods on just created tables ---echo # The tables should be defined without/with PRIMARY KEY and ---echo # UNIQUE INDEXes. ---echo # Every test round has to check ---echo # PARTITION BY HASH/KEY/LIST/RANGE ---echo # PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... ---echo #======================================================================== ---echo #------------------------------------------------------------------------ ---echo # 1 Tables without PRIMARY KEY or UNIQUE INDEXes ---echo #------------------------------------------------------------------------ ---echo # 1.1 The partitioning function contains one column. let $unique= ; ---source suite/parts/inc/partition_methods1.inc -# - --echo # 1.1.1 with DATA DIECTORY/INDEX DIRECTORY - # - --disable_query_log - # DATA DIRECTORY - # Make directory for partition data - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true - eval SET @data_dir = 'DATA DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/data'''''; - let $data_directory = `select @data_dir`; - #INDEX DIRECTORY - # Make directory for partition index - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true - eval SET @indx_dir = 'INDEX DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/index'''''; - let $index_directory = `select @indx_dir`; +# DATA DIRECTORY +# Make directory for partition data +let $data_dir_path= $MYSQLTEST_VARDIR/mysql-test-data-dir; +--mkdir $data_dir_path +let $data_directory= DATA DIRECTORY = '$data_dir_path'; - let $with_directories= 1; - --source suite/parts/inc/partition_methods1.inc - --source suite/parts/inc/partition_directory.inc - let $with_directories= 0; - --enable_query_log - # ---echo # 1.2 The partitioning function contains two columns. -let $unique= ; ---source suite/parts/inc/partition_methods2.inc -# ---echo #------------------------------------------------------------------------ ---echo # 2 Tables with PRIMARY KEY and/or UNIQUE INDEXes ---echo # The partitioning function contains one column. ---echo #------------------------------------------------------------------------ -if ($more_pk_ui_tests) -{ - if ($do_pk_tests) - { - --echo # 2.1 PRIMARY KEY consisting of one column - let $unique= , PRIMARY KEY(f_int1); - --source suite/parts/inc/partition_methods1.inc - } - --echo # 2.2 UNIQUE INDEX consisting of one column - let $unique= , UNIQUE INDEX uidx1 (f_int1); - --source suite/parts/inc/partition_methods1.inc +#INDEX DIRECTORY +# Make directory for partition index +let $idx_dir_path= $MYSQLTEST_VARDIR/mysql-test-idx-dir; +--mkdir $idx_dir_path +let $index_directory= INDEX DIRECTORY = '$idx_dir_path'; - --echo # 2.2.1 with DATA DIECTORY/INDEX DIRECTORY - # - --disable_query_log - # DATA DIRECTORY - # Make directory for partition data - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/data || true - eval SET @data_dir = 'DATA DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/data'''''; - let $data_directory = `select @data_dir`; - - #INDEX DIRECTORY - # Make directory for partition index - --exec mkdir $MYSQLTEST_VARDIR/master-data/test/index || true - eval SET @indx_dir = 'INDEX DIRECTORY = - ''''$MYSQLTEST_VARDIR/master-data/test/index'''''; - let $index_directory = `select @indx_dir`; - - let $with_directories= TRUE; - --source suite/parts/inc/partition_methods1.inc - let $with_directories= FALSE; - --enable_query_log - # - if ($do_pk_tests) - { - --echo # 2.3 PRIMARY KEY consisting of two columns - let $unique= , PRIMARY KEY(f_int1,f_int2); - --source suite/parts/inc/partition_methods1.inc - let $unique= , PRIMARY KEY(f_int2,f_int1); - --source suite/parts/inc/partition_methods1.inc - } - # - --echo # 2.4 UNIQUE INDEX consisting of two columns - let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2); - --source suite/parts/inc/partition_methods1.inc - let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1); - --source suite/parts/inc/partition_methods1.inc - # -} ---echo # 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns -if ($do_pk_tests) -{ - let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1); - --source suite/parts/inc/partition_methods1.inc - let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2); - --source suite/parts/inc/partition_methods1.inc -} -let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1); ---source suite/parts/inc/partition_methods1.inc - ---echo #------------------------------------------------------------------------ ---echo # 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes ---echo # The partitioning function contains two columns. ---echo #------------------------------------------------------------------------ -# -if ($more_pk_ui_tests) -{ - if ($do_pk_tests) - { - --echo # 3.1 PRIMARY KEY consisting of two columns - let $unique= , PRIMARY KEY(f_int1,f_int2); - --source suite/parts/inc/partition_methods2.inc - - let $unique= , PRIMARY KEY(f_int2,f_int1); - --source suite/parts/inc/partition_methods2.inc - } - # - --echo # 3.2 UNIQUE INDEX consisting of two columns - let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2); - --source suite/parts/inc/partition_methods2.inc - let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1); - --source suite/parts/inc/partition_methods2.inc -} -# ---echo # 3.3 PRIMARY KEY and UNIQUE INDEX consisting of two columns -if ($do_pk_tests) -{ - let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1); - --source suite/parts/inc/partition_methods2.inc - let $unique= , UNIQUE INDEX uidx1 (f_int2,f_int1), PRIMARY KEY(f_int1,f_int2); - --source suite/parts/inc/partition_methods2.inc -} -let $unique= , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1); ---source suite/parts/inc/partition_methods2.inc +let $with_directories= 1; +--echo #======================================================================== +--echo # 0.5 use partition_basic with DATA/INDEX DIRECTORY +--echo #======================================================================== +--source suite/parts/inc/partition_basic.inc +--echo #======================================================================== +--echo # 5 use partition_directory with DATA/INDEX DIRECTORY +--echo #======================================================================== +--source suite/parts/inc/partition_directory.inc +--rmdir $data_dir_path +--rmdir $idx_dir_path +let $with_directories= 0; diff --git a/mysql-test/suite/parts/inc/partition_directory.inc b/mysql-test/suite/parts/inc/partition_directory.inc index 5acdf13a8f9..f63a1952594 100644 --- a/mysql-test/suite/parts/inc/partition_directory.inc +++ b/mysql-test/suite/parts/inc/partition_directory.inc @@ -29,41 +29,35 @@ let $partitioning= ; if ($with_partitioning) { let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; ---disable_query_log if ($with_directories) { -eval SET @aux = -'PARTITION BY HASH(f_int1) PARTITIONS 2 +let $partitioning= +PARTITION BY HASH(f_int1) PARTITIONS 2 (PARTITION p1 $index_directory, PARTITION p2 -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY KEY ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY KEY(f_int1) PARTITIONS 5'; -let $partitioning= `SELECT @aux`; +let $partitioning= PARTITION BY KEY(f_int1) PARTITIONS 5; if ($with_directories) { ---disable_query_log -eval SET @aux = -'PARTITION BY HASH(f_int1) PARTITIONS 5 +let $partitioning= +PARTITION BY HASH(f_int1) PARTITIONS 5 (PARTITION p1 $data_directory, PARTITION p2 @@ -73,27 +67,25 @@ $data_directory $index_directory, PARTITION p4, PARTITION p5 -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY LIST(MOD(f_int1,4)) +let $partitioning= +PARTITION BY LIST(MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) $index_directory, PARTITION part_2 VALUES IN (-2) @@ -109,25 +101,23 @@ $index_directory, PARTITION part2 VALUES IN (2) $data_directory, PARTITION part3 VALUES IN (3) -$data_directory $index_directory)'; -let $partitioning= `SELECT @aux`; +$data_directory $index_directory); } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE ---disable_query_log if ($with_partitioning) { -eval SET @aux = 'PARTITION BY RANGE(f_int1) +let $partitioning= PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0) $index_directory, PARTITION partb VALUES LESS THAN ($max_row_div4) @@ -139,26 +129,24 @@ PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), PARTITION parte VALUES LESS THAN ($max_row) $data_directory, PARTITION partf VALUES LESS THAN $MAX_VALUE -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +let $partitioning= +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) $index_directory, PARTITION partb VALUES LESS THAN ($max_row_div4) @@ -166,25 +154,23 @@ $data_directory, PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN $MAX_VALUE $data_directory -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY ---disable_query_log if ($with_partitioning) { -eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) $data_directory (SUBPARTITION subpart11, SUBPARTITION subpart12), @@ -196,26 +182,24 @@ $data_directory $index_directory (SUBPARTITION subpart31, SUBPARTITION subpart32), PARTITION part4 VALUES LESS THAN $MAX_VALUE -(SUBPARTITION subpart41, SUBPARTITION subpart42))'; -let $partitioning= `SELECT @aux`; +(SUBPARTITION subpart41, SUBPARTITION subpart42)); } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY HASH ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) (PARTITION part1 VALUES IN (0) $index_directory (SUBPARTITION sp11 @@ -239,15 +223,14 @@ eval SET @aux = $index_directory, SUBPARTITION sp42 $data_directory - $index_directory))'; -let $partitioning= `SELECT @aux`; + $index_directory)); } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; diff --git a/mysql-test/suite/parts/inc/partition_layout_check1.inc b/mysql-test/suite/parts/inc/partition_layout_check1.inc index 6fa8df25496..b953d858adb 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check1.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check1.inc @@ -38,7 +38,8 @@ if ($do_file_tests) --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true if ($with_directories) { ---exec ls $MYSQLTEST_VARDIR/tmp/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true } eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'' )'); diff --git a/mysql-test/suite/parts/inc/partition_layout_check2.inc b/mysql-test/suite/parts/inc/partition_layout_check2.inc index 05c44a73a7f..716baa7d042 100644 --- a/mysql-test/suite/parts/inc/partition_layout_check2.inc +++ b/mysql-test/suite/parts/inc/partition_layout_check2.inc @@ -32,6 +32,11 @@ if ($do_file_tests) { # List the files belonging to the table t1 --exec ls $MYSQLTEST_VARDIR/master-data/test/t1* > $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +if ($with_directories) +{ +--exec ls $MYSQLTEST_VARDIR/mysql-test-data-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +--exec ls $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1* >> $MYSQLTEST_VARDIR/master-data/test/tmp2 2>&1 || true +} eval SET @aux = CONCAT('load_file(''$MYSQLTEST_VARDIR','/master-data/test/tmp2'')'); let $file_list= `SELECT @aux`; } diff --git a/mysql-test/suite/parts/inc/partition_methods1.inc b/mysql-test/suite/parts/inc/partition_methods1.inc index 1edcdcb3743..54cf050f1ff 100644 --- a/mysql-test/suite/parts/inc/partition_methods1.inc +++ b/mysql-test/suite/parts/inc/partition_methods1.inc @@ -44,42 +44,38 @@ let $partitioning= ; if ($with_partitioning) { let $partitioning= PARTITION BY HASH(f_int1) PARTITIONS 2; ---disable_query_log if ($with_directories) { -eval SET @aux = -'PARTITION BY HASH(f_int1) PARTITIONS 2 +let $partitioning= +PARTITION BY HASH(f_int1) PARTITIONS 2 (PARTITION p1 $data_directory $index_directory, PARTITION p2 $data_directory -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY KEY ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY KEY(f_int1) PARTITIONS 5'; -let $partitioning= `SELECT @aux`; +let $partitioning= +PARTITION BY KEY(f_int1) PARTITIONS 5; if ($with_directories) { -eval SET @aux = -'PARTITION BY HASH(f_int1) PARTITIONS 5 +let $partitioning= +PARTITION BY KEY(f_int1) PARTITIONS 5 (PARTITION p1 $data_directory $index_directory, @@ -94,27 +90,37 @@ $data_directory $index_directory, PARTITION p5 $data_directory -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } } +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY LIST(MOD(f_int1,4)) +let $partitioning= +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), + PARTITION part_2 VALUES IN (-2), + PARTITION part_1 VALUES IN (-1), + PARTITION part_N VALUES IN (NULL), + PARTITION part0 VALUES IN (0), + PARTITION part1 VALUES IN (1), + PARTITION part2 VALUES IN (2), + PARTITION part3 VALUES IN (3)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) $data_directory $index_directory, PARTITION part_2 VALUES IN (-2) @@ -130,25 +136,33 @@ $data_directory $index_directory, PARTITION part2 VALUES IN (2) $data_directory $index_directory, PARTITION part3 VALUES IN (3) -$data_directory $index_directory)'; -let $partitioning= `SELECT @aux`; +$data_directory $index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE ---disable_query_log if ($with_partitioning) { -eval SET @aux = 'PARTITION BY RANGE(f_int1) +let $partitioning= PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN ($max_row_div4), +PARTITION partc VALUES LESS THAN ($max_row_div2), +PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), +PARTITION parte VALUES LESS THAN ($max_row), +PARTITION partf VALUES LESS THAN $MAX_VALUE); +if ($with_directories) +{ +let $partitioning= PARTITION BY RANGE(f_int1) (PARTITION parta VALUES LESS THAN (0) $data_directory $index_directory, @@ -166,26 +180,33 @@ $data_directory $index_directory, PARTITION partf VALUES LESS THAN $MAX_VALUE $data_directory -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +let $partitioning= +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN ($max_row_div4), +PARTITION partc VALUES LESS THAN ($max_row_div2), +PARTITION partd VALUES LESS THAN $MAX_VALUE); +if ($with_directories) +{ +let $partitioning= +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) $data_directory $index_directory, @@ -197,60 +218,81 @@ $data_directory $index_directory, PARTITION partd VALUES LESS THAN $MAX_VALUE $data_directory -$index_directory)'; -let $partitioning= `SELECT @aux`; +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY ---disable_query_log if ($with_partitioning) { -eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) (PARTITION part1 VALUES LESS THAN (0) -$data_directory -$index_directory (SUBPARTITION subpart11, SUBPARTITION subpart12), PARTITION part2 VALUES LESS THAN ($max_row_div4) -$data_directory -$index_directory (SUBPARTITION subpart21, SUBPARTITION subpart22), PARTITION part3 VALUES LESS THAN ($max_row_div2) -$data_directory -$index_directory (SUBPARTITION subpart31, SUBPARTITION subpart32), PARTITION part4 VALUES LESS THAN $MAX_VALUE -$data_directory -$index_directory -(SUBPARTITION subpart41, SUBPARTITION subpart42))'; -let $partitioning= `SELECT @aux`; +(SUBPARTITION subpart41, SUBPARTITION subpart42)); +if ($with_directories) +{ +let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11 $data_directory $index_directory, + SUBPARTITION subpart12 $data_directory $index_directory), +PARTITION part2 VALUES LESS THAN ($max_row_div4) +(SUBPARTITION subpart21 $data_directory $index_directory, + SUBPARTITION subpart22 $data_directory $index_directory), +PARTITION part3 VALUES LESS THAN ($max_row_div2) +(SUBPARTITION subpart31 $data_directory $index_directory, + SUBPARTITION subpart32 $data_directory $index_directory), +PARTITION part4 VALUES LESS THAN $MAX_VALUE +(SUBPARTITION subpart41 $data_directory $index_directory, + SUBPARTITION subpart42 $data_directory $index_directory)); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY HASH ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) + (SUBPARTITION sp11, + SUBPARTITION sp12), + PARTITION part2 VALUES IN (1) + (SUBPARTITION sp21, + SUBPARTITION sp22), + PARTITION part3 VALUES IN (2) + (SUBPARTITION sp31, + SUBPARTITION sp32), + PARTITION part4 VALUES IN (NULL) + (SUBPARTITION sp41, + SUBPARTITION sp42)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) (PARTITION part1 VALUES IN (0) $data_directory $index_directory @@ -282,26 +324,33 @@ eval SET @aux = $index_directory, SUBPARTITION sp42 $data_directory - $index_directory))'; -let $partitioning= `SELECT @aux`; + $index_directory)); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc #----------- PARTITION BY LIST -- SUBPARTITION BY KEY ---disable_query_log if ($with_partitioning) { -eval SET @aux = -'PARTITION BY LIST(ABS(MOD(f_int1,2))) +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no +(PARTITION part1 VALUES IN (0), + PARTITION part2 VALUES IN (1), + PARTITION part3 VALUES IN (NULL)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no (PARTITION part1 VALUES IN (0) $data_directory @@ -311,17 +360,16 @@ SUBPARTITION BY KEY(f_int1) SUBPARTITIONS $sub_part_no $index_directory, PARTITION part3 VALUES IN (NULL) $data_directory - $index_directory)'; -let $partitioning= `SELECT @aux`; + $index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique ) $partitioning; ---enable_query_log eval $insert_all; --source suite/parts/inc/partition_check.inc DROP TABLE t1; --source suite/parts/inc/partition_check_drop.inc -let $with_directories= FALSE; diff --git a/mysql-test/suite/parts/inc/partition_methods2.inc b/mysql-test/suite/parts/inc/partition_methods2.inc index 91821d620b6..8af6a2cbf42 100644 --- a/mysql-test/suite/parts/inc/partition_methods2.inc +++ b/mysql-test/suite/parts/inc/partition_methods2.inc @@ -43,7 +43,19 @@ let $partitioning= ; if ($with_partitioning) { let $partitioning= PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; +if ($with_directories) +{ +let $partitioning= +PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2 +(PARTITION p1 +$data_directory +$index_directory, +PARTITION p2 +$data_directory +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -57,7 +69,28 @@ DROP TABLE t1; if ($with_partitioning) { let $partitioning= PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; +if ($with_directories) +{ +let $partitioning= +PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5 +(PARTITION p1 +$data_directory +$index_directory, +PARTITION p2 +$data_directory +$index_directory, +PARTITION p3 +$data_directory +$index_directory, +PARTITION p4 +$data_directory +$index_directory, +PARTITION p5 +$data_directory +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -79,7 +112,29 @@ let $partitioning= PARTITION BY LIST(MOD(f_int1 + f_int2,4)) PARTITION part1 VALUES IN (1), PARTITION part2 VALUES IN (2), PARTITION part3 VALUES IN (3)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(MOD(f_int1 + f_int2,4)) +(PARTITION part_3 VALUES IN (-3) +$data_directory $index_directory, + PARTITION part_2 VALUES IN (-2) +$data_directory $index_directory, + PARTITION part_1 VALUES IN (-1) +$data_directory $index_directory, + PARTITION part_N VALUES IN (NULL) +$data_directory $index_directory, + PARTITION part0 VALUES IN (0) +$data_directory $index_directory, + PARTITION part1 VALUES IN (1) +$data_directory $index_directory, + PARTITION part2 VALUES IN (2) +$data_directory $index_directory, + PARTITION part3 VALUES IN (3) +$data_directory $index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -92,17 +147,37 @@ DROP TABLE t1; #----------- PARTITION BY RANGE if ($with_partitioning) { ---disable_query_log -eval SET @aux = 'PARTITION BY RANGE((f_int1 + f_int2) DIV 2) +let $partitioning= PARTITION BY RANGE((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4), PARTITION parte VALUES LESS THAN ($max_row), -PARTITION partf VALUES LESS THAN $MAX_VALUE)'; -let $partitioning= `SELECT @aux`; ---enable_query_log +PARTITION partf VALUES LESS THAN $MAX_VALUE); +if ($with_directories) +{ +let $partitioning= PARTITION BY RANGE((f_int1 + f_int2) DIV 2) +(PARTITION parta VALUES LESS THAN (0) +$data_directory +$index_directory, +PARTITION partb VALUES LESS THAN ($max_row_div4) +$data_directory +$index_directory, +PARTITION partc VALUES LESS THAN ($max_row_div2) +$data_directory +$index_directory, +PARTITION partd VALUES LESS THAN ($max_row_div2 + $max_row_div4) +$data_directory +$index_directory, +PARTITION parte VALUES LESS THAN ($max_row) +$data_directory +$index_directory, +PARTITION partf VALUES LESS THAN $MAX_VALUE +$data_directory +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -115,16 +190,31 @@ DROP TABLE t1; #----------- PARTITION BY RANGE -- SUBPARTITION BY HASH if ($with_partitioning) { ---disable_query_log -eval SET @aux = -'PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 +let $partitioning= +PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0), PARTITION partb VALUES LESS THAN ($max_row_div4), PARTITION partc VALUES LESS THAN ($max_row_div2), -PARTITION partd VALUES LESS THAN $MAX_VALUE)'; -let $partitioning= `SELECT @aux`; ---enable_query_log +PARTITION partd VALUES LESS THAN $MAX_VALUE); +if ($with_directories) +{ +let $partitioning= +PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0) +$data_directory +$index_directory, +PARTITION partb VALUES LESS THAN ($max_row_div4) +$data_directory +$index_directory, +PARTITION partc VALUES LESS THAN ($max_row_div2) +$data_directory +$index_directory, +PARTITION partd VALUES LESS THAN $MAX_VALUE +$data_directory +$index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -137,8 +227,7 @@ DROP TABLE t1; #----------- PARTITION BY RANGE -- SUBPARTITION BY KEY if ($with_partitioning) { ---disable_query_log -eval SET @aux = 'PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) +let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11, SUBPARTITION subpart12), PARTITION part2 VALUES LESS THAN ($max_row_div4) @@ -146,10 +235,25 @@ PARTITION part2 VALUES LESS THAN ($max_row_div4) PARTITION part3 VALUES LESS THAN ($max_row_div2) (SUBPARTITION subpart31, SUBPARTITION subpart32), PARTITION part4 VALUES LESS THAN $MAX_VALUE -(SUBPARTITION subpart41, SUBPARTITION subpart42))'; -let $partitioning= `SELECT @aux`; ---enable_query_log +(SUBPARTITION subpart41, SUBPARTITION subpart42)); +if ($with_directories) +{ +let $partitioning= PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11 $data_directory $index_directory, + SUBPARTITION subpart12 $data_directory $index_directory), +PARTITION part2 VALUES LESS THAN ($max_row_div4) +(SUBPARTITION subpart21 $data_directory $index_directory, + SUBPARTITION subpart22 $data_directory $index_directory), +PARTITION part3 VALUES LESS THAN ($max_row_div2) +(SUBPARTITION subpart31 $data_directory $index_directory, + SUBPARTITION subpart32 $data_directory $index_directory), +PARTITION part4 VALUES LESS THAN $MAX_VALUE +(SUBPARTITION subpart41 $data_directory $index_directory, + SUBPARTITION subpart42 $data_directory $index_directory)); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -171,7 +275,45 @@ let $partitioning= PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_ (SUBPARTITION sp31, SUBPARTITION sp32), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41, SUBPARTITION sp42)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) +(PARTITION part1 VALUES IN (0) + $data_directory + $index_directory + (SUBPARTITION sp11 + $data_directory + $index_directory, + SUBPARTITION sp12 + $data_directory + $index_directory), + PARTITION part2 VALUES IN (1) + $data_directory + $index_directory + (SUBPARTITION sp21 + $data_directory + $index_directory, + SUBPARTITION sp22 + $data_directory + $index_directory), + PARTITION part3 VALUES IN (2) + $data_directory + $index_directory + (SUBPARTITION sp31, + SUBPARTITION sp32), + PARTITION part4 VALUES IN (NULL) + $data_directory + $index_directory + (SUBPARTITION sp41 + $data_directory + $index_directory, + SUBPARTITION sp42 + $data_directory + $index_directory)); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique @@ -184,16 +326,29 @@ DROP TABLE t1; #----------- PARTITION BY LIST -- SUBPARTITION BY KEY if ($with_partitioning) { ---disable_query_log -eval SET @aux = -'PARTITION BY LIST(ABS(MOD(f_int1,2))) +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no (PARTITION part1 VALUES IN (0), PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL))'; -let $partitioning= `SELECT @aux`; ---enable_query_log + PARTITION part3 VALUES IN (NULL)); +if ($with_directories) +{ +let $partitioning= +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int2) SUBPARTITIONS $sub_part_no +(PARTITION part1 VALUES IN (0) + $data_directory + $index_directory, + PARTITION part2 VALUES IN (1) + $data_directory + $index_directory, + PARTITION part3 VALUES IN (NULL) + $data_directory + $index_directory); } +} +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR eval CREATE TABLE t1 ( $column_list $unique diff --git a/mysql-test/suite/parts/r/partition_basic_innodb.result b/mysql-test/suite/parts/r/partition_basic_innodb.result index 504126e3102..7f5e7df6061 100644 --- a/mysql-test/suite/parts/r/partition_basic_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_innodb.result @@ -51,6 +51,15 @@ SET @@session.sql_mode= ''; #------------------------------------------------------------------------ # 1.1 The partitioning function contains one column. 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(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) @@ -65,6 +74,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -490,12 +503,15 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +CREATE TABLE t1 ( +f_int1 INTEGER, +f_int2 INTEGER, +f_char1 CHAR(20), +f_char2 CHAR(20), +f_charbig VARCHAR(1000) + +) +PARTITION BY KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -510,6 +526,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -935,12 +955,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -955,6 +986,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -1380,12 +1415,21 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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 parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -1400,6 +1444,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -1823,12 +1871,19 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -1843,6 +1898,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -2268,12 +2327,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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 KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -2288,6 +2358,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -2711,12 +2785,27 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +CREATE TABLE t1 ( +f_int1 INTEGER, +f_int2 INTEGER, +f_char1 CHAR(20), +f_char2 CHAR(20), +f_charbig VARCHAR(1000) + +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -2731,450 +2820,9 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -3601,12 +3249,462 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: +CREATE TABLE t1 ( +f_int1 INTEGER, +f_int2 INTEGER, +f_char1 CHAR(20), +f_char2 CHAR(20), +f_charbig VARCHAR(1000) + +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ + unified filelist ---- not determined --- +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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 able 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 The partitioning function contains two columns. DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( @@ -3632,6 +3730,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -4080,6 +4182,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -4536,6 +4642,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -4990,6 +5100,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -5440,6 +5554,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -5894,6 +6012,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -6348,6 +6470,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -6784,8 +6910,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -6800,6 +6926,10 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -7231,6 +7361,15 @@ DROP TABLE t1; #------------------------------------------------------------------------ # 2.5 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) +) +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) @@ -7247,6 +7386,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -7707,12 +7850,15 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -7729,6 +7875,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -8189,12 +8339,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -8211,6 +8372,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -8671,12 +8836,21 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -8693,6 +8867,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -9151,12 +9329,19 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -9173,6 +9358,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -9633,12 +9822,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -9655,6 +9855,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -10113,12 +10317,27 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -10135,487 +10354,9 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11077,13 +10818,509 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ + unified filelist ---- not determined --- +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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 able 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) +) +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) @@ -11100,6 +11337,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -11560,12 +11801,15 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -11582,6 +11826,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -12042,12 +12290,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -12064,6 +12323,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -12524,12 +12787,21 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -12546,6 +12818,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -13004,12 +13280,19 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -13026,6 +13309,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -13486,12 +13773,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -13508,6 +13806,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -13966,12 +14268,27 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -13988,487 +14305,9 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14930,13 +14769,509 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ + unified filelist ---- not determined --- +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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 able 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) +) +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) @@ -14953,6 +15288,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -15429,12 +15768,15 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -15451,6 +15793,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -15927,12 +16273,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -15949,6 +16306,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -16425,12 +16786,21 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -16447,6 +16817,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -16921,12 +17295,19 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -16943,6 +17324,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -17419,12 +17804,23 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -17441,6 +17837,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -17915,12 +18315,27 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -17937,503 +18352,9 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18911,12 +18832,515 @@ TRUNCATE t1; # check layout success: 1 # End usability test (inc/partition_check.inc) DROP TABLE t1; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: +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) +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +# Start usability test (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`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ + unified filelist ---- not determined --- +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + +# 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 able 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 Tables with PRIMARY KEY and/or UNIQUE INDEXes # The partitioning function contains two columns. @@ -18948,6 +19372,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -19433,6 +19861,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -19926,6 +20358,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -20417,6 +20853,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -20904,6 +21344,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -21395,6 +21839,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -21886,6 +22334,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -22357,8 +22809,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -22375,6 +22827,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int1`,`f_int2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -22861,6 +23317,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -23346,6 +23806,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -23839,6 +24303,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -24330,6 +24798,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -24817,6 +25289,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -25308,6 +25784,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -25799,6 +26279,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -26270,8 +26754,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -26288,6 +26772,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx1` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -26774,6 +27262,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -27275,6 +27767,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -27784,6 +28280,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -28291,6 +28791,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -28794,6 +29298,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -29301,6 +29809,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -29808,6 +30320,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 @@ -30295,8 +30811,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -30313,6 +30829,10 @@ t1 CREATE TABLE `t1` ( UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par + # check prerequisites-1 success: 1 # check COUNT(*) success: 1 # check MIN/MAX(f_int1) success: 1 diff --git a/mysql-test/suite/parts/r/partition_basic_myisam.result b/mysql-test/suite/parts/r/partition_basic_myisam.result index 8239c633e1e..4d1f160eace 100644 --- a/mysql-test/suite/parts/r/partition_basic_myisam.result +++ b/mysql-test/suite/parts/r/partition_basic_myisam.result @@ -51,6 +51,15 @@ SET @@session.sql_mode= ''; #------------------------------------------------------------------------ # 1.1 The partitioning function contains one column. 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(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) @@ -500,6 +509,15 @@ TRUNCATE t1; # 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 KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -955,6 +973,23 @@ TRUNCATE t1; # 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 LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -1416,6 +1451,21 @@ TRUNCATE t1; # 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) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -1871,6 +1921,19 @@ TRUNCATE t1; # 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 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -2332,6 +2395,23 @@ TRUNCATE t1; # 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 KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -2791,6 +2871,27 @@ TRUNCATE t1; # 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 LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -3252,6 +3353,19 @@ TRUNCATE t1; # 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 LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -7024,8 +7138,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -7495,6 +7609,15 @@ DROP TABLE t1; #------------------------------------------------------------------------ # 2.5 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), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +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) @@ -7997,6 +8120,15 @@ TRUNCATE t1; # 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) +) +PARTITION BY KEY(f_int1) PARTITIONS 5; INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -8505,6 +8637,23 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3), +PARTITION part_2 VALUES IN (-2), +PARTITION part_1 VALUES IN (-1), +PARTITION part_N VALUES IN (NULL), +PARTITION part0 VALUES IN (0), +PARTITION part1 VALUES IN (1), +PARTITION part2 VALUES IN (2), +PARTITION part3 VALUES IN (3)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -9019,6 +9168,21 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20), +PARTITION partf VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -9527,6 +9691,19 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0), +PARTITION partb VALUES LESS THAN (5), +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -10041,6 +10218,23 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -10553,6 +10747,27 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +(SUBPARTITION sp11, +SUBPARTITION sp12), +PARTITION part2 VALUES IN (1) +(SUBPARTITION sp21, +SUBPARTITION sp22), +PARTITION part3 VALUES IN (2) +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41, +SUBPARTITION sp42)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -11067,6 +11282,19 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0), +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) @@ -15267,8 +15495,8 @@ f_charbig VARCHAR(1000) PARTITION BY LIST(ABS(MOD(f_int1,2))) SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +PARTITION part2 VALUES IN (1), +PARTITION part3 VALUES IN (NULL)); INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; # Start usability test (inc/partition_check.inc) diff --git a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result index 03c6e1915bf..2fa1c25d0de 100644 --- a/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result +++ b/mysql-test/suite/parts/r/partition_basic_symlink_innodb.result @@ -1,37465 +1,32 @@ -SET @max_row = 20; -SET @@session.storage_engine = 'InnoDB'; - -#------------------------------------------------------------------------ -# 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 -#----------------------------------------------- - -#======================================================================== -# Check partitioning methods on just created tables -# The tables should be defined without/with PRIMARY KEY and -# UNIQUE INDEXes. -# Every test round has to check -# PARTITION BY HASH/KEY/LIST/RANGE -# PARTITION BY RANGE/LIST ... SUBPARTITION BY HASH/KEY ... -#======================================================================== -#------------------------------------------------------------------------ -# 1 Tables without PRIMARY KEY or UNIQUE INDEXes -#------------------------------------------------------------------------ -# 1.1 The partitioning function contains one column. +# Will not run partition_basic_symlink on InnoDB, since it is the same +# as partition_basic, since InnoDB does not support DATA/INDEX DIR +# Will only verify that the DATA/INDEX DIR is stored and used if +# ALTER to MyISAM. DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command +CREATE TABLE t1 (c1 INT) +ENGINE = InnoDB +PARTITION BY HASH (c1) +(PARTITION p0 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' + INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +); +# Verifying .frm and .par files +# Verifying that there are no MyISAM files +FLUSH TABLES; 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=InnoDB 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -# 1.1.1 with DATA DIECTORY/INDEX DIRECTORY -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -# 1.2 The partitioning function contains 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) - -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) 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 able 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 KEY(f_int1,f_int2) PARTITIONS 5; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ - -# 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 able 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 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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ - -# 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 able 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 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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 able 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_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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 able 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 KEY(f_int2) -(PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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 able 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 LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) -(PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), -PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), -PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), -PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ - -# 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 able 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 LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ - -# 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 able 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 Tables with PRIMARY KEY and/or UNIQUE INDEXes -# The partitioning function contains one column. -#------------------------------------------------------------------------ -# 2.5 PRIMARY KEY + UNIQUE INDEX consisting of two columns -DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB 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); -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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##'; -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#'; -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB 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); -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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##'; -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#'; -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB 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); -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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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##'; -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#'; -INSERT INTO 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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##'; -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#'; -INSERT INTO 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB)) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = InnoDB) */ - -# 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 able 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; -# Attention: There are unused files. -# Either the DROP TABLE or a preceding ALTER TABLE -# worked incomplete. -# We found: -unified filelist ---- not determined --- -#------------------------------------------------------------------------ -# 3 Tables with PRIMARY KEY and/or UNIQUE INDEXes -# The partitioning function contains two columns. -#------------------------------------------------------------------------ -# 3.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) -, UNIQUE INDEX uidx1 (f_int1,f_int2), PRIMARY KEY(f_int2,f_int1) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) 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); -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 able 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) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ - -# 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 able 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) -) -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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ - -# 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 able 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) -) -PARTITION BY RANGE((f_int1 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) -(PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) -(PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), -PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), -PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), -PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ - -# 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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ - -# 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 able 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) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) 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); -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 able 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) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ - -# 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 able 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) -) -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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ - -# 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 able 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) -) -PARTITION BY RANGE((f_int1 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) -(PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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##'; -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#'; -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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) -(PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), -PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), -PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), -PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ - -# 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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ - -# 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 able 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) -) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) 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); -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 able 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) -) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ - -# 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 able 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) -) -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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = InnoDB, PARTITION part_2 VALUES IN (-2) ENGINE = InnoDB, PARTITION part_1 VALUES IN (-1) ENGINE = InnoDB, PARTITION part_N VALUES IN (NULL) ENGINE = InnoDB, PARTITION part0 VALUES IN (0) ENGINE = InnoDB, PARTITION part1 VALUES IN (1) ENGINE = InnoDB, PARTITION part2 VALUES IN (2) ENGINE = InnoDB, PARTITION part3 VALUES IN (3) ENGINE = InnoDB) */ - -# 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 able 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) -) -PARTITION BY RANGE((f_int1 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (15) ENGINE = InnoDB, PARTITION parte VALUES LESS THAN (20) ENGINE = InnoDB, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -INSERT INTO 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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = InnoDB, PARTITION partb VALUES LESS THAN (5) ENGINE = InnoDB, PARTITION partc VALUES LESS THAN (10) ENGINE = InnoDB, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = InnoDB) */ - -# 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##'; -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#'; -INSERT INTO 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 able 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) -) -PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) -(PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), -PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), -PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), -PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = InnoDB, SUBPARTITION subpart12 ENGINE = InnoDB), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = InnoDB, SUBPARTITION subpart22 ENGINE = InnoDB), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = InnoDB, SUBPARTITION subpart32 ENGINE = InnoDB), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = InnoDB, SUBPARTITION subpart42 ENGINE = InnoDB)) */ - -# 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##'; -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#'; -INSERT INTO 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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) -(PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), -PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), -PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), -PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = InnoDB, SUBPARTITION sp12 ENGINE = InnoDB), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = InnoDB, SUBPARTITION sp22 ENGINE = InnoDB), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = InnoDB, SUBPARTITION sp32 ENGINE = InnoDB), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = InnoDB, SUBPARTITION sp42 ENGINE = InnoDB)) */ - -# 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 able 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) -) -PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (inc/partition_check.inc) -create_command + `c1` int(11) DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) (PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB, PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = InnoDB) */ +ALTER TABLE t1 ENGINE = MyISAM; +# Verifying .frm, .par and MyISAM files (.MYD, MYI) +FLUSH TABLES; 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`), - UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = InnoDB, PARTITION part2 VALUES IN (1) ENGINE = InnoDB, PARTITION part3 VALUES IN (NULL) ENGINE = InnoDB) */ - -# 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 able 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) + `c1` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (c1) (PARTITION p0 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ 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_basic_symlink_myisam.result b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result index 52c3b92912e..65ca09846b6 100644 --- a/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result +++ b/mysql-test/suite/parts/r/partition_basic_symlink_myisam.result @@ -38,6 +38,10 @@ SET @@session.sql_mode= ''; # End of basic preparations needed for all tests #----------------------------------------------- +#======================================================================== +# 0.5 use partition_basic with DATA/INDEX DIRECTORY +#======================================================================== + #======================================================================== # Check partitioning methods on just created tables # The tables should be defined without/with PRIMARY KEY and @@ -51,6 +55,21 @@ SET @@session.sql_mode= ''; #------------------------------------------------------------------------ # 1.1 The partitioning function contains one column. 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(f_int1) PARTITIONS 2 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -63,3672 +82,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) ENGINE = MyISAM, PARTITION part0 VALUES IN (0) ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) ENGINE = MyISAM, PARTITION part3 VALUES IN (3) ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = MyISAM, SUBPARTITION sp12 ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = MyISAM, SUBPARTITION sp22 ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = MyISAM, SUBPARTITION sp32 ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = MyISAM, SUBPARTITION sp42 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = MyISAM, PARTITION part2 VALUES IN (1) ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -# 1.1.1 with DATA DIECTORY/INDEX DIRECTORY -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -3737,10 +91,10 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4158,35 +512,41 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI -# check layout success: 0 +# 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 KEY(f_int1) PARTITIONS 5 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p3 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p4 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p5 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -4199,7 +559,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD @@ -4214,16 +574,16 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p4.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p5.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p4.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p5.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -4641,35 +1001,42 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#p1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p4.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#p5.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#p1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p4.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#p5.MYI -# check layout success: 0 +# 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 LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_2 VALUES IN (-2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_1 VALUES IN (-1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_N VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part0 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part1 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -4682,7 +1049,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -4703,22 +1070,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_N.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5136,35 +1503,44 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_3.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part_N.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_3.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part_N.MYI -# check layout success: 0 +# 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) +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (10 + 5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION parte VALUES LESS THAN (20) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partf VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -5177,7 +1553,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -5194,18 +1570,18 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parte.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partf.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parte.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partf.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -5621,35 +1997,38 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parte.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partf.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parte.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partf.MYI -# check layout success: 0 +# 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 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -5662,7 +2041,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -5683,22 +2062,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp1.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6116,35 +2495,38 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#parta#SP#partasp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partb#SP#partbsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partc#SP#partcsp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#partd#SP#partdsp1.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#parta#SP#partasp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partb#SP#partbsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partc#SP#partcsp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#partd#SP#partdsp1.MYI -# check layout success: 0 +# 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 KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -6157,7 +2539,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -6178,22 +2560,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -6609,35 +2991,58 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#subpart12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#subpart22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#subpart32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#subpart42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#subpart12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#subpart22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#subpart32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#subpart42.MYI -# check layout success: 0 +# 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 LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp11 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp12 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp21 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp22 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part3 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp41 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp42 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -6650,7 +3055,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -6671,22 +3076,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -7104,35 +3509,36 @@ 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI -# check layout success: 0 +# 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI -# check layout success: 0 +# check layout success: 1 TRUNCATE t1; # check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp11.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#sp12.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp21.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#sp22.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp31.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#sp32.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp41.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part4#SP#sp42.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp11.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#sp12.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp21.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#sp22.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp31.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#sp32.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp41.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part4#SP#sp42.MYI -# check layout success: 0 +# 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 LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -7145,7 +3551,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -7168,3244 +3574,24 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD -$MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI -$MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI - -# check 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 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI -# check layout success: 0 -REPAIR TABLE t1 EXTENDED; -Table Op Msg_type Msg_text -test.t1 repair note The storage engine for the table doesn't support repair -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI -# check layout success: 0 -TRUNCATE t1; - -# check TRUNCATE success: 1 -state new -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par -state old -Table definition SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `f_int1` int(11) DEFAULT NULL, `f_int2` int(11) DEFAULT NULL, `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ -File list MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI MYSQLTEST_VARDIR/master-data/test/t1.frm MYSQLTEST_VARDIR/master-data/test/t1.par MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part1#SP#part1sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part2#SP#part2sp2.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp0.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp1.MYD MYSQLTEST_VARDIR/master-data/test/data/t1#P#part3#SP#part3sp2.MYD MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part1#SP#part1sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part2#SP#part2sp2.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp0.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp1.MYI MYSQLTEST_VARDIR/master-data/test/index/t1#P#part3#SP#part3sp2.MYI -# check layout success: 0 -# End usability test (inc/partition_check.inc) -DROP TABLE t1; -DROP TABLE IF EXISTS t1; -INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) -SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; -# Start usability test (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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par - -# 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; -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; -INSERT INTO t1(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=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ - -unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI -$MYSQLTEST_VARDIR/master-data/test/t1.frm -$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -10844,7 +4030,13 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; +PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -10857,15 +4049,19 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11302,7 +4498,22 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) ) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; +PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p3 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p4 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p5 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -11315,11 +4526,9 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD @@ -11328,8 +4537,20 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p4.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p5.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p4.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p5.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -11767,14 +4988,22 @@ f_charbig VARCHAR(1000) ) 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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); +(PARTITION part_3 VALUES IN (-3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_2 VALUES IN (-2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_1 VALUES IN (-1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_N VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part0 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part1 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -11787,7 +5016,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) ENGINE = MyISAM, PARTITION part0 VALUES IN (0) ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) ENGINE = MyISAM, PARTITION part3 VALUES IN (3) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -11808,6 +5037,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_N.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12245,12 +5490,24 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE((f_int1 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (10 + 5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION parte VALUES LESS THAN (20) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partf VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -12263,7 +5520,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -12280,6 +5537,18 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parte.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partf.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parte.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partf.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -12715,10 +5984,18 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -12731,7 +6008,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -12752,6 +6029,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp1.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13188,13 +6481,17 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) (PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), +(SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), +(SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), +(SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); +(SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -13207,7 +6504,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -13228,6 +6525,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -13664,13 +6977,37 @@ f_charbig VARCHAR(1000) ) PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) (PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp11 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp12 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp21 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp22 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp31, +SUBPARTITION sp32), PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp41 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp42 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -13683,7 +7020,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = MyISAM, SUBPARTITION sp12 ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = MyISAM, SUBPARTITION sp22 ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = MyISAM, SUBPARTITION sp32 ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = MyISAM, SUBPARTITION sp42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -13704,6 +7041,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14141,10 +7494,16 @@ f_charbig VARCHAR(1000) ) PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -14157,7 +7516,7 @@ t1 CREATE TABLE `t1` ( `f_char1` char(20) DEFAULT NULL, `f_char2` char(20) DEFAULT NULL, `f_charbig` varchar(1000) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = MyISAM, PARTITION part2 VALUES IN (1) ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -14180,6 +7539,24 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -14614,6 +7991,21 @@ DROP TABLE t1; #------------------------------------------------------------------------ # 2.5 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), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY HASH(f_int1) PARTITIONS 2 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -14628,15 +8020,19 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) PARTITIONS 2 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15116,6 +8512,30 @@ TRUNCATE t1; # 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) +) +PARTITION BY KEY(f_int1) PARTITIONS 5 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p3 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p4 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p5 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -15130,11 +8550,9 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) PARTITIONS 5 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD @@ -15143,8 +8561,20 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p4.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p5.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p4.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p5.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -15624,6 +9054,31 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_2 VALUES IN (-2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_1 VALUES IN (-1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_N VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part0 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part1 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -15638,7 +9093,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -15659,6 +9114,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_N.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16138,6 +9609,33 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (10 + 5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION parte VALUES LESS THAN (20) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partf VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -16152,7 +9650,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -16169,6 +9667,18 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parte.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partf.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parte.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partf.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -16646,6 +10156,27 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -16660,7 +10191,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -16681,6 +10212,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp1.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17160,6 +10707,27 @@ TRUNCATE t1; # 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) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +(SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part2 VALUES LESS THAN (5) +(SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part3 VALUES LESS THAN (10) +(SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -17174,7 +10742,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -17195,6 +10763,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -17672,6 +11256,47 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp11 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp12 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp21 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp22 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part3 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp41 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp42 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -17686,7 +11311,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -17707,6 +11332,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18186,6 +11827,25 @@ TRUNCATE t1; # 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) +) +PARTITION BY LIST(ABS(MOD(f_int1,2))) +SUBPARTITION BY KEY(f_int1) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -18200,7 +11860,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/data' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/master-data/test/index' ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int1) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -18223,6 +11883,24 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -18716,7 +12394,13 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) -PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2; +PARTITION BY HASH(f_int1 + f_int2) PARTITIONS 2 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -18731,15 +12415,19 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) PARTITIONS 2 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1 + f_int2) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19227,7 +12915,22 @@ f_char2 CHAR(20), f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) -PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5; +PARTITION BY KEY(f_int1,f_int2) PARTITIONS 5 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p3 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p4 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p5 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -19242,11 +12945,9 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) PARTITIONS 5 */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY KEY (f_int1,f_int2) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p4 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p5 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD -$MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD @@ -19255,8 +12956,20 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p4.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p5.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p4.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p5.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -19745,14 +13458,22 @@ f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) 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 part_N VALUES IN (NULL), -PARTITION part0 VALUES IN (0), -PARTITION part1 VALUES IN (1), -PARTITION part2 VALUES IN (2), -PARTITION part3 VALUES IN (3)); +(PARTITION part_3 VALUES IN (-3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_2 VALUES IN (-2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_1 VALUES IN (-1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_N VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part0 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part1 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -19767,7 +13488,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) ENGINE = MyISAM, PARTITION part0 VALUES IN (0) ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) ENGINE = MyISAM, PARTITION part3 VALUES IN (3) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1 + f_int2,4)) (PARTITION part_3 VALUES IN (-3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD @@ -19788,6 +13509,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_N.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20276,12 +14013,24 @@ f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) PARTITION BY RANGE((f_int1 + f_int2) DIV 2) -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (10 + 5), -PARTITION parte VALUES LESS THAN (20), -PARTITION partf VALUES LESS THAN (2147483646)); +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (10 + 5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION parte VALUES LESS THAN (20) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partf VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -20296,7 +14045,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE ((f_int1 + f_int2) DIV 2) (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD @@ -20313,6 +14062,18 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parte.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partf.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parte.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partf.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -20799,10 +14560,18 @@ f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY HASH(f_int2) SUBPARTITIONS 2 -(PARTITION parta VALUES LESS THAN (0), -PARTITION partb VALUES LESS THAN (5), -PARTITION partc VALUES LESS THAN (10), -PARTITION partd VALUES LESS THAN (2147483646)); +(PARTITION parta VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -20817,7 +14586,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY HASH (f_int2) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD @@ -20838,6 +14607,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp1.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21325,13 +15110,17 @@ f_charbig VARCHAR(1000) ) PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int2) (PARTITION part1 VALUES LESS THAN (0) -(SUBPARTITION subpart11, SUBPARTITION subpart12), +(SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part2 VALUES LESS THAN (5) -(SUBPARTITION subpart21, SUBPARTITION subpart22), +(SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part3 VALUES LESS THAN (10) -(SUBPARTITION subpart31, SUBPARTITION subpart32), +(SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part4 VALUES LESS THAN (2147483646) -(SUBPARTITION subpart41, SUBPARTITION subpart42)); +(SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -21346,7 +15135,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 ENGINE = MyISAM, SUBPARTITION subpart12 ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 ENGINE = MyISAM, SUBPARTITION subpart22 ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 ENGINE = MyISAM, SUBPARTITION subpart32 ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int2) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD @@ -21367,6 +15156,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#subpart42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -21854,13 +15659,37 @@ f_charbig VARCHAR(1000) ) PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int2 + 1) (PARTITION part1 VALUES IN (0) -(SUBPARTITION sp11, SUBPARTITION sp12), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp11 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp12 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part2 VALUES IN (1) -(SUBPARTITION sp21, SUBPARTITION sp22), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp21 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp22 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), PARTITION part3 VALUES IN (2) -(SUBPARTITION sp31, SUBPARTITION sp32), +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp31, +SUBPARTITION sp32), PARTITION part4 VALUES IN (NULL) -(SUBPARTITION sp41, SUBPARTITION sp42)); +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp41 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp42 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); INSERT INTO t1(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) @@ -21875,7 +15704,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 ENGINE = MyISAM, SUBPARTITION sp12 ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 ENGINE = MyISAM, SUBPARTITION sp22 ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 ENGINE = MyISAM, SUBPARTITION sp32 ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 ENGINE = MyISAM, SUBPARTITION sp42 ENGINE = MyISAM)) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int2 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD @@ -21896,6 +15725,22 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 @@ -22384,10 +16229,16 @@ f_charbig VARCHAR(1000) , UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) ) PARTITION BY LIST(ABS(MOD(f_int1,2))) -SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 -(PARTITION part1 VALUES IN (0), - PARTITION part2 VALUES IN (1), - PARTITION part3 VALUES IN (NULL)); +SUBPARTITION BY KEY(f_int2) SUBPARTITIONS 3 +(PARTITION part1 VALUES IN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part3 VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); INSERT INTO t1(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) @@ -22402,7 +16253,7 @@ t1 CREATE TABLE `t1` ( `f_charbig` varchar(1000) DEFAULT NULL, UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) ENGINE = MyISAM, PARTITION part2 VALUES IN (1) ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) ENGINE = MyISAM) */ +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,2))) SUBPARTITION BY KEY (f_int2) SUBPARTITIONS 3 (PARTITION part1 VALUES IN (0) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part2 VALUES IN (1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ unified filelist $MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#part1sp0.MYD @@ -22425,6 +16276,3802 @@ $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYD $MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#part3sp2.MYI $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#part1sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#part2sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#part3sp2.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#part1sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#part2sp2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#part3sp2.MYI + +# 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; +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; +#======================================================================== +# 5 use partition_directory with DATA/INDEX DIRECTORY +#======================================================================== +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) +) +PARTITION BY HASH(f_int1) PARTITIONS 2 +(PARTITION p1 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p2 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p2 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +ls: $MYSQLTEST_VARDIR/mysql-test-data-dir/t1*: No such file or directory +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI + +# 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY HASH(f_int1) PARTITIONS 5 +(PARTITION p1 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION p2 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p3 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION p4, +PARTITION p5 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY HASH (f_int1) (PARTITION p1 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION p2 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p3 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION p4 ENGINE = MyISAM, PARTITION p5 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p2.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p3.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p4.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#p5.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p3.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p2.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p5.MYI + +# 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY LIST(MOD(f_int1,4)) +(PARTITION part_3 VALUES IN (-3) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_2 VALUES IN (-2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION part_1 VALUES IN (-1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part_N VALUES IN (NULL) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION part0 VALUES IN (0) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION part1 VALUES IN (1) +, +PARTITION part2 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION part3 VALUES IN (3) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (MOD(f_int1,4)) (PARTITION part_3 VALUES IN (-3) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_2 VALUES IN (-2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION part_1 VALUES IN (-1) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part_N VALUES IN (NULL) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION part0 VALUES IN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION part1 VALUES IN (1) ENGINE = MyISAM, PARTITION part2 VALUES IN (2) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION part3 VALUES IN (3) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part0.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_2.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_3.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part_N.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_2.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part_N.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part_3.MYI + +# 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY RANGE(f_int1) +(PARTITION parta VALUES LESS THAN (0) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION partc VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partd VALUES LESS THAN (10 + 5), +PARTITION parte VALUES LESS THAN (20) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION partf VALUES LESS THAN (2147483646) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (15) ENGINE = MyISAM, PARTITION parte VALUES LESS THAN (20) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION partf VALUES LESS THAN (2147483646) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#parte.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partf.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partc.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#parte.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partc.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partf.MYI + +# 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##'; +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#'; +INSERT INTO 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY RANGE(f_int1 DIV 2) SUBPARTITION BY HASH(f_int1) SUBPARTITIONS 2 +(PARTITION parta VALUES LESS THAN (0) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +PARTITION partb VALUES LESS THAN (5) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +PARTITION partc VALUES LESS THAN (10), +PARTITION partd VALUES LESS THAN (2147483646) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1 DIV 2) SUBPARTITION BY HASH (f_int1) SUBPARTITIONS 2 (PARTITION parta VALUES LESS THAN (0) INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, PARTITION partb VALUES LESS THAN (5) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, PARTITION partc VALUES LESS THAN (10) ENGINE = MyISAM, PARTITION partd VALUES LESS THAN (2147483646) DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp0.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partb#SP#partbsp1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp0.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partc#SP#partcsp1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#partd#SP#partdsp1.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partb#SP#partbsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp0.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#partd#SP#partdsp1.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#parta#SP#partasp1.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp0.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#partd#SP#partdsp1.MYI + +# 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY RANGE(f_int1) SUBPARTITION BY KEY(f_int1) +(PARTITION part1 VALUES LESS THAN (0) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +(SUBPARTITION subpart11, SUBPARTITION subpart12), +PARTITION part2 VALUES LESS THAN (5) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION subpart21, SUBPARTITION subpart22), +PARTITION part3 VALUES LESS THAN (10) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION subpart31, SUBPARTITION subpart32), +PARTITION part4 VALUES LESS THAN (2147483646) +(SUBPARTITION subpart41, SUBPARTITION subpart42)); +INSERT INTO t1(f_int1,f_int2,f_char1,f_char2,f_charbig) +SELECT f_int1,f_int2,f_char1,f_char2,f_charbig FROM t0_template; +# Start usability test (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`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (f_int1) SUBPARTITION BY KEY (f_int1) (PARTITION part1 VALUES LESS THAN (0) (SUBPARTITION subpart11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, SUBPARTITION subpart12 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM), PARTITION part2 VALUES LESS THAN (5) (SUBPARTITION subpart21 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart22 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES LESS THAN (10) (SUBPARTITION subpart31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION subpart32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES LESS THAN (2147483646) (SUBPARTITION subpart41 ENGINE = MyISAM, SUBPARTITION subpart42 ENGINE = MyISAM)) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart11.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#subpart12.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#subpart32.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart41.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#subpart42.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#subpart12.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#subpart32.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart21.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#subpart22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#subpart32.MYI + +# 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##'; +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#'; +INSERT INTO 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; +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) +, UNIQUE INDEX uidx1 (f_int1,f_int2), UNIQUE INDEX uidx2 (f_int2,f_int1) +) +PARTITION BY LIST(ABS(MOD(f_int1,3))) SUBPARTITION BY HASH(f_int1 + 1) +(PARTITION part1 VALUES IN (0) +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp11 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +SUBPARTITION sp12 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part2 VALUES IN (1) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +(SUBPARTITION sp21 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir', +SUBPARTITION sp22 +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir'), +PARTITION part3 VALUES IN (2) +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' +(SUBPARTITION sp31, +SUBPARTITION sp32), +PARTITION part4 VALUES IN (NULL) +(SUBPARTITION sp41 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir', +SUBPARTITION sp42 +DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' +INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir')); +INSERT INTO t1(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, + UNIQUE KEY `uidx1` (`f_int1`,`f_int2`), + UNIQUE KEY `uidx2` (`f_int2`,`f_int1`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (ABS(MOD(f_int1,3))) SUBPARTITION BY HASH (f_int1 + 1) (PARTITION part1 VALUES IN (0) (SUBPARTITION sp11 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp12 INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part2 VALUES IN (1) (SUBPARTITION sp21 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' ENGINE = MyISAM, SUBPARTITION sp22 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part3 VALUES IN (2) (SUBPARTITION sp31 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp32 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM), PARTITION part4 VALUES IN (NULL) (SUBPARTITION sp41 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM, SUBPARTITION sp42 DATA DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-data-dir' INDEX DIRECTORY = 'MYSQLTEST_VARDIR/mysql-test-idx-dir' ENGINE = MyISAM)) */ + +unified filelist +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp21.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/master-data/test/t1#P#part4#SP#sp42.MYI +$MYSQLTEST_VARDIR/master-data/test/t1.frm +$MYSQLTEST_VARDIR/master-data/test/t1.par +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part1#SP#sp11.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp21.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part2#SP#sp22.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp31.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part3#SP#sp32.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp41.MYD +$MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#part4#SP#sp42.MYD +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp11.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part1#SP#sp12.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part2#SP#sp22.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp31.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part3#SP#sp32.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp41.MYI +$MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#part4#SP#sp42.MYI # check prerequisites-1 success: 1 # check COUNT(*) success: 1 diff --git a/mysql-test/suite/parts/t/disabled.def b/mysql-test/suite/parts/t/disabled.def index 75b19c3f25a..408a624e707 100644 --- a/mysql-test/suite/parts/t/disabled.def +++ b/mysql-test/suite/parts/t/disabled.def @@ -18,5 +18,3 @@ partition_value_ndb : cannot create t1 rpl_ndb_dd_partitions : cannot create t1 partition_alter4_myisam : Bug#20129 / WL#4176 partition_alter4_innodb : Bug#20129 / WL#4176 -partition_basic_symlink_innodb : Bug#35306 Make pushbuild green -partition_basic_symlink_myisam : Bug#35306 Make pushbuild green diff --git a/mysql-test/suite/parts/t/partition_basic_innodb.test b/mysql-test/suite/parts/t/partition_basic_innodb.test index 2c3e172014c..d3d5916886b 100644 --- a/mysql-test/suite/parts/t/partition_basic_innodb.test +++ b/mysql-test/suite/parts/t/partition_basic_innodb.test @@ -51,8 +51,8 @@ let $more_pk_ui_tests= 0; let $engine= 'InnoDB'; ##### Execute the test of "table" files -# InnoDB has no files per PK, UI, ... -let $do_file_tests= 0; +# InnoDB has no files per PK, UI, ... But only .frm file +let $do_file_tests= 1; ##### Execute PRIMARY KEY tests ##### # AFAIK InnoDB clusters the table around PRIMARY KEYs. diff --git a/mysql-test/suite/parts/t/partition_basic_myisam.test b/mysql-test/suite/parts/t/partition_basic_myisam.test index c363d06b00a..8d84982335c 100644 --- a/mysql-test/suite/parts/t/partition_basic_myisam.test +++ b/mysql-test/suite/parts/t/partition_basic_myisam.test @@ -48,9 +48,6 @@ let $more_pk_ui_tests= 0; ##### Storage engine to be tested let $engine= 'MyISAM'; -# The server uses in case of MyISAM symlinking (if available) and the expected -# results fit to symlinking support. ---source include/have_symlink.inc ##### Execute the test of "table" files # MyISAM has files per PK, UI, ... diff --git a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test index 9400e9ffe2b..51e6397c018 100644 --- a/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test +++ b/mysql-test/suite/parts/t/partition_basic_symlink_innodb.test @@ -11,8 +11,87 @@ # Change Author: mattiasj # # Change Date: 2008-02-05 # # Change: copied it from partition_basic_innodb.test and kept DATA DIR # +# Change Author: mattiasj # +# Change Date: 2008-03-16 # +# Change: Replaced all test with alter -> myisam, since innodb does not support# +# DATA/INDEX DIRECTORY # ################################################################################ +# NOTE: Until InnoDB supports DATA/INDEX DIR, test that a partitioned table +# remembers the DATA/INDEX DIR and it is used if altered to MyISAM +# +--echo # Will not run partition_basic_symlink on InnoDB, since it is the same +--echo # as partition_basic, since InnoDB does not support DATA/INDEX DIR +--echo # Will only verify that the DATA/INDEX DIR is stored and used if +--echo # ALTER to MyISAM. +--source include/have_innodb.inc +# The server must support partitioning. +--source include/have_partition.inc +# The server must support symlink for DATA/INDEX DIRECTORY. +--source include/have_symlink.inc +# windows does not support symlink for DATA/INDEX DIRECTORY. +--source include/not_windows.inc + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings +--mkdir $MYSQLTEST_VARDIR/mysql-test-data-dir +--mkdir $MYSQLTEST_VARDIR/mysql-test-idx-dir +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval CREATE TABLE t1 (c1 INT) +ENGINE = InnoDB +PARTITION BY HASH (c1) +(PARTITION p0 + DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir', + PARTITION p1 + DATA DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-data-dir' + INDEX DIRECTORY = '$MYSQLTEST_VARDIR/mysql-test-idx-dir' +); +--echo # Verifying .frm and .par files +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par +--echo # Verifying that there are no MyISAM files +--error 1 +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +--error 1 +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +--error 1 +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD +--error 1 +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +--error 1 +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +FLUSH TABLES; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t1; +ALTER TABLE t1 ENGINE = MyISAM; +--echo # Verifying .frm, .par and MyISAM files (.MYD, MYI) +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.frm +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1.par +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYD +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p0.MYI +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYD +--file_exists $MYSQLTEST_VARDIR/master-data/test/t1#P#p1.MYI +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p0.MYD +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p0.MYI +--file_exists $MYSQLTEST_VARDIR/mysql-test-data-dir/t1#P#p1.MYD +--file_exists $MYSQLTEST_VARDIR/mysql-test-idx-dir/t1#P#p1.MYI +FLUSH TABLES; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +SHOW CREATE TABLE t1; +DROP TABLE t1; +--rmdir $MYSQLTEST_VARDIR/mysql-test-data-dir +--rmdir $MYSQLTEST_VARDIR/mysql-test-idx-dir +--exit +# here is the old test, which is tested by partition_basic_innodb + # # NOTE: PLEASE DO NOT ADD NOT INNODB SPECIFIC TESTCASES HERE ! # TESTCASES WHICH MUST BE APPLIED TO ALL STORAGE ENGINES MUST BE ADDED IN From 6cf64b26d8eedae3e744335736aee44975899c19 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 20:19:04 +0200 Subject: [PATCH 446/527] Bug #18199 PURGE BINARY LOGS fails silently with missing logs; Bug #18453 Warning/error message if there is a mismatch between ... There were three problems: 1. the reported lack of warnings for the BEFORE syntax of PURGE; 2. the similar lack of warnings for the TO syntax; 3. incompatible behaviour between the two in that the latter blanked out regardlessly of presence or lack the actual file corresponding to an index record; the former version gave up at the first mismatch. fixed with deploying the warning's generation and synronizing logics of purge_logs() and purge_logs_before_date(). my_stat() is called in either of two branches of purge_logs() (responsible for the TO syntax of PURGE) similarly to how it has behaved in the BEFORE syntax. If there is no actual binlog file, my_stat returns NULL and my_delete is not invoked. A critical error is reported to the user if a file from the index could not be retrieved info about or deleted with a system error code different than ENOENT. sql/log.cc: generating warning in two functions. refining logics to call my_stat() by purge_logs() as it happens in purge_logs_before_date(). my_delete() is called only if my_stat() ensured existance of the file. A critical error is reported to the user if a file from the index could not be my_stat():ed or my_delete():d with an error different than ENOENT. sql/share/errmsg.txt: new error message mysql-test/include/show_binary_logs.inc: a new macro - shortcut of show binary logs mysql-test/r/binlog_index.result: new results mysql-test/t/binlog_index.test: a regression test for the bugs --- mysql-test/include/show_binary_logs.inc | 3 + mysql-test/r/binlog_index.result | 39 ++++++ mysql-test/t/binlog_index.test | 69 +++++++++++ sql/log.cc | 153 ++++++++++++++++++++---- sql/share/errmsg.txt | 2 + 5 files changed, 240 insertions(+), 26 deletions(-) create mode 100644 mysql-test/include/show_binary_logs.inc create mode 100644 mysql-test/r/binlog_index.result create mode 100644 mysql-test/t/binlog_index.test diff --git a/mysql-test/include/show_binary_logs.inc b/mysql-test/include/show_binary_logs.inc new file mode 100644 index 00000000000..43a9d5d2eed --- /dev/null +++ b/mysql-test/include/show_binary_logs.inc @@ -0,0 +1,3 @@ +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_column 2 # +show binary logs; diff --git a/mysql-test/r/binlog_index.result b/mysql-test/r/binlog_index.result new file mode 100644 index 00000000000..9c22a33435a --- /dev/null +++ b/mysql-test/r/binlog_index.result @@ -0,0 +1,39 @@ +flush logs; +flush logs; +flush logs; +show binary logs; +Log_name File_size +master-bin.000001 # +master-bin.000002 # +master-bin.000003 # +master-bin.000004 # +purge binary logs TO 'master-bin.000004'; +Warnings: +Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +*** must show a list starting from the 'TO' argument of PURGE *** +show binary logs; +Log_name File_size +master-bin.000004 # +reset master; +flush logs; +flush logs; +flush logs; +*** must be a warning master-bin.000001 was not found *** +Warnings: +Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +*** must show one record, of the active binlog, left in the index file after PURGE *** +show binary logs; +Log_name File_size +master-bin.000004 # +reset master; +flush logs; +flush logs; +flush logs; +purge binary logs TO 'master-bin.000002'; +ERROR HY000: Fatal error during log purge +show warnings; +Level Code Message +Error 1377 a problem with deleting MYSQLTEST_VARDIR/log/master-bin.000001; consider examining correspondence of your binlog index file to the actual binlog files +Error 1377 Fatal error during log purge +reset master; +End of tests diff --git a/mysql-test/t/binlog_index.test b/mysql-test/t/binlog_index.test new file mode 100644 index 00000000000..1e44a9b02e2 --- /dev/null +++ b/mysql-test/t/binlog_index.test @@ -0,0 +1,69 @@ +# +# testing of purging of binary log files bug#18199/Bug#18453 +# +source include/have_log_bin.inc; +source include/not_embedded.inc; + +# +# testing purge binary logs TO +# + +flush logs; +flush logs; +flush logs; + +source include/show_binary_logs.inc; + +remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; + +# there must be a warning with file names +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +purge binary logs TO 'master-bin.000004'; + +--echo *** must show a list starting from the 'TO' argument of PURGE *** +source include/show_binary_logs.inc; + +# +# testing purge binary logs BEFORE +# + +reset master; + +flush logs; +flush logs; +flush logs; +remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; + +--echo *** must be a warning master-bin.000001 was not found *** +let $date=`select NOW() + INTERVAL 1 MINUTE`; +--disable_query_log +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +eval purge binary logs BEFORE '$date'; +--enable_query_log + +--echo *** must show one record, of the active binlog, left in the index file after PURGE *** +source include/show_binary_logs.inc; + +# +# testing a fatal error +# Turning a binlog file into a directory must be a portable setup +# + +reset master; + +flush logs; +flush logs; +flush logs; + +remove_file $MYSQLTEST_VARDIR/log/master-bin.000001; +mkdir $MYSQLTEST_VARDIR/log/master-bin.000001; + +--error ER_BINLOG_PURGE_FATAL_ERR +purge binary logs TO 'master-bin.000002'; +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +show warnings; +rmdir $MYSQLTEST_VARDIR/log/master-bin.000001; +--disable_warnings +reset master; +--enable_warnings +--echo End of tests diff --git a/sql/log.cc b/sql/log.cc index 0376facb473..1924821c91c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1180,6 +1180,8 @@ int MYSQL_LOG::update_log_index(LOG_INFO* log_info, bool need_update_threads) RETURN VALUES 0 ok LOG_INFO_EOF to_log not found + LOG_INFO_FATAL if any other than ENOENT error from + my_stat() or my_delete() */ int MYSQL_LOG::purge_logs(const char *to_log, @@ -1208,33 +1210,75 @@ int MYSQL_LOG::purge_logs(const char *to_log, while ((strcmp(to_log,log_info.log_file_name) || (exit_loop=included)) && !log_in_use(log_info.log_file_name)) { - ulong file_size= 0; - if (decrease_log_space) //stat the file we want to delete + MY_STAT s; + if (!my_stat(log_info.log_file_name, &s, MYF(0))) { - MY_STAT s; - - /* - If we could not stat, we can't know the amount - of space that deletion will free. In most cases, - deletion won't work either, so it's not a problem. - */ - if (my_stat(log_info.log_file_name,&s,MYF(0))) - file_size= s.st_size; - else - sql_print_information("Failed to execute my_stat on file '%s'", + if (my_errno == ENOENT) + { + /* + It's not fatal if we can't stat a log file that does not exist; + If we could not stat, we won't delete. + */ + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + log_info.log_file_name); + sql_print_information("Failed to execute my_stat on file '%s'", log_info.log_file_name); + my_errno= 0; + } + else + { + /* + Other than ENOENT are fatal + */ + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with getting info on being purged %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + error= LOG_INFO_FATAL; + goto err; + } + } + else + { + DBUG_PRINT("info",("purging %s",log_info.log_file_name)); + if (!my_delete(log_info.log_file_name, MYF(0))) + { + if (decrease_log_space) + *decrease_log_space-= s.st_size; + } + else + { + if (my_errno == ENOENT) + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + log_info.log_file_name); + sql_print_information("Failed to delete file '%s'", + log_info.log_file_name); + my_errno= 0; + } + else + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with deleting %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + error= LOG_INFO_FATAL; + goto err; + } + } } - /* - It's not fatal if we can't delete a log file ; - if we could delete it, take its size into account - */ - DBUG_PRINT("info",("purging %s",log_info.log_file_name)); - if (!my_delete(log_info.log_file_name, MYF(0)) && decrease_log_space) - *decrease_log_space-= file_size; if (find_next_log(&log_info, 0) || exit_loop) break; } - + /* If we get killed -9 here, the sysadmin would have to edit the log index file after restart - otherwise, this should be safe @@ -1263,6 +1307,8 @@ err: RETURN VALUES 0 ok LOG_INFO_PURGE_NO_ROTATE Binary file that can't be rotated + LOG_INFO_FATAL if any other than ENOENT error from + my_stat() or my_delete() */ int MYSQL_LOG::purge_logs_before_date(time_t purge_time) @@ -1286,11 +1332,66 @@ int MYSQL_LOG::purge_logs_before_date(time_t purge_time) while (strcmp(log_file_name, log_info.log_file_name) && !log_in_use(log_info.log_file_name)) { - /* It's not fatal even if we can't delete a log file */ - if (!my_stat(log_info.log_file_name, &stat_area, MYF(0)) || - stat_area.st_mtime >= purge_time) - break; - my_delete(log_info.log_file_name, MYF(0)); + if (!my_stat(log_info.log_file_name, &stat_area, MYF(0))) + { + if (my_errno == ENOENT) + { + /* + It's not fatal if we can't stat a log file that does not exist. + */ + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + log_info.log_file_name); + sql_print_information("Failed to execute my_stat on file '%s'", + log_info.log_file_name); + my_errno= 0; + } + else + { + /* + Other than ENOENT are fatal + */ + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with getting info on being purged %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + error= LOG_INFO_FATAL; + goto err; + } + } + else + { + if (stat_area.st_mtime >= purge_time) + break; + if (my_delete(log_info.log_file_name, MYF(0))) + { + if (my_errno == ENOENT) + { + /* It's not fatal even if we can't delete a log file */ + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + log_info.log_file_name); + sql_print_information("Failed to delete file '%s'", + log_info.log_file_name); + my_errno= 0; + } + else + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with deleting %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + log_info.log_file_name); + error= LOG_INFO_FATAL; + goto err; + } + } + } if (find_next_log(&log_info, 0)) break; } diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 9e6cf462113..516dba1cd08 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5641,3 +5641,5 @@ ER_NAME_BECOMES_EMPTY eng "Name '%-.64s' has become ''" ER_AMBIGUOUS_FIELD_TERM eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" +ER_LOG_PURGE_NO_FILE + eng "Being purged log %s was not found" From 809522598a9a8946a5e1fa4a981717c38466a379 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 17 Mar 2008 16:39:09 -0300 Subject: [PATCH 447/527] Post-merge fixes for Bug 35103 libmysql/libmysql.c: Manual merge sql/sql_class.cc: Don't send anything back to the client if disabled. sql/sql_prepare.cc: Don't send any packet back for statement close. tests/mysql_client_test.c: Manual merge --- libmysql/libmysql.c | 2 +- sql/sql_class.cc | 22 ++++++++++++++++++---- sql/sql_prepare.cc | 4 ++-- tests/mysql_client_test.c | 28 +++++++++++++++++++--------- 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 423068a6ba2..99bd393a907 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4751,7 +4751,7 @@ int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt) if (!mysql) { /* mysql can be reset in mysql_close called from mysql_reconnect */ - set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate); + set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL); DBUG_RETURN(1); } diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 376102c8bf9..594577dd89c 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -395,8 +395,11 @@ Diagnostics_area::set_ok_status(THD *thd, ha_rows affected_rows_arg, { DBUG_ASSERT(! is_set()); #ifdef DBUG_OFF - /* In production, refuse to overwrite an error with an OK packet. */ - if (is_error()) + /* + In production, refuse to overwrite an error or a custom response + with an OK packet. + */ + if (is_error() || is_disabled()) return; #endif /** Only allowed to report success if has not yet reported an error */ @@ -424,8 +427,11 @@ Diagnostics_area::set_eof_status(THD *thd) DBUG_ASSERT(! is_set()); #ifdef DBUG_OFF - /* In production, refuse to overwrite an error with an EOF packet. */ - if (is_error()) + /* + In production, refuse to overwrite an error or a custom response + with an EOF packet. + */ + if (is_error() || is_disabled()) return; #endif @@ -454,6 +460,14 @@ Diagnostics_area::set_error_status(THD *thd, uint sql_errno_arg, an error can happen during the flush. */ DBUG_ASSERT(! is_set() || can_overwrite_status); +#ifdef DBUG_OFF + /* + In production, refuse to overwrite a custom response with an + ERROR packet. + */ + if (is_disabled()) + return; +#endif m_sql_errno= sql_errno_arg; strmake(m_message, message_arg, sizeof(m_message) - 1); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index a027ffe9daa..c922b21af90 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2555,6 +2555,8 @@ void mysql_stmt_close(THD *thd, char *packet) Prepared_statement *stmt; DBUG_ENTER("mysql_stmt_close"); + thd->main_da.disable_status(); + if (!(stmt= find_prepared_statement(thd, stmt_id, "mysql_stmt_close"))) DBUG_VOID_RETURN; @@ -2566,8 +2568,6 @@ void mysql_stmt_close(THD *thd, char *packet) (void) stmt->deallocate(); general_log_print(thd, thd->command, NullS); - thd->main_da.disable_status(); - DBUG_VOID_RETURN; } diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 482ae37d15b..085b14a65e9 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -12016,6 +12016,7 @@ static void test_bug5194() rc= mysql_stmt_execute(stmt); check_execute(stmt, rc); + mysql_stmt_reset(stmt); } mysql_stmt_close(stmt); @@ -16600,7 +16601,10 @@ static void test_bug27592() DBUG_VOID_RETURN; } -#if 0 + +/** + Bug#29948 autoreconnect + prepared statements + kill seems unstable +*/ static void test_bug29948() { @@ -16614,7 +16618,10 @@ static void test_bug29948() const char *query; int buf; unsigned long length, cursor_type; - + + DBUG_ENTER("test_bug29948"); + myheader("test_bug29948"); + dbc = mysql_init(NULL); DIE_UNLESS(dbc); @@ -16650,7 +16657,7 @@ static void test_bug29948() res= mysql_stmt_attr_set(stmt, STMT_ATTR_CURSOR_TYPE, (void *)&cursor_type); myquery(res); - query= "SELECT * from t1 where a=?"; + query= "SELECT * FROM t1 WHERE a=?"; res= mysql_stmt_prepare(stmt, query, strlen(query)); myquery(res); @@ -16662,20 +16669,23 @@ static void test_bug29948() res= mysql_stmt_bind_result(stmt,&bind); check_execute(stmt, res); - - sprintf(kill_buf, "kill %ld", dbc->thread_id); - mysql_query(dbc, kill_buf); + + my_snprintf(kill_buf, sizeof(kill_buf), "KILL %ld", dbc->thread_id); + res= mysql_query(dbc, kill_buf); + myquery(res); res= mysql_stmt_store_result(stmt); DIE_UNLESS(res); mysql_stmt_free_result(stmt); mysql_stmt_close(stmt); - mysql_query(dbc, "DROP TABLE t1"); + + res= mysql_query(dbc, "DROP TABLE t1"); + myquery(res); + mysql_close(dbc); } -#endif /* Bug#29687 mysql_stmt_store_result memory leak in libmysqld @@ -17715,7 +17725,7 @@ static struct my_tests_st my_tests[]= { { "test_bug28505", test_bug28505 }, { "test_bug28934", test_bug28934 }, { "test_bug27592", test_bug27592 }, - /* { "test_bug29948", test_bug29948 }, */ + { "test_bug29948", test_bug29948 }, { "test_bug29687", test_bug29687 }, { "test_bug29692", test_bug29692 }, { "test_bug29306", test_bug29306 }, From 3cf4d70ed36bead6450490bc06f9c8a09868b93f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2008 00:57:57 +0100 Subject: [PATCH 448/527] Raise version number after cloning 4.1.24 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 01b5734a3b0..66825e5282b 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 4.1.24) +AM_INIT_AUTOMAKE(mysql, 4.1.25) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -21,7 +21,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 -NDB_VERSION_BUILD=24 +NDB_VERSION_BUILD=25 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ? From 001829914befbbaec672334b298d152fa8727060 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2008 10:45:36 +0100 Subject: [PATCH 449/527] Bug#25175 Too much memory used by MySQL grant system Each time the server reloads privileges containing table grants, the system will allocate too much memory than needed because of badly chosen growth prediction in the underlying dynamic arrays. This patch introduces a new signature to the hash container initializer which enables a much more pessimistic approach in favour for more efficient memory useage. This patch was supplied by Google Inc. include/hash.h: * New signature for _hash_init. * Defined new function hash_init2 which takes growth_size argument. mysys/hash.c: * New signature for _hash_init. sql/sql_acl.cc: * Changed hash_init signature so that it takes a 'growth_size' smaller than the default. Each time a GRANT_TABLE is allocated a pre-allocated dynamic array is instantiated. A large growth size can result in too many unused hash-entries per table-entry and thus be a waste of free memory. --- include/hash.h | 7 ++++--- mysys/hash.c | 5 +++-- sql/sql_acl.cc | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/hash.h b/include/hash.h index d924e62a0ec..4ca8dc0e8bf 100644 --- a/include/hash.h +++ b/include/hash.h @@ -47,8 +47,9 @@ typedef struct st_hash { /* A search iterator state */ typedef uint HASH_SEARCH_STATE; -#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,B,C,D,E,F,G, H CALLER_INFO) -my_bool _hash_init(HASH *hash, CHARSET_INFO *charset, +#define hash_init(A,B,C,D,E,F,G,H) _hash_init(A,0,B,C,D,E,F,G,H CALLER_INFO) +#define hash_init2(A,B,C,D,E,F,G,H,I) _hash_init(A,B,C,D,E,F,G,H,I CALLER_INFO) +my_bool _hash_init(HASH *hash, uint growth_size,CHARSET_INFO *charset, ulong default_array_elements, size_t key_offset, size_t key_length, hash_get_key get_key, void (*free_element)(void*), uint flags CALLER_INFO_PROTO); @@ -69,7 +70,7 @@ my_bool hash_check(HASH *hash); /* Only in debug library */ #define hash_clear(H) bzero((char*) (H),sizeof(*(H))) #define hash_inited(H) ((H)->array.buffer != 0) #define hash_init_opt(A,B,C,D,E,F,G,H) \ - (!hash_inited(A) && _hash_init(A,B,C,D,E,F,G, H CALLER_INFO)) + (!hash_inited(A) && _hash_init(A,0,B,C,D,E,F,G, H CALLER_INFO)) #ifdef __cplusplus } diff --git a/mysys/hash.c b/mysys/hash.c index 4532b06b533..9166ae6f788 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -46,7 +46,7 @@ static uint calc_hash(const HASH *hash, const uchar *key, size_t length) } my_bool -_hash_init(HASH *hash,CHARSET_INFO *charset, +_hash_init(HASH *hash,uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, hash_get_key get_key, void (*free_element)(void*),uint flags CALLER_INFO_PROTO) @@ -55,7 +55,8 @@ _hash_init(HASH *hash,CHARSET_INFO *charset, DBUG_PRINT("enter",("hash: 0x%lx size: %u", (long) hash, (uint) size)); hash->records=0; - if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0)) + if (my_init_dynamic_array_ci(&hash->array, sizeof(HASH_LINK), size, + growth_size)) { hash->free=0; /* Allow call to hash_free */ DBUG_RETURN(1); diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 3805d9fa8b6..9a218395721 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -2281,7 +2281,7 @@ GRANT_TABLE::GRANT_TABLE(const char *h, const char *d,const char *u, const char *t, ulong p, ulong c) :GRANT_NAME(h,d,u,t,p), cols(c) { - (void) hash_init(&hash_columns,system_charset_info, + (void) hash_init2(&hash_columns,4,system_charset_info, 0,0,0, (hash_get_key) get_key_column,0,0); } @@ -2329,7 +2329,7 @@ GRANT_TABLE::GRANT_TABLE(TABLE *form, TABLE *col_privs) cols= (ulong) form->field[7]->val_int(); cols = fix_rights_for_column(cols); - (void) hash_init(&hash_columns,system_charset_info, + (void) hash_init2(&hash_columns,4,system_charset_info, 0,0,0, (hash_get_key) get_key_column,0,0); if (cols) { From 7343db297a1f1ab08812c9b4471306535551ddec Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2008 16:38:12 +0400 Subject: [PATCH 450/527] Make gcov happy. --- sql/log_event.cc | 2 +- sql/repl_failsafe.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index 8e14a873fc6..05dccd782ad 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -406,7 +406,7 @@ Log_event::Log_event(const char* buf, binlog, so which will cause problems if the user uses this value in CHANGE MASTER). */ - log_pos+= data_written; + log_pos+= data_written; /* purecov: inspected */ } DBUG_PRINT("info", ("log_pos: %lu", (ulong) log_pos)); diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index f1826678c9f..7f98dd2d64a 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -191,7 +191,7 @@ int register_slave(THD* thd, uchar* packet, uint packet_length) err: my_free((gptr) si, MYF(MY_WME)); - my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); + my_message(ER_UNKNOWN_ERROR, errmsg, MYF(0)); /* purecov: inspected */ err2: return 1; } From f467cbaf441b73e0962f602ec7ae8e4c8b8dc24b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2008 19:42:04 +0400 Subject: [PATCH 451/527] Bug#35406 5.1-opt crashes on select from I_S.REFERENTIAL_CONSTRAINTS added intialization of f_key_info.referenced_key_name for the case when referenced table is dropped storage/innobase/handler/ha_innodb.cc: added intialization of f_key_info.referenced_key_name for the case when referenced table is dropped --- storage/innobase/handler/ha_innodb.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f81804c0701..cc284893764 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6207,6 +6207,8 @@ ha_innobase::get_foreign_key_list(THD *thd, List *f_key_list) foreign->referenced_index->name, strlen(foreign->referenced_index->name), 1); } + else + f_key_info.referenced_key_name= 0; FOREIGN_KEY_INFO *pf_key_info = (FOREIGN_KEY_INFO *) thd_memdup(thd, &f_key_info, sizeof(FOREIGN_KEY_INFO)); From 1626b42ca34d09844dd628f390d9ef8fb925ec13 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 18 Mar 2008 20:25:34 +0400 Subject: [PATCH 452/527] BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed Statement-based replication of DELETE ... LIMIT, UPDATE ... LIMIT, INSERT ... SELECT ... LIMIT is not safe as order of rows is not defined. With this fix, we issue a warning that this statement is not safe to replicate in statement mode, or go to row-based mode in mixed mode. Note that we may consider a statement as safe if ORDER BY primary_key is present. However it may confuse users to see very similiar statements replicated differently. Note 2: regular UPDATE statement (w/o LIMIT) is unsafe as well, but this patch doesn't address this issue. See comment from Kristian posted 18 Mar 10:55. mysql-test/suite/binlog/r/binlog_stm_ps.result: Updated a test case according to fix for BUG#34768: INSERT ... SELECT ... LIMIT is now replicated in row mode. mysql-test/suite/binlog/r/binlog_unsafe.result: A test case for BUG#34768. mysql-test/suite/binlog/t/binlog_unsafe.test: A test case for BUG#34768. sql/sql_delete.cc: Statement-based replication of DELETE ... LIMIT is not safe as order of rows is not defined, so in mixed mode we go to row-based. sql/sql_insert.cc: Statement-based replication of INSERT ... SELECT ... LIMIT is not safe as order of rows is not defined, so in mixed mode we go to row-based. sql/sql_update.cc: Statement-based replication of UPDATE ... LIMIT is not safe as order of rows is not defined, so in mixed mode we go to row-based. --- .../suite/binlog/r/binlog_stm_ps.result | 3 +- .../suite/binlog/r/binlog_unsafe.result | 28 +++++++++++++++++++ mysql-test/suite/binlog/t/binlog_unsafe.test | 22 ++++++++++++++- sql/sql_delete.cc | 13 +++++++++ sql/sql_insert.cc | 13 +++++++++ sql/sql_update.cc | 13 +++++++++ 6 files changed, 90 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/binlog/r/binlog_stm_ps.result b/mysql-test/suite/binlog/r/binlog_stm_ps.result index 47934665116..2128367deb5 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ps.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ps.result @@ -16,5 +16,6 @@ master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # User var # # @`a`=98 master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98) master-bin.000001 # Query # # use `test`; insert into t1 values (99) -master-bin.000001 # Query # # use `test`; insert into t1 select 100 limit 100 +master-bin.000001 # Table_map # # table_id: # (test.t1) +master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F drop table t1; diff --git a/mysql-test/suite/binlog/r/binlog_unsafe.result b/mysql-test/suite/binlog/r/binlog_unsafe.result index 47284ed8bc3..9d7f359ef15 100644 --- a/mysql-test/suite/binlog/r/binlog_unsafe.result +++ b/mysql-test/suite/binlog/r/binlog_unsafe.result @@ -11,3 +11,31 @@ Level Warning Code 1592 Message Statement is not safe to log in statement format. DROP TABLE t1,t2,t3; +CREATE TABLE t1(a INT, b INT, KEY(a), PRIMARY KEY(b)); +INSERT INTO t1 SELECT * FROM t1 LIMIT 1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +REPLACE INTO t1 SELECT * FROM t1 LIMIT 1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +UPDATE t1 SET a=1 LIMIT 1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +DELETE FROM t1 LIMIT 1; +Warnings: +Warning 1592 Statement is not safe to log in statement format. +CREATE PROCEDURE p1() +BEGIN +INSERT INTO t1 SELECT * FROM t1 LIMIT 1; +REPLACE INTO t1 SELECT * FROM t1 LIMIT 1; +UPDATE t1 SET a=1 LIMIT 1; +DELETE FROM t1 LIMIT 1; +END| +CALL p1(); +Warnings: +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +Warning 1592 Statement is not safe to log in statement format. +DROP PROCEDURE p1; +DROP TABLE t1; diff --git a/mysql-test/suite/binlog/t/binlog_unsafe.test b/mysql-test/suite/binlog/t/binlog_unsafe.test index f34c22dc5f7..de15f5f6f14 100644 --- a/mysql-test/suite/binlog/t/binlog_unsafe.test +++ b/mysql-test/suite/binlog/t/binlog_unsafe.test @@ -15,4 +15,24 @@ query_vertical SHOW WARNINGS; DROP TABLE t1,t2,t3; - +# +# BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode if +# binlog_format=mixed +# +CREATE TABLE t1(a INT, b INT, KEY(a), PRIMARY KEY(b)); +INSERT INTO t1 SELECT * FROM t1 LIMIT 1; +REPLACE INTO t1 SELECT * FROM t1 LIMIT 1; +UPDATE t1 SET a=1 LIMIT 1; +DELETE FROM t1 LIMIT 1; +delimiter |; +CREATE PROCEDURE p1() +BEGIN + INSERT INTO t1 SELECT * FROM t1 LIMIT 1; + REPLACE INTO t1 SELECT * FROM t1 LIMIT 1; + UPDATE t1 SET a=1 LIMIT 1; + DELETE FROM t1 LIMIT 1; +END| +delimiter ;| +CALL p1(); +DROP PROCEDURE p1; +DROP TABLE t1; diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 990f7713561..abf25e96be0 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -418,6 +418,19 @@ bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) DBUG_ENTER("mysql_prepare_delete"); List all_fields; + /* + Statement-based replication of DELETE ... LIMIT is not safe as order of + rows is not defined, so in mixed mode we go to row-based. + + Note that we may consider a statement as safe if ORDER BY primary_key + is present. However it may confuse users to see very similiar statements + replicated differently. + */ + if (thd->lex->current_select->select_limit) + { + thd->lex->set_stmt_unsafe(); + thd->set_current_stmt_binlog_row_based_if_mixed(); + } thd->lex->allow_sum_func= 0; if (setup_tables_and_check_access(thd, &thd->lex->select_lex.context, &thd->lex->select_lex.top_join_list, diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2be932a6040..58acf40964b 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2763,6 +2763,19 @@ bool mysql_insert_select_prepare(THD *thd) TABLE_LIST *first_select_leaf_table; DBUG_ENTER("mysql_insert_select_prepare"); + /* + Statement-based replication of INSERT ... SELECT ... LIMIT is not safe + as order of rows is not defined, so in mixed mode we go to row-based. + + Note that we may consider a statement as safe if ORDER BY primary_key + is present or we SELECT a constant. However it may confuse users to + see very similiar statements replicated differently. + */ + if (lex->current_select->select_limit) + { + lex->set_stmt_unsafe(); + thd->set_current_stmt_binlog_row_based_if_mixed(); + } /* SELECT_LEX do not belong to INSERT statement, so we can't add WHERE clause if table is VIEW diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 7c9ead7591c..77d5fd7421c 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -859,6 +859,19 @@ bool mysql_prepare_update(THD *thd, TABLE_LIST *table_list, SELECT_LEX *select_lex= &thd->lex->select_lex; DBUG_ENTER("mysql_prepare_update"); + /* + Statement-based replication of UPDATE ... LIMIT is not safe as order of + rows is not defined, so in mixed mode we go to row-based. + + Note that we may consider a statement as safe if ORDER BY primary_key + is present. However it may confuse users to see very similiar statements + replicated differently. + */ + if (thd->lex->current_select->select_limit) + { + thd->lex->set_stmt_unsafe(); + thd->set_current_stmt_binlog_row_based_if_mixed(); + } #ifndef NO_EMBEDDED_ACCESS_CHECKS table_list->grant.want_privilege= table->grant.want_privilege= (SELECT_ACL & ~table->grant.privilege); From 4018b13915c2fa972cf4da90ab1b2272b855a490 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 15:51:22 +0400 Subject: [PATCH 453/527] Bug #33334 mysqltest_embedded crashes when disconnecting before reap. Before breaking the connection we have to check that there's no query executing at the moment. Otherwise it can lead to crash in embedded server. client/mysqltest.c: Bug #33334 mysqltest_embedded crashes when disconnecting before reap. Wait until the query thread is finished before we break the connection. Waiting part moved to a separate wait_query_thread_end() function mysql-test/r/flush.result: Bug #33334 mysqltest_embedded crashes when disconnecting before reap. test result mysql-test/t/flush.test: Bug #33334 mysqltest_embedded crashes when disconnecting before reap. test case --- client/mysqltest.c | 34 +++++++++++++++++++++++++--------- mysql-test/r/flush.result | 1 + mysql-test/t/flush.test | 9 +++++++++ 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 88575c26bc6..b028794295c 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -542,6 +542,17 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len, return 0; } +static void wait_query_thread_end(struct st_connection *con) +{ + if (!con->query_done) + { + pthread_mutex_lock(&con->mutex); + while (!con->query_done) + pthread_cond_wait(&con->cond, &con->mutex); + pthread_mutex_unlock(&con->mutex); + } +} + #else /*EMBEDDED_LIBRARY*/ #define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len) @@ -3939,7 +3950,14 @@ void do_close_connection(struct st_command *command) con->mysql.net.vio = 0; } } -#endif +#else + /* + As query could be still executed in a separate theread + we need to check if the query's thread was finished and probably wait + (embedded-server specific) + */ + wait_query_thread_end(con); +#endif /*EMBEDDED_LIBRARY*/ if (con->stmt) mysql_stmt_close(con->stmt); con->stmt= 0; @@ -4229,6 +4247,9 @@ void do_connect(struct st_command *command) (int) (sizeof(connections)/sizeof(struct st_connection))); } +#ifdef EMBEDDED_LIBRARY + con_slot->query_done= 1; +#endif if (!mysql_init(&con_slot->mysql)) die("Failed on mysql_init()"); if (opt_compress || con_compress) @@ -5716,16 +5737,11 @@ void run_query_normal(struct st_connection *cn, struct st_command *command, } #ifdef EMBEDDED_LIBRARY /* - Here we handle 'reap' command, so we need to check if the - query's thread was finished and probably wait + Here we handle 'reap' command, so we need to check if the + query's thread was finished and probably wait */ else if (flags & QUERY_REAP_FLAG) - { - pthread_mutex_lock(&cn->mutex); - while (!cn->query_done) - pthread_cond_wait(&cn->cond, &cn->mutex); - pthread_mutex_unlock(&cn->mutex); - } + wait_query_thread_end(cn); #endif /*EMBEDDED_LIBRARY*/ if (!(flags & QUERY_REAP_FLAG)) DBUG_VOID_RETURN; diff --git a/mysql-test/r/flush.result b/mysql-test/r/flush.result index ce64e09c1d3..778f138f29d 100644 --- a/mysql-test/r/flush.result +++ b/mysql-test/r/flush.result @@ -72,3 +72,4 @@ flush tables with read lock; unlock tables; drop table t1, t2; set session low_priority_updates=default; +select benchmark(200, (select sin(1))) > 1000; diff --git a/mysql-test/t/flush.test b/mysql-test/t/flush.test index 72efa8a2ee6..4c6d4265600 100644 --- a/mysql-test/t/flush.test +++ b/mysql-test/t/flush.test @@ -164,4 +164,13 @@ drop table t1, t2; set session low_priority_updates=default; +# +# Bug #33334 mysqltest_embedded crashes when disconnecting before reap +# + +connect (con1,localhost,root,,); +send select benchmark(200, (select sin(1))) > 1000; +disconnect con1; +connection default; + # End of 5.0 tests From 3c5894baaa9dcc2d910d504ef073facfcd329f8e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 14:32:28 +0100 Subject: [PATCH 454/527] Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY When swapping out heap I_S tables to disk, this is done after plan refinement. Thus, READ_RECORD::file will still point to the (deleted) heap handler at start of execution. This causes segmentation fault if join buffering is used and the query is a star query where the result is found to be empty before accessing some table. In this case that table has not been initialized (i.e. had its READ_RECORD re-initialized) before the cleanup routine tries to close the handler. Fixed by updating READ_RECORD::file when changing handler. mysql-test/r/information_schema.result: Bug#34529: Test result. mysql-test/t/information_schema.test: Bug#34529: Test case. sql/sql_show.cc: Bug#34529: The fix. --- mysql-test/r/information_schema.result | 10 ++++++++++ mysql-test/t/information_schema.test | 21 +++++++++++++++++++++ sql/sql_show.cc | 2 ++ 3 files changed, 33 insertions(+) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 80f85aee429..2803c5af729 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1422,3 +1422,13 @@ show fields from information_schema.table_names; ERROR 42S02: Unknown table 'table_names' in information_schema show keys from information_schema.table_names; ERROR 42S02: Unknown table 'table_names' in information_schema +USE information_schema; +SET max_heap_table_size = 16384; +CREATE TABLE test.t1( a INT ); +SELECT * +FROM tables ta +JOIN collations co ON ( co.collation_name = ta.table_catalog ) +JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog ); +TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN +DROP TABLE test.t1; +SET max_heap_table_size = DEFAULT; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 3d3310e389e..09005a4b145 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1118,3 +1118,24 @@ show fields from information_schema.table_names; --error 1109 show keys from information_schema.table_names; +# +# Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY +# +USE information_schema; +SET max_heap_table_size = 16384; + +CREATE TABLE test.t1( a INT ); + +# What we need to create here is a bit of a corner case: +# We need a star query with information_schema tables, where the first +# branch of the star join produces zero rows, so that reading of the +# second branch never happens. At the same time we have to make sure +# that data for at least the last table is swapped from MEMORY/HEAP to +# MyISAM. This and only this triggers the bug. +SELECT * +FROM tables ta +JOIN collations co ON ( co.collation_name = ta.table_catalog ) +JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog ); + +DROP TABLE test.t1; +SET max_heap_table_size = DEFAULT; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 36d154181f8..a80319785bd 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -4073,9 +4073,11 @@ bool get_schema_tables_result(JOIN *join, { result= 1; join->error= 1; + tab->read_record.file= table_list->table->file; table_list->schema_table_state= executed_place; break; } + tab->read_record.file= table_list->table->file; table_list->schema_table_state= executed_place; } } From 5a6996dbcde4ca833f7936413cfa090cba060af5 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 18:44:50 +0200 Subject: [PATCH 455/527] Bug #35178 INSERT_ID not written to binary log for inserts against BLACKHOLE backed tables binlogging of insert into a autoincrement blackhole table ignored an explicit set insert_id. Fixed with refining of the blackhole's insert method to call update_auto_increment() that prepares binlogging the insert query with the preceeding set insert_id. Note, as the engine does not store any actual data one has to explicitly provide to the server with the value of the autoincrement column via set insert_id. Otherwise binlogging will happend with the default set insert_id=1. mysql-test/r/blackhole.result: results changed mysql-test/t/blackhole.test: a regression test for the bug added sql/ha_blackhole.cc: blackhole's insert method is refined to call update_auto_increment() that prepares binlogging the insert query with the preceeding set insert_id. --- mysql-test/r/blackhole.result | 17 +++++++++++++++++ mysql-test/t/blackhole.test | 26 ++++++++++++++++++++++++-- sql/ha_blackhole.cc | 2 +- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/blackhole.result b/mysql-test/r/blackhole.result index a4b780f9db5..51c19c29b0f 100644 --- a/mysql-test/r/blackhole.result +++ b/mysql-test/r/blackhole.result @@ -138,3 +138,20 @@ ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; +reset master; +create table t1 (a int auto_increment, primary key (a)) engine=blackhole; +insert into t1 values (11), (NULL), (NULL), (NULL); +set insert_id= 3; +insert into t1 values (NULL), (33), (NULL); +set insert_id= 5; +insert into t1 values (55), (NULL); +show binlog events from ; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole +master-bin.000001 # Intvar 1 # INSERT_ID=1 +master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL) +master-bin.000001 # Intvar 1 # INSERT_ID=3 +master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL) +master-bin.000001 # Intvar 1 # INSERT_ID=5 +master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL) +drop table t1; diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test index ba77b7b7f6a..cb8010d7967 100644 --- a/mysql-test/t/blackhole.test +++ b/mysql-test/t/blackhole.test @@ -142,7 +142,6 @@ CREATE TABLE t1(a INT) ENGINE=BLACKHOLE; INSERT DELAYED INTO t1 VALUES(1); DROP TABLE t1; -# End of 4.1 tests # #Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX @@ -159,4 +158,27 @@ ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; -# End of 5.0 tests +# +# Bug#35178 INSERT_ID not written to binary log for inserts against BLACKHOLE backed tables +# +# +# the test checks that explicitly prescribed with set insert_id= value +# preceeds the following autoincrement insert in a blachhole +# + +reset master; +create table t1 (a int auto_increment, primary key (a)) engine=blackhole; + +# not insert_id prescribed insert binlogs with the default set insert_id 1 +insert into t1 values (11), (NULL), (NULL), (NULL); +set insert_id= 3; +insert into t1 values (NULL), (33), (NULL); +set insert_id= 5; +insert into t1 values (55), (NULL); +source include/show_binlog_events2.inc; + +# cleanup +drop table t1; + + +# End of tests diff --git a/sql/ha_blackhole.cc b/sql/ha_blackhole.cc index e477686d18e..01ede3d3bd2 100644 --- a/sql/ha_blackhole.cc +++ b/sql/ha_blackhole.cc @@ -115,7 +115,7 @@ const char *ha_blackhole::index_type(uint key_number) int ha_blackhole::write_row(byte * buf) { DBUG_ENTER("ha_blackhole::write_row"); - DBUG_RETURN(0); + DBUG_RETURN(table->next_number_field ? update_auto_increment() : 0); } int ha_blackhole::rnd_init(bool scan) From edce44eea0b09d0d052c9d8f2ba523136a6644b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 15:01:03 -0300 Subject: [PATCH 456/527] Bug#30960 processlist state '*** DEAD ***' on recent 5.0.48 windows builds The problem is that unimplemented WIN32 version of pthread_kill is returning ESRCH no matter the arguments, causing calls to mysqld_list_processes to set the procinfo to dead because pthread_kill returns non zero. The dead procinfo would show up on a second invocation of show processlist. include/my_pthread.h: When unimplemented, pthread_kill must return zero for any process id other then zero. --- include/my_pthread.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/my_pthread.h b/include/my_pthread.h index 13b7cf93d6f..51202d6665e 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -181,7 +181,7 @@ extern int pthread_mutex_destroy (pthread_mutex_t *); #define pthread_mutex_unlock(A) LeaveCriticalSection(A) #define pthread_mutex_destroy(A) DeleteCriticalSection(A) #define my_pthread_setprio(A,B) SetThreadPriority(GetCurrentThread(), (B)) -#define pthread_kill(A,B) pthread_dummy(ESRCH) +#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #endif /* OS2 */ /* Dummy defines for easier code */ @@ -445,14 +445,14 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res); #define pthread_attr_setdetachstate(A,B) pthread_dummy(0) #define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D)) #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#define pthread_kill(A,B) pthread_dummy(ESRCH) +#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #undef pthread_detach_this_thread #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); } #endif #ifdef HAVE_DARWIN5_THREADS #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) -#define pthread_kill(A,B) pthread_dummy(ESRCH) +#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #define pthread_condattr_init(A) pthread_dummy(0) #define pthread_condattr_destroy(A) pthread_dummy(0) #undef pthread_detach_this_thread @@ -472,7 +472,7 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res); #ifndef pthread_sigmask #define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C)) #endif -#define pthread_kill(A,B) pthread_dummy(ESRCH) +#define pthread_kill(A,B) pthread_dummy((A) ? 0 : ESRCH) #undef pthread_detach_this_thread #define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); } #elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */ From 3e9928c624db668b9472a57e110f13373d57160f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 19:13:28 +0100 Subject: [PATCH 457/527] support-files/mysql.spec.sh : Add the man pages for "ndbd" and "ndb_mgmd". support-files/mysql.spec.sh: Add the man pages for "ndbd" and "ndb_mgmd". --- support-files/mysql.spec.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index b28af51d43e..49cb86d5bd5 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -642,10 +642,12 @@ fi %files ndb-storage %defattr(-,root,root,0755) %attr(755, root, root) %{_sbindir}/ndbd +%doc %attr(644, root, man) %{_mandir}/man8/ndbd.8* %files ndb-management %defattr(-,root,root,0755) %attr(755, root, root) %{_sbindir}/ndb_mgmd +%doc %attr(644, root, man) %{_mandir}/man8/ndb_mgmd.8* %files ndb-tools %defattr(-,root,root,0755) @@ -737,6 +739,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Wed Mar 19 2008 Joerg Bruehe + +- Add the man pages for "ndbd" and "ndb_mgmd". + * Fri Mar 02 2007 Joerg Bruehe - Add several man pages for NDB which are now created. From 8dad72ee4cf108e206ec93a1a46c96a6d9950e7e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 18:13:56 -0400 Subject: [PATCH 458/527] Bug#30378: mysql.server needs to skip wait_for_pid() when mysqld \ isn't running Pass the process id of the manager as a parameter to "wait_for_pid" and if the manager isn't running, then do not continue to wait. Also, capture the error message of our process-existence test, "kill -0", as we expect errors and shouldn't pass them to the user. Additionally, be a bit more descriptive of what the problem is. support-files/mysql.server.sh: Test that the PID-file's manager is running while we're waiting for something to happen with the pid-file. Capture the error message of our process-existence test, "kill -0", as we expect errors and shouldn't pass them to the user. Additionally, be a bit more descriptive of what the problem is. --- support-files/mysql.server.sh | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index 0a87b04c992..be8a8bd741e 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -150,22 +150,45 @@ parse_manager_arguments() { } wait_for_pid () { + verb="$1" + manager_pid="$2" # process ID of the program operating on the pid-file i=0 + avoid_race_condition="by checking again" while test $i -ne $service_startup_timeout ; do sleep 1 - case "$1" in + + case "$verb" in 'created') + # wait for a PID-file to pop into existence. test -s $pid_file && i='' && break - kill -0 $2 || break # if the program goes away, stop waiting ;; 'removed') + # wait for this PID-file to disappear test ! -s $pid_file && i='' && break ;; *) - echo "wait_for_pid () usage: wait_for_pid created|removed" + echo "wait_for_pid () usage: wait_for_pid created|removed manager_pid" exit 1 ;; esac + + # if manager isn't running, then pid-file will never be updated + if test -n "$manager_pid"; then + if kill -0 "$manager_pid" 2>/dev/null; then + : # the manager still runs + else + # The manager may have exited between the last pid-file check and now. + if test -n "$avoid_race_condition"; then + avoid_race_condition="" + continue # Check again. + fi + + # there's nothing that will affect the file. + log_failure_msg "Manager of pid-file quit without updating file." + return 1 # not waiting any more. + fi + fi + echo $echo_n ".$echo_c" i=`expr $i + 1` done @@ -335,7 +358,7 @@ case "$mode" in echo $echo_n "Shutting down MySQL" kill $mysqlmanager_pid # mysqlmanager should remove the pid_file when it exits, so wait for it. - wait_for_pid removed; return_value=$? + wait_for_pid removed "$mysqlmanager_pid"; return_value=$? # delete lock for RedHat / SuSE if test -f $lock_dir From c10b1b3b7c2dc50dcc512b2c4c506a0e09f0e71a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2008 18:36:41 -0400 Subject: [PATCH 459/527] Suggestion of Tim. Avoid unnecessary sleep. --- support-files/mysql.server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index be8a8bd741e..ac7a9c25ce6 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -155,7 +155,6 @@ wait_for_pid () { i=0 avoid_race_condition="by checking again" while test $i -ne $service_startup_timeout ; do - sleep 1 case "$verb" in 'created') @@ -191,6 +190,7 @@ wait_for_pid () { echo $echo_n ".$echo_c" i=`expr $i + 1` + sleep 1 done if test -z "$i" ; then From 95023bb9b0702cc9e080d67ab79cf56d2c12fd97 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Mar 2008 11:40:26 +0400 Subject: [PATCH 460/527] BUG#34790 - 'create server' doesn't handle out of memory scenario well enough CREATE SERVER may cause server crash if there is not enough memory to execute this operation. Fixed that create_server() and prepare_server_struct_for_insert() didn't check return value of functions that allocate memory. As this is out of memory issue fix, not test case available. sql/sql_servers.cc: Fixed that create_server() and prepare_server_struct_for_insert() didn't check return value of functions that allocate memory. --- sql/sql_servers.cc | 68 ++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 26 deletions(-) diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index 8203ca92eed..6255901d782 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -55,8 +55,8 @@ static bool get_server_from_table_to_cache(TABLE *table); static int insert_server(THD *thd, FOREIGN_SERVER *server_options); static int insert_server_record(TABLE *table, FOREIGN_SERVER *server); static int insert_server_record_into_cache(FOREIGN_SERVER *server); -static void prepare_server_struct_for_insert(LEX_SERVER_OPTIONS *server_options, - FOREIGN_SERVER *server); +static FOREIGN_SERVER * +prepare_server_struct_for_insert(LEX_SERVER_OPTIONS *server_options); /* drop functions */ static int delete_server_record(TABLE *table, char *server_name, @@ -966,10 +966,14 @@ int create_server(THD *thd, LEX_SERVER_OPTIONS *server_options) server_options->server_name_length)) goto end; - server= (FOREIGN_SERVER *)alloc_root(&mem, - sizeof(FOREIGN_SERVER)); - prepare_server_struct_for_insert(server_options, server); + if (!(server= prepare_server_struct_for_insert(server_options))) + { + /* purecov: begin inspected */ + error= ER_OUT_OF_RESOURCES; + goto end; + /* purecov: end */ + } error= insert_server(thd, server); @@ -1040,52 +1044,64 @@ end: SYNOPSIS prepare_server_struct_for_insert() LEX_SERVER_OPTIONS *server_options - FOREIGN_SERVER *server NOTES + As FOREIGN_SERVER members are allocated on mem_root, we do not need to + free them in case of error. RETURN VALUE - none + On success filled FOREIGN_SERVER, or NULL in case out of memory. */ -static void -prepare_server_struct_for_insert(LEX_SERVER_OPTIONS *server_options, - FOREIGN_SERVER *server) +static FOREIGN_SERVER * +prepare_server_struct_for_insert(LEX_SERVER_OPTIONS *server_options) { char *unset_ptr= (char*)""; + FOREIGN_SERVER *server; DBUG_ENTER("prepare_server_struct"); + if (!(server= (FOREIGN_SERVER *)alloc_root(&mem, sizeof(FOREIGN_SERVER)))) + DBUG_RETURN(NULL); /* purecov: inspected */ + /* these two MUST be set */ - server->server_name= strdup_root(&mem, server_options->server_name); + if (!(server->server_name= strdup_root(&mem, server_options->server_name))) + DBUG_RETURN(NULL); /* purecov: inspected */ server->server_name_length= server_options->server_name_length; - server->host= server_options->host ? - strdup_root(&mem, server_options->host) : unset_ptr; + if (!(server->host= server_options->host ? + strdup_root(&mem, server_options->host) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - server->db= server_options->db ? - strdup_root(&mem, server_options->db) : unset_ptr; + if (!(server->db= server_options->db ? + strdup_root(&mem, server_options->db) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - server->username= server_options->username ? - strdup_root(&mem, server_options->username) : unset_ptr; + if (!(server->username= server_options->username ? + strdup_root(&mem, server_options->username) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - server->password= server_options->password ? - strdup_root(&mem, server_options->password) : unset_ptr; + if (!(server->password= server_options->password ? + strdup_root(&mem, server_options->password) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ /* set to 0 if not specified */ server->port= server_options->port > -1 ? server_options->port : 0; - server->socket= server_options->socket ? - strdup_root(&mem, server_options->socket) : unset_ptr; + if (!(server->socket= server_options->socket ? + strdup_root(&mem, server_options->socket) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - server->scheme= server_options->scheme ? - strdup_root(&mem, server_options->scheme) : unset_ptr; + if (!(server->scheme= server_options->scheme ? + strdup_root(&mem, server_options->scheme) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - server->owner= server_options->owner ? - strdup_root(&mem, server_options->owner) : unset_ptr; + if (!(server->owner= server_options->owner ? + strdup_root(&mem, server_options->owner) : unset_ptr)) + DBUG_RETURN(NULL); /* purecov: inspected */ - DBUG_VOID_RETURN; + DBUG_RETURN(server); } /* From b31a1622e33b92d926e7e4346a027694156353c0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Mar 2008 11:57:30 +0400 Subject: [PATCH 461/527] BUG#34789 - drop server/create server leaks memory ! When CREATE SERVER is issued, it allocates memory on memory root to store cached server structure. When DROP SERVER is issued, it doesn't release this memory, as it is impossible with the memory root. We use the same allocation strategy for plugins and acl. The problem here that there was no way (except for the server restart) to force 'servers' code to release this memory. With this fix it is possible to release unused server cache memory by FLUSH PRIVILEGES. No test case for this fix. sql/sql_parse.cc: Reload servers table on FLUSH PRIVILEGES. sql/sql_servers.cc: Instead of just marking memory blocks as unused, release memory used by servers cache and initialize new memory root. This is needed for FLUSH PRIVILEGES to release unused memory blocks. --- sql/sql_parse.cc | 2 ++ sql/sql_servers.cc | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f2e0065f860..046eae4e654 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6486,6 +6486,8 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, result= 1; if (grant_reload(thd)) result= 1; + if (servers_reload(thd)) + result= 1; } if (tmp_thd) { diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index 8203ca92eed..42abd9b4eb5 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -166,6 +166,9 @@ end: RETURN VALUES FALSE Success TRUE Error + + TODO + Revert back to old list if we failed to load new one. */ static bool servers_load(THD *thd, TABLE_LIST *tables) @@ -175,10 +178,9 @@ static bool servers_load(THD *thd, TABLE_LIST *tables) bool return_val= TRUE; DBUG_ENTER("servers_load"); - /* first, send all cached rows to sleep with the fishes, oblivion! - I expect this crappy comment replaced */ - free_root(&mem, MYF(MY_MARK_BLOCKS_FREE)); my_hash_reset(&servers_cache); + free_root(&mem, MYF(0)); + init_alloc_root(&mem, ACL_ALLOC_BLOCK_SIZE, 0); init_read_record(&read_record_info,thd,table=tables[0].table,NULL,1,0); while (!(read_record_info.read_record(&read_record_info))) From 1975532945bd1e719cf88e646907e22002635e51 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Mar 2008 11:36:35 +0300 Subject: [PATCH 462/527] A test case for Bug#29958: Weird message on DROP DATABASE if mysql.proc does not exist. mysql-test/r/drop.result: Update result file. mysql-test/t/drop.test: Add a test case for Bug#29958: Weird message on DROP DATABASE if mysql.proc does not exist. --- mysql-test/r/drop.result | 16 ++++++++++++++++ mysql-test/t/drop.test | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result index 71d6fcc7cd0..ea34fa316a2 100644 --- a/mysql-test/r/drop.result +++ b/mysql-test/r/drop.result @@ -91,4 +91,20 @@ create table mysql_test.`#sql-347f_7` (f1 int); create table mysql_test.`#sql-347f_8` (f1 int); drop table mysql_test.`#sql-347f_8`; drop database mysql_test; + +# -- +# -- Bug#29958: Weird message on DROP DATABASE if mysql.proc does not +# -- exist. +# -- +DROP DATABASE IF EXISTS mysql_test; +CREATE DATABASE mysql_test; +DROP TABLE mysql.proc; +DROP DATABASE mysql_test; +Warnings: +Error 1146 Table 'mysql.proc' doesn't exist + +# -- +# -- End of Bug#29958. +# -- + End of 5.1 tests diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index a79044436eb..1668d2f3d09 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -134,4 +134,38 @@ drop table mysql_test.`#sql-347f_8`; copy_file $MYSQLTEST_VARDIR/master-data/mysql_test/t1.frm $MYSQLTEST_VARDIR/master-data/mysql_test/#sql-347f_6.frm; drop database mysql_test; +########################################################################### + +--echo +--echo # -- +--echo # -- Bug#29958: Weird message on DROP DATABASE if mysql.proc does not +--echo # -- exist. +--echo # -- + +--disable_warnings +DROP DATABASE IF EXISTS mysql_test; +--enable_warnings + +CREATE DATABASE mysql_test; + +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.frm +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYD +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYI + +DROP TABLE mysql.proc; + +DROP DATABASE mysql_test; + +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.frm $MYSQLTEST_VARDIR/master-data/mysql/proc.frm +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI + +--echo +--echo # -- +--echo # -- End of Bug#29958. +--echo # -- + +########################################################################### + +--echo --echo End of 5.1 tests From 8030bdfc16a647c15e0de5e07b5f53d263ef5ca2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Mar 2008 19:07:17 +0400 Subject: [PATCH 463/527] BUG#34788 - malformed federated connection url is not handled correctly - crashes server ! Creating federated table with connect string containing empty (zero-length) host name and port is evaluated as 0 (port is incorrect, omitted or 0) crashes server. This happens because federated calls strcmp() with NULL pointer. Fixed by avoiding strcmp() call if hostname is set to NULL. mysql-test/r/federated.result: A test case for BUG#34788. mysql-test/t/federated.test: A test case for BUG#34788. sql/ha_federated.cc: Fixed that parse_url() may call strcmp() with NULL pointer. --- mysql-test/r/federated.result | 2 ++ mysql-test/t/federated.test | 7 +++++++ sql/ha_federated.cc | 9 ++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index 3a934e7fe3c..685e4d0c335 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -2069,6 +2069,8 @@ a b 1 1 DROP TABLE t1; DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://'; +DROP TABLE t1; DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index 934db5cd68b..f33dfa3a1b8 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1738,4 +1738,11 @@ DROP TABLE t1; connection slave; DROP TABLE t1; +# +# BUG#34788 - malformed federated connection url is not handled correctly - +# crashes server ! +# +CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://'; +DROP TABLE t1; + source include/federated_cleanup.inc; diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index c0743bd6c9a..a5e4714c53a 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -643,12 +643,19 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, if ((strchr(share->table_name, '/'))) goto error; + /* + If hostname is omitted, we set it to NULL. According to + mysql_real_connect() manual: + The value of host may be either a hostname or an IP address. + If host is NULL or the string "localhost", a connection to the + local host is assumed. + */ if (share->hostname[0] == '\0') share->hostname= NULL; if (!share->port) { - if (strcmp(share->hostname, my_localhost) == 0) + if (!share->hostname || strcmp(share->hostname, my_localhost) == 0) share->socket= my_strdup(MYSQL_UNIX_ADDR, MYF(0)); else share->port= MYSQL_PORT; From 8eb0166801e33d9db1b17c25d4fabbde68ed4852 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Mar 2008 10:52:00 +0300 Subject: [PATCH 464/527] Fix tree. --- mysql-test/t/drop.test | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test index 1668d2f3d09..7c60c7daf69 100644 --- a/mysql-test/t/drop.test +++ b/mysql-test/t/drop.test @@ -148,17 +148,17 @@ DROP DATABASE IF EXISTS mysql_test; CREATE DATABASE mysql_test; ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.frm ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYD ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYI +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.frm $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD +--copy_file $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI DROP TABLE mysql.proc; DROP DATABASE mysql_test; ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.frm $MYSQLTEST_VARDIR/master-data/mysql/proc.frm ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD ---copy_file $MYSQLTEST_VARDIR/master-data/mysql/backup.proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI +--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.frm $MYSQLTEST_VARDIR/master-data/mysql/proc.frm +--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYD $MYSQLTEST_VARDIR/master-data/mysql/proc.MYD +--copy_file $MYSQLTEST_VARDIR/tmp/bug29958.proc.MYI $MYSQLTEST_VARDIR/master-data/mysql/proc.MYI --echo --echo # -- From cebb6727b3c8593283f81182d06c45ca69cc0304 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Mar 2008 17:23:17 +0200 Subject: [PATCH 465/527] Bug #26461: Intrinsic data type bool (1 byte) redefined to BOOL (4 bytes) The bool data type was redefined to BOOL (4 bytes on windows). Removed the #define and fixed some of the warnings that were uncovered by this. Note that the fix also disables 2 warnings : 4800 : 'type' : forcing value to bool 'true' or 'false' (performance warning) 4805: 'operation' : unsafe mix of type 'type' and type 'type' in operation These warnings will be handled in a separate bug, as they are performance related or bogus. Fixed to int the return type of functions that return more than 2 distinct values. CMakeLists.txt: Bug #26461: disable the C4800 and C4805 warnings temporarily include/config-win.h: Bug #26461: - no need for this define for Windows. - windows C++ compilers have a bool type include/my_global.h: Bug #26461: removed bool_defined (no longer needed) sql/handler.h: Bug #26461: bool functions must return boolean values sql/mysql_priv.h: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/procedure.h: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_acl.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_acl.h: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_analyse.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_analyse.h: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_base.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_db.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_delete.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_load.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_parse.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_prepare.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. sql/sql_update.cc: Bug #26461: fixed return type of functions that return more than 2 distinct values. --- CMakeLists.txt | 4 ++++ include/config-win.h | 4 +--- include/my_global.h | 2 +- sql/handler.h | 2 +- sql/mysql_priv.h | 14 +++++++------- sql/procedure.h | 2 +- sql/sql_acl.cc | 6 +++--- sql/sql_acl.h | 6 +++--- sql/sql_analyse.cc | 2 +- sql/sql_analyse.h | 2 +- sql/sql_base.cc | 2 +- sql/sql_db.cc | 2 +- sql/sql_delete.cc | 4 ++-- sql/sql_load.cc | 2 +- sql/sql_parse.cc | 4 ++-- sql/sql_prepare.cc | 6 +++--- sql/sql_update.cc | 2 +- 17 files changed, 34 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27b2bf9b70e..77c95e16a76 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,10 @@ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDBUG_OFF SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DDBUG_OFF") SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DDBUG_OFF") +#TODO: update the code and remove the disabled warnings +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805") +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805") + IF(CMAKE_GENERATOR MATCHES "Visual Studio 8") SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996") SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996") diff --git a/include/config-win.h b/include/config-win.h index 45bfeb5ba26..c9c25d44691 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -157,14 +157,12 @@ typedef uint rf_SetTimer; #define Socket_defined #define my_socket SOCKET -#define bool BOOL #define SIGPIPE SIGINT #define RETQSORTTYPE void #define QSORT_TYPE_IS_VOID #define RETSIGTYPE void #define SOCKET_SIZE_TYPE int #define my_socket_defined -#define bool_defined #define byte_defined #define HUGE_PTR #define STDCALL __stdcall /* Used by libmysql.dll */ @@ -457,4 +455,4 @@ inline double ulonglong2double(ulonglong value) #define HAVE_CHARSET_ujis 1 #define HAVE_CHARSET_utf8 1 #define HAVE_UCA_COLLATIONS 1 - +#define HAVE_BOOL 1 diff --git a/include/my_global.h b/include/my_global.h index 08877300d8a..f0f33a7de8b 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -980,7 +980,7 @@ typedef int myf; /* Type of MyFlags in my_funcs */ typedef char byte; /* Smallest addressable unit */ #endif typedef char my_bool; /* Small bool */ -#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) +#if !defined(bool) && (!defined(HAVE_BOOL) || !defined(__cplusplus)) typedef char bool; /* Ordinary boolean values 0 1 */ #endif /* Macros for converting *constants* to the right type */ diff --git a/sql/handler.h b/sql/handler.h index 74c09d2d9ee..aa3377c3868 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -815,7 +815,7 @@ public: { return HA_ADMIN_NOT_IMPLEMENTED; } /* end of the list of admin commands */ - virtual bool check_and_repair(THD *thd) { return HA_ERR_WRONG_COMMAND; } + virtual bool check_and_repair(THD *thd) { return TRUE; } virtual int dump(THD* thd, int fd = -1) { return HA_ERR_WRONG_COMMAND; } virtual int disable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } virtual int enable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 59ec18e1a3d..0b488900ac5 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -597,8 +597,8 @@ bool check_merge_table_access(THD *thd, char *db, bool check_some_routine_access(THD *thd, const char *db, const char *name, bool is_proc); bool multi_update_precheck(THD *thd, TABLE_LIST *tables); bool multi_delete_precheck(THD *thd, TABLE_LIST *tables); -bool mysql_multi_update_prepare(THD *thd); -bool mysql_multi_delete_prepare(THD *thd); +int mysql_multi_update_prepare(THD *thd); +int mysql_multi_delete_prepare(THD *thd); bool mysql_insert_select_prepare(THD *thd); bool update_precheck(THD *thd, TABLE_LIST *tables); bool delete_precheck(THD *thd, TABLE_LIST *tables); @@ -691,7 +691,7 @@ struct Query_cache_query_flags uint build_table_path(char *buff, size_t bufflen, const char *db, const char *table, const char *ext); -bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent); +int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create, bool silent); bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create); bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent); void mysql_binlog_send(THD* thd, char* log_ident, my_off_t pos, ushort flags); @@ -731,7 +731,7 @@ pthread_handler_t handle_one_connection(void *arg); pthread_handler_t handle_bootstrap(void *arg); void end_thread(THD *thd,bool put_in_cache); void flush_thread_cache(); -bool mysql_execute_command(THD *thd); +int mysql_execute_command(THD *thd); bool dispatch_command(enum enum_server_command command, THD *thd, char* packet, uint packet_length); void log_slow_statement(THD *thd); @@ -862,7 +862,7 @@ void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, enum_duplicates duplic); void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table, enum_duplicates duplic); -bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); +int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows rows, ulonglong options, bool reset_auto_increment); @@ -1106,7 +1106,7 @@ int init_ftfuncs(THD *thd, SELECT_LEX* select, bool no_order); void wait_for_refresh(THD *thd); int open_tables(THD *thd, TABLE_LIST **tables, uint *counter, uint flags); int simple_open_n_lock_tables(THD *thd,TABLE_LIST *tables); -bool open_and_lock_tables(THD *thd,TABLE_LIST *tables); +int open_and_lock_tables(THD *thd,TABLE_LIST *tables); bool open_normal_and_derived_tables(THD *thd, TABLE_LIST *tables, uint flags); int lock_tables(THD *thd, TABLE_LIST *tables, uint counter, bool *need_reopen); TABLE *open_temporary_table(THD *thd, const char *path, const char *db, @@ -1177,7 +1177,7 @@ inline TABLE_LIST *find_table_in_local_list(TABLE_LIST *table, bool eval_const_cond(COND *cond); /* sql_load.cc */ -bool mysql_load(THD *thd, sql_exchange *ex, TABLE_LIST *table_list, +int mysql_load(THD *thd, sql_exchange *ex, TABLE_LIST *table_list, List &fields_vars, List &set_fields, List &set_values_list, enum enum_duplicates handle_duplicates, bool ignore, diff --git a/sql/procedure.h b/sql/procedure.h index 850d5c74db4..f1fb433a6ee 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -144,7 +144,7 @@ public: virtual int send_row(List &fields)=0; virtual bool change_columns(List &fields)=0; virtual void update_refs(void) {} - virtual bool end_of_records() { return 0; } + virtual int end_of_records() { return 0; } }; Procedure *setup_procedure(THD *thd,ORDER *proc_param,select_result *result, diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index e9504f423ad..e773f754e18 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1382,7 +1382,7 @@ bool acl_check_host(const char *host, const char *ip) 1 ERROR ; In this case the error is sent to the client. */ -bool check_change_password(THD *thd, const char *host, const char *user, +int check_change_password(THD *thd, const char *host, const char *user, char *new_password, uint new_password_len) { if (!initialized) @@ -2763,7 +2763,7 @@ table_error: TRUE error */ -bool mysql_table_grant(THD *thd, TABLE_LIST *table_list, +int mysql_table_grant(THD *thd, TABLE_LIST *table_list, List &user_list, List &columns, ulong rights, bool revoke_grant) @@ -5805,7 +5805,7 @@ bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, < 0 Error. Error message not yet sent. */ -bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, +int sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, bool is_proc) { Security_context *sctx= thd->security_ctx; diff --git a/sql/sql_acl.h b/sql/sql_acl.h index b2007ccdf47..1efcd2e3b6b 100644 --- a/sql/sql_acl.h +++ b/sql/sql_acl.h @@ -183,13 +183,13 @@ int acl_getroot(THD *thd, USER_RESOURCES *mqh, const char *passwd, bool acl_getroot_no_password(Security_context *sctx, char *user, char *host, char *ip, char *db); bool acl_check_host(const char *host, const char *ip); -bool check_change_password(THD *thd, const char *host, const char *user, +int check_change_password(THD *thd, const char *host, const char *user, char *password, uint password_len); bool change_password(THD *thd, const char *host, const char *user, char *password); bool mysql_grant(THD *thd, const char *db, List &user_list, ulong rights, bool revoke); -bool mysql_table_grant(THD *thd, TABLE_LIST *table, List &user_list, +int mysql_table_grant(THD *thd, TABLE_LIST *table, List &user_list, List &column_list, ulong rights, bool revoke); bool mysql_routine_grant(THD *thd, TABLE_LIST *table, bool is_proc, @@ -225,7 +225,7 @@ void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant, const char *db, const char *table); bool sp_revoke_privileges(THD *thd, const char *sp_db, const char *sp_name, bool is_proc); -bool sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, +int sp_grant_privileges(THD *thd, const char *sp_db, const char *sp_name, bool is_proc); bool check_routine_level_acl(THD *thd, const char *db, const char *name, bool is_proc); diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 95a7fb3d34d..2e90d00f8aa 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -683,7 +683,7 @@ int analyse::send_row(List &field_list __attribute__((unused))) } // analyse::send_row -bool analyse::end_of_records() +int analyse::end_of_records() { field_info **f = f_info; char buff[MAX_FIELD_WIDTH]; diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h index 21a37209e89..2a4226b2d95 100644 --- a/sql/sql_analyse.h +++ b/sql/sql_analyse.h @@ -350,7 +350,7 @@ public: virtual bool change_columns(List &fields); virtual int send_row(List &fields); virtual void end_group(void) {} - virtual bool end_of_records(void); + virtual int end_of_records(void); friend Procedure *proc_analyse_init(THD *thd, ORDER *param, select_result *result, List &field_list); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index c9f20b3d71b..533b0070fee 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -3046,7 +3046,7 @@ int simple_open_n_lock_tables(THD *thd, TABLE_LIST *tables) The lock will automaticaly be freed by close_thread_tables() */ -bool open_and_lock_tables(THD *thd, TABLE_LIST *tables) +int open_and_lock_tables(THD *thd, TABLE_LIST *tables) { uint counter; bool need_reopen; diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 91b0c02d23b..e25ede1be03 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -449,7 +449,7 @@ bool load_db_opt_by_name(THD *thd, const char *db_name, */ -bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, +int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, bool silent) { char path[FN_REFLEN+16]; diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index a28a39a769d..af895c172ff 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -370,7 +370,7 @@ cleanup: FALSE OK TRUE error */ -bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) +int mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds) { Item *fake_conds= 0; SELECT_LEX *select_lex= &thd->lex->select_lex; @@ -433,7 +433,7 @@ extern "C" int refpos_order_cmp(void* arg, const void *a,const void *b) TRUE Error */ -bool mysql_multi_delete_prepare(THD *thd) +int mysql_multi_delete_prepare(THD *thd) { LEX *lex= thd->lex; TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxiliary_table_list.first; diff --git a/sql/sql_load.cc b/sql/sql_load.cc index d687ceff393..4da3c19bb3c 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -110,7 +110,7 @@ static bool write_execute_load_query_log_event(THD *thd, TRUE - error / FALSE - success */ -bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, +int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, List &fields_vars, List &set_fields, List &set_values, enum enum_duplicates handle_duplicates, bool ignore, diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8bdbd812529..98e04e45bdd 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2500,10 +2500,10 @@ static void reset_one_shot_variables(THD *thd) TRUE Error */ -bool +int mysql_execute_command(THD *thd) { - bool res= FALSE; + int res= FALSE; bool need_start_waiting= FALSE; // have protection against global read lock int up_result= 0; LEX *lex= thd->lex; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 18cfd8d7dfc..220b9a0bcd8 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1403,7 +1403,7 @@ error: */ static bool select_like_stmt_test(Prepared_statement *stmt, - bool (*specific_prepare)(THD *thd), + int (*specific_prepare)(THD *thd), ulong setup_tables_done_option) { DBUG_ENTER("select_like_stmt_test"); @@ -1441,7 +1441,7 @@ static bool select_like_stmt_test(Prepared_statement *stmt, static bool select_like_stmt_test_with_open_n_lock(Prepared_statement *stmt, TABLE_LIST *tables, - bool (*specific_prepare)(THD *thd), + int (*specific_prepare)(THD *thd), ulong setup_tables_done_option) { DBUG_ENTER("select_like_stmt_test_with_open_n_lock"); @@ -1630,7 +1630,7 @@ error: because mysql_handle_derived uses local tables lists. */ -static bool mysql_insert_select_prepare_tester(THD *thd) +static int mysql_insert_select_prepare_tester(THD *thd) { SELECT_LEX *first_select= &thd->lex->select_lex; TABLE_LIST *second_table= ((TABLE_LIST*)first_select->table_list.first)-> diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 84349a40977..541704cfaf1 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -716,7 +716,7 @@ static table_map get_table_map(List *items) TRUE Error */ -bool mysql_multi_update_prepare(THD *thd) +int mysql_multi_update_prepare(THD *thd) { LEX *lex= thd->lex; TABLE_LIST *table_list= lex->query_tables; From d05f6b9fb8a5c02ef27390c34ebe97c26dda7923 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Mar 2008 18:34:12 +0300 Subject: [PATCH 466/527] A patch for Bug#21854: Problems with CREATE TRIGGER without DEFINER clause in --skip-grant-tables mode. Update error message. mysql-test/r/information_schema_db.result: Update result file. mysql-test/r/sp-security.result: Update result file. mysql-test/r/trigger_notembedded.result: Update result file. mysql-test/r/view_grant.result: Update result file. sql/share/errmsg.txt: Update error message. --- mysql-test/r/information_schema_db.result | 6 +++--- mysql-test/r/sp-security.result | 8 ++++---- mysql-test/r/trigger_notembedded.result | 4 ++-- mysql-test/r/view_grant.result | 16 ++++++++-------- sql/share/errmsg.txt | 3 +-- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index 3044a11fb39..fc68e9d3518 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -128,7 +128,7 @@ grant show view on v6 to testdb_2@localhost; create table t2 (f1 char(4)); create definer=`no_such_user`@`no_such_host` view v7 as select * from t2; Warnings: -Note 1449 There is no 'no_such_user'@'no_such_host' registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered show fields from testdb_1.v6; Field Type Null Key Default Extra f1 char(4) YES NULL @@ -144,7 +144,7 @@ show fields from testdb_1.v7; Field Type Null Key Default Extra f1 char(4) YES NULL Warnings: -Note 1449 There is no 'no_such_user'@'no_such_host' registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered create table t3 (f1 char(4), f2 char(4)); create view v3 as select f1,f2 from t3; grant insert(f1), insert(f2) on v3 to testdb_2@localhost; @@ -164,7 +164,7 @@ show fields from testdb_1.v7; Field Type Null Key Default Extra f1 char(4) YES NULL Warnings: -Note 1449 There is no 'no_such_user'@'no_such_host' registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered show create view testdb_1.v7; View Create View character_set_client collation_connection v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2` latin1 latin1_swedish_ci diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 1a1645ca971..93503e68cd1 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -357,10 +357,10 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation use mysqltest; CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3; Warnings: -Note 1449 There is no 'a @ b @ c'@'localhost' registered +Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered CREATE DEFINER='a @ b @ c'@localhost FUNCTION wl2897_f3() RETURNS INT RETURN 3; Warnings: -Note 1449 There is no 'a @ b @ c'@'localhost' registered +Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered ---> connection: con1root use mysqltest; @@ -420,9 +420,9 @@ DROP USER mysqltest_1@localhost; ---> connection: mysqltest_2_con use mysqltest; CALL bug13198_p1(); -ERROR HY000: There is no 'mysqltest_1'@'localhost' registered +ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered SELECT bug13198_f1(); -ERROR HY000: There is no 'mysqltest_1'@'localhost' registered +ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered ---> connection: root DROP USER mysqltest_2@localhost; diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index 87e8f68da38..d07f64b8afb 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -133,9 +133,9 @@ CREATE DEFINER='mysqltest_nonexs'@'localhost' FOR EACH ROW SET @new_sum = 0; Warnings: -Note 1449 There is no 'mysqltest_nonexs'@'localhost' registered +Note 1449 The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered INSERT INTO t1 VALUES(6); -ERROR HY000: There is no 'mysqltest_nonexs'@'localhost' registered +ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation trg1 INSERT t1 SET @new_sum = 0 BEFORE NULL mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 133fb5600bf..1c374d9f5e6 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -515,10 +515,10 @@ drop user mysqltest_1@localhost; drop database mysqltest; create definer=some_user@`` sql security invoker view v1 as select 1; Warnings: -Note 1449 There is no 'some_user'@'' registered +Note 1449 The user specified as a definer ('some_user'@'') is invalid or not registered create definer=some_user@localhost sql security invoker view v2 as select 1; Warnings: -Note 1449 There is no 'some_user'@'localhost' registered +Note 1449 The user specified as a definer ('some_user'@'localhost') is invalid or not registered show create view v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci @@ -601,14 +601,14 @@ CREATE TABLE t1 (a INT PRIMARY KEY); INSERT INTO t1 VALUES (1), (2), (3); CREATE DEFINER = 'no-such-user'@localhost VIEW v AS SELECT a from t1; Warnings: -Note 1449 There is no 'no-such-user'@'localhost' registered +Note 1449 The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered SHOW CREATE VIEW v; View Create View character_set_client collation_connection v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci Warnings: Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them SELECT * FROM v; -ERROR HY000: There is no 'no-such-user'@'localhost' registered +ERROR HY000: The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered DROP VIEW v; DROP TABLE t1; USE test; @@ -722,7 +722,7 @@ SELECT * FROM v1; ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1' for a superuser SELECT * FROM v1; -ERROR HY000: There is no 'def_17254'@'localhost' registered +ERROR HY000: The user specified as a definer ('def_17254'@'localhost') is invalid or not registered DROP USER inv_17254@localhost; DROP DATABASE db17254; DROP DATABASE IF EXISTS mysqltest_db1; @@ -932,7 +932,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 There is no 'no_such'@'user_1' registered +Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci @@ -940,7 +940,7 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 There is no 'no_such'@'user_1' registered +Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci @@ -948,7 +948,7 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 There is no 'no_such'@'user_2' registered +Note 1449 The user specified as a definer ('no_such'@'user_2') is invalid or not registered SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 693140e642a..7990baa6bb7 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5584,8 +5584,7 @@ ER_VIEW_OTHER_USER eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer" ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen" ER_NO_SUCH_USER - eng "There is no '%-.64s'@'%-.64s' registered" - ger "'%-.64s'@'%-.64s' ist nicht registriert" + eng "The user specified as a definer ('%-.64s'@'%-.64s') does not exist" ER_FORBID_SCHEMA_CHANGE eng "Changing schema from '%-.192s' to '%-.192s' is not allowed." ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt" From 194e43ee68e9f1acb9d1ef380894c4fc4c27f22e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Mar 2008 12:08:04 -0600 Subject: [PATCH 467/527] Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) Fixed the parser to reject SQLSTATE '00000', since '00000' is the successful completion condition, and can not be caught by an exception handler in SQL. mysql-test/r/sp-error.result: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) mysql-test/t/sp-error.test: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) sql/sp_pcontext.cc: Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) --- mysql-test/r/sp-error.result | 12 ++++++++++++ mysql-test/t/sp-error.test | 26 ++++++++++++++++++++++++++ sql/sp_pcontext.cc | 2 ++ 3 files changed, 40 insertions(+) diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result index bc2ab13fe5f..5ac61821cea 100644 --- a/mysql-test/r/sp-error.result +++ b/mysql-test/r/sp-error.result @@ -1638,3 +1638,15 @@ Warning 1287 The syntax 'TYPE=storage_engine' is deprecated and will be removed call p1(); call p1(); drop procedure p1; +drop procedure if exists proc_8759; +create procedure proc_8759() +begin +declare should_be_illegal condition for sqlstate '00000'; +declare continue handler for should_be_illegal set @x=0; +end$$ +ERROR 42000: Bad SQLSTATE: '00000' +create procedure proc_8759() +begin +declare continue handler for sqlstate '00000' set @x=0; +end$$ +ERROR 42000: Bad SQLSTATE: '00000' diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test index 23bce3805af..6896a1ab832 100644 --- a/mysql-test/t/sp-error.test +++ b/mysql-test/t/sp-error.test @@ -2386,6 +2386,32 @@ call p1(); call p1(); drop procedure p1; +# +# Bug#8759 (Stored Procedures: SQLSTATE '00000' should be illegal) +# + +--disable_warnings +drop procedure if exists proc_8759; +--enable_warnings + +delimiter $$; + +--error ER_SP_BAD_SQLSTATE +create procedure proc_8759() +begin + declare should_be_illegal condition for sqlstate '00000'; + declare continue handler for should_be_illegal set @x=0; +end$$ + +--error ER_SP_BAD_SQLSTATE +create procedure proc_8759() +begin + declare continue handler for sqlstate '00000' set @x=0; +end$$ + +delimiter ;$$ + + # # BUG#NNNN: New bug synopsis # diff --git a/sql/sp_pcontext.cc b/sql/sp_pcontext.cc index 8babbd52ff6..414ea12cd7a 100644 --- a/sql/sp_pcontext.cc +++ b/sql/sp_pcontext.cc @@ -51,6 +51,8 @@ sp_cond_check(LEX_STRING *sqlstate) (c < 'A' || 'Z' < c)) return FALSE; } + if (strcmp(sqlstate->str, "00000") == 0) + return FALSE; return TRUE; } From 9965de17bab9c84472c3dc8c92f22c7d98da8f87 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Mar 2008 11:01:31 +0300 Subject: [PATCH 468/527] Fix result files (Bug#21854). mysql-test/r/information_schema_db.result: Update result file. mysql-test/r/sp-security.result: Update result file. mysql-test/r/trigger_notembedded.result: Update result file. mysql-test/r/view_grant.result: Update result file. --- mysql-test/r/information_schema_db.result | 6 +++--- mysql-test/r/sp-security.result | 8 ++++---- mysql-test/r/trigger_notembedded.result | 4 ++-- mysql-test/r/view_grant.result | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result index fc68e9d3518..eff5f117c50 100644 --- a/mysql-test/r/information_schema_db.result +++ b/mysql-test/r/information_schema_db.result @@ -128,7 +128,7 @@ grant show view on v6 to testdb_2@localhost; create table t2 (f1 char(4)); create definer=`no_such_user`@`no_such_host` view v7 as select * from t2; Warnings: -Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') does not exist show fields from testdb_1.v6; Field Type Null Key Default Extra f1 char(4) YES NULL @@ -144,7 +144,7 @@ show fields from testdb_1.v7; Field Type Null Key Default Extra f1 char(4) YES NULL Warnings: -Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') does not exist create table t3 (f1 char(4), f2 char(4)); create view v3 as select f1,f2 from t3; grant insert(f1), insert(f2) on v3 to testdb_2@localhost; @@ -164,7 +164,7 @@ show fields from testdb_1.v7; Field Type Null Key Default Extra f1 char(4) YES NULL Warnings: -Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') is invalid or not registered +Note 1449 The user specified as a definer ('no_such_user'@'no_such_host') does not exist show create view testdb_1.v7; View Create View character_set_client collation_connection v7 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such_user`@`no_such_host` SQL SECURITY DEFINER VIEW `v7` AS select `testdb_1`.`t2`.`f1` AS `f1` from `t2` latin1 latin1_swedish_ci diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result index 93503e68cd1..cf26f0076d7 100644 --- a/mysql-test/r/sp-security.result +++ b/mysql-test/r/sp-security.result @@ -357,10 +357,10 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation use mysqltest; CREATE DEFINER='a @ b @ c'@localhost PROCEDURE wl2897_p3() SELECT 3; Warnings: -Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered +Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') does not exist CREATE DEFINER='a @ b @ c'@localhost FUNCTION wl2897_f3() RETURNS INT RETURN 3; Warnings: -Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') is invalid or not registered +Note 1449 The user specified as a definer ('a @ b @ c'@'localhost') does not exist ---> connection: con1root use mysqltest; @@ -420,9 +420,9 @@ DROP USER mysqltest_1@localhost; ---> connection: mysqltest_2_con use mysqltest; CALL bug13198_p1(); -ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered +ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') does not exist SELECT bug13198_f1(); -ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') is invalid or not registered +ERROR HY000: The user specified as a definer ('mysqltest_1'@'localhost') does not exist ---> connection: root DROP USER mysqltest_2@localhost; diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result index d07f64b8afb..1e13bff03b1 100644 --- a/mysql-test/r/trigger_notembedded.result +++ b/mysql-test/r/trigger_notembedded.result @@ -133,9 +133,9 @@ CREATE DEFINER='mysqltest_nonexs'@'localhost' FOR EACH ROW SET @new_sum = 0; Warnings: -Note 1449 The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered +Note 1449 The user specified as a definer ('mysqltest_nonexs'@'localhost') does not exist INSERT INTO t1 VALUES(6); -ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') is invalid or not registered +ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') does not exist SHOW TRIGGERS; Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation trg1 INSERT t1 SET @new_sum = 0 BEFORE NULL mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 1c374d9f5e6..3585635d0f9 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -515,10 +515,10 @@ drop user mysqltest_1@localhost; drop database mysqltest; create definer=some_user@`` sql security invoker view v1 as select 1; Warnings: -Note 1449 The user specified as a definer ('some_user'@'') is invalid or not registered +Note 1449 The user specified as a definer ('some_user'@'') does not exist create definer=some_user@localhost sql security invoker view v2 as select 1; Warnings: -Note 1449 The user specified as a definer ('some_user'@'localhost') is invalid or not registered +Note 1449 The user specified as a definer ('some_user'@'localhost') does not exist show create view v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`some_user`@`` SQL SECURITY INVOKER VIEW `v1` AS select 1 AS `1` latin1 latin1_swedish_ci @@ -601,14 +601,14 @@ CREATE TABLE t1 (a INT PRIMARY KEY); INSERT INTO t1 VALUES (1), (2), (3); CREATE DEFINER = 'no-such-user'@localhost VIEW v AS SELECT a from t1; Warnings: -Note 1449 The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered +Note 1449 The user specified as a definer ('no-such-user'@'localhost') does not exist SHOW CREATE VIEW v; View Create View character_set_client collation_connection v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci Warnings: Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them SELECT * FROM v; -ERROR HY000: The user specified as a definer ('no-such-user'@'localhost') is invalid or not registered +ERROR HY000: The user specified as a definer ('no-such-user'@'localhost') does not exist DROP VIEW v; DROP TABLE t1; USE test; @@ -722,7 +722,7 @@ SELECT * FROM v1; ERROR 42000: SELECT command denied to user 'inv_17254'@'localhost' for table 'v1' for a superuser SELECT * FROM v1; -ERROR HY000: The user specified as a definer ('def_17254'@'localhost') is invalid or not registered +ERROR HY000: The user specified as a definer ('def_17254'@'localhost') does not exist DROP USER inv_17254@localhost; DROP DATABASE db17254; DROP DATABASE IF EXISTS mysqltest_db1; @@ -932,7 +932,7 @@ View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci ALTER DEFINER=no_such@user_1 VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered +Note 1449 The user specified as a definer ('no_such'@'user_1') does not exist SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=UNDEFINED DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci @@ -940,7 +940,7 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them ALTER ALGORITHM=MERGE VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 The user specified as a definer ('no_such'@'user_1') is invalid or not registered +Note 1449 The user specified as a definer ('no_such'@'user_1') does not exist SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=MERGE DEFINER=`no_such`@`user_1` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci @@ -948,7 +948,7 @@ Warnings: Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them ALTER ALGORITHM=TEMPTABLE DEFINER=no_such@user_2 VIEW v1 AS SELECT * FROM t1; Warnings: -Note 1449 The user specified as a definer ('no_such'@'user_2') is invalid or not registered +Note 1449 The user specified as a definer ('no_such'@'user_2') does not exist SHOW CREATE VIEW v1; View Create View character_set_client collation_connection v1 CREATE ALGORITHM=TEMPTABLE DEFINER=`no_such`@`user_2` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t1`.`i` AS `i` from `t1` latin1 latin1_swedish_ci From 28cd75fec42e327950056617c7dea8ae4d2f6395 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 Mar 2008 11:32:24 +0300 Subject: [PATCH 469/527] Fix for Bug#34274: Invalid handling of 'DEFAULT 0' for YEAR data type. The problem was that for some unknown reason 0 was not allowed as a default value for YEAR data type. That was coded before BK. However the Manual does not say a word about such a limitation. Also, it looks inconsistent with other data types. The fix is to allow 0 as a default value. mysql-test/r/create.result: Update result file. mysql-test/t/create.test: Add a test case for Bug#34274: Invalid handling of 'DEFAULT 0' for YEAR data type. sql/unireg.cc: Allow 0 as a default value for YEAR data type. --- mysql-test/r/create.result | 41 +++++++++++++++++++++++++++++++ mysql-test/t/create.test | 50 +++++++++++++++++++++++++++++++++++++- sql/unireg.cc | 4 +-- 3 files changed, 91 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 81463a3f0f2..85ce830025d 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1847,4 +1847,45 @@ DROP TABLE t3; # -- End of Bug#18834. +# -- +# -- Bug#34274: Invalid handling of 'DEFAULT 0' for YEAR data type. +# -- + +DROP TABLE IF EXISTS t1; + +CREATE TABLE t1(c1 YEAR DEFAULT 2008, c2 YEAR DEFAULT 0); + +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` year(4) DEFAULT '2008', + `c2` year(4) DEFAULT '0000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +INSERT INTO t1 VALUES(); + +SELECT * FROM t1; +c1 c2 +2008 0000 + +ALTER TABLE t1 MODIFY c1 YEAR DEFAULT 0; + +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` year(4) DEFAULT '0000', + `c2` year(4) DEFAULT '0000' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 + +INSERT INTO t1 VALUES(); + +SELECT * FROM t1; +c1 c2 +2008 0000 +0000 0000 + +DROP TABLE t1; + +# -- End of Bug#34274 + End of 5.1 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 28ae38d943a..9cf38742289 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -1365,6 +1365,8 @@ create table t1 like information_schema.character_sets; show create table t1; drop table t1; +########################################################################### + --echo --echo # -- --echo # -- Bug#21380: DEFAULT definition not always transfered by CREATE @@ -1407,8 +1409,10 @@ DROP TABLE t2; --echo --echo # -- End of test case for Bug#21380. ---echo +########################################################################### + +--echo --echo # -- --echo # -- Bug#18834: ALTER TABLE ADD INDEX on table with two timestamp fields --echo # -- @@ -1471,6 +1475,50 @@ DROP TABLE t3; --echo --echo # -- End of Bug#18834. + +########################################################################### + +--echo +--echo # -- +--echo # -- Bug#34274: Invalid handling of 'DEFAULT 0' for YEAR data type. +--echo # -- --echo +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +--echo +CREATE TABLE t1(c1 YEAR DEFAULT 2008, c2 YEAR DEFAULT 0); + +--echo +SHOW CREATE TABLE t1; + +--echo +INSERT INTO t1 VALUES(); + +--echo +SELECT * FROM t1; + +--echo +ALTER TABLE t1 MODIFY c1 YEAR DEFAULT 0; + +--echo +SHOW CREATE TABLE t1; + +--echo +INSERT INTO t1 VALUES(); + +--echo +SELECT * FROM t1; + +--echo +DROP TABLE t1; + +--echo +--echo # -- End of Bug#34274 + +########################################################################### + +--echo --echo End of 5.1 tests diff --git a/sql/unireg.cc b/sql/unireg.cc index 38f09a7946c..abab4632fe4 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -979,9 +979,7 @@ static bool make_empty_rec(THD *thd, File file,enum legacy_db_type table_type, type= (Field::utype) MTYP_TYPENR(field->unireg_check); - if (field->def && - (regfield->real_type() != MYSQL_TYPE_YEAR || - field->def->val_int() != 0)) + if (field->def) { int res= field->def->save_in_field(regfield, 1); /* If not ok or warning of level 'note' */ From 7bcbc7f2d5078d308c25f7d1c92995c64af7b8bc Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 23 Mar 2008 14:29:35 +0200 Subject: [PATCH 470/527] merge bug 26461 to 5.1-opt --- sql/handler.h | 2 +- sql/log.cc | 2 +- sql/sql_table.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/handler.h b/sql/handler.h index 9800f4974c3..a3743c78f34 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -1883,7 +1883,7 @@ private: { return HA_ADMIN_NOT_IMPLEMENTED; } virtual int analyze(THD* thd, HA_CHECK_OPT* check_opt) { return HA_ADMIN_NOT_IMPLEMENTED; } - virtual bool check_and_repair(THD *thd) { return HA_ERR_WRONG_COMMAND; } + virtual bool check_and_repair(THD *thd) { return TRUE; } virtual int disable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } virtual int enable_indexes(uint mode) { return HA_ERR_WRONG_COMMAND; } virtual int discard_or_import_tablespace(my_bool discard) diff --git a/sql/log.cc b/sql/log.cc index c2e0c85acfe..67438da6008 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1005,7 +1005,7 @@ bool LOGGER::general_log_write(THD *thd, enum enum_server_command command, current_time= my_time(0); while (*current_handler) - error+= (*current_handler++)-> + error|= (*current_handler++)-> log_general(thd, current_time, user_host_buff, user_host_len, id, command_name[(uint) command].str, diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c62d0545fda..2baf26f5953 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -42,7 +42,7 @@ static int copy_data_between_tables(TABLE *from,TABLE *to, static bool prepare_blob_field(THD *thd, Create_field *sql_field); static bool check_engine(THD *, const char *, HA_CREATE_INFO *); -static bool +static int mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, Alter_info *alter_info, bool tmp_table, @@ -2173,7 +2173,7 @@ int prepare_create_field(Create_field *sql_field, TRUE error */ -static bool +static int mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info, Alter_info *alter_info, bool tmp_table, From 33dde6ebfade2b9a8072058b20beaef501ca45bf Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 24 Mar 2008 22:39:48 -0300 Subject: [PATCH 471/527] Patch for bug 28386 enabled table logging for all tests in mysql_client_test causing a severe slowdown and increase in memory usage, especially for test cases with long queries. The solution is to enable the general log only in tests that actually need the general log and disable it during the execution of all other tests. tests/mysql_client_test.c: Selectively enable and disable the general log. --- tests/mysql_client_test.c | 53 +++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 02faf88a6e7..0df2d4ed4a5 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -13233,6 +13233,40 @@ static void test_bug15518() } +static void disable_general_log() +{ + int rc; + rc= mysql_query(mysql, "set @@global.general_log=off"); + myquery(rc); +} + + +static void enable_general_log(int truncate) +{ + int rc; + + rc= mysql_query(mysql, "set @save_global_general_log=@@global.general_log"); + myquery(rc); + + rc= mysql_query(mysql, "set @@global.general_log=on"); + myquery(rc); + + if (truncate) + { + rc= mysql_query(mysql, "truncate mysql.general_log"); + myquery(rc); + } +} + + +static void restore_general_log() +{ + int rc; + rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log"); + myquery(rc); +} + + static void test_view_sp_list_fields() { int rc; @@ -15397,6 +15431,8 @@ static void test_bug17667() return; } + enable_general_log(1); + for (statement_cursor= statements; statement_cursor->buffer != NULL; statement_cursor++) { @@ -15475,6 +15511,8 @@ static void test_bug17667() statement_cursor->buffer); } + restore_general_log(); + if (!opt_silent) printf("success. All queries found intact in the log.\n"); @@ -17301,14 +17339,7 @@ static void test_bug28386() } mysql_free_result(result); - rc= mysql_query(mysql, "set @save_global_general_log=@@global.general_log"); - myquery(rc); - - rc= mysql_query(mysql, "set @@global.general_log=on"); - myquery(rc); - - rc= mysql_query(mysql, "truncate mysql.general_log"); - myquery(rc); + enable_general_log(1); stmt= mysql_simple_prepare(mysql, "SELECT ?"); check_stmt(stmt); @@ -17347,8 +17378,7 @@ static void test_bug28386() mysql_free_result(result); - rc= mysql_query(mysql, "set @@global.general_log=@save_global_general_log"); - myquery(rc); + restore_general_log(); DBUG_VOID_RETURN; } @@ -17429,7 +17459,8 @@ and you are welcome to modify and redistribute it under the GPL license\n"); static struct my_tests_st my_tests[]= { - { "test_view_sp_list_fields", test_view_sp_list_fields}, + { "disable_general_log", disable_general_log }, + { "test_view_sp_list_fields", test_view_sp_list_fields }, { "client_query", client_query }, { "test_prepare_insert_update", test_prepare_insert_update}, #if NOT_YET_WORKING From 5ad505dda2d8ae019f6abfbf6eb9091cea1a5c55 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 12:47:57 +0400 Subject: [PATCH 472/527] BUG#35509 - Federated leaks memory when connecting to localhost/default port When creating federated table that points to unspecified host or localhost on unspecified port or port is 0, small memory leak occurs. This happens because we make a copy of unix socket path, which is never freed. With this fix we do not make a copy of unix socket path, instead share->socket points to MYSQL_UNIX_ADDR constant directly. This fix is covered by a test case for BUG34788. Affects 5.0 only. mysql-test/t/federated.test: A test case for BUG#35509. sql/ha_federated.cc: When creating federated table we call parse_url() to check if connect string is correct. parse_url() may make a copy of unix socket path if port is not specified or 0 and host is not specified or 'localhost'. This copy is never freed. As there is no need to make a copy of unix socket path, let share->socket point to MYSQL_UNIX_ADDR directly. --- mysql-test/t/federated.test | 5 +++++ sql/ha_federated.cc | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index f33dfa3a1b8..9e7548a21ed 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1742,6 +1742,11 @@ DROP TABLE t1; # BUG#34788 - malformed federated connection url is not handled correctly - # crashes server ! # +# also tests +# +# BUG#35509 - Federated leaks memory when connecting to localhost/default +# port +# CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://'; DROP TABLE t1; diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index a5e4714c53a..d414dc34f02 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -656,7 +656,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table, if (!share->port) { if (!share->hostname || strcmp(share->hostname, my_localhost) == 0) - share->socket= my_strdup(MYSQL_UNIX_ADDR, MYF(0)); + share->socket= (char*) MYSQL_UNIX_ADDR; else share->port= MYSQL_PORT; } @@ -1342,7 +1342,6 @@ static int free_share(FEDERATED_SHARE *share) { hash_delete(&federated_open_tables, (byte*) share); my_free((gptr) share->scheme, MYF(MY_ALLOW_ZERO_PTR)); - my_free((gptr) share->socket, MYF(MY_ALLOW_ZERO_PTR)); thr_lock_delete(&share->lock); VOID(pthread_mutex_destroy(&share->mutex)); my_free((gptr) share, MYF(0)); From 2b2ae926f439980f6de50bbae25b37b8b141992f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 17:28:12 +0400 Subject: [PATCH 473/527] BUG#34768 - nondeterministic INSERT using LIMIT logged in stmt mode if binlog_format=mixed Addition to fix for BUG#34768: fixed test case failures discovered by pushbuild. mysql-test/suite/binlog/r/binlog_stm_ps.result: Fixed binlog_stm_ps failure when binlog format is statement: - this test case makes sence only if binlog format is statement, thus execute it only in this mode; - added a warning that insert ... select ... limit is not safe to execute in statement mode. mysql-test/suite/binlog/t/binlog_stm_ps.test: Fixed binlog_stm_ps failure when binlog format is statement: - this test case makes sence only if binlog format is statement, thus execute it only in this mode; - added a warning that insert ... select ... limit is not safe to execute in statement mode. mysql-test/suite/rpl/t/rpl_optimize.test: rpl_optimize test may be executed in various binlog format modes. In statement mode delete ... limit issues a warning, in mixed and row modes it does not. Fixed a test case so it is still possible to execute it in all binlog format modes by ignoring delete ... limit warnings. mysql-test/suite/rpl/t/rpl_user_variables.test: rpl_user_variables test may be executed in various binlog format modes. In statement mode insert ... select ... limit issues a warning, in mixed and row modes it does not. Fixed a test case so it is still possible to execute it in all binlog format modes by ignoring insert ... select ... limit warnings. --- mysql-test/suite/binlog/r/binlog_stm_ps.result | 5 +++-- mysql-test/suite/binlog/t/binlog_stm_ps.test | 2 +- mysql-test/suite/rpl/t/rpl_optimize.test | 2 ++ mysql-test/suite/rpl/t/rpl_user_variables.test | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/binlog/r/binlog_stm_ps.result b/mysql-test/suite/binlog/r/binlog_stm_ps.result index 2128367deb5..1cf7429987e 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ps.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ps.result @@ -10,12 +10,13 @@ execute s using @a; prepare s from "insert into t1 select 100 limit ?"; set @a=100; execute s using @a; +Warnings: +Warning 1592 Statement is not safe to log in statement format. 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) master-bin.000001 # User var # # @`a`=98 master-bin.000001 # Query # # use `test`; insert into t1 values (@a),(98) master-bin.000001 # Query # # use `test`; insert into t1 values (99) -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; insert into t1 select 100 limit 100 drop table t1; diff --git a/mysql-test/suite/binlog/t/binlog_stm_ps.test b/mysql-test/suite/binlog/t/binlog_stm_ps.test index 83add5af3d7..55e3d30ad23 100644 --- a/mysql-test/suite/binlog/t/binlog_stm_ps.test +++ b/mysql-test/suite/binlog/t/binlog_stm_ps.test @@ -1,7 +1,7 @@ # This test is to verify replication with PS -- source include/not_embedded.inc --- source include/have_binlog_format_mixed_or_statement.inc +-- source include/have_binlog_format_statement.inc -- disable_query_log reset master; # get rid of previous tests binlog diff --git a/mysql-test/suite/rpl/t/rpl_optimize.test b/mysql-test/suite/rpl/t/rpl_optimize.test index 80f0c052fc8..f4582ba1167 100644 --- a/mysql-test/suite/rpl/t/rpl_optimize.test +++ b/mysql-test/suite/rpl/t/rpl_optimize.test @@ -31,7 +31,9 @@ INSERT INTO t1 (a) SELECT null FROM t1; save_master_pos; # a few updates to force OPTIMIZE to do something update t1 set b=(a/2*rand()); +--disable_warnings delete from t1 order by b limit 10000; +--enable_warnings connection slave; sync_with_master; diff --git a/mysql-test/suite/rpl/t/rpl_user_variables.test b/mysql-test/suite/rpl/t/rpl_user_variables.test index 21b2063c9f2..8d570f28f64 100644 --- a/mysql-test/suite/rpl/t/rpl_user_variables.test +++ b/mysql-test/suite/rpl/t/rpl_user_variables.test @@ -315,7 +315,9 @@ create table t1(a int); insert into t1 values (1),(2); prepare s1 from 'insert into t1 select a from t1 limit ?'; set @x='1.1'; +--disable_warnings execute s1 using @x; +--enable_warnings select * from t1; sync_slave_with_master; connection slave; From 811fb145eaf694485395934c81c7576a000e2cc7 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 17:37:53 +0400 Subject: [PATCH 474/527] BUG#34789 - drop server/create server leaks memory ! BUG#34790 - 'create server' doesn't handle out of memory scenario well enough This is an addition to fixes for these bugs, which makes gcov happy. mysql-test/r/federated.result: CREATE SERVER is only tested by federated_server.test, which requires big-test option. Added dummy test case to make gcov happy. mysql-test/t/federated.test: CREATE SERVER is only tested by federated_server.test, which requires big-test option. Added dummy test case to make gcov happy. sql/sql_parse.cc: Make gcov happy. --- mysql-test/r/federated.result | 2 ++ mysql-test/t/federated.test | 6 ++++++ sql/sql_parse.cc | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index 65fafcb2166..21743c3a8a6 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -2092,6 +2092,8 @@ DROP TABLE t1; DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://'; DROP TABLE t1; +create server 's1' foreign data wrapper 'mysql' options (port 3306); +drop server 's1'; End of 5.1 tests DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; diff --git a/mysql-test/t/federated.test b/mysql-test/t/federated.test index 0fd2290d619..6540cf8648e 100644 --- a/mysql-test/t/federated.test +++ b/mysql-test/t/federated.test @@ -1823,5 +1823,11 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=federated CONNECTION='mysql://@:://'; DROP TABLE t1; +# +# Coverage testing of CREATE SERVER. +# +create server 's1' foreign data wrapper 'mysql' options (port 3306); +drop server 's1'; + --echo End of 5.1 tests source include/federated_cleanup.inc; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 046eae4e654..a2708632a56 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6487,7 +6487,7 @@ bool reload_acl_and_cache(THD *thd, ulong options, TABLE_LIST *tables, if (grant_reload(thd)) result= 1; if (servers_reload(thd)) - result= 1; + result= 1; /* purecov: inspected */ } if (tmp_thd) { From 2daa01682775d42bbe00d3fb41e0865079240de8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 15:20:42 +0100 Subject: [PATCH 475/527] Eliminating compiler warnings. sql/set_var.h: Changing order of initializer list for sys_var class constructor to eliminate compiler warning. mysql-test/suite/binlog/combinations: New BitKeeper file ``mysql-test/suite/binlog/combinations'' --- mysql-test/suite/binlog/combinations | 8 ++++++++ sql/set_var.h | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/binlog/combinations diff --git a/mysql-test/suite/binlog/combinations b/mysql-test/suite/binlog/combinations new file mode 100644 index 00000000000..ea25611a5d4 --- /dev/null +++ b/mysql-test/suite/binlog/combinations @@ -0,0 +1,8 @@ +[row] +--binlog-format=row + +[stmt] +--binlog-format=statement + +[mix] +--binlog-format=mixed diff --git a/sql/set_var.h b/sql/set_var.h index 46fe7755baf..b33a3a968bb 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -73,8 +73,8 @@ public: bool no_support_one_shot; sys_var(const char *name_arg, sys_after_update_func func= NULL, Binlog_status_enum binlog_status_arg= NOT_IN_BINLOG) - :name(name_arg), after_update(func), binlog_status(binlog_status_arg) - , no_support_one_shot(1) + :name(name_arg), after_update(func), no_support_one_shot(1), + binlog_status(binlog_status_arg) {} virtual ~sys_var() {} void chain_sys_var(sys_var_chain *chain_arg) From 266790e8f7b15e8386c8cf1fa8d966422e99423f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 16:27:23 +0100 Subject: [PATCH 476/527] Bug#34761 Mysql-test-run.pl script hangs on Windows mysql-test/mysql-test-run.pl: Group all code to find extra suites together Fix problem with infinite loop by using splitdir to split the path Use a hash to map clone name -> extr suite --- mysql-test/mysql-test-run.pl | 43 ++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 373aecf77aa..9f84b49de3a 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -62,6 +62,7 @@ use File::Path; use File::Basename; use File::Copy; use File::Temp qw /tempdir/; +use File::Spec::Functions qw /splitdir/; use Cwd; use Getopt::Long; use IO::Socket; @@ -134,17 +135,6 @@ our $default_vardir; our $opt_usage; our $opt_suites; our $opt_suites_default= "main,binlog,rpl,rpl_ndb,ndb"; # Default suites to run -our @extra_suites= -( - ["mysql-5.1-new-ndb", "ndb_team"], - ["mysql-5.1-new-ndb-merge", "ndb_team"], - ["mysql-5.1-telco-6.2", "ndb_team"], - ["mysql-5.1-telco-6.2-merge", "ndb_team"], - ["mysql-5.1-telco-6.3", "ndb_team"], - ["mysql-6.0-ndb", "ndb_team"], -); - - our $opt_script_debug= 0; # Script debugging, enable with --script-debug our $opt_verbose= 0; # Verbose output, enable with --verbose @@ -414,22 +404,27 @@ sub main () { # Figure out which tests we are going to run if (!$opt_suites) { - # use default and add any extra_suites as defined $opt_suites= $opt_suites_default; - my $ccc= dirname($glob_mysql_test_dir); - my $found= 1; # BUG#34761 - disable this feature - while (!$found and !($ccc eq "/") and !($ccc eq "")) + + # Check for any extra suites to enable based on the path name + my %extra_suites= + ( + "mysql-5.1-new-ndb" => "ndb_team", + "mysql-5.1-new-ndb-merge" => "ndb_team", + "mysql-5.1-telco-6.2" => "ndb_team", + "mysql-5.1-telco-6.2-merge" => "ndb_team", + "mysql-5.1-telco-6.3" => "ndb_team", + "mysql-6.0-ndb" => "ndb_team", + ); + + foreach my $dir ( reverse splitdir($glob_basedir) ) { - my $ddd= basename($ccc); - foreach my $extra_suite (@extra_suites) - { - if ($extra_suite->[0] eq "$ddd") - { - $opt_suites= "$extra_suite->[1],$opt_suites"; - $found= 1; - } + my $extra_suite= $extra_suites{$dir}; + if (defined $extra_suite){ + mtr_report("Found extra suite: $extra_suite"); + $opt_suites= "$extra_suite,$opt_suites"; + last; } - $ccc= dirname($ccc); } } From d62c9e33ca09125a66f226bf7817dc466a547e91 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 19:44:27 +0400 Subject: [PATCH 477/527] information_schema.test, information_schema.result: Minor test case cleanup after bug#34529. mysql-test/r/information_schema.result: Minor test case cleanup after bug#34529. mysql-test/t/information_schema.test: Minor test case cleanup after bug#34529. --- mysql-test/r/information_schema.result | 3 ++- mysql-test/t/information_schema.test | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 2803c5af729..d7ff87bd1eb 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1417,7 +1417,6 @@ select * from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE -End of 5.0 tests. show fields from information_schema.table_names; ERROR 42S02: Unknown table 'table_names' in information_schema show keys from information_schema.table_names; @@ -1432,3 +1431,5 @@ JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog ); TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN DROP TABLE test.t1; SET max_heap_table_size = DEFAULT; +USE test; +End of 5.0 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 09005a4b145..caf38945cbc 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1108,8 +1108,6 @@ select * from `information_schema`.`TRIGGERS` where `EVENT_OBJECT_TABLE` = NULL; select * from `information_schema`.`VIEWS` where `TABLE_SCHEMA` = NULL; select * from `information_schema`.`VIEWS` where `TABLE_NAME` = NULL; ---echo End of 5.0 tests. - # # Bug#30079 A check for "hidden" I_S tables is flawed # @@ -1139,3 +1137,7 @@ JOIN character_sets cs ON ( cs.character_set_name = ta.table_catalog ); DROP TABLE test.t1; SET max_heap_table_size = DEFAULT; +USE test; + +--echo End of 5.0 tests. + From 2d5a444d1fac9dc1866231355ea791ea0545fdd8 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 18:18:58 +0200 Subject: [PATCH 478/527] Fix for Bug #27944 Filtering THD::client capabilities The server used to trust blindly information from the client about its capabilities. During the connection handshake the server sends information about what it supports and then the client sends back a set of capabilities which cover all of the server's or less. Before this changeset the server didn't check whether the flags sent by the client were valid for the server. For example, if the server doesn't support compressed protocol but the client does and sends that bit turned on, the server didn't check it. The change make the server code less error prone to problems related to the value of THD::client_capabilities. Clearly there is no vulnerability being fixed but this is a maintainenance fix to prevent misusage in the future. include/mysql_com.h: List all CLIENT flags in a common defition. Add also a definition which excludes flags, which are optoinal. sql/sql_connect.cc: Renamed client_flags to server_capabilities to reflect what the server supports. Only allow from the client the flags the server supports. --- include/mysql_com.h | 31 +++++++++++++++++++++++++++++++ sql/sql_connect.cc | 23 ++++++++++++++++------- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/include/mysql_com.h b/include/mysql_com.h index cea98cebc61..25bf58e58ba 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -148,6 +148,37 @@ enum enum_server_command #define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) #define CLIENT_REMEMBER_OPTIONS (1UL << 31) +/* Gather all possible capabilites (flags) supported by the server */ +#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \ + CLIENT_FOUND_ROWS | \ + CLIENT_LONG_FLAG | \ + CLIENT_CONNECT_WITH_DB | \ + CLIENT_NO_SCHEMA | \ + CLIENT_COMPRESS | \ + CLIENT_ODBC | \ + CLIENT_LOCAL_FILES | \ + CLIENT_IGNORE_SPACE | \ + CLIENT_PROTOCOL_41 | \ + CLIENT_INTERACTIVE | \ + CLIENT_SSL | \ + CLIENT_IGNORE_SIGPIPE | \ + CLIENT_TRANSACTIONS | \ + CLIENT_RESERVED | \ + CLIENT_SECURE_CONNECTION | \ + CLIENT_MULTI_STATEMENTS | \ + CLIENT_MULTI_RESULTS | \ + CLIENT_SSL_VERIFY_SERVER_CERT | \ + CLIENT_REMEMBER_OPTIONS) + +/* + Switch off the flags that are optional and depending on build flags + If any of the optional flags is supported by the build it will be switched + on before sending to the client during the connection handshake. +*/ +#define CLIENT_BASIC_FLAGS (((CLIENT_ALL_FLAGS & ~CLIENT_SSL) \ + & ~CLIENT_COMPRESS) \ + & ~CLIENT_SSL_VERIFY_SERVER_CERT) + #define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */ #define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */ #define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */ diff --git a/sql/sql_connect.cc b/sql/sql_connect.cc index b22a33e3e92..b3acfd99991 100644 --- a/sql/sql_connect.cc +++ b/sql/sql_connect.cc @@ -700,20 +700,24 @@ static int check_connection(THD *thd) bzero((char*) &thd->remote, sizeof(thd->remote)); } vio_keepalive(net->vio, TRUE); + + ulong server_capabilites; { /* buff[] needs to big enough to hold the server_version variable */ char buff[SERVER_VERSION_LENGTH + SCRAMBLE_LENGTH + 64]; - ulong client_flags = (CLIENT_LONG_FLAG | CLIENT_CONNECT_WITH_DB | - CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION); + server_capabilites= CLIENT_BASIC_FLAGS; if (opt_using_transactions) - client_flags|=CLIENT_TRANSACTIONS; + server_capabilites|= CLIENT_TRANSACTIONS; #ifdef HAVE_COMPRESS - client_flags |= CLIENT_COMPRESS; + server_capabilites|= CLIENT_COMPRESS; #endif /* HAVE_COMPRESS */ #ifdef HAVE_OPENSSL if (ssl_acceptor_fd) - client_flags |= CLIENT_SSL; /* Wow, SSL is available! */ + { + server_capabilites |= CLIENT_SSL; /* Wow, SSL is available! */ + server_capabilites |= CLIENT_SSL_VERIFY_SERVER_CERT; + } #endif /* HAVE_OPENSSL */ end= strnmov(buff, server_version, SERVER_VERSION_LENGTH) + 1; @@ -732,7 +736,7 @@ static int check_connection(THD *thd) */ end= strmake(end, thd->scramble, SCRAMBLE_LENGTH_323) + 1; - int2store(end, client_flags); + int2store(end, server_capabilites); /* write server characteristics: up to 16 bytes allowed */ end[2]=(char) default_charset_info->number; int2store(end+3, thd->server_status); @@ -762,7 +766,7 @@ static int check_connection(THD *thd) if (thd->packet.alloc(thd->variables.net_buffer_length)) return 1; /* The error is set by alloc(). */ - thd->client_capabilities=uint2korr(net->read_pos); + thd->client_capabilities= uint2korr(net->read_pos); if (thd->client_capabilities & CLIENT_PROTOCOL_41) { thd->client_capabilities|= ((ulong) uint2korr(net->read_pos+2)) << 16; @@ -777,6 +781,11 @@ static int check_connection(THD *thd) thd->max_client_packet_length= uint3korr(net->read_pos+2); end= (char*) net->read_pos+5; } + /* + Disable those bits which are not supported by the server. + This is a precautionary measure, if the client lies. See Bug#27944. + */ + thd->client_capabilities&= server_capabilites; if (thd->client_capabilities & CLIENT_IGNORE_SPACE) thd->variables.sql_mode|= MODE_IGNORE_SPACE; From 18801aa8298bfe20a397ec36dd3d72fda694fece Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 11:20:11 -0600 Subject: [PATCH 479/527] Bug#20906 (Multiple assignments in SET in stored routine produce incorrect instructions) This bug can not be reproduced in the current version, adding the test case to the test suite for coverage, no code change. mysql-test/r/sp-code.result: Bug#20906 (Multiple assignments in SET in stored routine produce incorrect instructions) mysql-test/t/sp-code.test: Bug#20906 (Multiple assignments in SET in stored routine produce incorrect instructions) --- mysql-test/r/sp-code.result | 28 ++++++++++++++++++++++++++++ mysql-test/t/sp-code.test | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 855cabc25d8..2848306b442 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -842,4 +842,32 @@ Pos Instruction 21 jump 3 drop procedure proc_33618_h; drop procedure proc_33618_c; +drop procedure if exists p_20906_a; +drop procedure if exists p_20906_b; +create procedure p_20906_a() SET @a=@a+1, @b=@b+1; +show procedure code p_20906_a; +Pos Instruction +0 stmt 32 "SET @a=@a+1" +1 stmt 32 "SET @b=@b+1" +set @a=1; +set @b=1; +call p_20906_a(); +select @a, @b; +@a @b +2 2 +create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; +show procedure code p_20906_b; +Pos Instruction +0 stmt 32 "SET @a=@a+1" +1 stmt 32 "SET @b=@b+1" +2 stmt 32 "SET @c=@c+1" +set @a=1; +set @b=1; +set @c=1; +call p_20906_b(); +select @a, @b, @c; +@a @b @c +2 2 2 +drop procedure p_20906_a; +drop procedure p_20906_b; End of 5.0 tests. diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test index 751282c895a..a76863dd5fa 100644 --- a/mysql-test/t/sp-code.test +++ b/mysql-test/t/sp-code.test @@ -598,4 +598,36 @@ show procedure code proc_33618_c; drop procedure proc_33618_h; drop procedure proc_33618_c; +# +# Bug#20906 (Multiple assignments in SET in stored routine produce incorrect +# instructions) +# + +--disable_warnings +drop procedure if exists p_20906_a; +drop procedure if exists p_20906_b; +--enable_warnings + +create procedure p_20906_a() SET @a=@a+1, @b=@b+1; +show procedure code p_20906_a; + +set @a=1; +set @b=1; + +call p_20906_a(); +select @a, @b; + +create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; +show procedure code p_20906_b; + +set @a=1; +set @b=1; +set @c=1; + +call p_20906_b(); +select @a, @b, @c; + +drop procedure p_20906_a; +drop procedure p_20906_b; + --echo End of 5.0 tests. From c3641cd5136f7bb0b79475b0bcb0b97f20150e14 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 15:53:57 -0300 Subject: [PATCH 480/527] Bug#35272: @@global.key_buffer_size = 4294967295 let the server crash When trying to get the requested amount of memory for the keybuffer, the out of memory could be signaled if one of the tentative allocations fail. Later the server would crash (debug assert) when trying to send a ok packet with a error set. The solution is only to signal the error if all tentative allocations for the keybuffer fail. mysql-test/r/key_cache.result: Add test case result for Bug#35272 mysql-test/t/key_cache.test: Add test case for Bug#35272 mysys/mf_keycache.c: Don't set error on my_large_malloc if allocation fails. Set the error if all tentative allocations failed. --- mysql-test/r/key_cache.result | 5 +++++ mysql-test/t/key_cache.test | 25 +++++++++++++++++++++++++ mysys/mf_keycache.c | 4 +++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 9ada5dc0784..6f30480d6b1 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -368,3 +368,8 @@ Variable_name Value key_cache_block_size 1536 SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size; DROP TABLE t1; +SET @save_key_buffer = @@global.key_buffer_size; +SET @@global.key_buffer_size = 4294967295; +SET @@global.key_buffer_size = 9223372036854775807; +SET @@global.key_buffer_size = @save_key_buffer; +End of 5.1 tests diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index 4c14dc96aaa..f588a964584 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -247,3 +247,28 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size; DROP TABLE t1; # End of 4.1 tests + +# +# Bug#35272: @@global.key_buffer_size = 4294967295 let the server crash +# + +SET @save_key_buffer = @@global.key_buffer_size; + +# Wee try to force Out Of Memory here. key_buffer_size is ULL, so +# on a 32 bit machine, 4GB is the most we can ask for before the +# server complains about value/variable mismatch. At the off chance +# of one of our 64-bit machines actually offering us 4GB, we also +# accept "no error" (in addition to the expected "out of memory"). +--error 0,ER_OUTOFMEMORY +SET @@global.key_buffer_size = 4294967295; + +# on 32-bit, we get "out of range", on 64-bit, "out of memory". +--error 0,ER_WRONG_ARGUMENTS,ER_OUTOFMEMORY +--disable_warnings +SET @@global.key_buffer_size = 9223372036854775807; +--enable_warnings + +# restore normal value, just in case we got the 4GB or something. +SET @@global.key_buffer_size = @save_key_buffer; + +--echo End of 5.1 tests diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index a03d71f32d8..8001c61a6b9 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -102,6 +102,7 @@ */ #include "mysys_priv.h" +#include "mysys_err.h" #include #include "my_static.h" #include @@ -430,7 +431,7 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, /* Allocate memory for cache page buffers */ if ((keycache->block_mem= my_large_malloc((size_t) blocks * keycache->key_cache_block_size, - MYF(MY_WME)))) + MYF(0)))) { /* Allocate memory for blocks, hash_links and hash entries; @@ -445,6 +446,7 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size, if (blocks < 8) { my_errno= ENOMEM; + my_error(EE_OUTOFMEMORY, MYF(0), blocks * keycache->key_cache_block_size); goto err; } blocks= blocks / 4*3; From a1de91e7082816f05bcafc2b321e5f82eb66054b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 21:30:45 +0100 Subject: [PATCH 481/527] Bug#35559 - plugin_load.test creates warnings plugin_load.test created lines in the warnings files and made pushbuild cells yellow. Some pushbuild systems are configured so that they don't build the ha_example plugin. Trying to load them creates error messages in the error log. These were copied to the warnings file. Fixed by ignoring expected error messages for non-existent ha_example. mysql-test/lib/mtr_report.pl: Bug#35559 - plugin_load.test creates warnings Ignore expected error messages for non-existent ha_example. --- mysql-test/lib/mtr_report.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 84cb4eddf36..3603600f94c 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -279,6 +279,8 @@ sub mtr_report_stats ($) { /Failed to open log/ or /Failed to open the existing master info file/ or /Forcing shutdown of [0-9]* plugins/ or + /Can't open shared library .*\bha_example\b/ or + /Couldn't load plugin .*\bha_example\b/ or /Got error [0-9]* when reading table/ or /Incorrect definition of table/ or /Incorrect information in file/ or From a1d5a59c2af6e031995add81c68e839b2213fa45 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 25 Mar 2008 17:48:05 -0600 Subject: [PATCH 482/527] Manual merge mysql-test/r/sp-code.result: manual merge, adjust test results --- mysql-test/r/sp-code.result | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 7706f18b171..39770dc4f2a 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -847,8 +847,8 @@ drop procedure if exists p_20906_b; create procedure p_20906_a() SET @a=@a+1, @b=@b+1; show procedure code p_20906_a; Pos Instruction -0 stmt 32 "SET @a=@a+1" -1 stmt 32 "SET @b=@b+1" +0 stmt 31 "SET @a=@a+1" +1 stmt 31 "SET @b=@b+1" set @a=1; set @b=1; call p_20906_a(); @@ -858,9 +858,9 @@ select @a, @b; create procedure p_20906_b() SET @a=@a+1, @b=@b+1, @c=@c+1; show procedure code p_20906_b; Pos Instruction -0 stmt 32 "SET @a=@a+1" -1 stmt 32 "SET @b=@b+1" -2 stmt 32 "SET @c=@c+1" +0 stmt 31 "SET @a=@a+1" +1 stmt 31 "SET @b=@b+1" +2 stmt 31 "SET @c=@c+1" set @a=1; set @b=1; set @c=1; From c49632cf9623bbcc8cbc6ab314132c2d26534f40 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 13:14:30 +0300 Subject: [PATCH 483/527] Dummy change to force PushBuild. --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 56bd912d3d6..8c1779db2c1 100644 --- a/README +++ b/README @@ -33,3 +33,4 @@ file. IMPORTANT: Bug or error reports should be sent to http://bugs.mysql.com. + From 27c0540bd8e785499accbd4777bdb5067911cce9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 13:15:03 +0300 Subject: [PATCH 484/527] Dummy change to force PushBuild. --- README | 1 - 1 file changed, 1 deletion(-) diff --git a/README b/README index 8c1779db2c1..56bd912d3d6 100644 --- a/README +++ b/README @@ -33,4 +33,3 @@ file. IMPORTANT: Bug or error reports should be sent to http://bugs.mysql.com. - From 10d9d68d7cbe1bbf9cf37fee71473b097a89f239 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 16:22:10 +0100 Subject: [PATCH 485/527] Post-merge fix --- storage/federated/ha_federated.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc index ed9a7a9cf8f..5702b2f3514 100644 --- a/storage/federated/ha_federated.cc +++ b/storage/federated/ha_federated.cc @@ -842,11 +842,12 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATED_SHARE *share, TABLE *table, */ if (share->hostname[0] == '\0') share->hostname= NULL; - } + if (!share->port) { if (!share->hostname || strcmp(share->hostname, my_localhost) == 0) + share->socket= (char*) MYSQL_UNIX_ADDR; else share->port= MYSQL_PORT; } From b4b72fb306a1f816c0a39fe4a1eb70fa894ed70b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 19:37:36 +0300 Subject: [PATCH 486/527] Fix for bug #34928: Confusion by having Primary Key and Index The bug is a regression introduced in 5.1 by the patch for bug28404. Under some circumstances test_if_skip_sort_order() could leave some data structures in an inconsistent state so that some parts of code could assume the selected execution strategy for GROUP BY/DISTINCT as a loose index scan (e.g. JOIN_TAB::is_using_loose_index_scan()), while the actual strategy chosen was an ordered index scan, which led to wrong data being returned. Fixed test_if_skip_sort_order() so that when changing the type for a join table, select->quick is reset not only for EXPLAIN, but for the actual join execution as well, to not confuse code that depends on its value to determine the chosen GROUP BY/DISTINCT strategy. mysql-test/r/distinct.result: Added a test case for bug #34928. mysql-test/t/distinct.test: Added a test case for bug #34928. sql/sql_select.cc: When changing the table's join type to JT_NEXT in test_if_skip_sort_order(), also reset select->quick because other code may depend on its value to determine the GROUP BY/DISTINCT execution strategy. --- mysql-test/r/distinct.result | 23 +++++++++++++++++++++++ mysql-test/t/distinct.test | 23 +++++++++++++++++++++++ sql/sql_select.cc | 10 +++++----- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result index b2a9eb04c04..15e4c3f15b3 100644 --- a/mysql-test/r/distinct.result +++ b/mysql-test/r/distinct.result @@ -682,3 +682,26 @@ a a b 1 1 3 DROP TABLE t1; End of 5.0 tests +CREATE TABLE t1(a INT, b INT, c INT, d INT, e INT, +PRIMARY KEY(a,b,c,d,e), +KEY(a,b,d,c) +); +INSERT INTO t1(a, b, c) VALUES (1, 1, 1), +(1, 1, 2), +(1, 1, 3), +(1, 2, 1), +(1, 2, 2), +(1, 2, 3); +EXPLAIN SELECT DISTINCT a, b, d, c FROM t1; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 index NULL a 16 NULL 6 Using index +SELECT DISTINCT a, b, d, c FROM t1; +a b d c +1 1 0 1 +1 1 0 2 +1 1 0 3 +1 2 0 1 +1 2 0 2 +1 2 0 3 +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test index bfdb5f8b9f8..559dde44b81 100644 --- a/mysql-test/t/distinct.test +++ b/mysql-test/t/distinct.test @@ -553,3 +553,26 @@ SELECT DISTINCT a, a, b FROM t1; DROP TABLE t1; --echo End of 5.0 tests + +# +# Bug #34928: Confusion by having Primary Key and Index +# +CREATE TABLE t1(a INT, b INT, c INT, d INT, e INT, + PRIMARY KEY(a,b,c,d,e), + KEY(a,b,d,c) +); + +INSERT INTO t1(a, b, c) VALUES (1, 1, 1), + (1, 1, 2), + (1, 1, 3), + (1, 2, 1), + (1, 2, 2), + (1, 2, 3); + +EXPLAIN SELECT DISTINCT a, b, d, c FROM t1; + +SELECT DISTINCT a, b, d, c FROM t1; + +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 57bcb0b5942..1117df942dd 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -13158,6 +13158,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, tab->read_first_record= best_key_direction > 0 ? join_read_first:join_read_last; tab->type=JT_NEXT; // Read with index_first(), index_next() + if (select && select->quick) + { + delete select->quick; + select->quick= 0; + } if (table->covering_keys.is_set(best_key)) { table->key_read=1; @@ -13168,11 +13173,6 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, { tab->ref.key= -1; tab->ref.key_parts= 0; - if (select && select->quick) - { - delete select->quick; - select->quick= 0; - } if (select_limit < table_records) tab->limit= select_limit; } From 0b8342ba4e3c0426569f3256a8d951e168a7d52d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 22:43:12 +0400 Subject: [PATCH 487/527] Fixed bug #35193. View definition as SELECT ... FROM DUAL WHERE ... has valid syntax, but use of such view in SELECT or SHOW CREATE VIEW syntax causes unexpected syntax error. Server omits FROM DUAL clause when storing view body string in a .frm file for further evaluation. However, syntax of SELECT-witout-FROM query is more restrictive than SELECT FROM DUAL syntax, and doesn't allow the WHERE clause. NOTE: this syntax difference is not documented. View registration procedure has been modified to preserve original structure of view's body. mysql-test/r/view.result: Added test case for bug #35193. mysql-test/t/view.test: Added test case for bug #35193. sql/sql_select.cc: Fixed bug #35193. The st_select_lex::print function always omits FROM DUAL clause, even if original SELECT query has the WHERE clause. The mysql_register_view function uses this function to reconstruct a body of view's AS clause for further evaluation and stores that reconstructed clause in a .frm file. SELECT without FROM syntax is more restrictive than SELECT FROM DUAL syntax: second one allows the WHERE clause, but first one is not. Use of this view in SELECT or SHOW CREATE VIEW queries causes unexpected syntax errors. The st_select_lex::print function has been modified to reconstruct FROM DUAL clause in queries when needed. TODO: Syntax difference is not documented and should be eliminated, however improvement of the SELECT-without-FROM syntax is not trivial and leads to significant modification of grammar file because of additional shift/reduce conflicts. --- mysql-test/r/view.result | 18 ++++++++++++++++++ mysql-test/t/view.test | 23 +++++++++++++++++++++++ sql/sql_select.cc | 8 ++++++++ 3 files changed, 49 insertions(+) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 520bf9426b8..eb7a89c3d12 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3659,6 +3659,24 @@ DROP TABLE t1; # -- End of test case for Bug#34337. +# ----------------------------------------------------------------- +# -- Bug#35193: VIEW query is rewritten without "FROM DUAL", +# -- causing syntax error +# ----------------------------------------------------------------- + +CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1; + +SELECT * FROM v1; +1 +1 +SHOW CREATE TABLE v1; +View Create View +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` from DUAL where 1 + +DROP VIEW v1; + +# -- End of test case for Bug#35193. + # ----------------------------------------------------------------- # -- End of 5.0 tests. # ----------------------------------------------------------------- diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 23e64b0546f..9fa981ccb9a 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -3537,6 +3537,29 @@ DROP TABLE t1; ########################################################################### +--echo # ----------------------------------------------------------------- +--echo # -- Bug#35193: VIEW query is rewritten without "FROM DUAL", +--echo # -- causing syntax error +--echo # ----------------------------------------------------------------- +--echo + +CREATE VIEW v1 AS SELECT 1 FROM DUAL WHERE 1; + +--echo + +SELECT * FROM v1; +SHOW CREATE TABLE v1; + +--echo + +DROP VIEW v1; + +--echo +--echo # -- End of test case for Bug#35193. +--echo + +########################################################################### + --echo # ----------------------------------------------------------------- --echo # -- End of 5.0 tests. --echo # ----------------------------------------------------------------- diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6392f7c4299..bb3030a721c 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -15806,6 +15806,14 @@ void st_select_lex::print(THD *thd, String *str) /* go through join tree */ print_join(thd, str, &top_join_list); } + else if (where) + { + /* + "SELECT 1 FROM DUAL WHERE 2" should not be printed as + "SELECT 1 WHERE 2": the 1st syntax is valid, but the 2nd is not. + */ + str->append(STRING_WITH_LEN(" from DUAL ")); + } // Where Item *cur_where= where; From 321f392f629479eedf63062f85283e911ce05d7e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 26 Mar 2008 20:27:23 +0100 Subject: [PATCH 488/527] Post-merge fix. Query cache does now work with concurrent_insert=0. See Bug 33756 - query cache with concurrent_insert=0 appears broken --- mysql-test/r/sp_notembedded.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result index 3efb01fdb94..d15efc6d7d7 100644 --- a/mysql-test/r/sp_notembedded.result +++ b/mysql-test/r/sp_notembedded.result @@ -70,7 +70,7 @@ c 2 show status like 'Qcache_hits'| Variable_name Value -Qcache_hits 0 +Qcache_hits 2 set global query_cache_size = @x| flush status| flush query cache| From b90296c70ac526be823d76ffdb2ef2e8cac87179 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 00:55:13 +0400 Subject: [PATCH 489/527] view.result: Post-merge fix (bug #35193). mysql-test/r/view.result: Post-merge fix (bug #35193). --- mysql-test/r/view.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result index 0810b6d9bf1..a0af9fdcf1d 100644 --- a/mysql-test/r/view.result +++ b/mysql-test/r/view.result @@ -3665,8 +3665,8 @@ SELECT * FROM v1; 1 1 SHOW CREATE TABLE v1; -View Create View -v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` from DUAL where 1 +View Create View character_set_client collation_connection +v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 AS `1` from DUAL where 1 latin1 latin1_swedish_ci DROP VIEW v1; From fb27979e6538e0f7c263b3d9f7400190f762e2fd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 01:13:39 +0100 Subject: [PATCH 490/527] Recommit of antonys previous commit. Bug#21413 "Engine table handler used by multiple threads in REPLACE DELAYED" When executing a REPLACE DELAYED statement, the storage engine ::extra() method was invoked by a different thread than the thread which has acquired the handler instance. This did not cause problems within the current server and with the current storage engines. But it has the potential to confuse future storage engines. Added code to avoid surplus calls to extra() method in case of DELAYED which avoids calling storage engine from a different thread than expected. No test case. This change does not change behavior in conjunction with current storage engines. So it cannot be tested by the regression test suite. sql/sql_insert.cc: Bug#21413 When performing DELAYED operations, we should not call the storage engine methods from the 'wrong' context. Ensure that the calls to the methods are appropiately guarded by either moving calls to sections where the lock_type is checked. No need to copy all elements of TABLE_LIST when opening table using open_ltable(). --- sql/sql_insert.cc | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f5bbba742a5..2e371971838 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -315,18 +315,23 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, error=0; id=0; thd->proc_info="update"; - if (duplic != DUP_ERROR || ignore) - table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); - /* - let's *try* to start bulk inserts. It won't necessary - start them as values_list.elements should be greater than - some - handler dependent - threshold. - So we call start_bulk_insert to perform nesessary checks on - values_list.elements, and - if nothing else - to initialize - the code to make the call of end_bulk_insert() below safe. - */ +#ifndef EMBEDDED_LIBRARY if (lock_type != TL_WRITE_DELAYED) +#endif /* EMBEDDED_LIBRARY */ + { + if (duplic != DUP_ERROR || ignore) + table->file->extra(HA_EXTRA_IGNORE_DUP_KEY); + + /* + let's *try* to start bulk inserts. It won't necessary + start them as values_list.elements should be greater than + some - handler dependent - threshold. + So we call start_bulk_insert to perform nesessary checks on + values_list.elements, and - if nothing else - to initialize + the code to make the call of end_bulk_insert() below safe. + */ table->file->start_bulk_insert(values_list.elements); + } while ((values= its++)) { @@ -415,6 +420,9 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, else if (table->next_number_field && info.copied) id=table->next_number_field->val_int(); // Return auto_increment value + if (duplic != DUP_ERROR || ignore) + table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); + /* Invalidate the table in the query cache if something changed. For the transactional algorithm to work the invalidation must be @@ -455,8 +463,6 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list, table->next_number_field=0; thd->count_cuted_fields= CHECK_FIELD_IGNORE; thd->next_insert_id=0; // Reset this if wrongly used - if (duplic != DUP_ERROR || ignore) - table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY); /* Reset value of LAST_INSERT_ID if no rows where inserted */ if (!info.copied && thd->insert_id_used) @@ -561,7 +567,12 @@ int mysql_prepare_insert(THD *thd, TABLE_LIST *table_list, DBUG_RETURN(-1); } } - if (duplic == DUP_UPDATE || duplic == DUP_REPLACE) + /* + Only call extra() handler method if we are not performing a DELAYED + operation. It will instead be executed by delayed insert thread. + */ + if ((duplic == DUP_UPDATE || duplic == DUP_REPLACE) && + (insert_table_list->lock_type != TL_WRITE_DELAYED)) table->file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY); DBUG_RETURN(0); @@ -930,9 +941,11 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) my_error(ER_OUT_OF_RESOURCES,MYF(0)); goto err1; } - tmp->table_list= *table_list; // Needed to open table + /* We only need the db and table name to open tables with open_ltable() */ tmp->table_list.db= tmp->thd.db; + tmp->table_list.db_length= table_list->db_length; tmp->table_list.alias= tmp->table_list.real_name=tmp->thd.query; + tmp->table_list.real_name_length= table_list->real_name_length; tmp->lock(); pthread_mutex_lock(&tmp->mutex); if ((error=pthread_create(&tmp->thd.real_id,&connection_attrib, @@ -1491,6 +1504,9 @@ bool delayed_insert::handle_inserts(void) info.ignore= row->ignore; info.handle_duplicates= row->dup; + if (info.handle_duplicates == DUP_UPDATE || + info.handle_duplicates == DUP_REPLACE) + table->file->extra(HA_EXTRA_RETRIEVE_PRIMARY_KEY); if (info.ignore || info.handle_duplicates != DUP_ERROR) { From 9aaab69ab104a9c6d72a66d2de66833f36e6042e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 02:40:45 +0100 Subject: [PATCH 491/527] Apply innodb-5.1-ss2360 snapshot Fixes: - Bug #34920: auto_increment resets to 1 on foreign key creation We need to use/inherit the passed in autoinc counter for ALTER TABLE statements too. mysql-test/r/innodb.result: Apply innodb-5.1-ss2360 snapshot Revision r2345: branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc counter for ALTER TABLE statements too. mysql-test/t/innodb.test: Apply innodb-5.1-ss2360 snapshot Revision r2345: branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc counter for ALTER TABLE statements too. storage/innobase/dict/dict0dict.c: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/handler/ha_innodb.cc: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. Revision r2345: branches/5.1: Fix Bug# 34920. We need to use/inherit the passed in autoinc counter for ALTER TABLE statements too. storage/innobase/handler/ha_innodb.h: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/include/dict0dict.h: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/include/dict0mem.h: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/include/row0sel.h: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/include/univ.i: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. storage/innobase/row/row0sel.c: Apply innodb-5.1-ss2360 snapshot Revision r2353: branches/5.1: Change the InnoDB autoinc type to ulint64. For this added a new typedef to univ.i (ib_ulonglong). Added checks for overflow and removed the assertion where it crashed previously, since the type has now changed to unsigned, it doesn't make sense to check for < 0. Added new tests, to check for overflow, for the different INT types supported for both signed and unsigned. --- mysql-test/r/innodb.result | 19 +++++++++ mysql-test/t/innodb.test | 23 +++++++++++ storage/innobase/dict/dict0dict.c | 6 +-- storage/innobase/handler/ha_innodb.cc | 59 +++++++++++++++++++-------- storage/innobase/handler/ha_innodb.h | 2 +- storage/innobase/include/dict0dict.h | 6 +-- storage/innobase/include/dict0mem.h | 2 +- storage/innobase/include/row0sel.h | 2 +- storage/innobase/include/univ.i | 3 ++ storage/innobase/row/row0sel.c | 10 ++--- 10 files changed, 102 insertions(+), 30 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index bdfa2471cb8..0cd276852bf 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3245,3 +3245,22 @@ where table_schema='test' and table_name = 't1'; table_comment data_free_is_set this is a comment 1 drop table t1; +CREATE TABLE t1 ( +c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +c2 VARCHAR(128) NOT NULL, +PRIMARY KEY(c1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100; +CREATE TABLE t2 ( +c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, +c2 INT(10) UNSIGNED DEFAULT NULL, +PRIMARY KEY(c1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200; +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2'; +AUTO_INCREMENT +200 +ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1); +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2'; +AUTO_INCREMENT +200 +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 54d4ca94f84..d7c5f00564d 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2436,6 +2436,29 @@ select table_comment, data_free > 0 as data_free_is_set where table_schema='test' and table_name = 't1'; drop table t1; +# +# Bug 34920 test +# +CONNECTION default; +CREATE TABLE t1 ( + c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + c2 VARCHAR(128) NOT NULL, + PRIMARY KEY(c1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=100; + +CREATE TABLE t2 ( + c1 INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, + c2 INT(10) UNSIGNED DEFAULT NULL, + PRIMARY KEY(c1) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=200; + +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2'; +ALTER TABLE t2 ADD CONSTRAINT t1_t2_1 FOREIGN KEY(c1) REFERENCES t1(c1); +SELECT AUTO_INCREMENT FROM INFORMATION_SCHEMA.TABLES WHERE table_name = 't2'; +DROP TABLE t2; +DROP TABLE t1; +# End 34920 test + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 8aba5ac1c85..10cef688705 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -429,7 +429,7 @@ void dict_table_autoinc_initialize( /*==========================*/ dict_table_t* table, /* in: table */ - ib_longlong value) /* in: next value to assign to a row */ + ib_ulonglong value) /* in: next value to assign to a row */ { ut_ad(mutex_own(&table->autoinc_mutex)); @@ -441,7 +441,7 @@ dict_table_autoinc_initialize( Reads the next autoinc value (== autoinc counter value), 0 if not yet initialized. */ -ib_longlong +ib_ulonglong dict_table_autoinc_read( /*====================*/ /* out: value for a new row, or 0 */ @@ -470,7 +470,7 @@ dict_table_autoinc_update( /*======================*/ dict_table_t* table, /* in: table */ - ib_longlong value) /* in: value which was assigned to a row */ + ib_ulonglong value) /* in: value which was assigned to a row */ { if (table->autoinc_inited && value > table->autoinc) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index f81804c0701..a181ecf1612 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -3545,7 +3545,19 @@ no_commit: if (auto_inc > prebuilt->last_value) { set_max_autoinc: ut_a(prebuilt->table->autoinc_increment > 0); - auto_inc += prebuilt->table->autoinc_increment; + + ulonglong have; + ulonglong need; + + /* Check for overflow conditions. */ + need = prebuilt->table->autoinc_increment; + have = ~0x0ULL - auto_inc; + + if (have < need) { + need = have; + } + + auto_inc += need; err = innobase_set_max_autoinc(auto_inc); @@ -5105,8 +5117,15 @@ ha_innobase::create( DBUG_ASSERT(innobase_table != 0); - if ((create_info->used_fields & HA_CREATE_USED_AUTO) && - (create_info->auto_increment_value != 0)) { + /* Note: We can't call update_thd() as prebuilt will not be + setup at this stage and so we use thd. */ + + /* We need to copy the AUTOINC value from the old table if + this is an ALTER TABLE. */ + + if (((create_info->used_fields & HA_CREATE_USED_AUTO) + || thd_sql_command(thd) == SQLCOM_ALTER_TABLE) + && create_info->auto_increment_value != 0) { /* Query was ALTER TABLE...AUTO_INCREMENT = x; or CREATE TABLE ...AUTO_INCREMENT = x; Find out a table @@ -5856,7 +5875,7 @@ ha_innobase::info( } if (flag & HA_STATUS_AUTO && table->found_next_number_field) { - longlong auto_inc; + ulonglong auto_inc; int ret; /* The following function call can the first time fail in @@ -7207,9 +7226,9 @@ ha_innobase::innobase_read_and_init_auto_inc( /*=========================================*/ /* out: 0 or generic MySQL error code */ - longlong* value) /* out: the autoinc value */ + ulonglong* value) /* out: the autoinc value */ { - longlong auto_inc; + ulonglong auto_inc; ibool stmt_start; int mysql_error = 0; dict_table_t* innodb_table = prebuilt->table; @@ -7260,7 +7279,9 @@ ha_innobase::innobase_read_and_init_auto_inc( index, autoinc_col_name, &auto_inc); if (error == DB_SUCCESS) { - ++auto_inc; + if (auto_inc < ~0x0ULL) { + ++auto_inc; + } dict_table_autoinc_initialize(innodb_table, auto_inc); } else { ut_print_timestamp(stderr); @@ -7313,14 +7334,14 @@ ha_innobase::innobase_get_auto_increment( error = innobase_autoinc_lock(); if (error == DB_SUCCESS) { - ib_longlong autoinc; + ulonglong autoinc; /* Determine the first value of the interval */ autoinc = dict_table_autoinc_read(prebuilt->table); /* We need to initialize the AUTO-INC value, for that we release all locks.*/ - if (autoinc <= 0) { + if (autoinc == 0) { trx_t* trx; trx = prebuilt->trx; @@ -7339,14 +7360,11 @@ ha_innobase::innobase_get_auto_increment( mysql_error = innobase_read_and_init_auto_inc( &autoinc); - if (!mysql_error) { - /* Should have read the proper value */ - ut_a(autoinc > 0); - } else { + if (mysql_error) { error = DB_ERROR; } } else { - *value = (ulonglong) autoinc; + *value = autoinc; } /* A deadlock error during normal processing is OK and can be ignored. */ @@ -7431,10 +7449,19 @@ ha_innobase::get_auto_increment( /* With old style AUTOINC locking we only update the table's AUTOINC counter after attempting to insert the row. */ if (innobase_autoinc_lock_mode != AUTOINC_OLD_STYLE_LOCKING) { + ulonglong have; + ulonglong need; + + /* Check for overflow conditions. */ + need = *nb_reserved_values * increment; + have = ~0x0ULL - *first_value; + + if (have < need) { + need = have; + } /* Compute the last value in the interval */ - prebuilt->last_value = *first_value + - (*nb_reserved_values * increment); + prebuilt->last_value = *first_value + need; ut_a(prebuilt->last_value >= *first_value); diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 773884b6584..4ffcdb1e3c2 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -72,7 +72,7 @@ class ha_innobase: public handler int update_thd(THD* thd); int change_active_index(uint keynr); int general_fetch(uchar* buf, uint direction, uint match_mode); - int innobase_read_and_init_auto_inc(longlong* ret); + int innobase_read_and_init_auto_inc(ulonglong* ret); ulong innobase_autoinc_lock(); ulong innobase_set_max_autoinc(ulonglong auto_inc); ulong innobase_reset_autoinc(ulonglong auto_inc); diff --git a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict0dict.h index 2f038b21e8e..f60775c8c2f 100644 --- a/storage/innobase/include/dict0dict.h +++ b/storage/innobase/include/dict0dict.h @@ -185,12 +185,12 @@ void dict_table_autoinc_initialize( /*==========================*/ dict_table_t* table, /* in: table */ - ib_longlong value); /* in: next value to assign to a row */ + ib_ulonglong value); /* in: next value to assign to a row */ /************************************************************************ Reads the next autoinc value (== autoinc counter value), 0 if not yet initialized. */ -ib_longlong +ib_ulonglong dict_table_autoinc_read( /*====================*/ /* out: value for a new row, or 0 */ @@ -204,7 +204,7 @@ dict_table_autoinc_update( /*======================*/ dict_table_t* table, /* in: table */ - ib_longlong value); /* in: value which was assigned to a row */ + ib_ulonglong value); /* in: value which was assigned to a row */ /************************************************************************ Release the autoinc lock.*/ diff --git a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h index a05bc513efd..2fe72498989 100644 --- a/storage/innobase/include/dict0mem.h +++ b/storage/innobase/include/dict0mem.h @@ -409,7 +409,7 @@ struct dict_table_struct{ /* TRUE if the autoinc counter has been inited; MySQL gets the init value by executing SELECT MAX(auto inc column) */ - ib_longlong autoinc;/* autoinc counter value to give to the + ib_ulonglong autoinc;/* autoinc counter value to give to the next inserted row */ ib_longlong autoinc_increment; diff --git a/storage/innobase/include/row0sel.h b/storage/innobase/include/row0sel.h index 4bde648f18e..a0a4ccb973b 100644 --- a/storage/innobase/include/row0sel.h +++ b/storage/innobase/include/row0sel.h @@ -181,7 +181,7 @@ row_search_max_autoinc( error code */ dict_index_t* index, /* in: index to search */ const char* col_name, /* in: autoinc column name */ - ib_longlong* value); /* out: AUTOINC value read */ + ib_ulonglong* value); /* out: AUTOINC value read */ /* A structure for caching column values for prefetched rows */ struct sel_buf_struct{ diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 8163ae16e4e..8ab62e655ff 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -212,8 +212,11 @@ typedef long int lint; #ifdef __WIN__ typedef __int64 ib_longlong; +typedef unsigned __int64 ib_ulonglong; #else +/* Note: longlong and ulonglong come from MySQL headers. */ typedef longlong ib_longlong; +typedef ulonglong ib_ulonglong; #endif typedef unsigned long long int ullint; diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index 29bded114e0..b050838aad2 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -4529,7 +4529,7 @@ row_search_check_if_query_cache_permitted( Read the AUTOINC column from the current row. If the value is less than 0 and the type is not unsigned then we reset the value to 0. */ static -ib_longlong +ib_ulonglong row_search_autoinc_read_column( /*===========================*/ /* out: value read from the column */ @@ -4540,7 +4540,7 @@ row_search_autoinc_read_column( { ulint len; const byte* data; - ib_longlong value; + ib_ulonglong value; mem_heap_t* heap = NULL; /* Our requirement is that dest should be word aligned. */ byte dest[sizeof(value)]; @@ -4567,7 +4567,7 @@ row_search_autoinc_read_column( and that dest is word aligned. */ switch (len) { case 8: - value = *(ib_longlong*) dest; + value = *(ib_ulonglong*) dest; break; case 4: @@ -4595,7 +4595,7 @@ row_search_autoinc_read_column( mem_heap_free(heap); } - if (!unsigned_type && value < 0) { + if (!unsigned_type && (ib_longlong) value < 0) { value = 0; } @@ -4634,7 +4634,7 @@ row_search_max_autoinc( column name can't be found in index */ dict_index_t* index, /* in: index to search */ const char* col_name, /* in: name of autoinc column */ - ib_longlong* value) /* out: AUTOINC value read */ + ib_ulonglong* value) /* out: AUTOINC value read */ { ulint i; ulint n_cols; From 4020e6a2d7910be74c0f22e884c6f4ee8ba7865b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 13:42:34 +0800 Subject: [PATCH 492/527] post fix after push of BUG#33029 mysql-test/r/binlog_killed_simulate.result: Update test result after push of bug#33029 mysql-test/r/mix_innodb_myisam_binlog.result: Update test result after push of bug#33029 mysql-test/r/multi_update.result: Update test result after push of bug#33029 mysql-test/r/rpl_auto_increment_bug33029.result: disable warning messages mysql-test/r/rpl_user.result: Update test result after push of bug#33029 mysql-test/t/rpl_auto_increment_bug33029.test: disable warning messages --- mysql-test/r/binlog_killed_simulate.result | 6 +- mysql-test/r/mix_innodb_myisam_binlog.result | 186 +++++++++--------- mysql-test/r/multi_update.result | 4 +- .../r/rpl_auto_increment_bug33029.result | 2 - mysql-test/r/rpl_user.result | 14 +- mysql-test/t/rpl_auto_increment_bug33029.test | 2 + 6 files changed, 107 insertions(+), 107 deletions(-) diff --git a/mysql-test/r/binlog_killed_simulate.result b/mysql-test/r/binlog_killed_simulate.result index a21ac5b1e32..c0087316420 100644 --- a/mysql-test/r/binlog_killed_simulate.result +++ b/mysql-test/r/binlog_killed_simulate.result @@ -16,10 +16,10 @@ create table t2 (a int, b int) ENGINE=MyISAM; reset master; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */; ERROR 70100: Query execution was interrupted -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Begin_load_query 1 # ;file_id=1;block_len=12 -master-bin.000001 133 Execute_load_query 1 # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=1 +master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=12 +master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/rpl_loaddata.dat' into table t2 /* will be "killed" in the middle */ ;file_id=# select (@a:=load_file("MYSQLTEST_VARDIR/tmp/binlog_killed_bug27571.binlog")) is not null; diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index b1d328a61dc..eda3ff41c89 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -6,12 +6,12 @@ begin; insert into t1 values(1); insert into t2 select * from t1; commit; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 347 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(1) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -21,12 +21,12 @@ insert into t2 select * from t1; rollback; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(2) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 347 Query 1 # use `test`; ROLLBACK +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(2) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; ROLLBACK delete from t1; delete from t2; reset master; @@ -39,15 +39,15 @@ rollback to savepoint my_savepoint; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back commit; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(3) -master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) -master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 616 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(3) +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(4) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -65,16 +65,16 @@ select a from t1 order by a; a 5 7 -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(5) -master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint -master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) -master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7) -master-bin.000001 703 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(5) +master-bin.000001 # Query # # use `test`; savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(6) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; rollback to savepoint my_savepoint +master-bin.000001 # Query # # use `test`; insert into t1 values(7) +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -87,46 +87,46 @@ insert into t2 select * from t1; select get_lock("a",10); get_lock("a",10) 1 -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(8) -master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 347 Query 1 # use `test`; ROLLBACK +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(8) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; ROLLBACK delete from t1; delete from t2; reset master; insert into t1 values(9); insert into t2 select * from t1; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 253 Xid 1 # COMMIT /* XID */ -master-bin.000001 280 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(9) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; reset master; insert into t1 values(10); begin; insert into t2 select * from t1; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 254 Xid 1 # COMMIT /* XID */ -master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(10) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 254 Xid 1 # COMMIT /* XID */ -master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 375 Query 1 # use `test`; BEGIN -master-bin.000001 443 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 531 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(10) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(11) +master-bin.000001 # Xid # # COMMIT /* XID */ alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -135,12 +135,12 @@ begin; insert into t1 values(12); insert into t2 select * from t1; commit; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12) -master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(12) +master-bin.000001 # Query # # use `test`; insert into t2 select * from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -148,7 +148,7 @@ begin; insert into t1 values(13); insert into t2 select * from t1; rollback; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info delete from t1; delete from t2; @@ -160,11 +160,11 @@ insert into t1 values(15); insert into t2 select * from t1; rollback to savepoint my_savepoint; commit; -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 254 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(14) +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -180,12 +180,12 @@ select a from t1 order by a; a 16 18 -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) -master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(16) +master-bin.000001 # Query # # use `test`; insert into t1 values(18) +master-bin.000001 # Xid # # COMMIT /* XID */ delete from t1; delete from t2; alter table t2 type=MyISAM; @@ -232,35 +232,35 @@ insert into t2 values (3); select get_lock("lock1",60); get_lock("lock1",60) 1 -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; BEGIN -master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) -master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* XID */ -master-bin.000001 369 Query 1 # use `test`; BEGIN -master-bin.000001 437 Query 1 # use `test`; delete from t1 -master-bin.000001 514 Xid 1 # COMMIT /* XID */ -master-bin.000001 541 Query 1 # use `test`; BEGIN -master-bin.000001 609 Query 1 # use `test`; delete from t2 -master-bin.000001 686 Xid 1 # COMMIT /* XID */ -master-bin.000001 713 Query 1 # use `test`; alter table t2 type=MyISAM -master-bin.000001 802 Query 1 # use `test`; BEGIN -master-bin.000001 870 Query 1 # use `test`; insert into t1 values (1) -master-bin.000001 958 Xid 1 # COMMIT /* XID */ -master-bin.000001 985 Query 1 # use `test`; insert into t2 values (20) -master-bin.000001 1074 Query 1 # use `test`; drop table t1,t2 -master-bin.000001 1153 Query 1 # use `test`; create temporary table ti (a int) engine=innodb -master-bin.000001 1263 Query 1 # use `test`; BEGIN -master-bin.000001 1331 Query 1 # use `test`; insert into ti values(1) -master-bin.000001 1418 Xid 1 # COMMIT /* XID */ -master-bin.000001 1445 Query 1 # use `test`; create temporary table t1 (a int) engine=myisam -master-bin.000001 1555 Query 1 # use `test`; insert t1 values (1) -master-bin.000001 1638 Query 1 # use `test`; create table t0 (n int) -master-bin.000001 1724 Query 1 # use `test`; insert t0 select * from t1 -master-bin.000001 1813 Query 1 # use `test`; insert into t0 select GET_LOCK("lock1",null) -master-bin.000001 1920 Query 1 # use `test`; create table t2 (n int) engine=innodb -master-bin.000001 2020 Query 1 # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti` +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values(16) +master-bin.000001 # Query # # use `test`; insert into t1 values(18) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; delete from t1 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; delete from t2 +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; alter table t2 type=MyISAM +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into t1 values (1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; insert into t2 values (20) +master-bin.000001 # Query # # use `test`; drop table t1,t2 +master-bin.000001 # Query # # use `test`; create temporary table ti (a int) engine=innodb +master-bin.000001 # Query # # use `test`; BEGIN +master-bin.000001 # Query # # use `test`; insert into ti values(1) +master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; create temporary table t1 (a int) engine=myisam +master-bin.000001 # Query # # use `test`; insert t1 values (1) +master-bin.000001 # Query # # use `test`; create table t0 (n int) +master-bin.000001 # Query # # use `test`; insert t0 select * from t1 +master-bin.000001 # Query # # use `test`; insert into t0 select GET_LOCK("lock1",null) +master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb +master-bin.000001 # Query # # use `test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `test`.`t1`,`test`.`ti` do release_lock("lock1"); drop table t0,t2; reset master; diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result index 7a12fc87bdc..18394bfc88a 100644 --- a/mysql-test/r/multi_update.result +++ b/mysql-test/r/multi_update.result @@ -573,8 +573,8 @@ count(*) select count(*) from t3 /* must be 1 */; count(*) 1 -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; delete t3.* from t2,t3 where t2.a=t3.a +master-bin.000001 # Query # # use `test`; delete t3.* from t2,t3 where t2.a=t3.a drop table t1, t2, t3; end of tests diff --git a/mysql-test/r/rpl_auto_increment_bug33029.result b/mysql-test/r/rpl_auto_increment_bug33029.result index b1512a6ec1d..fb17553f5a0 100644 --- a/mysql-test/r/rpl_auto_increment_bug33029.result +++ b/mysql-test/r/rpl_auto_increment_bug33029.result @@ -163,5 +163,3 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; -Warnings: -Note 1360 Trigger does not exist diff --git a/mysql-test/r/rpl_user.result b/mysql-test/r/rpl_user.result index 25e0f310f55..be24ce0bc46 100644 --- a/mysql-test/r/rpl_user.result +++ b/mysql-test/r/rpl_user.result @@ -35,11 +35,11 @@ drop user 'not_exist_user1'@'fakehost', 'not_exist_user2'@'fakehost'; ERROR HY000: Operation DROP USER failed for 'not_exist_user1'@'fakehost','not_exist_user2'@'fakehost' select Host,User from mysql.user where Host='fakehost'; Host User -show binlog events from 98; +show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 # use `test`; create user 'foo'@'fakehost' -master-bin.000001 189 Query 1 # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' -master-bin.000001 298 Query 1 # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' -master-bin.000001 412 Query 1 # use `test`; rename user 'not_exist_user1'@'fakehost' to 'foobar'@'fakehost', 'bar'@'fakehost' to 'barbar'@'fakehost' -master-bin.000001 579 Query 1 # use `test`; drop user 'foofoo'@'fakehost' -master-bin.000001 671 Query 1 # use `test`; drop user 'not_exist_user1'@'fakehost', 'barbar'@'fakehost' +master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost' +master-bin.000001 # Query # # use `test`; create user 'foo'@'fakehost', 'bar'@'fakehost' +master-bin.000001 # Query # # use `test`; rename user 'foo'@'fakehost' to 'foofoo'@'fakehost' +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' diff --git a/mysql-test/t/rpl_auto_increment_bug33029.test b/mysql-test/t/rpl_auto_increment_bug33029.test index a4f716d8411..db548945c7f 100644 --- a/mysql-test/t/rpl_auto_increment_bug33029.test +++ b/mysql-test/t/rpl_auto_increment_bug33029.test @@ -99,9 +99,11 @@ SELECT * FROM t2; # clean up connection master; +disable_warnings; 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; +enable_warnings; sync_slave_with_master; From 8b1f52c6694b00afd8ba3644502be8b19807c15f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 13:48:04 +0800 Subject: [PATCH 493/527] post fix after push of bug#33029 mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result: clean up objects used by test mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: clean up objects used by test --- .../suite/binlog/r/binlog_auto_increment_bug33029.result | 5 +++++ .../suite/binlog/t/binlog_auto_increment_bug33029.test | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result index 79b3af85072..6fbadf68721 100644 --- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result +++ b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result @@ -31,3 +31,8 @@ id 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; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index 0f0ecdd06a0..ecda14da45e 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -34,3 +34,12 @@ enable_result_log; echo # Result on slave; SELECT * FROM t1; SELECT * FROM t2; + +# clean up +disable_warnings; +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; +enable_warnings; From 5a6b357e6ff9379b68914048bdac50275f994749 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 13:02:59 +0100 Subject: [PATCH 494/527] BUG#25340 --- win/configure.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/win/configure.js b/win/configure.js index 4450b97f9a1..0de09fb318c 100755 --- a/win/configure.js +++ b/win/configure.js @@ -134,6 +134,8 @@ function GetValue(str, key) var end = str.indexOf("\n", pos); if (str.charAt(pos) == "\"") pos++; + if (str.charAt(end-1) == "\r") + end--; if (str.charAt(end-1) == "\"") end--; return str.substring(pos, end); From f8653a79e96dc1e553b5c73b733a34fef343e15b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 09:37:20 -0300 Subject: [PATCH 495/527] Patch clean up. Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/r/grant.result: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. mysql-test/t/grant.test: Fixed interference between tests: Users were added but not properly removed. This caused later tests to fail. --- mysql-test/r/grant.result | 4 ++-- mysql-test/t/grant.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 98a21b14585..d56020c3090 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1146,8 +1146,8 @@ select col1 from test limit 1 into tmp; return '1'; end| create view v1 as select test.* from test where test.col1=test_function(); -grant update (col1) on v1 to 'greg'; -revoke all privileges on v1 from 'greg'; +grant update (col1) on v1 to 'greg'@'localhost'; +drop user 'greg'@'localhost'; drop view v1; drop table test; drop function test_function; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 43548094a33..e4b95502143 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1169,8 +1169,8 @@ begin end| delimiter ;| create view v1 as select test.* from test where test.col1=test_function(); -grant update (col1) on v1 to 'greg'; -revoke all privileges on v1 from 'greg'; +grant update (col1) on v1 to 'greg'@'localhost'; +drop user 'greg'@'localhost'; drop view v1; drop table test; drop function test_function; From 1f21098a9bb5557dcab62ce9b91e2712539008de Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 15:13:10 +0100 Subject: [PATCH 496/527] apply snapshot innodb-5.1-ss2387 ------------------------------------------------------------------------ r2361 | sunny | 2008-03-12 09:08:09 +0200 (Wed, 12 Mar 2008) | 3 lines Changed paths: M /branches/5.1/include/srv0srv.h M /branches/5.1/os/os0file.c M /branches/5.1/srv/srv0srv.c M /branches/5.1/srv/srv0start.c branches/5.1: Remove the innodb_flush_method fdatasync option since it was not being used and there was a potential it could mislead users. ------------------------------------------------------------------------ r2367 | marko | 2008-03-17 10:23:03 +0200 (Mon, 17 Mar 2008) | 5 lines Changed paths: M /branches/5.1/handler/ha_innodb.cc branches/5.1: ha_innobase::check_if_incompatible_data(): Check HA_CREATE_USED_ROW_FORMAT before comparing row_type. Previously, the comparison was incorrectly guarded by the presence of an AUTO_INCREMENT attribute. ------------------------------------------------------------------------ r2374 | vasil | 2008-03-18 09:35:30 +0200 (Tue, 18 Mar 2008) | 11 lines Changed paths: M /branches/5.1/dict/dict0dict.c A /branches/5.1/mysql-test/innodb_bug35220.result A /branches/5.1/mysql-test/innodb_bug35220.test branches/5.1: Fix Bug#35220 ALTER TABLE too picky on reserved word "foreign". In ALTER TABLE, change the internal parser to search for ``FOREIGN[[:space:]]'' instead of only ``FOREIGN'' when parsing ALTER TABLE ... DROP FOREIGN KEY ...; otherwise it could be mistaken with ALTER TABLE ... DROP foreign_col; Approved by: Heikki ------------------------------------------------------------------------ r2379 | vasil | 2008-03-19 18:48:00 +0200 (Wed, 19 Mar 2008) | 10 lines Changed paths: M /branches/5.1/os/os0file.c branches/5.1: Fix Bug#34823: fsync() occasionally returns ENOLCK and causes InnoDB to restart mysqld Create a wrapper to fsync(2) that retries the operation if the error is ENOLCK. Use that wrapper instead of fsync(2). Approved by: Heikki ------------------------------------------------------------------------ r2380 | sunny | 2008-03-21 05:03:56 +0200 (Fri, 21 Mar 2008) | 9 lines Changed paths: M /branches/5.1/include/trx0undo.h M /branches/5.1/trx/trx0trx.c M /branches/5.1/trx/trx0undo.c branches/5.1: Fix for Bug# 35352. We've added a heuristic that checks the size of the UNDO slots cache lists (insert and upate). If either of cached lists has more than 500 entries then we add any UNDO slots that are freed, to the common free list instead of the cache list, this is to avoid the case where all the free slots end up in only one of the lists on startup after a crash. Tested with test case for 26590 and passes all mysql-test(s). ------------------------------------------------------------------------ r2383 | vasil | 2008-03-26 09:35:22 +0200 (Wed, 26 Mar 2008) | 4 lines Changed paths: M /branches/5.1/include/row0mysql.h branches/5.1: Fix typo in comment. ------------------------------------------------------------------------ r2384 | vasil | 2008-03-26 18:26:54 +0200 (Wed, 26 Mar 2008) | 20 lines Changed paths: A /branches/5.1/mysql-test/innodb_bug34300.result A /branches/5.1/mysql-test/innodb_bug34300.test M /branches/5.1/row/row0sel.c branches/5.1: Fix Bug#34300 Tinyblob & tinytext fields currupted after export/import and alter in 5.1 Copy the BLOB fields, that are stored internally, to a safe place (prebuilt->blob_heap) when converting a row from InnoDB format to MySQL format in row_sel_store_mysql_rec(). The bug was introduced in: ------------------------------------------------------------------------ r587 | osku | 2006-05-23 15:35:58 +0300 (Tue, 23 May 2006) | 3 lines Optimize BLOB selects by using prebuilt->blob_heap directly instead of first reading BLOB data to a temporary heap and then copying it to prebuilt->blob_heap. ------------------------------------------------------------------------ Approved by: Heikki ------------------------------------------------------------------------ r2386 | vasil | 2008-03-27 07:45:02 +0200 (Thu, 27 Mar 2008) | 22 lines Changed paths: M /branches/5.1/mysql-test/innodb.result branches/5.1: Merge change from MySQL (this fixes the failing innodb test): ChangeSet@1.1810.3601.4, 2008-02-07 02:33:21+04:00, gshchepa@host.loc +9 -0 Fixed bug#30059. Server handles truncation for assignment of too-long values into CHAR/VARCHAR/TEXT columns in a different ways when the truncated characters are spaces: 1. CHAR(N) columns silently ignore end-space truncation; 2. TEXT columns post a truncation warning/error in the non-strict/strict mode. 3. VARCHAR columns always post a truncation note in any mode. Space truncation processing has been synchronised over CHAR/VARCHAR/TEXT columns: current behavior of VARCHAR columns has been propagated as standard. Binary-encoded string/BLOB columns are not affected. ------------------------------------------------------------------------ r2387 | vasil | 2008-03-27 08:49:05 +0200 (Thu, 27 Mar 2008) | 8 lines Changed paths: M /branches/5.1/row/row0sel.c branches/5.1: Check whether *trx->mysql_query_str is != NULL in addition to trx->mysql_query_str. This adds more safety. This may or may not fix Bug#35226 RBR event crashes slave. ------------------------------------------------------------------------ storage/innobase/dict/dict0dict.c: apply snapshot innodb-5.1-ss2387 storage/innobase/handler/ha_innodb.cc: apply snapshot innodb-5.1-ss2387 storage/innobase/include/row0mysql.h: apply snapshot innodb-5.1-ss2387 storage/innobase/include/srv0srv.h: apply snapshot innodb-5.1-ss2387 storage/innobase/include/trx0undo.h: apply snapshot innodb-5.1-ss2387 storage/innobase/os/os0file.c: apply snapshot innodb-5.1-ss2387 storage/innobase/row/row0sel.c: apply snapshot innodb-5.1-ss2387 storage/innobase/srv/srv0srv.c: apply snapshot innodb-5.1-ss2387 storage/innobase/srv/srv0start.c: apply snapshot innodb-5.1-ss2387 storage/innobase/trx/trx0trx.c: apply snapshot innodb-5.1-ss2387 storage/innobase/trx/trx0undo.c: apply snapshot innodb-5.1-ss2387 --- storage/innobase/dict/dict0dict.c | 2 +- storage/innobase/handler/ha_innodb.cc | 2 +- storage/innobase/include/row0mysql.h | 2 +- storage/innobase/include/srv0srv.h | 6 +-- storage/innobase/include/trx0undo.h | 1 + storage/innobase/os/os0file.c | 61 +++++++++++++++++++++++---- storage/innobase/row/row0sel.c | 23 +++++++++- storage/innobase/srv/srv0srv.c | 2 +- storage/innobase/srv/srv0start.c | 6 +-- storage/innobase/trx/trx0trx.c | 6 +-- storage/innobase/trx/trx0undo.c | 26 ++++++++++-- 11 files changed, 108 insertions(+), 29 deletions(-) diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 10cef688705..5eaa44b4615 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -3395,7 +3395,7 @@ loop: ptr = dict_accept(cs, ptr, "FOREIGN", &success); - if (!success) { + if (!success || !my_isspace(cs, *ptr)) { goto loop; } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index a181ecf1612..665171927e0 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -7935,7 +7935,7 @@ bool ha_innobase::check_if_incompatible_data( } /* Check that row format didn't change */ - if ((info->used_fields & HA_CREATE_USED_AUTO) && + if ((info->used_fields & HA_CREATE_USED_ROW_FORMAT) && get_row_type() != info->row_type) { return COMPATIBLE_DATA_NO; diff --git a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h index f486caa874d..ca9d9c6b8f8 100644 --- a/storage/innobase/include/row0mysql.h +++ b/storage/innobase/include/row0mysql.h @@ -679,7 +679,7 @@ struct row_prebuilt_struct { fetched row in fetch_cache */ ulint n_fetch_cached; /* number of not yet fetched rows in fetch_cache */ - mem_heap_t* blob_heap; /* in SELECTS BLOB fie lds are copied + mem_heap_t* blob_heap; /* in SELECTS BLOB fields are copied to this heap */ mem_heap_t* old_vers_heap; /* memory heap where a previous version is built in consistent read */ diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 1ad695f700c..f0bfd3b07ce 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -249,11 +249,7 @@ extern srv_sys_t* srv_sys; /* Alternatives for the file flush option in Unix; see the InnoDB manual about what these mean */ -#define SRV_UNIX_FDATASYNC 1 /* This is the default; it is - currently mapped to a call of - fsync() because fdatasync() seemed - to corrupt files in Linux and - Solaris */ +#define SRV_UNIX_FSYNC 1 /* This is the default */ #define SRV_UNIX_O_DSYNC 2 #define SRV_UNIX_LITTLESYNC 3 #define SRV_UNIX_NOSYNC 4 diff --git a/storage/innobase/include/trx0undo.h b/storage/innobase/include/trx0undo.h index f53c6b01be4..7f10e407746 100644 --- a/storage/innobase/include/trx0undo.h +++ b/storage/innobase/include/trx0undo.h @@ -240,6 +240,7 @@ trx_undo_set_state_at_finish( /*=========================*/ /* out: undo log segment header page, x-latched */ + trx_rseg_t* rseg, /* in: rollback segment memory object */ trx_t* trx, /* in: transaction */ trx_undo_t* undo, /* in: undo log memory copy */ mtr_t* mtr); /* in: mtr */ diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index 78140cc5ecf..9adb9ddac50 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -22,8 +22,6 @@ Created 10/21/1995 Heikki Tuuri #include #endif /* UNIV_HOTBACKUP */ -#undef HAVE_FDATASYNC - #ifdef POSIX_ASYNC_IO /* We assume in this case that the OS has standard Posix aio (at least SunOS 2.6, HP-UX 11i and AIX 4.3 have) */ @@ -1812,6 +1810,55 @@ os_file_set_eof( #endif /* __WIN__ */ } +#ifndef __WIN__ +/*************************************************************************** +Wrapper to fsync(2) that retries the call on some errors. +Returns the value 0 if successful; otherwise the value -1 is returned and +the global variable errno is set to indicate the error. */ + +static +int +os_file_fsync( +/*==========*/ + /* out: 0 if success, -1 otherwise */ + os_file_t file) /* in: handle to a file */ +{ + int ret; + int failures; + ibool retry; + + failures = 0; + + do { + ret = fsync(file); + + os_n_fsyncs++; + + if (ret == -1 && errno == ENOLCK) { + + if (failures % 100 == 0) { + + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: fsync(): " + "No locks available; retrying\n"); + } + + os_thread_sleep(200000 /* 0.2 sec */); + + failures++; + + retry = TRUE; + } else { + + retry = FALSE; + } + } while (retry); + + return(ret); +} +#endif /* !__WIN__ */ + /*************************************************************************** Flushes the write buffers of a given file to the disk. */ @@ -1869,23 +1916,19 @@ os_file_flush( /* If we are not on an operating system that supports this, then fall back to a plain fsync. */ - ret = fsync(file); + ret = os_file_fsync(file); } else { ret = fcntl(file, F_FULLFSYNC, NULL); if (ret) { /* If we are not on a file system that supports this, then fall back to a plain fsync. */ - ret = fsync(file); + ret = os_file_fsync(file); } } -#elif HAVE_FDATASYNC - ret = fdatasync(file); #else - /* fprintf(stderr, "Flushing to file %p\n", file); */ - ret = fsync(file); + ret = os_file_fsync(file); #endif - os_n_fsyncs++; if (ret == 0) { return(TRUE); diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c index b050838aad2..9d2e08e0929 100644 --- a/storage/innobase/row/row0sel.c +++ b/storage/innobase/row/row0sel.c @@ -2643,6 +2643,25 @@ row_sel_store_mysql_rec( data = rec_get_nth_field(rec, offsets, templ->rec_field_no, &len); + + if (UNIV_UNLIKELY(templ->type == DATA_BLOB) + && len != UNIV_SQL_NULL) { + + /* It is a BLOB field locally stored in the + InnoDB record: we MUST copy its contents to + prebuilt->blob_heap here because later code + assumes all BLOB values have been copied to a + safe place. */ + + if (prebuilt->blob_heap == NULL) { + prebuilt->blob_heap = mem_heap_create( + UNIV_PAGE_SIZE); + } + + data = memcpy(mem_heap_alloc( + prebuilt->blob_heap, len), + data, len); + } } if (len != UNIV_SQL_NULL) { @@ -3558,7 +3577,9 @@ shortcut_fails_too_big_rec: if (trx->isolation_level <= TRX_ISO_READ_COMMITTED && prebuilt->select_lock_type != LOCK_NONE - && trx->mysql_query_str && trx->mysql_thd) { + && trx->mysql_query_str != NULL + && *trx->mysql_query_str != NULL + && trx->mysql_thd != NULL) { /* Scan the MySQL query string; check if SELECT is the first word there */ diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 1b13b19783e..53fa5c58ded 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -192,7 +192,7 @@ a heavier load on the I/O sub system. */ ulong srv_insert_buffer_batch_size = 20; char* srv_file_flush_method_str = NULL; -ulint srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; +ulint srv_unix_file_flush_method = SRV_UNIX_FSYNC; ulint srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; ulint srv_max_n_open_files = 300; diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index dac84e1410d..979d882307a 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -1122,12 +1122,12 @@ innobase_start_or_create_for_mysql(void) if (srv_file_flush_method_str == NULL) { /* These are the default options */ - srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; + srv_unix_file_flush_method = SRV_UNIX_FSYNC; srv_win_file_flush_method = SRV_WIN_IO_UNBUFFERED; #ifndef __WIN__ - } else if (0 == ut_strcmp(srv_file_flush_method_str, "fdatasync")) { - srv_unix_file_flush_method = SRV_UNIX_FDATASYNC; + } else if (0 == ut_strcmp(srv_file_flush_method_str, "fsync")) { + srv_unix_file_flush_method = SRV_UNIX_FSYNC; } else if (0 == ut_strcmp(srv_file_flush_method_str, "O_DSYNC")) { srv_unix_file_flush_method = SRV_UNIX_O_DSYNC; diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index 55b244abb0a..69b72451f2b 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -757,8 +757,8 @@ trx_commit_off_kernel( mutex_enter(&(rseg->mutex)); if (trx->insert_undo != NULL) { - trx_undo_set_state_at_finish(trx, trx->insert_undo, - &mtr); + trx_undo_set_state_at_finish( + rseg, trx, trx->insert_undo, &mtr); } undo = trx->update_undo; @@ -774,7 +774,7 @@ trx_commit_off_kernel( transaction commit for this transaction. */ update_hdr_page = trx_undo_set_state_at_finish( - trx, undo, &mtr); + rseg, trx, undo, &mtr); /* We have to do the cleanup for the update log while holding the rseg mutex because update log headers diff --git a/storage/innobase/trx/trx0undo.c b/storage/innobase/trx/trx0undo.c index 64e5ad3c9a8..2aa7752d292 100644 --- a/storage/innobase/trx/trx0undo.c +++ b/storage/innobase/trx/trx0undo.c @@ -1725,6 +1725,7 @@ trx_undo_set_state_at_finish( /*=========================*/ /* out: undo log segment header page, x-latched */ + trx_rseg_t* rseg, /* in: rollback segment memory object */ trx_t* trx __attribute__((unused)), /* in: transaction */ trx_undo_t* undo, /* in: undo log memory copy */ mtr_t* mtr) /* in: mtr */ @@ -1734,7 +1735,10 @@ trx_undo_set_state_at_finish( page_t* undo_page; ulint state; - ut_ad(trx && undo && mtr); + ut_ad(trx); + ut_ad(undo); + ut_ad(mtr); + ut_ad(mutex_own(&rseg->mutex)); if (undo->id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", @@ -1748,9 +1752,23 @@ trx_undo_set_state_at_finish( seg_hdr = undo_page + TRX_UNDO_SEG_HDR; page_hdr = undo_page + TRX_UNDO_PAGE_HDR; - if (undo->size == 1 && mach_read_from_2(page_hdr + TRX_UNDO_PAGE_FREE) - < TRX_UNDO_PAGE_REUSE_LIMIT) { - state = TRX_UNDO_CACHED; + if (undo->size == 1 + && mach_read_from_2(page_hdr + TRX_UNDO_PAGE_FREE) + < TRX_UNDO_PAGE_REUSE_LIMIT) { + + /* This is a heuristic to avoid the problem of all UNDO + slots ending up in one of the UNDO lists. Previously if + the server crashed with all the slots in one of the lists, + transactions that required the slots of a different type + would fail for lack of slots. */ + + if (UT_LIST_GET_LEN(rseg->update_undo_list) < 500 + && UT_LIST_GET_LEN(rseg->insert_undo_list) < 500) { + + state = TRX_UNDO_CACHED; + } else { + state = TRX_UNDO_TO_FREE; + } } else if (undo->type == TRX_UNDO_INSERT) { From f6013e63b8d286a5f29cd4973c7bfe9ca4053fe8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 17:43:17 +0100 Subject: [PATCH 497/527] Bug#35272: @@global.key_buffer_size = 4294967295 let the server crash reverting test that has been obsoleted by changes to the code mysql-test/r/key_cache.result: reverting test that has been obsoleted by changes to the code mysql-test/t/key_cache.test: reverting test that has been obsoleted by changes to the code --- mysql-test/r/key_cache.result | 5 ----- mysql-test/t/key_cache.test | 25 ------------------------- 2 files changed, 30 deletions(-) diff --git a/mysql-test/r/key_cache.result b/mysql-test/r/key_cache.result index 6f30480d6b1..9ada5dc0784 100644 --- a/mysql-test/r/key_cache.result +++ b/mysql-test/r/key_cache.result @@ -368,8 +368,3 @@ Variable_name Value key_cache_block_size 1536 SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size; DROP TABLE t1; -SET @save_key_buffer = @@global.key_buffer_size; -SET @@global.key_buffer_size = 4294967295; -SET @@global.key_buffer_size = 9223372036854775807; -SET @@global.key_buffer_size = @save_key_buffer; -End of 5.1 tests diff --git a/mysql-test/t/key_cache.test b/mysql-test/t/key_cache.test index f588a964584..4c14dc96aaa 100644 --- a/mysql-test/t/key_cache.test +++ b/mysql-test/t/key_cache.test @@ -247,28 +247,3 @@ SET GLOBAL key_cache_block_size= @bug28478_key_cache_block_size; DROP TABLE t1; # End of 4.1 tests - -# -# Bug#35272: @@global.key_buffer_size = 4294967295 let the server crash -# - -SET @save_key_buffer = @@global.key_buffer_size; - -# Wee try to force Out Of Memory here. key_buffer_size is ULL, so -# on a 32 bit machine, 4GB is the most we can ask for before the -# server complains about value/variable mismatch. At the off chance -# of one of our 64-bit machines actually offering us 4GB, we also -# accept "no error" (in addition to the expected "out of memory"). ---error 0,ER_OUTOFMEMORY -SET @@global.key_buffer_size = 4294967295; - -# on 32-bit, we get "out of range", on 64-bit, "out of memory". ---error 0,ER_WRONG_ARGUMENTS,ER_OUTOFMEMORY ---disable_warnings -SET @@global.key_buffer_size = 9223372036854775807; ---enable_warnings - -# restore normal value, just in case we got the 4GB or something. -SET @@global.key_buffer_size = @save_key_buffer; - ---echo End of 5.1 tests From 9d661efd7f85b4208b9220434a0d5b5f21ac5070 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 19:49:32 +0300 Subject: [PATCH 498/527] Bug#27219: Aggregate functions in ORDER BY. Mixing aggregate functions and non-grouping columns is not allowed in the ONLY_FULL_GROUP_BY mode. However in some cases the error wasn't thrown because of insufficient check. In order to check more thoroughly the new algorithm employs a list of outer fields used in a sum function and a SELECT_LEX::full_group_by_flag. Each non-outer field checked to find out whether it's aggregated or not and the current select is marked accordingly. All outer fields that are used under an aggregate function are added to the Item_sum::outer_fields list and later checked by the Item_sum::check_sum_func function. mysql-test/t/group_by.test: Added a test case for the bug#27219: Aggregate functions in ORDER BY. mysql-test/r/group_by.result: Added a test case for the bug#27219: Aggregate functions in ORDER BY. sql/sql_select.cc: Bug#27219: Aggregate functions in ORDER BY. Implementation of new check for mixing non aggregated fields and aggregation function in the ONLY_FULL_GROUP_BY mode. sql/sql_lex.cc: Bug#27219: Aggregate functions in ORDER BY. Initialization of the full_group_by_flag bitmap. SELECT_LEX::test_limit function doesn't reset ORDER BY clause anymore. sql/sql_lex.h: Bug#27219: Aggregate functions in ORDER BY. The full_group_by_flag is added to the SELECT_LEX class. sql/item_sum.h: Bug#27219: Aggregate functions in ORDER BY. The outer_fields list is added to the Item_sum class. sql/mysql_priv.h: Bug#27219: Aggregate functions in ORDER BY. Defined a set of constants used in the new check for mixing non aggregated fields and sum functions in the ONLY_FULL_GROUP_BY_MODE. sql/item_subselect.cc: Bug#27219: Aggregate functions in ORDER BY. The Item_in_subselect::select_in_like_transformer function now drops ORDER BY clause in all selects in a subquery. sql/item_sum.cc: Bug#27219: Aggregate functions in ORDER BY. Now the Item_sum::check_sum_func function now checks whether fields in the outer_fields list are aggregated or not and marks selects accordingly. sql/item.cc: Bug#27219: Aggregate functions in ORDER BY. Now the Item_field::fix_fields function checks whether the field is aggregated or not and marks its select_lex accordingly. --- mysql-test/r/group_by.result | 146 +++++++++++++++++++++++++++++++++++ mysql-test/t/group_by.test | 117 ++++++++++++++++++++++++++++ sql/item.cc | 28 ++++++- sql/item_subselect.cc | 14 ++++ sql/item_sum.cc | 64 +++++++++++++++ sql/item_sum.h | 7 ++ sql/mysql_priv.h | 7 ++ sql/sql_lex.cc | 3 +- sql/sql_lex.h | 11 ++- sql/sql_select.cc | 34 ++------ 10 files changed, 395 insertions(+), 36 deletions(-) diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 7574aa916ae..28a9e15d473 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -1213,4 +1213,150 @@ FROM t1; ERROR 21000: Subquery returns more than 1 row DROP TABLE t1; SET @@sql_mode = @old_sql_mode; +# +# Bug#27219: Aggregate functions in ORDER BY. +# +SET @save_sql_mode=@@sql_mode; +SET @@sql_mode='ONLY_FULL_GROUP_BY'; +CREATE TABLE t1 (a INT, b INT, c INT DEFAULT 0); +INSERT INTO t1 (a, b) VALUES (3,3), (2,2), (3,3), (2,2), (3,3), (4,4); +CREATE TABLE t2 SELECT * FROM t1; +SELECT 1 FROM t1 ORDER BY COUNT(*); +1 +1 +SELECT 1 FROM t1 ORDER BY COUNT(*) + 1; +1 +1 +SELECT 1 FROM t1 ORDER BY COUNT(*) + a; +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT 1 FROM t1 ORDER BY COUNT(*), 1; +1 +1 +SELECT 1 FROM t1 ORDER BY COUNT(*), a; +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT 1 FROM t1 ORDER BY SUM(a); +1 +1 +SELECT 1 FROM t1 ORDER BY SUM(a + 1); +1 +1 +SELECT 1 FROM t1 ORDER BY SUM(a) + 1; +1 +1 +SELECT 1 FROM t1 ORDER BY SUM(a), b; +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT a FROM t1 ORDER BY COUNT(b); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a) FROM t2); +a +3 +2 +3 +2 +3 +4 +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a), t2.a FROM t2); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a) FROM t2 ORDER BY t2.a); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 ORDER BY (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 +WHERE t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a IN (SELECT t2.a FROM t2 ORDER BY SUM(t1.b)); +a +2 +3 +4 +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a IN (SELECT t2.a FROM t2 ORDER BY t2.a, SUM(t2.b)); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING t1.a > ANY (SELECT t2.a FROM t2 ORDER BY t2.a, SUM(t2.b)); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 +WHERE t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t1.b)); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(SUM(t1.b) + 1) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +1 +1 +1 +1 +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(SUM(t1.b) + t2.b) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +1 +1 +1 +1 +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(t1.b + t2.b) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +1 +1 +1 +1 +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(SUM(t1.b) + 1) FROM t2 ORDER BY t2.a LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(SUM(t1.b) + t2.b) FROM t2 ORDER BY t2.a LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT 1 FROM t1 GROUP BY t1.a +HAVING (SELECT AVG(t1.b + t2.b) FROM t2 ORDER BY t2.a LIMIT 1); +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +SELECT t1.a FROM t1 +WHERE t1.a = (SELECT t2.a FROM t2 GROUP BY t2.a +ORDER BY SUM(t2.b), SUM(t1.b) LIMIT 1); +a +4 +SELECT t1.a, SUM(t1.b) FROM t1 +WHERE t1.a = (SELECT SUM(t2.b) FROM t2 GROUP BY t2.a +ORDER BY SUM(t2.b), SUM(t1.b) LIMIT 1) +GROUP BY t1.a; +a SUM(t1.b) +4 4 +SELECT t1.a, SUM(t1.b) FROM t1 +WHERE t1.a = (SELECT SUM(t2.b) FROM t2 +ORDER BY SUM(t2.b) + SUM(t1.b) LIMIT 1) +GROUP BY t1.a; +a SUM(t1.b) +SELECT t1.a, SUM(t1.b) FROM t1 +WHERE t1.a = (SELECT SUM(t2.b) FROM t2 +ORDER BY SUM(t2.b + t1.a) LIMIT 1) +GROUP BY t1.a; +a SUM(t1.b) +SELECT t1.a FROM t1 GROUP BY t1.a +HAVING (1, 1) = (SELECT SUM(t1.a), t1.a FROM t2 LIMIT 1); +a +select avg ( +(select +(select sum(outr.a + innr.a) from t1 as innr limit 1) as tt +from t1 as outr order by outr.a limit 1)) +from t1 as most_outer; +avg ( +(select +(select sum(outr.a + innr.a) from t1 as innr limit 1) as tt +from t1 as outr order by outr.a limit 1)) +29.0000 +select avg ( +(select ( +(select sum(outr.a + innr.a) from t1 as innr limit 1)) as tt +from t1 as outr order by count(outr.a) limit 1)) as tt +from t1 as most_outer; +ERROR 42000: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause +select (select sum(outr.a + t1.a) from t1 limit 1) as tt from t1 as outr order by outr.a; +tt +29 +29 +35 +35 +35 +41 +SET sql_mode=@save_sql_mode; +DROP TABLE t1, t2; End of 5.0 tests diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 636544f7854..82bb8a45faa 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -893,4 +893,121 @@ FROM t1; DROP TABLE t1; SET @@sql_mode = @old_sql_mode; +--echo # +--echo # Bug#27219: Aggregate functions in ORDER BY. +--echo # +SET @save_sql_mode=@@sql_mode; +SET @@sql_mode='ONLY_FULL_GROUP_BY'; + +CREATE TABLE t1 (a INT, b INT, c INT DEFAULT 0); +INSERT INTO t1 (a, b) VALUES (3,3), (2,2), (3,3), (2,2), (3,3), (4,4); +CREATE TABLE t2 SELECT * FROM t1; + +SELECT 1 FROM t1 ORDER BY COUNT(*); +SELECT 1 FROM t1 ORDER BY COUNT(*) + 1; +--error 1140 +SELECT 1 FROM t1 ORDER BY COUNT(*) + a; +SELECT 1 FROM t1 ORDER BY COUNT(*), 1; +--error 1140 +SELECT 1 FROM t1 ORDER BY COUNT(*), a; + +SELECT 1 FROM t1 ORDER BY SUM(a); +SELECT 1 FROM t1 ORDER BY SUM(a + 1); +SELECT 1 FROM t1 ORDER BY SUM(a) + 1; +--error 1140 +SELECT 1 FROM t1 ORDER BY SUM(a), b; + +--error 1140 +SELECT a FROM t1 ORDER BY COUNT(b); + +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a) FROM t2); + +--error 1140 +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a), t2.a FROM t2); +--error 1140 +SELECT t1.a FROM t1 ORDER BY (SELECT SUM(t2.a) FROM t2 ORDER BY t2.a); +--error 1140 +SELECT t1.a FROM t1 ORDER BY (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1); + +--error 1140 +SELECT t1.a FROM t1 + WHERE t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t2.b) LIMIT 1); +--error 1140 +SELECT t1.a FROM t1 GROUP BY t1.a + HAVING t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t2.a) LIMIT 1); + +SELECT t1.a FROM t1 GROUP BY t1.a + HAVING t1.a IN (SELECT t2.a FROM t2 ORDER BY SUM(t1.b)); +--error 1140 +SELECT t1.a FROM t1 GROUP BY t1.a + HAVING t1.a IN (SELECT t2.a FROM t2 ORDER BY t2.a, SUM(t2.b)); +--error 1140 +SELECT t1.a FROM t1 GROUP BY t1.a + HAVING t1.a > ANY (SELECT t2.a FROM t2 ORDER BY t2.a, SUM(t2.b)); + +--error 1140 +SELECT t1.a FROM t1 + WHERE t1.a = (SELECT t2.a FROM t2 ORDER BY SUM(t1.b)); + +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(SUM(t1.b) + 1) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(SUM(t1.b) + t2.b) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(t1.b + t2.b) FROM t2 ORDER BY SUM(t2.a) LIMIT 1); + +--error 1140 +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(SUM(t1.b) + 1) FROM t2 ORDER BY t2.a LIMIT 1); +--error 1140 +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(SUM(t1.b) + t2.b) FROM t2 ORDER BY t2.a LIMIT 1); +--error 1140 +SELECT 1 FROM t1 GROUP BY t1.a + HAVING (SELECT AVG(t1.b + t2.b) FROM t2 ORDER BY t2.a LIMIT 1); + +# Both SUMs are aggregated in the subquery, no mixture: +SELECT t1.a FROM t1 + WHERE t1.a = (SELECT t2.a FROM t2 GROUP BY t2.a + ORDER BY SUM(t2.b), SUM(t1.b) LIMIT 1); + +# SUM(t1.b) is aggregated in the subquery, no mixture: +SELECT t1.a, SUM(t1.b) FROM t1 + WHERE t1.a = (SELECT SUM(t2.b) FROM t2 GROUP BY t2.a + ORDER BY SUM(t2.b), SUM(t1.b) LIMIT 1) + GROUP BY t1.a; + +# 2nd SUM(t1.b) is aggregated in the subquery, no mixture: +SELECT t1.a, SUM(t1.b) FROM t1 + WHERE t1.a = (SELECT SUM(t2.b) FROM t2 + ORDER BY SUM(t2.b) + SUM(t1.b) LIMIT 1) + GROUP BY t1.a; + +# SUM(t2.b + t1.a) is aggregated in the subquery, no mixture: +SELECT t1.a, SUM(t1.b) FROM t1 + WHERE t1.a = (SELECT SUM(t2.b) FROM t2 + ORDER BY SUM(t2.b + t1.a) LIMIT 1) + GROUP BY t1.a; + +SELECT t1.a FROM t1 GROUP BY t1.a + HAVING (1, 1) = (SELECT SUM(t1.a), t1.a FROM t2 LIMIT 1); + +select avg ( + (select + (select sum(outr.a + innr.a) from t1 as innr limit 1) as tt + from t1 as outr order by outr.a limit 1)) +from t1 as most_outer; + +--error 1140 +select avg ( + (select ( + (select sum(outr.a + innr.a) from t1 as innr limit 1)) as tt + from t1 as outr order by count(outr.a) limit 1)) as tt +from t1 as most_outer; + +select (select sum(outr.a + t1.a) from t1 limit 1) as tt from t1 as outr order by outr.a; + +SET sql_mode=@save_sql_mode; +DROP TABLE t1, t2; + --echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 6f0119393e7..85756dcb124 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3925,9 +3925,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference) } if ((ret= fix_outer_field(thd, &from_field, reference)) < 0) goto error; - else if (!ret) - return FALSE; outer_fixed= TRUE; + if (!ret) + goto mark_non_agg_field; } else if (!from_field) goto error; @@ -3939,9 +3939,9 @@ bool Item_field::fix_fields(THD *thd, Item **reference) int ret; if ((ret= fix_outer_field(thd, &from_field, reference)) < 0) goto error; - else if (!ret) - return FALSE; outer_fixed= 1; + if (!ret) + goto mark_non_agg_field; } /* @@ -4007,6 +4007,26 @@ bool Item_field::fix_fields(THD *thd, Item **reference) thd->lex->current_select->non_agg_fields.push_back(this); marker= thd->lex->current_select->cur_pos_in_select_list; } +mark_non_agg_field: + if (fixed && thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) + { + /* + Mark selects according to presence of non aggregated fields. + Fields from outer selects added to the aggregate function + outer_fields list as its unknown at the moment whether it's + aggregated or not. + */ + if (!thd->lex->in_sum_func) + cached_table->select_lex->full_group_by_flag|= NON_AGG_FIELD_USED; + else + { + if (outer_fixed) + thd->lex->in_sum_func->outer_fields.push_back(this); + else if (thd->lex->in_sum_func->nest_level != + thd->lex->current_select->nest_level) + cached_table->select_lex->full_group_by_flag|= NON_AGG_FIELD_USED; + } + } return FALSE; error: diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index b3710841dfb..1c81a4ac3a1 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -1434,6 +1434,19 @@ Item_in_subselect::select_in_like_transformer(JOIN *join, Comp_creator *func) DBUG_ENTER("Item_in_subselect::select_in_like_transformer"); + { + /* + IN/SOME/ALL/ANY subqueries aren't support LIMIT clause. Without it + ORDER BY clause becomes meaningless thus we drop it here. + */ + SELECT_LEX *sl= current->master_unit()->first_select(); + for (; sl; sl= sl->next_select()) + { + if (sl->join) + sl->join->order= 0; + } + } + if (changed) { DBUG_RETURN(RES_OK); @@ -1468,6 +1481,7 @@ Item_in_subselect::select_in_like_transformer(JOIN *join, Comp_creator *func) transformed= 1; arena= thd->activate_stmt_arena_if_needed(&backup); + /* Both transformers call fix_fields() only for Items created inside them, and all that items do not make permanent changes in current item arena diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 3d6d46ab3f4..42c934261b0 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -66,6 +66,7 @@ bool Item_sum::init_sum_func_check(THD *thd) aggr_sel= NULL; max_arg_level= -1; max_sum_func_level= -1; + outer_fields.empty(); return FALSE; } @@ -175,6 +176,7 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref) MYF(0)); return TRUE; } + if (in_sum_func) { /* @@ -195,6 +197,68 @@ bool Item_sum::check_sum_func(THD *thd, Item **ref) set_if_bigger(in_sum_func->max_sum_func_level, aggr_level); set_if_bigger(in_sum_func->max_sum_func_level, max_sum_func_level); } + + /* + Check that non-aggregated fields and sum functions aren't mixed in the + same select in the ONLY_FULL_GROUP_BY mode. + */ + if (outer_fields.elements) + { + Item_field *field; + /* + Here we compare the nesting level of the select to which an outer field + belongs to with the aggregation level of the sum function. All fields in + the outer_fields list are checked. + + If the nesting level is equal to the aggregation level then the field is + aggregated by this sum function. + If the nesting level is less than the aggregation level then the field + belongs to an outer select. In this case if there is an embedding sum + function add current field to functions outer_fields list. If there is + no embedding function then the current field treated as non aggregated + and the select it belongs to is marked accordingly. + If the nesting level is greater than the aggregation level then it means + that this field was added by an inner sum function. + Consider an example: + + select avg ( <-- we are here, checking outer.f1 + select ( + select sum(outer.f1 + inner.f1) from inner + ) from outer) + from most_outer; + + In this case we check that no aggregate functions are used in the + select the field belongs to. If there are some then an error is + raised. + */ + List_iterator of(outer_fields); + while ((field= of++)) + { + SELECT_LEX *sel= field->cached_table->select_lex; + if (sel->nest_level < aggr_level) + { + if (in_sum_func) + { + /* + Let upper function decide whether this field is a non + aggregated one. + */ + in_sum_func->outer_fields.push_back(field); + } + else + sel->full_group_by_flag|= NON_AGG_FIELD_USED; + } + if (sel->nest_level > aggr_level && + (sel->full_group_by_flag & SUM_FUNC_USED) && + !sel->group_list.elements) + { + my_message(ER_MIX_OF_GROUP_FUNC_AND_FIELDS, + ER(ER_MIX_OF_GROUP_FUNC_AND_FIELDS), MYF(0)); + return TRUE; + } + } + } + aggr_sel->full_group_by_flag|= SUM_FUNC_USED; update_used_tables(); thd->lex->in_sum_func= in_sum_func; return FALSE; diff --git a/sql/item_sum.h b/sql/item_sum.h index bf0abe53eea..d39fc96e254 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -239,6 +239,13 @@ public: int8 max_arg_level; /* max level of unbound column references */ int8 max_sum_func_level;/* max level of aggregation for embedded functions */ bool quick_group; /* If incremental update of fields */ + /* + This list is used by the check for mixing non aggregated fields and + sum functions in the ONLY_FULL_GROUP_BY_MODE. We save all outer fields + directly or indirectly used under this function it as it's unclear + at the moment of fixing outer field whether it's aggregated or not. + */ + List outer_fields; protected: table_map used_tables_cache; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 59ec18e1a3d..6352647a154 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1044,6 +1044,13 @@ SQL_SELECT *make_select(TABLE *head, table_map const_tables, bool allow_null_cond, int *error); extern Item **not_found_item; +/* + A set of constants used for checking non aggregated fields and sum + functions mixture in the ONLY_FULL_GROUP_BY_MODE. +*/ +#define NON_AGG_FIELD_USED 1 +#define SUM_FUNC_USED 2 + /* This enumeration type is used only by the function find_item_in_list to return the info on how an item has been resolved against a list diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index f1b4ffc949d..6bfcd982b04 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1253,6 +1253,7 @@ void st_select_lex::init_select() non_agg_fields.empty(); cond_value= having_value= Item::COND_UNDEF; inner_refs_list.empty(); + full_group_by_flag= 0; } /* @@ -1491,8 +1492,6 @@ bool st_select_lex::test_limit() "LIMIT & IN/ALL/ANY/SOME subquery"); return(1); } - // no sense in ORDER BY without LIMIT - order_list.empty(); return(0); } diff --git a/sql/sql_lex.h b/sql/sql_lex.h index f216f51b0e4..cde4c3a97b3 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -611,7 +611,16 @@ public: joins on the right. */ List *prev_join_using; - + /* + Bitmap used in the ONLY_FULL_GROUP_BY_MODE to prevent mixture of aggregate + functions and non aggregated fields when GROUP BY list is absent. + Bits: + 0 - non aggregated fields are used in this select, + defined as NON_AGG_FIELD_USED. + 1 - aggregate functions are used in this select, + defined as SUM_FUNC_USED. + */ + uint8 full_group_by_flag; void init_query(); void init_select(); st_select_lex_unit* master_unit(); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6392f7c4299..8c5d09f4e16 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -568,37 +568,13 @@ JOIN::prepare(Item ***rref_pointer_array, /* Check if there are references to un-aggregated columns when computing aggregate functions with implicit grouping (there is no GROUP BY). - TODO: Add check of calculation of GROUP functions and fields: - SELECT COUNT(*)+table.col1 from table1; */ - if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY) + if (thd->variables.sql_mode & MODE_ONLY_FULL_GROUP_BY && !group_list && + select_lex->full_group_by_flag == (NON_AGG_FIELD_USED | SUM_FUNC_USED)) { - if (!group_list) - { - uint flag=0; - List_iterator_fast it(fields_list); - Item *item; - while ((item= it++)) - { - if (item->with_sum_func) - flag|=1; - else if (!(flag & 2) && !item->const_during_execution()) - flag|=2; - } - if (having) - { - if (having->with_sum_func) - flag |= 1; - else if (!having->const_during_execution()) - flag |= 2; - } - if (flag == 3) - { - my_message(ER_MIX_OF_GROUP_FUNC_AND_FIELDS, - ER(ER_MIX_OF_GROUP_FUNC_AND_FIELDS), MYF(0)); - DBUG_RETURN(-1); - } - } + my_message(ER_MIX_OF_GROUP_FUNC_AND_FIELDS, + ER(ER_MIX_OF_GROUP_FUNC_AND_FIELDS), MYF(0)); + DBUG_RETURN(-1); } { /* Caclulate the number of groups */ From 77fbeeab2464d5f035a7393eb11953604a4ac3f8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Mar 2008 19:39:21 +0200 Subject: [PATCH 499/527] Bug #35206: select query result different if the key is indexed or not The code for executing indexed ORDER BY was not setting all the internal fields correctly when selecting to execute ORDER BY over and index. Fixed by change the access method to one that will use the quick indexed access if one is selected while selecting indexed ORDER BY. mysql-test/r/order_by.result: Bug #35206: test case mysql-test/t/order_by.test: Bug #35206: test case sql/sql_select.cc: Bug #35206: Change the access method when selecting a quick indexed access. --- mysql-test/r/order_by.result | 30 +++ mysql-test/t/order_by.test | 462 +++++++++++++++++++++++++++++++++++ sql/sql_select.cc | 17 ++ 3 files changed, 509 insertions(+) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 4320a7764de..faab8e49880 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -1428,3 +1428,33 @@ set session max_sort_length= 2180; select * from t1 order by b; ERROR HY001: Out of sort memory; increase server sort buffer size drop table t1; +CREATE TABLE t2 (a varchar(32), b int(11), c float, d double, +UNIQUE KEY a (a,b,c), KEY b (b), KEY c (c)); +CREATE TABLE t1 (a varchar(32), b char(3), UNIQUE KEY a (a,b), KEY b (b)); +CREATE TABLE t3 (a varchar(32), b char(3), UNIQUE KEY a (a,b)); +INSERT INTO t3 SELECT * FROM t1; +EXPLAIN +SELECT d FROM t1, t2 +WHERE t2.b=14 AND t2.a=t1.a AND 5.1limit= select_limit; } } + else if (tab->type != JT_ALL) + { + /* + We're about to use a quick access to the table. + We need to change the access method so as the quick access + method is actually used. + */ + DBUG_ASSERT(tab->select->quick); + tab->type=JT_ALL; + tab->use_quick=1; + tab->ref.key= -1; + tab->ref.key_parts=0; // Don't use ref key. + tab->read_first_record= join_init_read_record; + /* + TODO: update the number of records in join->best_positions[tablenr] + */ + } } used_key_parts= best_key_parts; order_direction= best_key_direction; From f56d77dadf324d62f21e3fff7f460a8aba464605 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 13:16:41 +0100 Subject: [PATCH 500/527] BUG#29020 (Event results not correctly replicated to slave in RBR): The bug allow multiple executing transactions working with non-transactional to interfere with each others by interleaving the events of different trans- actions. Bug is fixed by writing non-transactional events to the transaction cache and flushing the cache to the binary log at statement commit. To mimic the behavior of normal statement-based replication, we flush the transaction cache in row- based mode when there is no committed statements in the transaction cache, which means we are committing the first one. This means that it will be written to the binary log as a "mini-transaction" with just the rows for the statement. Note that the changes here does not take effect when building the server with HAVE_TRANSACTIONS set to false, but it is not clear if this was possible before this patch either. For row-based logging, we also have that when AUTOCOMMIT=1, the code now always generates a BEGIN/COMMIT pair for single statements, or BEGIN/ROLLBACK pair in the case of non-transactional changes in a statement that was rolled back. Note that for the case where changes to a non-transactional table causes a rollback due to error, the statement will now be logged with a BEGIN/ROLLBACK pair, even though some changes has been committed to the non-transactional table. mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test: Removing SHOW BINLOG EVENTS causing test to be non-deterministic. mysql-test/r/ctype_cp932_binlog_row.result: Result change. mysql-test/suite/binlog/r/binlog_base64_flag.result: Result change. mysql-test/suite/binlog/r/binlog_multi_engine.result: Result file change. mysql-test/suite/binlog/r/binlog_row_binlog.result: Result file change. mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result: Result file change. mysql-test/suite/binlog/r/binlog_row_insert_select.result: Result file change. mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Result file change. mysql-test/suite/binlog/r/binlog_stm_binlog.result: Result file change. mysql-test/suite/binlog/t/binlog_base64_flag.test: Removing table that will be used in test to prevent failing if preceeding tests forgot to drop the table. mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: Result file change. mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Result file change. mysql-test/suite/rpl/r/rpl_row_create_table.result: Result file change. mysql-test/suite/rpl/r/rpl_row_delayed_ins.result: Result file change. mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: Result file change. mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Result file change. mysql-test/suite/rpl/r/rpl_row_log.result: Result file change. mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Result file change. mysql-test/suite/rpl/r/rpl_row_until.result: Result file change. mysql-test/suite/rpl/r/rpl_slave_skip.result: Result file change. mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Result file change. mysql-test/suite/rpl/r/rpl_truncate_2myisam.result: Result file change. mysql-test/suite/rpl/t/rpl_row_create_table.test: Binlog position change. mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: Binlog position change. mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test: Binlog position change. Added stop position to mysqlbinlog argments to prevent extreneous output. mysql-test/suite/rpl/t/rpl_row_until.test: Binlog position change. mysql-test/suite/rpl/t/rpl_slave_skip.test: Binlog position change. mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Removing extreneous SHOW BINLOG EVENTS causing test to be non-deterministic. mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: Result change. sql/log.cc: Adding variable at_least_one_stmt to denote that there is at least one statement committed to the transaction cache (but there might be more). Removing duplicate checks from binlog_end_trans(). The transaction cache should always be committed or rolled back when this function is called. Correcting conditions for binlog_rollback() and binlog_commit() and removing the previous "invisible commit" in favor of always using explicit commits in the binary log. sql/log_event.cc: Marking table map event to be cached. Removing Muted_query_log_event from code. sql/log_event.h: Removing unused class Muted_query_log_event. sql/sql_insert.cc: Adding missing call to ha_autocommit_or_rollback() for delayed thread. Marking CREATE-SELECT statements as transactional, since they don't need to be logged. --- .../extra/rpl_tests/rpl_row_delayed_ins.test | 1 - mysql-test/r/ctype_cp932_binlog_row.result | 2 + .../suite/binlog/r/binlog_base64_flag.result | 1 + .../suite/binlog/r/binlog_multi_engine.result | 2 + .../suite/binlog/r/binlog_row_binlog.result | 30 +- .../binlog/r/binlog_row_ctype_ucs.result | 13 + .../binlog/r/binlog_row_insert_select.result | 2 + .../r/binlog_row_mix_innodb_myisam.result | 38 +- .../suite/binlog/r/binlog_stm_binlog.result | 6 + .../suite/binlog/t/binlog_base64_flag.test | 3 + mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result | 8 +- .../suite/rpl/r/rpl_row_basic_11bugs.result | 8 +- .../suite/rpl/r/rpl_row_create_table.result | 99 ++-- .../suite/rpl/r/rpl_row_delayed_ins.result | 10 - .../suite/rpl/r/rpl_row_flsh_tbls.result | 4 +- .../suite/rpl/r/rpl_row_inexist_tbl.result | 4 +- mysql-test/suite/rpl/r/rpl_row_log.result | 34 +- .../suite/rpl/r/rpl_row_log_innodb.result | 2 + mysql-test/suite/rpl/r/rpl_row_until.result | 20 +- mysql-test/suite/rpl/r/rpl_slave_skip.result | 14 +- .../rpl/r/rpl_switch_stm_row_mixed.result | 432 ++++-------------- .../suite/rpl/r/rpl_truncate_2myisam.result | 6 + .../suite/rpl/t/rpl_row_create_table.test | 6 +- mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test | 2 +- .../suite/rpl/t/rpl_row_mysqlbinlog.test | 17 +- mysql-test/suite/rpl/t/rpl_row_until.test | 2 +- mysql-test/suite/rpl/t/rpl_slave_skip.test | 2 +- .../suite/rpl/t/rpl_switch_stm_row_mixed.test | 2 +- mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result | 2 + sql/log.cc | 181 ++++++-- sql/log_event.cc | 17 +- sql/log_event.h | 25 - sql/sql_insert.cc | 12 +- 33 files changed, 473 insertions(+), 534 deletions(-) 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 c4e6dbc84c2..214027160a9 100644 --- a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test +++ b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test @@ -15,7 +15,6 @@ SELECT * FROM t1 ORDER BY a; sync_slave_with_master; connection master; -source include/show_binlog_events.inc; sync_slave_with_master; SELECT * FROM t1 ORDER BY a; connection master; diff --git a/mysql-test/r/ctype_cp932_binlog_row.result b/mysql-test/r/ctype_cp932_binlog_row.result index 39d7727b58a..0370b7a1cf6 100644 --- a/mysql-test/r/ctype_cp932_binlog_row.result +++ b/mysql-test/r/ctype_cp932_binlog_row.result @@ -9,8 +9,10 @@ EXECUTE stmt1 USING @var1; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; CREATE TABLE t1(f1 blob) +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT SELECT HEX(f1) FROM t1; HEX(f1) 8300 diff --git a/mysql-test/suite/binlog/r/binlog_base64_flag.result b/mysql-test/suite/binlog/r/binlog_base64_flag.result index 8e5d7def823..ad9e460381e 100644 --- a/mysql-test/suite/binlog/r/binlog_base64_flag.result +++ b/mysql-test/suite/binlog/r/binlog_base64_flag.result @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS t1; ==== Test BUG#32407 ==== select * from t1; a diff --git a/mysql-test/suite/binlog/r/binlog_multi_engine.result b/mysql-test/suite/binlog/r/binlog_multi_engine.result index 8574a2351a1..ffe7915f1f8 100644 --- a/mysql-test/suite/binlog/r/binlog_multi_engine.result +++ b/mysql-test/suite/binlog/r/binlog_multi_engine.result @@ -78,8 +78,10 @@ UPDATE t1n, t1b SET e = 2, b = 3 WHERE f = c; ERROR HY000: Binary logging not possible. Message: Row-based format required for this statement, but not allowed by this combination of engines show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1m) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1n) master-bin.000001 # Table_map # # table_id: # (mysql.ndb_apply_status) diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result index 8da441d5865..f830b69bf9d 100644 --- a/mysql-test/suite/binlog/r/binlog_row_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result @@ -1085,9 +1085,11 @@ show binlog events from 0; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 4 Format_desc 1 106 Server version, Binlog ver: 4 master-bin.000001 106 Query 1 227 use `test`; create table t1 (a bigint unsigned, b bigint(20) unsigned) -master-bin.000001 227 Table_map 1 269 table_id: # (test.t1) -master-bin.000001 269 Write_rows 1 315 table_id: # flags: STMT_END_F -master-bin.000001 315 Query 1 391 use `test`; drop table t1 +master-bin.000001 227 Query 1 295 use `test`; BEGIN +master-bin.000001 295 Table_map 1 337 table_id: # (test.t1) +master-bin.000001 337 Write_rows 1 383 table_id: # flags: STMT_END_F +master-bin.000001 383 Query 1 452 use `test`; COMMIT +master-bin.000001 452 Query 1 528 use `test`; drop table t1 End of 5.0 tests reset master; create table t1 (id tinyint auto_increment primary key); @@ -1111,8 +1113,10 @@ use test; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; BEGIN @@ -1123,12 +1127,18 @@ master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) +master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysql`; COMMIT +master-bin.000001 # Query # # use `mysql`; 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 # # use `mysql`; COMMIT +master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysql`; COMMIT drop table t1,t2,t3,tt1; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1; @@ -1138,8 +1148,10 @@ insert delayed into t1 values (300); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; create table t1 (id tinyint auto_increment primary key) +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (a int) master-bin.000001 # Query # # use `test`; BEGIN @@ -1150,20 +1162,32 @@ master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` ( `a` int(11) DEFAULT NULL ) +master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysql`; COMMIT +master-bin.000001 # Query # # use `mysql`; 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 # # use `mysql`; COMMIT +master-bin.000001 # Query # # use `mysql`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysql.user) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysql`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1`,`t2`,`t3` /* generated by server */ master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(400),(null); 11 == 11 diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 4f4e7bcedd7..783dee673d2 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -5,13 +5,26 @@ reset master; insert into t2 values (@v); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT flush logs; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; +use test/*!*/; +SET TIMESTAMP=10000/*!*/; +SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; +SET @@session.sql_mode=0/*!*/; +/*!\C latin1 *//*!*/; +SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +BEGIN +/*!*/; +SET TIMESTAMP=10000/*!*/; +COMMIT +/*!*/; DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; diff --git a/mysql-test/suite/binlog/r/binlog_row_insert_select.result b/mysql-test/suite/binlog/r/binlog_row_insert_select.result index cd6ddafc47b..d4370c4de12 100644 --- a/mysql-test/suite/binlog/r/binlog_row_insert_select.result +++ b/mysql-test/suite/binlog/r/binlog_row_insert_select.result @@ -8,8 +8,10 @@ insert into t1 select * from t2; ERROR 23000: Duplicate entry '2' for key 'a' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; ROLLBACK select * from t1; a 1 diff --git a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result index d26913da2b2..419aea5b581 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result @@ -117,8 +117,10 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT delete from t1; delete from t2; reset master; @@ -131,8 +133,10 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT insert into t1 values(11); commit; show binlog events from ; @@ -141,8 +145,10 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F @@ -272,14 +278,20 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Xid # # COMMIT /* XID */ +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; drop table t1,t2 master-bin.000001 # Query # # use `test`; create table t0 (n int) +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t0) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; create table t2 (n int) engine=innodb do release_lock("lock1"); drop table t0,t2; @@ -362,38 +374,52 @@ a b DROP TABLE t1,t2; show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE if exists t2 +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t2 master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Xid # # COMMIT /* XID */ -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; BEGIN -master-bin.000001 # Table_map # # table_id: # (test.t2) +master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t2 +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; TRUNCATE table t2 master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ reset master; create table t1 (a int) engine=innodb; @@ -489,9 +515,11 @@ insert into t2 values (bug27417(2)); ERROR 23000: Duplicate entry '2' for key 'PRIMARY' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; ROLLBACK /* only (!) with fixes for #23333 will show there is the query */; select count(*) from t1 /* must be 3 */; count(*) @@ -506,9 +534,11 @@ count(*) 2 show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT /* the query must be in regardless of #23333 */; select count(*) from t1 /* must be 5 */; count(*) @@ -564,11 +594,13 @@ update t3 set b=b+bug27417(1); ERROR 23000: Duplicate entry '4' for key 'b' show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t3) master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Update_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; ROLLBACK /* the output must denote there is the query */; select count(*) from t1 /* must be 2 */; count(*) diff --git a/mysql-test/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result index 54a2ceda9b3..20d7281d5cc 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result +++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result @@ -648,12 +648,18 @@ master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('An master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@' master-bin.000001 # Query # # use `test`; drop table t1,t2,t3,tt1 master-bin.000001 # Query # # use `test`; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT insert delayed into t1 values (null),(null),(null),(null); insert delayed into t1 values (null),(null),(400),(null); 11 == 11 diff --git a/mysql-test/suite/binlog/t/binlog_base64_flag.test b/mysql-test/suite/binlog/t/binlog_base64_flag.test index 01f98b8a134..0aeeb346e36 100644 --- a/mysql-test/suite/binlog/t/binlog_base64_flag.test +++ b/mysql-test/suite/binlog/t/binlog_base64_flag.test @@ -9,6 +9,9 @@ # BINLOG statement does not work in embedded mode. source include/not_embedded.inc; +disable_warnings; +DROP TABLE IF EXISTS t1; +enable_warnings; # Test to show BUG#32407. This reads a binlog created with the # mysql-5.1-telco-6.1 tree, specifically at the tag 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 1c9d8701232..8f145b94046 100644 --- a/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result +++ b/mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result @@ -18,8 +18,10 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # use `test`; COMMIT **** On Slave **** SHOW SLAVE STATUS; Slave_IO_State # @@ -28,7 +30,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 457 +Read_Master_Log_Pos 594 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -43,7 +45,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 457 +Exec_Master_Log_Pos 594 Relay_Log_Space # Until_Condition None Until_Log_File @@ -66,6 +68,8 @@ slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 2 # use `test`; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9 slave-bin.000001 # Query 1 # use `test`; CREATE TABLE t1 (a INT, b LONG) slave-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES (1,1), (2,2) +slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; COMMIT DROP TABLE IF EXISTS t1; 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 f49c23248e5..670456ba6fd 100644 --- a/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result +++ b/mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result @@ -27,8 +27,10 @@ INSERT INTO t2 VALUES (3,3), (4,4); 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, b INT) +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT **** On Slave **** SHOW DATABASES; Database @@ -56,8 +58,10 @@ 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 192 use `test`; CREATE TABLE t1 (a INT) -master-bin.000001 192 Table_map 1 233 table_id: # (test.t1) -master-bin.000001 233 Write_rows 1 272 table_id: # flags: STMT_END_F +master-bin.000001 192 Query 1 260 use `test`; BEGIN +master-bin.000001 260 Table_map 1 301 table_id: # (test.t1) +master-bin.000001 301 Write_rows 1 340 table_id: # flags: STMT_END_F +master-bin.000001 340 Query 1 409 use `test`; COMMIT DROP TABLE t1; ================ Test for BUG#17620 ================ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; diff --git a/mysql-test/suite/rpl/r/rpl_row_create_table.result b/mysql-test/suite/rpl/r/rpl_row_create_table.result index ba5a13a57bf..b846ad09c3b 100644 --- a/mysql-test/suite/rpl/r/rpl_row_create_table.result +++ b/mysql-test/suite/rpl/r/rpl_row_create_table.result @@ -140,8 +140,10 @@ a b SHOW BINLOG EVENTS FROM 1374; Log_name Pos Event_type Server_id End_log_pos Info # 1374 Query # 1474 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE) -# 1474 Table_map # 1516 table_id: # (test.t7) -# 1516 Write_rows # 1572 table_id: # flags: STMT_END_F +# 1474 Query # 1542 use `test`; BEGIN +# 1542 Table_map # 1584 table_id: # (test.t7) +# 1584 Write_rows # 1640 table_id: # flags: STMT_END_F +# 1640 Query # 1711 use `test`; ROLLBACK SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -154,10 +156,12 @@ INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back -SHOW BINLOG EVENTS FROM 1572; +SHOW BINLOG EVENTS FROM 1711; Log_name Pos Event_type Server_id End_log_pos Info -# 1572 Table_map # 1614 table_id: # (test.t7) -# 1614 Write_rows # 1670 table_id: # flags: STMT_END_F +# 1711 Query # 1779 use `test`; BEGIN +# 1779 Table_map # 1821 table_id: # (test.t7) +# 1821 Write_rows # 1877 table_id: # flags: STMT_END_F +# 1877 Query # 1946 use `test`; COMMIT SELECT * FROM t7 ORDER BY a,b; a b 1 2 @@ -192,10 +196,10 @@ Create Table CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 -SHOW BINLOG EVENTS FROM 1670; +SHOW BINLOG EVENTS FROM 1946; Log_name Pos Event_type Server_id End_log_pos Info -# 1670 Query # 1756 use `test`; CREATE TABLE t8 LIKE t4 -# 1756 Query # 1895 use `test`; CREATE TABLE `t9` ( +# 1946 Query # 2032 use `test`; CREATE TABLE t8 LIKE t4 +# 2032 Query # 2171 use `test`; CREATE TABLE `t9` ( `a` int(11) DEFAULT NULL, `b` int(11) DEFAULT NULL ) @@ -276,31 +280,35 @@ SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info # 4 Format_desc # 106 Server ver: #, Binlog ver: # # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Table_map # 233 table_id: # (test.t1) -# 233 Write_rows # 277 table_id: # flags: STMT_END_F -# 277 Query # 345 use `test`; BEGIN -# 345 Query # 470 use `test`; CREATE TABLE `t2` ( +# 192 Query # 260 use `test`; BEGIN +# 260 Table_map # 301 table_id: # (test.t1) +# 301 Write_rows # 345 table_id: # flags: STMT_END_F +# 345 Query # 414 use `test`; COMMIT +# 414 Query # 482 use `test`; BEGIN +# 482 Query # 607 use `test`; CREATE TABLE `t2` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 470 Table_map # 511 table_id: # (test.t2) -# 511 Write_rows # 555 table_id: # flags: STMT_END_F -# 555 Xid # 582 COMMIT /* XID */ -# 582 Query # 650 use `test`; BEGIN -# 650 Query # 775 use `test`; CREATE TABLE `t3` ( +# 607 Table_map # 648 table_id: # (test.t2) +# 648 Write_rows # 692 table_id: # flags: STMT_END_F +# 692 Xid # 719 COMMIT /* XID */ +# 719 Query # 787 use `test`; BEGIN +# 787 Query # 912 use `test`; CREATE TABLE `t3` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 775 Table_map # 816 table_id: # (test.t3) -# 816 Write_rows # 860 table_id: # flags: STMT_END_F -# 860 Xid # 887 COMMIT /* XID */ -# 887 Query # 955 use `test`; BEGIN -# 955 Query # 1080 use `test`; CREATE TABLE `t4` ( +# 912 Table_map # 953 table_id: # (test.t3) +# 953 Write_rows # 997 table_id: # flags: STMT_END_F +# 997 Xid # 1024 COMMIT /* XID */ +# 1024 Query # 1092 use `test`; BEGIN +# 1092 Query # 1217 use `test`; CREATE TABLE `t4` ( `a` int(11) DEFAULT NULL ) ENGINE=InnoDB -# 1080 Table_map # 1121 table_id: # (test.t4) -# 1121 Write_rows # 1165 table_id: # flags: STMT_END_F -# 1165 Xid # 1192 COMMIT /* XID */ -# 1192 Table_map # 1233 table_id: # (test.t1) -# 1233 Write_rows # 1277 table_id: # flags: STMT_END_F +# 1217 Table_map # 1258 table_id: # (test.t4) +# 1258 Write_rows # 1302 table_id: # flags: STMT_END_F +# 1302 Xid # 1329 COMMIT /* XID */ +# 1329 Query # 1397 use `test`; BEGIN +# 1397 Table_map # 1438 table_id: # (test.t1) +# 1438 Write_rows # 1482 table_id: # flags: STMT_END_F +# 1482 Query # 1551 use `test`; COMMIT SHOW TABLES; Tables_in_test t1 @@ -367,15 +375,17 @@ SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info # 4 Format_desc # 106 Server ver: #, Binlog ver: # # 106 Query # 192 use `test`; CREATE TABLE t1 (a INT) -# 192 Table_map # 233 table_id: # (test.t1) -# 233 Write_rows # 277 table_id: # flags: STMT_END_F -# 277 Query # 377 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB -# 377 Query # 445 use `test`; BEGIN -# 445 Table_map # 486 table_id: # (test.t2) -# 486 Write_rows # 530 table_id: # flags: STMT_END_F -# 530 Table_map # 571 table_id: # (test.t2) -# 571 Write_rows # 610 table_id: # flags: STMT_END_F -# 610 Xid # 637 COMMIT /* XID */ +# 192 Query # 260 use `test`; BEGIN +# 260 Table_map # 301 table_id: # (test.t1) +# 301 Write_rows # 345 table_id: # flags: STMT_END_F +# 345 Query # 414 use `test`; COMMIT +# 414 Query # 514 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB +# 514 Query # 582 use `test`; BEGIN +# 582 Table_map # 623 table_id: # (test.t2) +# 623 Write_rows # 667 table_id: # flags: STMT_END_F +# 667 Table_map # 708 table_id: # (test.t2) +# 708 Write_rows # 747 table_id: # flags: STMT_END_F +# 747 Xid # 774 COMMIT /* XID */ SELECT * FROM t2 ORDER BY a; a 1 @@ -396,17 +406,14 @@ Warnings: Warning 1196 Some non-transactional changed tables couldn't be rolled back SELECT * FROM t2 ORDER BY a; a -SHOW BINLOG EVENTS FROM 637; +SHOW BINLOG EVENTS FROM 949; Log_name Pos Event_type Server_id End_log_pos Info -# 637 Query # 705 use `test`; BEGIN -# 705 Query # 785 use `test`; TRUNCATE TABLE t2 -# 785 Xid # 812 COMMIT /* XID */ -# 812 Query # 880 use `test`; BEGIN -# 880 Table_map # 921 table_id: # (test.t2) -# 921 Write_rows # 965 table_id: # flags: STMT_END_F -# 965 Table_map # 1006 table_id: # (test.t2) -# 1006 Write_rows # 1045 table_id: # flags: STMT_END_F -# 1045 Query # 1116 use `test`; ROLLBACK +# 949 Query # 1017 use `test`; BEGIN +# 1017 Table_map # 1058 table_id: # (test.t2) +# 1058 Write_rows # 1102 table_id: # flags: STMT_END_F +# 1102 Table_map # 1143 table_id: # (test.t2) +# 1143 Write_rows # 1182 table_id: # flags: STMT_END_F +# 1182 Query # 1253 use `test`; ROLLBACK SELECT * FROM t2 ORDER BY a; a DROP TABLE t1,t2; 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 800a39bd567..90b68428008 100644 --- a/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result +++ b/mysql-test/suite/rpl/r/rpl_row_delayed_ins.result @@ -14,16 +14,6 @@ a 1 2 3 -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 not null primary key) engine=myisam -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (test.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `test`; flush tables SELECT * FROM t1 ORDER BY a; a 1 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 072f15cbbd3..09626754428 100644 --- a/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result +++ b/mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result @@ -12,13 +12,13 @@ create table t4 (a int); insert into t4 select * from t3; rename table t1 to t5, t2 to t1; flush no_write_to_binlog tables; -SHOW BINLOG EVENTS FROM 623 ; +SHOW BINLOG EVENTS FROM 897 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 select * from t3; a flush tables; -SHOW BINLOG EVENTS FROM 623 ; +SHOW BINLOG EVENTS FROM 897 ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1 master-bin.000001 # Query 1 # use `test`; flush tables 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 70e923bc4f4..71c825183f7 100644 --- a/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result +++ b/mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result @@ -24,7 +24,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 605 +Read_Master_Log_Pos 1153 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table Last_Errno 1146 Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1` Skip_Counter 0 -Exec_Master_Log_Pos 530 +Exec_Master_Log_Pos 941 Relay_Log_Space # Until_Condition None Until_Log_File diff --git a/mysql-test/suite/rpl/r/rpl_row_log.result b/mysql-test/suite/rpl/r/rpl_row_log.result index 33a6c3b9781..af46d6af9c1 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log.result +++ b/mysql-test/suite/rpl/r/rpl_row_log.result @@ -20,22 +20,26 @@ show binlog events; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # use `test`; drop table t1 master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Table_map 1 # table_id: # (test.t1) master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Query 1 # use `test`; COMMIT show binlog events from 106 limit 1; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM show binlog events from 106 limit 2; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM -master-bin.000001 # Table_map 1 # table_id: # (test.t1) +master-bin.000001 # Query 1 # use `test`; BEGIN show binlog events from 106 limit 2,1; Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000001 # Table_map 1 # table_id: # (test.t1) flush logs; create table t3 (a int)ENGINE=MyISAM; select * from t1 order by 1 asc; @@ -192,47 +196,59 @@ 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=MyISAM +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; drop table t1 master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Rotate # # master-bin.000002;pos=4 show binlog events in 'master-bin.000002'; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4 master-bin.000002 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM master-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +master-bin.000002 # Query 1 # use `test`; BEGIN master-bin.000002 # Table_map 1 # table_id: # (test.t2) master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +master-bin.000002 # Query 1 # use `test`; COMMIT show binary logs; Log_name File_size -master-bin.000001 1266 -master-bin.000002 379 +master-bin.000001 1540 +master-bin.000002 516 start slave; show binary logs; Log_name File_size -slave-bin.000001 1364 -slave-bin.000002 280 +slave-bin.000001 1638 +slave-bin.000002 417 show binlog events in 'slave-bin.000001' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM +slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; COMMIT slave-bin.000001 # Query 1 # use `test`; drop table t1 slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM +slave-bin.000001 # Query 1 # use `test`; BEGIN slave-bin.000001 # Table_map 1 # table_id: # (test.t1) slave-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000001 # Query 1 # use `test`; COMMIT slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4 show binlog events in 'slave-bin.000002' from 4; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM +slave-bin.000002 # Query 1 # use `test`; BEGIN slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F +slave-bin.000002 # Query 1 # use `test`; COMMIT SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -240,7 +256,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000002 -Read_Master_Log_Pos 379 +Read_Master_Log_Pos 516 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000002 @@ -255,7 +271,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 379 +Exec_Master_Log_Pos 516 Relay_Log_Space # Until_Condition None Until_Log_File @@ -284,8 +300,10 @@ 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`; 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 # # use `test`; COMMIT select * from t1; a b 1 1 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 e08c47558a0..dc0f9545bc4 100644 --- a/mysql-test/suite/rpl/r/rpl_row_log_innodb.result +++ b/mysql-test/suite/rpl/r/rpl_row_log_innodb.result @@ -300,8 +300,10 @@ 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`; 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 # # use `test`; COMMIT select * from t1; a b 1 1 diff --git a/mysql-test/suite/rpl/r/rpl_row_until.result b/mysql-test/suite/rpl/r/rpl_row_until.result index 383d1a03a22..f544ef95702 100644 --- a/mysql-test/suite/rpl/r/rpl_row_until.result +++ b/mysql-test/suite/rpl/r/rpl_row_until.result @@ -26,7 +26,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 750 +Read_Master_Log_Pos 1161 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -41,7 +41,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 317 +Exec_Master_Log_Pos 454 Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 @@ -72,7 +72,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 750 +Read_Master_Log_Pos 1161 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -87,7 +87,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 317 +Exec_Master_Log_Pos 454 Relay_Log_Space # Until_Condition Master Until_Log_File master-no-such-bin.000001 @@ -104,7 +104,7 @@ Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 0 Last_SQL_Error -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=1014; select * from t2; n 1 @@ -116,7 +116,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 750 +Read_Master_Log_Pos 1161 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -131,11 +131,11 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 594 +Exec_Master_Log_Pos 868 Relay_Log_Space # Until_Condition Relay Until_Log_File slave-relay-bin.000004 -Until_Log_Pos 728 +Until_Log_Pos 1014 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path @@ -158,7 +158,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 750 +Read_Master_Log_Pos 1161 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -173,7 +173,7 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 750 +Exec_Master_Log_Pos 1161 Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 diff --git a/mysql-test/suite/rpl/r/rpl_slave_skip.result b/mysql-test/suite/rpl/r/rpl_slave_skip.result index f89fa34e319..bb03c3b6cca 100644 --- a/mysql-test/suite/rpl/r/rpl_slave_skip.result +++ b/mysql-test/suite/rpl/r/rpl_slave_skip.result @@ -17,14 +17,20 @@ 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, b INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t2 (c INT, d INT) +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Table_map # # table_id: # (test.t2) master-bin.000001 # Update_rows # # table_id: # master-bin.000001 # Update_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT SELECT * FROM t1; a b 1 1 @@ -36,7 +42,7 @@ c d 2 16 3 54 **** On Slave **** -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762; SHOW SLAVE STATUS; Slave_IO_State # Master_Host 127.0.0.1 @@ -44,7 +50,7 @@ Master_User root Master_Port MASTER_PORT Connect_Retry 1 Master_Log_File master-bin.000001 -Read_Master_Log_Pos 722 +Read_Master_Log_Pos 1133 Relay_Log_File # Relay_Log_Pos # Relay_Master_Log_File master-bin.000001 @@ -59,11 +65,11 @@ Replicate_Wild_Ignore_Table Last_Errno 0 Last_Error Skip_Counter 0 -Exec_Master_Log_Pos 488 +Exec_Master_Log_Pos 762 Relay_Log_Space # Until_Condition Master Until_Log_File master-bin.000001 -Until_Log_Pos 484 +Until_Log_Pos 762 Master_SSL_Allowed No Master_SSL_CA_File Master_SSL_CA_Path 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 cae8492abbd..9a036cda4a7 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 @@ -430,20 +430,34 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # drop database if exists mysqltest1 master-bin.000001 # Query # # create database mysqltest1 master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") @@ -457,19 +471,29 @@ master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( @@ -493,9 +517,11 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() begin insert into t1 values("work_25_"); @@ -522,26 +548,44 @@ begin insert into t1 values(concat("work_250_",x)); insert into t1 select "yesterday_270_"; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 @@ -551,68 +595,94 @@ insert into t1 values("foo3_32_"); call foo(); return 100; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned begin insert into t2 select foo3(); return 100; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned begin insert into t2 select UUID(); return 100; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned begin insert into t2 select x; return 100; end master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') @@ -620,8 +690,11 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost begin set NEW.data = concat(NEW.data,UUID()); end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) @@ -632,6 +705,7 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 @@ -645,20 +719,26 @@ insert into t1 values(null,x); insert into t2 values(null,x); return 1; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Intvar # # INSERT_ID=3 master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 master-bin.000001 # Query # # use `mysqltest1`; drop table t1 master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) @@ -680,20 +760,26 @@ begin insert into t2 values(null,x); return 1; end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) 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 # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; drop function f2 master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic begin @@ -711,30 +797,40 @@ master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost begin insert into t2 values(null,"try_55_"); end +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) master-bin.000001 # Write_rows # # table_id: # master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key master-bin.000001 # Intvar # # INSERT_ID=5 master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' ) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_user() RETURNS CHAR(64) BEGIN @@ -751,347 +847,21 @@ RETURN user; END master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t13 master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t13 (data CHAR(64)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest1 -master-bin.000001 # Query # # create database mysqltest1 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( - `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( - `1` varbinary(108) NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; COMMIT master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( - `a` varchar(100) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) +master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -set session binlog_format=row; # rejected for stored funcs -insert into t1 values("alarm"); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -insert into t1 values("foo3_32_"); -call foo(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned -begin -insert into t2 select foo3(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned -begin -insert into t2 select UUID(); -return 100; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned -begin -insert into t2 select x; -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() -master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row -begin -set NEW.data = concat(NEW.data,UUID()); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') -master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; drop function f -master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -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 # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -declare y int; -insert into t1 values(null,x); -set y = (select count(*) from t2); -return y; -end -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row -begin -insert into t2 values(null,"try_55_"); -end -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( - `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_user() -RETURNS CHAR(64) -BEGIN -DECLARE user CHAR(64); -SELECT USER() INTO user; -RETURN user; -END -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_current_user() -RETURNS CHAR(64) -BEGIN -DECLARE user CHAR(64); -SELECT CURRENT_USER() INTO user; -RETURN user; -END -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t13 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t13 (data CHAR(64)) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; BEGIN master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `mysqltest1`; COMMIT drop database mysqltest1; set global binlog_format =@my_binlog_format; diff --git a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result index 7eee31dab7a..1ae98706975 100644 --- a/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result +++ b/mysql-test/suite/rpl/r/rpl_truncate_2myisam.result @@ -114,8 +114,10 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; TRUNCATE TABLE t1 master-bin.000001 # Query # # use `test`; DROP TABLE t1 RESET MASTER; @@ -230,9 +232,13 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS t1 master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a INT, b LONG) ENGINE=MyISAM +master-bin.000001 # Query # # use `test`; 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 # # use `test`; COMMIT +master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Table_map # # table_id: # (test.t1) master-bin.000001 # Delete_rows # # table_id: # flags: STMT_END_F +master-bin.000001 # Query # # use `test`; COMMIT master-bin.000001 # Query # # use `test`; DROP TABLE t1 RESET MASTER; 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 ffddfd2ce4a..bfeb939f30f 100644 --- a/mysql-test/suite/rpl/t/rpl_row_create_table.test +++ b/mysql-test/suite/rpl/t/rpl_row_create_table.test @@ -94,7 +94,7 @@ INSERT INTO t7 SELECT a,b FROM tt4; ROLLBACK; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1572; +SHOW BINLOG EVENTS FROM 1711; SELECT * FROM t7 ORDER BY a,b; sync_slave_with_master; SELECT * FROM t7 ORDER BY a,b; @@ -110,7 +110,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1; --query_vertical SHOW CREATE TABLE t9 --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 1670; +SHOW BINLOG EVENTS FROM 1946; sync_slave_with_master; --echo **** On Slave **** --query_vertical SHOW CREATE TABLE t8 @@ -227,7 +227,7 @@ ROLLBACK; SELECT * FROM t2 ORDER BY a; --replace_column 1 # 4 # --replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/ -SHOW BINLOG EVENTS FROM 637; +SHOW BINLOG EVENTS FROM 949; sync_slave_with_master; SELECT * FROM t2 ORDER BY a; 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 bfa356fbfb4..667e1d9a1a8 100644 --- a/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test +++ b/mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test @@ -1,7 +1,7 @@ # depends on the binlog output -- source include/have_binlog_format_row.inc -let $rename_event_pos= 623; +let $rename_event_pos= 897; # Bug#18326: Do not lock table for writing during prepare of statement # The use of the ps protocol causes extra table maps in the binlog, so diff --git a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test index be76ac9f3f6..192c1e325bf 100644 --- a/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test +++ b/mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test @@ -164,12 +164,12 @@ connection master; # this test for position option -# By setting this position to 413, we should only get the create of t3 +# By setting this position to 416, we should only get the create of t3 --disable_query_log select "--- Test 2 position test --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 --stop-position=569 $MYSQLTEST_VARDIR/log/master-bin.000001 # These are tests for remote binlog. # They should return the same as previous test. @@ -180,7 +180,7 @@ select "--- Test 3 First Remote test --" as ""; # This is broken now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=569 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 # This part is disabled due to bug #17654 @@ -246,12 +246,17 @@ connection master; --exec rm $MYSQLTEST_VARDIR/tmp/remote.sql ################### End Bug 17654 ###################### +# What is the point of this test? It seems entirely pointless. It +# might make sense for statement-based replication, but for row-based +# replication the LOAD DATA INFILE is printed just as empty +# transactions. /Matz + # LOAD DATA --disable_query_log select "--- Test 5 LOAD DATA --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR ---exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --stop-position=106 --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 (mysqlbinlog does not accept input from stdin) @@ -259,13 +264,13 @@ select "--- Test 5 LOAD DATA --" as ""; select "--- Test 6 reading stdin --" as ""; --enable_query_log --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --stop-position=569 - < $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- Test 7 reading stdin w/position --" as ""; --enable_query_log --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR ---exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --short-form --position=416 --stop-position=569 - < $MYSQLTEST_VARDIR/log/master-bin.000001 # Bug#16217 (mysql client did not know how not switch its internal charset) --disable_query_log diff --git a/mysql-test/suite/rpl/t/rpl_row_until.test b/mysql-test/suite/rpl/t/rpl_row_until.test index 610eec305df..bdf7351d9a5 100644 --- a/mysql-test/suite/rpl/t/rpl_row_until.test +++ b/mysql-test/suite/rpl/t/rpl_row_until.test @@ -42,7 +42,7 @@ select * from t1; source include/show_slave_status.inc; # try replicate all up to and not including the second insert to t2; -start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; +start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=1014; --source include/wait_for_slave_sql_to_stop.inc select * from t2; source include/show_slave_status.inc; diff --git a/mysql-test/suite/rpl/t/rpl_slave_skip.test b/mysql-test/suite/rpl/t/rpl_slave_skip.test index 6783098fd7c..8a5b1ae0ae4 100644 --- a/mysql-test/suite/rpl/t/rpl_slave_skip.test +++ b/mysql-test/suite/rpl/t/rpl_slave_skip.test @@ -26,7 +26,7 @@ save_master_pos; connection slave; # Stop when reaching the the first table map event. -START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=484; +START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762; wait_for_slave_to_stop; --replace_result $MASTER_MYPORT MASTER_PORT --replace_column 1 # 8 # 9 # 23 # 33 # 35 # 36 # 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 adda4f67694..9ce73de9797 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 @@ -526,6 +526,7 @@ sync_slave_with_master; # connection master; +let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); # Just to get something that is non-trivial, albeit still simple, we # stuff the result of USER() and CURRENT_USER() into a variable. @@ -571,7 +572,6 @@ sync_slave_with_master; diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql; connection master; -source include/show_binlog_events.inc; # Now test that mysqlbinlog works fine on a binlog generated by the # mixed mode 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 326506b0396..3bf5ea108ae 100644 --- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result +++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result @@ -316,8 +316,10 @@ 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`; 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 # # use `test`; COMMIT select * from t1; a b 1 1 diff --git a/sql/log.cc b/sql/log.cc index 6a9673989ea..4946cfd765c 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -52,8 +52,6 @@ LOGGER logger; MYSQL_BIN_LOG mysql_bin_log; ulong sync_binlog_counter= 0; -static Muted_query_log_event invisible_commit; - static bool test_if_number(const char *str, long *res, bool allow_wildcards); static int binlog_init(void *p); @@ -155,7 +153,7 @@ private: class binlog_trx_data { public: binlog_trx_data() - : m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF) + : m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF), at_least_one_stmt(0) { trans_log.end_of_file= max_binlog_cache_size; } @@ -188,6 +186,16 @@ public: reinit_io_cache(&trans_log, WRITE_CACHE, pos, 0, 0); if (pos < before_stmt_pos) before_stmt_pos= MY_OFF_T_UNDEF; + + /* + The only valid positions that can be truncated to are at the + beginning of a statement. We are relying on this fact to be able + to set the at_least_one_stmt flag correctly. In other word, if + we are truncating to the beginning of the transaction cache, + there will be no statements in the cache, otherwhise, we will + have at least one statement in the transaction cache. + */ + at_least_one_stmt= (pos > 0); } /* @@ -213,6 +221,12 @@ public: IO_CACHE trans_log; // The transaction cache + /** + Boolean that is true if there is at least one statement in the + transaction cache. + */ + bool at_least_one_stmt; + private: /* Pending binrows event. This event is the event where the rows are @@ -1373,26 +1387,20 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data, inside a stored function. */ thd->binlog_flush_pending_rows_event(TRUE); + + error= mysql_bin_log.write(thd, &trx_data->trans_log, end_ev); + trx_data->reset(); + /* - We write the transaction cache to the binary log if either we're - committing the entire transaction, or if we are doing an - autocommit outside a transaction. - */ - if (all || !(thd->options & (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT))) + We need to step the table map version after writing the + transaction cache to disk. + */ + mysql_bin_log.update_table_map_version(); + statistic_increment(binlog_cache_use, &LOCK_status); + if (trans_log->disk_writes != 0) { - error= mysql_bin_log.write(thd, &trx_data->trans_log, end_ev); - trx_data->reset(); - /* - We need to step the table map version after writing the - transaction cache to disk. - */ - mysql_bin_log.update_table_map_version(); - statistic_increment(binlog_cache_use, &LOCK_status); - if (trans_log->disk_writes != 0) - { - statistic_increment(binlog_cache_disk_use, &LOCK_status); - trans_log->disk_writes= 0; - } + statistic_increment(binlog_cache_disk_use, &LOCK_status); + trans_log->disk_writes= 0; } } else @@ -1431,6 +1439,8 @@ static int binlog_prepare(handlerton *hton, THD *thd, bool all) return 0; } +#define YESNO(X) ((X) ? "yes" : "no") + /** This function is called once after each statement. @@ -1439,10 +1449,8 @@ static int binlog_prepare(handlerton *hton, THD *thd, bool all) @param hton The binlog handlerton. @param thd The client thread that executes the transaction. - @param all true if this is the last statement before a COMMIT - statement; false if either this is a statement in a - transaction but not the last, or if this is a statement - not inside a BEGIN block and autocommit is on. + @param all This is @c true if this is a real transaction commit, and + @false otherwise. @see handlerton::commit */ @@ -1458,26 +1466,86 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all) trx_data->reset(); DBUG_RETURN(0); } + /* - Write commit event if at least one of the following holds: - - the user sends an explicit COMMIT; or - - the autocommit flag is on, and we are not inside a BEGIN. - However, if the user has not sent an explicit COMMIT, and we are - either inside a BEGIN or run with autocommit off, then this is not - the end of a transaction and we should not write a commit event. + Decision table for committing a transaction. The top part, the + *conditions* represent different cases that can occur, and hte + bottom part, the *actions*, represent what should be done in that + particular case. + + Real transaction 'all' was true + + Statement in cache There were at least one statement in the + transaction cache + + In transaction We are inside a transaction + + Stmt modified non-trans The statement being committed modified a + non-transactional table + + All modified non-trans Some statement before this one in the + transaction modified a non-transactional + table + + + ============================= = = = = = = = = = = = = = = = = + Real transaction N N N N N N N N N N N N N N N N + Statement in cache N N N N N N N N Y Y Y Y Y Y Y Y + In transaction N N N N Y Y Y Y N N N N Y Y Y Y + Stmt modified non-trans N N Y Y N N Y Y N N Y Y N N Y Y + All modified non-trans N Y N Y N Y N Y N Y N Y N Y N Y + + Action: (C)ommit/(A)ccumulate C C - C A C - C - - - - A A - A + ============================= = = = = = = = = = = = = = = = = + + + ============================= = = = = = = = = = = = = = = = = + Real transaction Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y + Statement in cache N N N N N N N N Y Y Y Y Y Y Y Y + In transaction N N N N Y Y Y Y N N N N Y Y Y Y + Stmt modified non-trans N N Y Y N N Y Y N N Y Y N N Y Y + All modified non-trans N Y N Y N Y N Y N Y N Y N Y N Y + + (C)ommit/(A)ccumulate/(-) - - - - C C - C - - - - C C - C + ============================= = = = = = = = = = = = = = = = = + + In other words, we commit the transaction if and only if both of + the following are true: + - We are not in a transaction and committing a statement + + - We are in a transaction and one (or more) of the following are + true: + + - A full transaction is committed + + OR + + - A non-transactional statement is committed and there is + no statement cached + + Otherwise, we accumulate the statement */ - if (all || !(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))) + ulonglong const in_transaction= + thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN); + DBUG_PRINT("debug", + ("all: %d, empty: %s, in_transaction: %s, all.modified_non_trans_table: %s, stmt.modified_non_trans_table: %s", + all, + YESNO(trx_data->empty()), + YESNO(in_transaction), + YESNO(thd->transaction.all.modified_non_trans_table), + YESNO(thd->transaction.stmt.modified_non_trans_table))); + if (in_transaction && + (all || + (!trx_data->at_least_one_stmt && + thd->transaction.stmt.modified_non_trans_table)) || + !in_transaction && !all) { Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE); qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) int error= binlog_end_trans(thd, trx_data, &qev, all); DBUG_RETURN(error); } - else - { - int error= binlog_end_trans(thd, trx_data, &invisible_commit, all); - DBUG_RETURN(error); - } + DBUG_RETURN(0); } /** @@ -1490,10 +1558,8 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all) @param hton The binlog handlerton. @param thd The client thread that executes the transaction. - @param all true if this is the last statement before a COMMIT - statement; false if either this is a statement in a - transaction but not the last, or if this is a statement - not inside a BEGIN block and autocommit is on. + @param all This is @c true if this is a real transaction rollback, and + @false otherwise. @see handlerton::rollback */ @@ -1509,21 +1575,36 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) DBUG_RETURN(0); } - /* - Update the binary log with a BEGIN/ROLLBACK block if we have - cached some queries and we updated some non-transactional - table. Such cases should be rare (updating a - non-transactional table inside a transaction...) - */ - if (unlikely(thd->transaction.all.modified_non_trans_table || - (thd->options & OPTION_KEEP_LOG))) + DBUG_PRINT("debug", ("all: %s, all.modified_non_trans_table: %s, stmt.modified_non_trans_table: %s", + YESNO(all), + YESNO(thd->transaction.all.modified_non_trans_table), + YESNO(thd->transaction.stmt.modified_non_trans_table))); + if (all && thd->transaction.all.modified_non_trans_table || + !all && thd->transaction.stmt.modified_non_trans_table || + (thd->options & OPTION_KEEP_LOG)) { + /* + We write the transaction cache with a rollback last if we have + modified any non-transactional table. We do this even if we are + committing a single statement that has modified a + non-transactional table since it can have modified a + transactional table in that statement as well, which needs to be + rolled back on the slave. + */ Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE); qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) error= binlog_end_trans(thd, trx_data, &qev, all); } - else + else if (all && !thd->transaction.all.modified_non_trans_table || + !all && !thd->transaction.stmt.modified_non_trans_table) + { + /* + If we have modified only transactional tables, we can truncate + the transaction cache without writing anything to the binary + log. + */ error= binlog_end_trans(thd, trx_data, 0, all); + } DBUG_RETURN(error); } diff --git a/sql/log_event.cc b/sql/log_event.cc index cc6ae14f160..5e625edf3d9 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -2602,21 +2602,6 @@ Query_log_event::do_shall_skip(Relay_log_info *rli) #endif -/************************************************************************** - Muted_query_log_event methods -**************************************************************************/ - -#ifndef MYSQL_CLIENT -/* - Muted_query_log_event::Muted_query_log_event() -*/ -Muted_query_log_event::Muted_query_log_event() - :Query_log_event() -{ -} -#endif - - /************************************************************************** Start_log_event_v3 methods **************************************************************************/ @@ -7054,7 +7039,7 @@ int Table_map_log_event::save_field_metadata() #if !defined(MYSQL_CLIENT) Table_map_log_event::Table_map_log_event(THD *thd, TABLE *tbl, ulong tid, bool is_transactional, uint16 flags) - : Log_event(thd, 0, is_transactional), + : Log_event(thd, 0, true), m_table(tbl), m_dbnam(tbl->s->db.str), m_dblen(m_dbnam ? tbl->s->db.length : 0), diff --git a/sql/log_event.h b/sql/log_event.h index c46827253a3..8342cb17851 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -1614,31 +1614,6 @@ public: /* !!! Public in this patch to allow old usage */ }; -/** - @class Muted_query_log_event - - Pretends to log SQL queries, but doesn't actually do so. This is - used internally only and never written to any binlog. - - @section Muted_query_log_event_binary_format Binary Format - - This log event is not stored, and thus the binary format is 0 bytes - long. Note that not even the Common-Header is stored. -*/ -class Muted_query_log_event: public Query_log_event -{ -public: -#ifndef MYSQL_CLIENT - Muted_query_log_event(); - - bool write(IO_CACHE* file) { return(false); }; - virtual bool write_post_header_for_derived(IO_CACHE* file) { return FALSE; } -#else - Muted_query_log_event() {} -#endif -}; - - #ifdef HAVE_REPLICATION /** diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2be932a6040..8971e8eab42 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2426,6 +2426,7 @@ pthread_handler_t handle_delayed_insert(void *arg) */ di->table->file->ha_release_auto_increment(); mysql_unlock_tables(thd, lock); + ha_autocommit_or_rollback(thd, 0); di->group_count=0; pthread_mutex_lock(&di->mutex); } @@ -3676,14 +3677,11 @@ void select_create::abort() { DBUG_ENTER("select_create::abort"); - /* - Disable binlog, because we "roll back" partial inserts in ::abort - by removing the table, even for non-transactional tables. - */ - tmp_disable_binlog(thd); /* In select_insert::abort() we roll back the statement, including - truncating the transaction cache of the binary log. + truncating the transaction cache of the binary log. To do this, we + pretend that the statement is transactional, even though it might + be the case that it was not. We roll back the statement prior to deleting the table and prior to releasing the lock on the table, since there might be potential @@ -3694,7 +3692,9 @@ void select_create::abort() of the table succeeded or not, since we need to reset the binary log state. */ + tmp_disable_binlog(thd); select_insert::abort(); + thd->transaction.stmt.modified_non_trans_table= FALSE; reenable_binlog(thd); From fe22ff56f465545fcf5cfe16a36c93f640490436 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 14:27:22 +0100 Subject: [PATCH 501/527] Bug#21413 - Engine table handler used by multiple threads in REPLACE DELAYED post push patch, removing the optimization for copying delayed_insert variables. sql/sql_insert.cc: Bug#21413 - Engine table handler used by multiple threads in REPLACE DELAYED post push patch, removing the optimization for copying delayed_insert variables. (restored some parts which caused errors) --- sql/sql_insert.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2e371971838..54f2d5695d4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -941,11 +941,10 @@ static TABLE *delayed_get_table(THD *thd,TABLE_LIST *table_list) my_error(ER_OUT_OF_RESOURCES,MYF(0)); goto err1; } - /* We only need the db and table name to open tables with open_ltable() */ + tmp->table_list= *table_list; // Needed to open table + /* Replace volatile strings with local copies */ tmp->table_list.db= tmp->thd.db; - tmp->table_list.db_length= table_list->db_length; tmp->table_list.alias= tmp->table_list.real_name=tmp->thd.query; - tmp->table_list.real_name_length= table_list->real_name_length; tmp->lock(); pthread_mutex_lock(&tmp->mutex); if ((error=pthread_create(&tmp->thd.real_id,&connection_attrib, From 564a83505cbd887d8fd41490f320ebb79c1f5dd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 16:07:50 +0200 Subject: [PATCH 502/527] BUG#33029 refining a test for embedded env. mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: test must ensure there is binlog capability on the server --- mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index ecda14da45e..83c5b9513c4 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -15,6 +15,8 @@ # rpl_auto_increment_bug33029.test with clean up statements at the end # of the test case removed on a buggy 5.0 server +source include/have_log_bin.inc; + copy_file $MYSQL_TEST_DIR/std_data/bug33029-slave-relay-bin.000001 $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001; write_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index; From 0795e14ca0dd01d03fb7b804b9eaf3ef843e2ef1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 19:16:52 +0400 Subject: [PATCH 503/527] Fix for bug #35392: Delete all statement does not execute properly after few delete statements Problem: changing a file size might require that it must be unmapped beforehand. Fix: unmap the file before changing its size. mysql-test/r/temp_table.result: Fix for bug #35392: Delete all statement does not execute properly after few delete statements - test result. mysql-test/t/temp_table.test: Fix for bug #35392: Delete all statement does not execute properly after few delete statements - test case. storage/myisam/mi_delete_all.c: Fix for bug #35392: Delete all statement does not execute properly after few delete statements - unmap file before changing its size as it's required by SetEndOfFile() function (see my_chsize()). - as no other threads allowed to perform concurrent inserts when delete_all is called, mmap_lock locking removed. --- mysql-test/r/temp_table.result | 11 +++++++++++ mysql-test/t/temp_table.test | 14 ++++++++++++++ storage/myisam/mi_delete_all.c | 11 +++++++---- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 1c846700346..6df09463d02 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -184,3 +184,14 @@ select * from t1; a 42 drop table t1; +CREATE TEMPORARY TABLE t1(a INT, b VARCHAR(20)); +INSERT INTO t1 VALUES(1, 'val1'), (2, 'val2'), (3, 'val3'); +DELETE FROM t1 WHERE a=1; +SELECT count(*) FROM t1; +count(*) +2 +DELETE FROM t1; +SELECT * FROM t1; +a b +DROP TABLE t1; +End of 5.1 tests diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index d1ad7ab8ffa..4ab8a982e63 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -191,3 +191,17 @@ truncate t1; insert into t1 values (42); select * from t1; drop table t1; + +# +# Bug #35392: Delete all statement does not execute properly after +# few delete statements +# +CREATE TEMPORARY TABLE t1(a INT, b VARCHAR(20)); +INSERT INTO t1 VALUES(1, 'val1'), (2, 'val2'), (3, 'val3'); +DELETE FROM t1 WHERE a=1; +SELECT count(*) FROM t1; +DELETE FROM t1; +SELECT * FROM t1; +DROP TABLE t1; + +--echo End of 5.1 tests diff --git a/storage/myisam/mi_delete_all.c b/storage/myisam/mi_delete_all.c index dea0385cbca..e2bbb04ab3c 100644 --- a/storage/myisam/mi_delete_all.c +++ b/storage/myisam/mi_delete_all.c @@ -53,15 +53,18 @@ int mi_delete_all_rows(MI_INFO *info) since it was locked then there may be key blocks in the key cache */ flush_key_blocks(share->key_cache, share->kfile, FLUSH_IGNORE_CHANGED); +#ifdef HAVE_MMAP + if (share->file_map) + _mi_unmap_file(info); +#endif if (my_chsize(info->dfile, 0, 0, MYF(MY_WME)) || my_chsize(share->kfile, share->base.keystart, 0, MYF(MY_WME)) ) goto err; VOID(_mi_writeinfo(info,WRITEINFO_UPDATE_KEYFILE)); #ifdef HAVE_MMAP - /* Resize mmaped area */ - rw_wrlock(&info->s->mmap_lock); - mi_remap_file(info, (my_off_t)0); - rw_unlock(&info->s->mmap_lock); + /* Map again */ + if (share->file_map) + mi_dynmap_file(info, (my_off_t) 0); #endif allow_break(); /* Allow SIGHUP & SIGINT */ DBUG_RETURN(0); From 4ae69fc2b14edab79b841a57fb6acb3c28ca76a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 17:24:23 +0200 Subject: [PATCH 504/527] fixed a hand in 5.1-marvel : Removed a double release of the mutex on error --- sql/sql_plugin.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 4735cd569fc..106984823a5 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1446,8 +1446,6 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) - { - pthread_mutex_unlock(&LOCK_plugin); goto error; } } @@ -1459,10 +1457,7 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); pthread_mutex_lock(&LOCK_plugin); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) - { - pthread_mutex_unlock(&LOCK_plugin); goto error; - } } pthread_mutex_unlock(&LOCK_plugin); name.length= dl.length= 0; From 4ec65151dc8e1b30b05a84c2f3a8bd2b9ce641c6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:59:13 +0300 Subject: [PATCH 505/527] Fix for Bug#35469: server crash with LOAD DATA INFILE to a VIEW. The problem was that LOAD DATA code (sql_load.cc) didn't take into account that there may be items, representing references to other columns. This is a usual case in views. The crash happened because Item_direct_view_ref was casted to Item_user_var_as_out_param, which is not a base class. The fix is to 1) Handle references properly; 2) Ensure that an item is treated as a user variable only when it is a user variable indeed; 3) Report an error if LOAD DATA is used to load data into non-updatable column. mysql-test/r/loaddata.result: Update result file. mysql-test/t/loaddata.test: Add a test case form Bug#35469: server crash with LOAD DATA INFILE to a VIEW. sql/share/errmsg.txt: Introduce a new error. sql/sql_load.cc: Handle reference-items properly. mysql-test/std_data/bug35649.data: Add a data file for the test case. --- mysql-test/r/loaddata.result | 76 ++++++++++++++++++++++++++++ mysql-test/std_data/bug35649.data | 3 ++ mysql-test/t/loaddata.test | 82 +++++++++++++++++++++++++++++++ sql/share/errmsg.txt | 4 ++ sql/sql_load.cc | 56 +++++++++++++++------ 5 files changed, 207 insertions(+), 14 deletions(-) create mode 100644 mysql-test/std_data/bug35649.data diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 7fff2700779..156a78eb627 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -252,3 +252,79 @@ SELECT * FROM t1; c1 c2 c3 c4 10 1970-02-01 01:02:03 1.1e-100 1.1e+100 DROP TABLE t1; + +# -- +# -- Bug#35469: server crash with LOAD DATA INFILE to a VIEW. +# -- + +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v2; +DROP VIEW IF EXISTS v3; + +CREATE TABLE t1(c1 INT, c2 VARCHAR(255)); + +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; +CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; + +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v1 +FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c1, c2); + +SELECT * FROM t1; +c1 c2 +1 "string1" +2 "string2" +3 "string3" + +SELECT * FROM v1; +c1 c2 +1 "string1" +2 "string2" +3 "string3" + +DELETE FROM t1; + +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c1, c2); + +SELECT * FROM t1; +c1 c2 +1 "string1" +2 "string2" +3 "string3" + +SELECT * FROM v2; +c0 c1 c2 +3 1 "string1" +3 2 "string2" +3 3 "string3" + +DELETE FROM t1; + +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c0, c2); +ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA + +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v3 +FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (d1, d2); +ERROR HY000: The target table v3 of the LOAD is not updatable + +DROP TABLE t1; +DROP VIEW v1; +DROP VIEW v2; +DROP VIEW v3; + +# -- End of Bug#35469. diff --git a/mysql-test/std_data/bug35649.data b/mysql-test/std_data/bug35649.data new file mode 100644 index 00000000000..afcd9e9cc95 --- /dev/null +++ b/mysql-test/std_data/bug35649.data @@ -0,0 +1,3 @@ +"1", "string1" +"2", "string2" +"3", "string3" diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 9eb92015399..68cf84b7fac 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -236,4 +236,86 @@ SELECT * FROM t1; remove_file $MYSQLTEST_VARDIR/tmp/t1; DROP TABLE t1; +########################################################################### + +--echo +--echo # -- +--echo # -- Bug#35469: server crash with LOAD DATA INFILE to a VIEW. +--echo # -- + +--echo +--disable_warnings +DROP TABLE IF EXISTS t1; +DROP VIEW IF EXISTS v1; +DROP VIEW IF EXISTS v2; +DROP VIEW IF EXISTS v3; +--enable_warnings + +--echo +CREATE TABLE t1(c1 INT, c2 VARCHAR(255)); + +--echo +CREATE VIEW v1 AS SELECT * FROM t1; +CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; +CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; + +--echo +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v1 + FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c1, c2); + +--echo +SELECT * FROM t1; + +--echo +SELECT * FROM v1; + +--echo +DELETE FROM t1; + +--echo +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 + FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c1, c2); + +--echo +SELECT * FROM t1; + +--echo +SELECT * FROM v2; + +--echo +DELETE FROM t1; + +--echo +--error ER_LOAD_DATA_INVALID_COLUMN +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 + FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (c0, c2); + +--echo +--error ER_NON_UPDATABLE_TABLE +LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v3 + FIELDS ESCAPED BY '\\' + TERMINATED BY ',' + ENCLOSED BY '"' + LINES TERMINATED BY '\n' (d1, d2); + +--echo +DROP TABLE t1; +DROP VIEW v1; +DROP VIEW v2; +DROP VIEW v3; + +--echo +--echo # -- End of Bug#35469. + +########################################################################### + # End of 5.0 tests diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 9e6cf462113..a3514776d6e 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5641,3 +5641,7 @@ ER_NAME_BECOMES_EMPTY eng "Name '%-.64s' has become ''" ER_AMBIGUOUS_FIELD_TERM eng "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY" + +ER_LOAD_DATA_INVALID_COLUMN + eng "Invalid column reference (%-.64s) in LOAD DATA" + diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 4da3c19bb3c..e9fd04dff15 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -233,9 +233,11 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, while ((item= it++)) { - if (item->type() == Item::FIELD_ITEM) + Item *real_item= item->real_item(); + + if (real_item->type() == Item::FIELD_ITEM) { - Field *field= ((Item_field*)item)->field; + Field *field= ((Item_field*)real_item)->field; if (field->flags & BLOB_FLAG) { use_blobs= 1; @@ -244,7 +246,7 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, else tot_length+= field->field_length; } - else + else if (item->type() == Item::STRING_ITEM) use_vars= 1; } if (use_blobs && !ex->line_term->length() && !field_term->length()) @@ -705,6 +707,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, { uint length; byte *pos; + Item *real_item; if (read_info.read_field()) break; @@ -716,14 +719,17 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, pos=read_info.row_start; length=(uint) (read_info.row_end-pos); + real_item= item->real_item(); + if (!read_info.enclosed && (enclosed_length && length == 4 && !memcmp(pos, STRING_WITH_LEN("NULL"))) || (length == 1 && read_info.found_null)) { - if (item->type() == Item::FIELD_ITEM) + + if (real_item->type() == Item::FIELD_ITEM) { - Field *field= ((Item_field *)item)->field; + Field *field= ((Item_field *)real_item)->field; if (field->reset()) { my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0), field->field_name, @@ -740,25 +746,39 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, ER_WARN_NULL_TO_NOTNULL, 1); } } - else + else if (item->type() == Item::STRING_ITEM) + { ((Item_user_var_as_out_param *)item)->set_null_value( read_info.read_charset); + } + else + { + my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name()); + DBUG_RETURN(1); + } + continue; } - if (item->type() == Item::FIELD_ITEM) + if (real_item->type() == Item::FIELD_ITEM) { - - Field *field= ((Item_field *)item)->field; + Field *field= ((Item_field *)real_item)->field; field->set_notnull(); read_info.row_end[0]=0; // Safe to change end marker if (field == table->next_number_field) table->auto_increment_field_not_null= TRUE; field->store((char*) pos, length, read_info.read_charset); } - else + else if (item->type() == Item::STRING_ITEM) + { ((Item_user_var_as_out_param *)item)->set_value((char*) pos, length, - read_info.read_charset); + read_info.read_charset); + } + else + { + my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name()); + DBUG_RETURN(1); + } } if (read_info.error) break; @@ -774,9 +794,10 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, break; for (; item ; item= it++) { - if (item->type() == Item::FIELD_ITEM) + Item *real_item= item->real_item(); + if (real_item->type() == Item::FIELD_ITEM) { - Field *field= ((Item_field *)item)->field; + Field *field= ((Item_field *)real_item)->field; if (field->reset()) { my_error(ER_WARN_NULL_TO_NOTNULL, MYF(0),field->field_name, @@ -796,9 +817,16 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, ER_WARN_TOO_FEW_RECORDS, ER(ER_WARN_TOO_FEW_RECORDS), thd->row_count); } - else + else if (item->type() == Item::STRING_ITEM) + { ((Item_user_var_as_out_param *)item)->set_null_value( read_info.read_charset); + } + else + { + my_error(ER_LOAD_DATA_INVALID_COLUMN, MYF(0), item->full_name()); + DBUG_RETURN(1); + } } } From 911e325d095865d8dc087d18343f5ee81c224265 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:25:49 +0200 Subject: [PATCH 506/527] wl#4091 improving a test that shows a failure. the wait condition was for data in tables but the log positions are updates after the data are unlocked. So there was a time window [after_table_unlock_for_select, log_pos_updated] where the orig cond was true but log position might be changed. the correct one is to expect the last pos of the slave's insert in the output of show_slave_status on the master. mysql-test/suite/rpl/t/rpl_flushlog_loop.test: refining a sychronization condition (2 times) --- mysql-test/suite/rpl/t/rpl_flushlog_loop.test | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test index f9f01855aa9..caead008169 100644 --- a/mysql-test/suite/rpl/t/rpl_flushlog_loop.test +++ b/mysql-test/suite/rpl/t/rpl_flushlog_loop.test @@ -45,25 +45,31 @@ 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; + connection master; INSERT INTO t1 VALUE(1); --enable_query_log FLUSH LOGS; +let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); + connection slave; -let $wait_condition= SELECT COUNT(*) = 1 FROM t1; --- source include/wait_condition.inc +let $slave_param= Exec_Master_Log_Pos; +source include/wait_for_slave_param.inc; + --disable_query_log INSERT INTO t1 VALUE(2); +let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1); --enable_query_log + connection master; -let $wait_condition= SELECT COUNT(*) = 2 FROM t1; --- source include/wait_condition.inc +let $slave_param= Exec_Master_Log_Pos; +source include/wait_for_slave_param.inc; + --enable_query_log # # Show status of slave # -let $pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1); ---replace_result $SLAVE_MYPORT SLAVE_PORT $pos POSITION +--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_param_value POSITION --replace_column 1 # 8 # 9 # 16 # 23 # 33 # 34 # 35 # --query_vertical SHOW SLAVE STATUS From 1d9f9abce36a81c8e6a9751940ff292a1ca15e2a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:43:13 +0200 Subject: [PATCH 507/527] fixed compiler error in 5.1-marvel. --- sql/sql_plugin.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 106984823a5..811b82ebe05 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1447,7 +1447,6 @@ static bool plugin_load_list(MEM_ROOT *tmp_root, int *argc, char **argv, free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE)); if (plugin_add(tmp_root, &name, &dl, argc, argv, REPORT_TO_LOG)) goto error; - } } plugin_dl_del(&dl); // reduce ref count } From d5a6fa7e8c84b424ca38aaf27e08a3371cb8d32c Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:45:03 +0200 Subject: [PATCH 508/527] Fixed problem with non-synchronous error lists in perror and handler descriptors (BUG#25177) Fixed problem of masking mysql error by system error in perror (BUG#23028) extra/perror.c: Used common handlers error list. Fixed BUG#23028 ignoring mysql error in case of OS and mysql error codes overlapping. include/my_base.h: Added errors of maria engine. Fixed incorrect comment in #define (can be cause of seriouse problems) include/my_handler.h: Added ability to be included into C++ code. mysys/my_handler.c: Error texts moved to the separate files. mysys/my_handler_errors.h: New BitKeeper file ``mysys/my_handler_errors.h'' --- extra/perror.c | 79 +++++++++++++++------------------------ include/my_base.h | 10 +++-- include/my_handler.h | 6 +++ mysys/my_handler.c | 52 +++++--------------------- mysys/my_handler_errors.h | 67 +++++++++++++++++++++++++++++++++ 5 files changed, 120 insertions(+), 94 deletions(-) create mode 100644 mysys/my_handler_errors.h diff --git a/extra/perror.c b/extra/perror.c index fba7b69bfe4..612456eaff3 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -13,9 +13,9 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* Return error-text for system error messages and nisam messages */ +/* Return error-text for system error messages and handler messages */ -#define PERROR_VERSION "2.10" +#define PERROR_VERSION "2.11" #include #include @@ -30,6 +30,9 @@ static my_bool verbose, print_all_codes; +#include "../include/my_base.h" +#include "../mysys/my_handler_errors.h" + #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE static my_bool ndb_code; static char ndb_string[1024]; @@ -82,36 +85,6 @@ typedef struct ha_errors { static HA_ERRORS ha_errlist[]= { - { 120,"Didn't find key on read or update" }, - { 121,"Duplicate key on write or update" }, - { 123,"Someone has changed the row since it was read (while the table was locked to prevent it)" }, - { 124,"Wrong index given to function" }, - { 126,"Index file is crashed" }, - { 127,"Record-file is crashed" }, - { 128,"Out of memory" }, - { 130,"Incorrect file format" }, - { 131,"Command not supported by database" }, - { 132,"Old database file" }, - { 133,"No record read before update" }, - { 134,"Record was already deleted (or record file crashed)" }, - { 135,"No more room in record file" }, - { 136,"No more room in index file" }, - { 137,"No more records (read after end of file)" }, - { 138,"Unsupported extension used for table" }, - { 139,"Too big row"}, - { 140,"Wrong create options"}, - { 141,"Duplicate unique key or constraint on write or update"}, - { 142,"Unknown character set used"}, - { 143,"Conflicting table definitions in sub-tables of MERGE table"}, - { 144,"Table is crashed and last repair failed"}, - { 145,"Table was marked as crashed and should be repaired"}, - { 146,"Lock timed out; Retry transaction"}, - { 147,"Lock table is full; Restart program with a larger locktable"}, - { 148,"Updates are not allowed under a read only transactions"}, - { 149,"Lock deadlock; Retry transaction"}, - { 150,"Foreign key constraint is incorrectly formed"}, - { 151,"Cannot add a child row"}, - { 152,"Cannot delete a parent row"}, { -30999, "DB_INCOMPLETE: Sync didn't finish"}, { -30998, "DB_KEYEMPTY: Key/data deleted or never created"}, { -30997, "DB_KEYEXIST: The key/data pair already exists"}, @@ -193,6 +166,17 @@ static const char *get_ha_error_msg(int code) { HA_ERRORS *ha_err_ptr; + /* + If you got compilation error here about compile_time_assert array, check + that every HA_ERR_xxx constant has a corresponding error message in + handler_error_messages[] list (check mysys/ma_handler_errors.h and + include/my_base.h). + */ + compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) == + HA_ERR_LAST + 1); + if (code >= HA_ERR_FIRST && code <= HA_ERR_LAST) + return handler_error_messages[code - HA_ERR_FIRST]; + for (ha_err_ptr=ha_errlist ; ha_err_ptr->errcode ;ha_err_ptr++) if (ha_err_ptr->errcode == code) return ha_err_ptr->msg; @@ -210,6 +194,8 @@ int main(int argc,char *argv[]) if (get_options(&argc,&argv)) exit(1); + my_handler_error_register(); + error=0; #ifdef HAVE_SYS_ERRLIST if (print_all_codes) @@ -290,29 +276,24 @@ int main(int argc,char *argv[]) (const uchar*) "Unknown Error", 13) && (!unknown_error || strcmp(msg, unknown_error))) { - found=1; + found= 1; if (verbose) - printf("OS error code %3d: %s\n",code,msg); + printf("OS error code %3d: %s\n", code, msg); else puts(msg); } - + if ((msg= get_ha_error_msg(code))) + { + found= 1; + if (verbose) + printf("MySQL error code %3d: %s\n", code, msg); + else + puts(msg); + } if (!found) { - /* Error message still not found, look in handler error codes */ - if (!(msg=get_ha_error_msg(code))) - { - fprintf(stderr,"Illegal error code: %d\n",code); - error=1; - } - else - { - found= 1; - if (verbose) - printf("MySQL error code %3d: %s\n",code,msg); - else - puts(msg); - } + fprintf(stderr,"Illegal error code: %d\n", code); + error= 1; } } } diff --git a/include/my_base.h b/include/my_base.h index e4f59648fcd..22f518b0f9a 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -375,6 +375,7 @@ enum ha_base_keytype { #define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */ #define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */ +#define HA_ERR_INTERNAL_ERROR 122 /* Internal error */ #define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */ #define HA_ERR_WRONG_INDEX 124 /* Wrong index given to function */ #define HA_ERR_CRASHED 126 /* Indexfile is crashed */ @@ -411,8 +412,8 @@ enum ha_base_keytype { /* NULLs are not supported in spatial index */ #define HA_ERR_NULL_IN_SPATIAL 158 #define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */ -#define HA_ERR_NO_PARTITION_FOUND 160 /* There's no partition in table for - given value */ +/* There's no partition in table for given value */ +#define HA_ERR_NO_PARTITION_FOUND 160 #define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */ #define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */ /* @@ -437,7 +438,10 @@ enum ha_base_keytype { #define HA_ERR_NEW_FILE 172 /* New file format */ #define HA_ERR_ROWS_EVENT_APPLY 173 /* The event could not be processed no other hanlder error happened */ -#define HA_ERR_LAST 173 /* Copy of last error nr */ +#define HA_ERR_INITIALIZATION 174 /* Error during initialization */ +#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */ +#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */ +#define HA_ERR_LAST 176 /* Copy of last error nr */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) diff --git a/include/my_handler.h b/include/my_handler.h index dabe73bd138..a3376cb74a2 100644 --- a/include/my_handler.h +++ b/include/my_handler.h @@ -19,6 +19,9 @@ #define _my_handler_h #include "myisampack.h" +#ifdef __cplusplus +extern "C" { +#endif /* There is a hard limit for the maximum number of keys as there are only @@ -118,5 +121,8 @@ extern void my_handler_error_unregister(void); this amount of bytes. */ #define portable_sizeof_char_ptr 8 +#ifdef __cplusplus +} +#endif #endif /* _my_handler_h */ diff --git a/mysys/my_handler.c b/mysys/my_handler.c index bf75d992f9d..3bc27b622cb 100644 --- a/mysys/my_handler.c +++ b/mysys/my_handler.c @@ -21,6 +21,8 @@ #include #include +#include "my_handler_errors.h" + int ha_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, uchar *b, uint b_length, my_bool part_key, my_bool skip_end_space) @@ -565,48 +567,6 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a) } -/* - Errors a handler can give you -*/ - -static const char *handler_error_messages[]= -{ - "Didn't find key on read or update", - "Duplicate key on write or update", - "Undefined handler error 122", - "Someone has changed the row since it was read (while the table was locked to prevent it)", - "Wrong index given to function", - "Undefined handler error 125", - "Index file is crashed", - "Record file is crashed", - "Out of memory in engine", - "Undefined handler error 129", - "Incorrect file format", - "Command not supported by database", - "Old database file", - "No record read before update", - "Record was already deleted (or record file crashed)", - "No more room in record file", - "No more room in index file", - "No more records (read after end of file)", - "Unsupported extension used for table", - "Too big row", - "Wrong create options", - "Duplicate unique key or constraint on write or update", - "Unknown character set used in table", - "Conflicting table definitions in sub-tables of MERGE table", - "Table is crashed and last repair failed", - "Table was marked as crashed and should be repaired", - "Lock timed out; Retry transaction", - "Lock table is full; Restart program with a larger locktable", - "Updates are not allowed under a read only transactions", - "Lock deadlock; Retry transaction", - "Foreign key constraint is incorrectly formed", - "Cannot add a child row", - "Cannot delete a parent row", - "Unknown handler error" -}; - /* Register handler error messages for usage with my_error() @@ -619,6 +579,14 @@ static const char *handler_error_messages[]= void my_handler_error_register(void) { + /* + If you got compilation error here about compile_time_assert array, check + that every HA_ERR_xxx constant has a corresponding error message in + handler_error_messages[] list (check mysys/ma_handler_errors.h and + include/my_base.h). + */ + compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) == + HA_ERR_LAST + 1); my_error_register(handler_error_messages, HA_ERR_FIRST, HA_ERR_FIRST+ array_elements(handler_error_messages)-1); } diff --git a/mysys/my_handler_errors.h b/mysys/my_handler_errors.h new file mode 100644 index 00000000000..e360af8c57e --- /dev/null +++ b/mysys/my_handler_errors.h @@ -0,0 +1,67 @@ + +/* + Errors a handler can give you +*/ + +static const char *handler_error_messages[]= +{ + "Didn't find key on read or update", + "Duplicate key on write or update", + "Internal (unspecified) error in handler", + "Someone has changed the row since it was read (while the table was locked to prevent it)", + "Wrong index given to function", + "Undefined handler error 125", + "Index file is crashed", + "Record file is crashed", + "Out of memory in engine", + "Undefined handler error 129", + "Incorrect file format", + "Command not supported by database", + "Old database file", + "No record read before update", + "Record was already deleted (or record file crashed)", + "No more room in record file", + "No more room in index file", + "No more records (read after end of file)", + "Unsupported extension used for table", + "Too big row", + "Wrong create options", + "Duplicate unique key or constraint on write or update", + "Unknown character set used in table", + "Conflicting table definitions in sub-tables of MERGE table", + "Table is crashed and last repair failed", + "Table was marked as crashed and should be repaired", + "Lock timed out; Retry transaction", + "Lock table is full; Restart program with a larger locktable", + "Updates are not allowed under a read only transactions", + "Lock deadlock; Retry transaction", + "Foreign key constraint is incorrectly formed", + "Cannot add a child row", + "Cannot delete a parent row", + "No savepoint with that name", + "Non unique key block size", + "The table does not exist in engine", + "The table already existed in storage engine", + "Could not connect to storage engine", + "Unexpected null pointer found when using spatial index", + "The table changed in storage engine", + "There's no partition in table for the given value", + "Row-based binlogging of row failed", + "Index needed in foreign key constraint", + "Upholding foreign key constraints would lead to a duplicate key error in " + "some other table", + "Table needs to be upgraded before it can be used", + "Table is read only", + "Failed to get next auto increment value", + "Failed to set row auto increment value", + "Unknown (generic) error from engine", + "Record is the same", + "It is not possible to log this statement", + "The event was corrupt, leading to illegal data being read", + "The table is of a new format not supported by this version", + "The event could not be processed no other hanlder error happened", + "Got a fatal error during initialzaction of handler", + "File to short; Expected more data in file", + "Read page with wrong checksum" +}; + From 313947b140c1b89949cdae482648d279f5cc0dfd Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 18:56:43 +0100 Subject: [PATCH 509/527] Post-merge fixes to remove test failures resulting from merge. mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result: Result change. mysql-test/suite/rpl/r/rpl_extraCol_myisam.result: Result change. mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result: Result change. mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test: Removing rows causing tests to be non-deterministic. --- .../binlog/r/binlog_row_ctype_ucs.result | 4 + .../suite/rpl/r/rpl_extraCol_myisam.result | 4 +- .../rpl/r/rpl_switch_stm_row_mixed.result | 438 ------------------ .../suite/rpl/t/rpl_switch_stm_row_mixed.test | 2 - 4 files changed, 6 insertions(+), 442 deletions(-) diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 783dee673d2..a066928fc13 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -16,10 +16,14 @@ DELIMITER /*!*/; ROLLBACK/*!*/; use test/*!*/; SET TIMESTAMP=10000/*!*/; +SET @@session.pseudo_thread_id=999999999/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.sql_mode=0/*!*/; +SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!\C latin1 *//*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; +SET @@session.lc_time_names=0/*!*/; +SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; SET TIMESTAMP=10000/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result index ad67e3ecf80..da8151262d1 100644 --- a/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result +++ b/mysql-test/suite/rpl/r/rpl_extraCol_myisam.result @@ -434,7 +434,7 @@ Replicate_Ignore_Table # Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno 1364 -Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 262 +Last_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 Skip_Counter 0 Exec_Master_Log_Pos # Relay_Log_Space # @@ -452,7 +452,7 @@ Master_SSL_Verify_Server_Cert No Last_IO_Errno # Last_IO_Error # Last_SQL_Errno 1364 -Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 262 +Last_SQL_Error Could not execute Write_rows event on table test.t9; Field 'e' doesn't have a default value, Error_code: 1364; handler error HA_ERR_ROWS_EVENT_APPLY; the event's master log master-bin.000001, end_log_pos 330 SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Create t10 on slave *** 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 9a036cda4a7..7447d12f9b2 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 @@ -425,443 +425,5 @@ INSERT INTO t13 VALUES (USER()); INSERT INTO t13 VALUES (my_user()); INSERT INTO t13 VALUES (CURRENT_USER()); INSERT INTO t13 VALUES (my_current_user()); -show binlog events from ; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 # Query # # drop database if exists mysqltest1 -master-bin.000001 # Query # # create database mysqltest1 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t1 (a varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_8_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_9_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_7_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_10_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_11_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_13_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_14_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_12_' -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("for_15_") -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_16_" -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values("work_18_") -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_21_" -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select 'emergency_17_' -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_24_" -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t2` ( - `rpad(UUID(),100,' ')` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t3` ( - `1` varbinary(108) NOT NULL DEFAULT '' -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t4` ( - `a` varchar(100) DEFAULT NULL -) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t4) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t5) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo() -begin -insert into t1 values("work_25_"); -insert into t1 values(concat("for_26_",UUID())); -insert into t1 select "yesterday_27_"; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo2() -begin -insert into t1 values(concat("emergency_28_",UUID())); -insert into t1 values("work_29_"); -insert into t1 values(concat("for_30_",UUID())); -set session binlog_format=row; # accepted for stored procs -insert into t1 values("more work_31_"); -set session binlog_format=mixed; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -set session binlog_format=row; # rejected for stored funcs -insert into t1 values("alarm"); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo4(x varchar(100)) -begin -insert into t1 values(concat("work_250_",x)); -insert into t1 select "yesterday_270_"; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'hello'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(concat("work_250_", NAME_CONST('x',_latin1'world'))) -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 select "yesterday_270_" -master-bin.000001 # Query # # use `mysqltest1`; drop function foo3 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo3() returns bigint unsigned -begin -insert into t1 values("foo3_32_"); -call foo(); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo4() returns bigint unsigned -begin -insert into t2 select foo3(); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo5() returns bigint unsigned -begin -insert into t2 select UUID(); -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function foo6(x varchar(100)) returns bigint unsigned -begin -insert into t2 select x; -return 100; -end -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_') -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select uuid() -master-bin.000001 # Query # # use `mysqltest1`; create table t11 (data varchar(255)) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; insert into t11 select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='mysqltest1' and TABLE_NAME IN ('v1','t11') -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t11_bi before insert on t11 for each row -begin -set NEW.data = concat(NEW.data,UUID()); -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; create table t20 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t21 select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; create table t22 select * from t3 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1,t2,t3 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t2 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; create table t3 (b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Intvar # # INSERT_ID=3 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_44_") -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; create table t12 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a)) -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_') -master-bin.000001 # Query # # use `mysqltest1`; create table t13 select * from t1 -master-bin.000001 # Query # # use `mysqltest1`; drop table t1 -master-bin.000001 # Query # # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100)) -master-bin.000001 # Query # # use `mysqltest1`; drop function f -master-bin.000001 # Query # # use `mysqltest1`; create table t14 (unique (a)) select * from t2 -master-bin.000001 # Query # # use `mysqltest1`; truncate table t2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f1 (x varchar(100)) returns int deterministic -begin -insert into t1 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -insert into t2 values(null,x); -return 1; -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t3) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -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 # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function f2 (x varchar(100)) returns int deterministic -begin -declare y int; -insert into t1 values(null,x); -set y = (select count(*) from t2); -return y; -end -master-bin.000001 # Intvar # # INSERT_ID=4 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_') -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_') -master-bin.000001 # Query # # use `mysqltest1`; drop function f2 -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row -begin -insert into t2 values(null,"try_55_"); -end -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t1) -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t2) -master-bin.000001 # Write_rows # # table_id: # -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; alter table t1 modify a int, drop primary key -master-bin.000001 # Intvar # # INSERT_ID=5 -master-bin.000001 # Query # # use `mysqltest1`; insert into t1 values(null,"try_57_") -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE `t16` ( - `UUID()` varchar(36) CHARACTER SET utf8 NOT NULL DEFAULT '' -) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t16) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; insert into t16 values("try_66_") -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t11 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t11 (song VARCHAR(255)) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t11) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; INSERT INTO t11 VALUES('Careful With That Axe, Eugene') -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t12 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t12 (data LONG) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t12) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_user() -RETURNS CHAR(64) -BEGIN -DECLARE user CHAR(64); -SELECT USER() INTO user; -RETURN user; -END -master-bin.000001 # Query # # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` FUNCTION my_current_user() -RETURNS CHAR(64) -BEGIN -DECLARE user CHAR(64); -SELECT CURRENT_USER() INTO user; -RETURN user; -END -master-bin.000001 # Query # # use `mysqltest1`; DROP TABLE IF EXISTS t13 -master-bin.000001 # Query # # use `mysqltest1`; CREATE TABLE t13 (data CHAR(64)) -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT -master-bin.000001 # Query # # use `mysqltest1`; BEGIN -master-bin.000001 # Table_map # # table_id: # (mysqltest1.t13) -master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F -master-bin.000001 # Query # # use `mysqltest1`; COMMIT drop database mysqltest1; set global binlog_format =@my_binlog_format; 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 9ce73de9797..8e6a04104bd 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 @@ -526,7 +526,6 @@ sync_slave_with_master; # connection master; -let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); # Just to get something that is non-trivial, albeit still simple, we # stuff the result of USER() and CURRENT_USER() into a variable. @@ -557,7 +556,6 @@ INSERT INTO t13 VALUES (my_user()); INSERT INTO t13 VALUES (CURRENT_USER()); INSERT INTO t13 VALUES (my_current_user()); -source include/show_binlog_events.inc; sync_slave_with_master; # as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID From a9089cf460c7d7be3d8b843c948f0c707822878e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 14:02:27 -0400 Subject: [PATCH 510/527] Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG to 5.0. - Avoid memory cleanup race on Windows client for CTRL-C client/mysql.cc: Bug#26243 mysql command line crash after control-c - On Windows, the sigint handler shouldn't call mysql_end because the main thread will do so automatically. - Remove unnecessary signal call from the sigint handler. - Call my_end with proper value. dbug/dbug.c: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. dbug/factorial.c: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. dbug/user.r: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. include/my_dbug.h: Bug#26243 mysql command line crash after control-c - Backported the 5.1 DBUG library. The old version uses a non-thread safe global variable 'static struct state *stack'. libmysql/libmysql.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. myisam/mi_open.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_federated.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_innodb.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/ha_myisammrg.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/item_cmpfunc.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/mysqld.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/net_serv.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/opt_range.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/set_var.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/slave.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/sql_cache.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. sql/sql_select.cc: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. tests/mysql_client_test.c: Bug#26243 mysql command line crash after control-c - Update for new DBUG library. --- client/mysql.cc | 24 +- dbug/dbug.c | 2851 ++++++++++++++++++++----------------- dbug/factorial.c | 14 +- dbug/user.r | 297 ++-- include/my_dbug.h | 100 +- libmysql/libmysql.c | 4 - myisam/mi_open.c | 2 +- sql/ha_federated.cc | 2 +- sql/ha_innodb.cc | 2 +- sql/ha_myisammrg.cc | 2 +- sql/item_cmpfunc.cc | 2 +- sql/mysqld.cc | 13 +- sql/net_serv.cc | 4 +- sql/opt_range.cc | 6 +- sql/set_var.cc | 2 +- sql/slave.cc | 2 +- sql/sql_cache.cc | 6 +- sql/sql_select.cc | 2 +- tests/mysql_client_test.c | 1 - 19 files changed, 1823 insertions(+), 1513 deletions(-) diff --git a/client/mysql.cc b/client/mysql.cc index 483b1829ec0..a4706a1c580 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -1216,21 +1216,35 @@ sig_handler mysql_sigint(int sig) char kill_buffer[40]; MYSQL *kill_mysql= NULL; - signal(SIGINT, mysql_sigint); - /* terminate if no query being executed, or we already tried interrupting */ if (!executing_query || interrupted_query++) - mysql_end(sig); + goto err; kill_mysql= mysql_init(kill_mysql); if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password, "", opt_mysql_port, opt_mysql_unix_port,0)) - mysql_end(sig); + goto err; /* kill_buffer is always big enough because max length of %lu is 15 */ sprintf(kill_buffer, "KILL /*!50000 QUERY */ %lu", mysql_thread_id(&mysql)); mysql_real_query(kill_mysql, kill_buffer, strlen(kill_buffer)); mysql_close(kill_mysql); tee_fprintf(stdout, "Query aborted by Ctrl+C\n"); + + return; + +err: +#ifdef _WIN32 + /* + When SIGINT is raised on Windows, the OS creates a new thread to handle the + interrupt. Once that thread completes, the main thread continues running + only to find that it's resources have already been free'd when the sigint + handler called mysql_end(). + */ + mysql_thread_end(); + return; +#else + mysql_end(sig); +#endif } sig_handler mysql_end(int sig) @@ -1271,7 +1285,7 @@ sig_handler mysql_end(int sig) my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR)); mysql_server_end(); free_defaults(defaults_argv); - my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); + my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR); exit(status.exit_status); } diff --git a/dbug/dbug.c b/dbug/dbug.c index c991daf3617..09515dc329c 100644 --- a/dbug/dbug.c +++ b/dbug/dbug.c @@ -1,74 +1,77 @@ /****************************************************************************** - * * - * N O T I C E * - * * - * Copyright Abandoned, 1987, Fred Fish * - * * - * * - * This previously copyrighted work has been placed into the public * - * domain by the author and may be freely used for any purpose, * - * private or commercial. * - * * - * Because of the number of inquiries I was receiving about the use * - * of this product in commercially developed works I have decided to * - * simply make it public domain to further its unrestricted use. I * - * specifically would be most happy to see this material become a * - * part of the standard Unix distributions by AT&T and the Berkeley * - * Computer Science Research Group, and a standard part of the GNU * - * system from the Free Software Foundation. * - * * - * I would appreciate it, as a courtesy, if this notice is left in * - * all copies and derivative works. Thank you. * - * * - * The author makes no warranty of any kind with respect to this * + * * + * N O T I C E * + * * + * Copyright Abandoned, 1987, Fred Fish * + * * + * * + * This previously copyrighted work has been placed into the public * + * domain by the author and may be freely used for any purpose, * + * private or commercial. * + * * + * Because of the number of inquiries I was receiving about the use * + * of this product in commercially developed works I have decided to * + * simply make it public domain to further its unrestricted use. I * + * specifically would be most happy to see this material become a * + * part of the standard Unix distributions by AT&T and the Berkeley * + * Computer Science Research Group, and a standard part of the GNU * + * system from the Free Software Foundation. * + * * + * I would appreciate it, as a courtesy, if this notice is left in * + * all copies and derivative works. Thank you. * + * * + * The author makes no warranty of any kind with respect to this * * product and explicitly disclaims any implied warranties of mer- * - * chantability or fitness for any particular purpose. * - * * + * chantability or fitness for any particular purpose. * + * * ****************************************************************************** */ - /* * FILE * - * dbug.c runtime support routines for dbug package + * dbug.c runtime support routines for dbug package * * SCCS * - * @(#)dbug.c 1.25 7/25/89 + * @(#)dbug.c 1.25 7/25/89 * * DESCRIPTION * - * These are the runtime support routines for the dbug package. - * The dbug package has two main components; the user include - * file containing various macro definitions, and the runtime - * support routines which are called from the macro expansions. + * These are the runtime support routines for the dbug package. + * The dbug package has two main components; the user include + * file containing various macro definitions, and the runtime + * support routines which are called from the macro expansions. * - * Externally visible functions in the runtime support module - * use the naming convention pattern "_db_xx...xx_", thus - * they are unlikely to collide with user defined function names. + * Externally visible functions in the runtime support module + * use the naming convention pattern "_db_xx...xx_", thus + * they are unlikely to collide with user defined function names. * * AUTHOR(S) * - * Fred Fish (base code) - * Enhanced Software Technologies, Tempe, AZ - * asuvax!mcdphx!estinc!fnf + * Fred Fish (base code) + * Enhanced Software Technologies, Tempe, AZ + * asuvax!mcdphx!estinc!fnf * - * Binayak Banerjee (profiling enhancements) - * seismo!bpa!sjuvax!bbanerje + * Binayak Banerjee (profiling enhancements) + * seismo!bpa!sjuvax!bbanerje * - * Michael Widenius: - * DBUG_DUMP - To dump a block of memory. + * Michael Widenius: + * DBUG_DUMP - To dump a block of memory. * PUSH_FLAG "O" - To be used insted of "o" if we * want flushing after each write - * PUSH_FLAG "A" - as 'O', but we will append to the out file instead - * of creating a new one. - * Check of malloc on entry/exit (option "S") + * PUSH_FLAG "A" - as 'O', but we will append to the out file instead + * of creating a new one. + * Check of malloc on entry/exit (option "S") + * + * DBUG_EXECUTE_IF + * incremental mode (-#+t:-d,info ...) + * DBUG_SET, _db_explain_ + * thread-local settings + * */ -#ifdef DBUG_OFF -#undef DBUG_OFF -#endif + #include #include #include @@ -76,51 +79,44 @@ #include #endif -#ifdef _DBUG_CONDITION_ -#define _DBUG_START_CONDITION_ "d:t" -#else -#define _DBUG_START_CONDITION_ "" -#endif + +#ifndef DBUG_OFF + /* - * Manifest constants that should not require any changes. + * Manifest constants which may be "tuned" if desired. */ -#define EOS '\000' /* End Of String marker */ +#define PRINTBUF 1024 /* Print buffer size */ +#define INDENT 2 /* Indentation per trace level */ +#define MAXDEPTH 200 /* Maximum trace depth default */ /* - * Manifest constants which may be "tuned" if desired. + * The following flags are used to determine which + * capabilities the user has enabled with the settings + * push macro. */ -#define PRINTBUF 1024 /* Print buffer size */ -#define INDENT 2 /* Indentation per trace level */ -#define MAXDEPTH 200 /* Maximum trace depth default */ +#define TRACE_ON 000001 /* Trace enabled */ +#define DEBUG_ON 000002 /* Debug enabled */ +#define FILE_ON 000004 /* File name print enabled */ +#define LINE_ON 000010 /* Line number print enabled */ +#define DEPTH_ON 000020 /* Function nest level print enabled */ +#define PROCESS_ON 000040 /* Process name print enabled */ +#define NUMBER_ON 000100 /* Number each line of output */ +#define PROFILE_ON 000200 /* Print out profiling code */ +#define PID_ON 000400 /* Identify each line with process id */ +#define TIMESTAMP_ON 001000 /* timestamp every line of output */ +#define SANITY_CHECK_ON 002000 /* Check safemalloc on DBUG_ENTER */ +#define FLUSH_ON_WRITE 004000 /* Flush on every write */ +#define OPEN_APPEND 010000 /* Open for append */ + +#define TRACING (cs->stack->flags & TRACE_ON) +#define DEBUGGING (cs->stack->flags & DEBUG_ON) +#define PROFILING (cs->stack->flags & PROFILE_ON) /* - * The following flags are used to determine which - * capabilities the user has enabled with the state - * push macro. - */ - -#define TRACE_ON 000001 /* Trace enabled */ -#define DEBUG_ON 000002 /* Debug enabled */ -#define FILE_ON 000004 /* File name print enabled */ -#define LINE_ON 000010 /* Line number print enabled */ -#define DEPTH_ON 000020 /* Function nest level print enabled */ -#define PROCESS_ON 000040 /* Process name print enabled */ -#define NUMBER_ON 000100 /* Number each line of output */ -#define PROFILE_ON 000200 /* Print out profiling code */ -#define PID_ON 000400 /* Identify each line with process id */ -#define SANITY_CHECK_ON 001000 /* Check safemalloc on DBUG_ENTER */ -#define FLUSH_ON_WRITE 002000 /* Flush on every write */ - -#define TRACING (stack -> flags & TRACE_ON) -#define DEBUGGING (stack -> flags & DEBUG_ON) -#define PROFILING (stack -> flags & PROFILE_ON) -#define STREQ(a,b) (strcmp(a,b) == 0) - -/* - * Typedefs to make things more obvious. + * Typedefs to make things more obvious. */ #ifndef __WIN__ @@ -130,13 +126,13 @@ typedef int BOOLEAN; #endif /* - * Make it easy to change storage classes if necessary. + * Make it easy to change storage classes if necessary. */ -#define IMPORT extern /* Names defined externally */ -#define EXPORT /* Allocated here, available globally */ -#define AUTO auto /* Names to be allocated on stack */ -#define REGISTER register /* Names to be placed in registers */ +#define IMPORT extern /* Names defined externally */ +#define EXPORT /* Allocated here, available globally */ +#define AUTO auto /* Names to be allocated on stack */ +#define REGISTER register /* Names to be placed in registers */ /* * The default file for profiling. Could also add another flag @@ -151,153 +147,150 @@ typedef int BOOLEAN; * */ -#define PROF_FILE "dbugmon.out" -#define PROF_EFMT "E\t%ld\t%s\n" -#define PROF_SFMT "S\t%lx\t%lx\t%s\n" -#define PROF_XFMT "X\t%ld\t%s\n" +#define PROF_FILE "dbugmon.out" +#define PROF_EFMT "E\t%ld\t%s\n" +#define PROF_SFMT "S\t%lx\t%lx\t%s\n" +#define PROF_XFMT "X\t%ld\t%s\n" -#ifdef M_I386 /* predefined by xenix 386 compiler */ +#ifdef M_I386 /* predefined by xenix 386 compiler */ #define AUTOS_REVERSE 1 #endif /* - * Variables which are available externally but should only - * be accessed via the macro package facilities. - */ - -EXPORT FILE *_db_fp_ = (FILE *) 0; /* Output stream, default stderr */ -EXPORT char *_db_process_ = (char*) "dbug"; /* Pointer to process name; argv[0] */ -EXPORT FILE *_db_pfp_ = (FILE *)0; /* Profile stream, 'dbugmon.out' */ -EXPORT BOOLEAN _db_on_ = FALSE; /* TRUE if debugging currently on */ -EXPORT BOOLEAN _db_pon_ = FALSE; /* TRUE if profile currently on */ -EXPORT BOOLEAN _no_db_ = FALSE; /* TRUE if no debugging at all */ - -/* - * Externally supplied functions. + * Externally supplied functions. */ #ifndef HAVE_PERROR -static void perror (); /* Fake system/library error print routine */ +static void perror(); /* Fake system/library error print routine */ #endif -IMPORT int _sanity(const char *file,uint line); +IMPORT int _sanity(const char *file,uint line); /* safemalloc sanity checker */ /* - * The user may specify a list of functions to trace or - * debug. These lists are kept in a linear linked list, - * a very simple implementation. + * The user may specify a list of functions to trace or + * debug. These lists are kept in a linear linked list, + * a very simple implementation. */ struct link { - char *str; /* Pointer to link's contents */ struct link *next_link; /* Pointer to the next link */ + char str[1]; /* Pointer to link's contents */ }; /* - * Debugging states can be pushed or popped off of a - * stack which is implemented as a linked list. Note - * that the head of the list is the current state and the - * stack is pushed by adding a new state to the head of the - * list or popped by removing the first link. - */ - -struct state { - int flags; /* Current state flags */ - int maxdepth; /* Current maximum trace depth */ - uint delay; /* Delay after each output line */ - int sub_level; /* Sub this from code_state->level */ - FILE *out_file; /* Current output stream */ - FILE *prof_file; /* Current profiling stream */ - char name[FN_REFLEN]; /* Name of output file */ - struct link *functions; /* List of functions */ - struct link *p_functions; /* List of profiled functions */ - struct link *keywords; /* List of debug keywords */ - struct link *processes; /* List of process names */ - struct state *next_state; /* Next state in the list */ -}; - - -/* - * Local variables not seen by user. - */ - - -static my_bool init_done = FALSE; /* Set to TRUE when initialization done */ -static struct state *stack=0; - -typedef struct st_code_state { - const char *func; /* Name of current user function */ - const char *file; /* Name of current user file */ - char **framep; /* Pointer to current frame */ - const char *jmpfunc; /* Remember current function for setjmp */ - const char *jmpfile; /* Remember current file for setjmp */ - int lineno; /* Current debugger output line number */ - int level; /* Current function nesting level */ - int disable_output; /* Set to it if output is disabled */ - int jmplevel; /* Remember nesting level at setjmp () */ - -/* - * The following variables are used to hold the state information - * between the call to _db_pargs_() and _db_doprnt_(), during - * expansion of the DBUG_PRINT macro. This is the only macro - * that currently uses these variables. + * Debugging settings can be pushed or popped off of a + * stack which is implemented as a linked list. Note + * that the head of the list is the current settings and the + * stack is pushed by adding a new settings to the head of the + * list or popped by removing the first link. * - * These variables are currently used only by _db_pargs_() and - * _db_doprnt_(). + * Note: if out_file is NULL, the other fields are not initialized at all! */ - uint u_line; /* User source code line number */ - int locked; /* If locked with _db_lock_file */ - const char *u_keyword; /* Keyword for current macro */ +struct settings { + int flags; /* Current settings flags */ + int maxdepth; /* Current maximum trace depth */ + uint delay; /* Delay after each output line */ + int sub_level; /* Sub this from code_state->level */ + FILE *out_file; /* Current output stream */ + FILE *prof_file; /* Current profiling stream */ + char name[FN_REFLEN]; /* Name of output file */ + struct link *functions; /* List of functions */ + struct link *p_functions; /* List of profiled functions */ + struct link *keywords; /* List of debug keywords */ + struct link *processes; /* List of process names */ + struct settings *next; /* Next settings in the list */ +}; + +#define is_shared(S, V) ((S)->next && (S)->next->V == (S)->V) + +/* + * Local variables not seen by user. + */ + + +static BOOLEAN init_done= FALSE; /* Set to TRUE when initialization done */ +static struct settings init_settings; +static const char *db_process= 0;/* Pointer to process name; argv[0] */ + +typedef struct _db_code_state_ { + const char *process; /* Pointer to process name; usually argv[0] */ + const char *func; /* Name of current user function */ + const char *file; /* Name of current user file */ + char **framep; /* Pointer to current frame */ + struct settings *stack; /* debugging settings */ + const char *jmpfunc; /* Remember current function for setjmp */ + const char *jmpfile; /* Remember current file for setjmp */ + int lineno; /* Current debugger output line number */ + int level; /* Current function nesting level */ + int jmplevel; /* Remember nesting level at setjmp() */ + +/* + * The following variables are used to hold the state information + * between the call to _db_pargs_() and _db_doprnt_(), during + * expansion of the DBUG_PRINT macro. This is the only macro + * that currently uses these variables. + * + * These variables are currently used only by _db_pargs_() and + * _db_doprnt_(). + */ + + uint u_line; /* User source code line number */ + int locked; /* If locked with _db_lock_file_ */ + const char *u_keyword; /* Keyword for current macro */ } CODE_STATE; - /* Parse a debug command string */ -static struct link *ListParse(char *ctlp); - /* Make a fresh copy of a string */ -static char *StrDup(const char *str); - /* Open debug output stream */ -static void DBUGOpenFile(const char *name, int append); -#ifndef THREAD - /* Open profile output stream */ -static FILE *OpenProfile(const char *name); - /* Profile if asked for it */ -static BOOLEAN DoProfile(void); -#endif - /* Return current user time (ms) */ -#ifndef THREAD -static unsigned long Clock (void); -#endif - /* Close debug output stream */ -static void CloseFile(FILE *fp); - /* Push current debug state */ -static void PushState(void); - /* Free memory associated with debug state. */ -static void FreeState (struct state *state); - /* Test for tracing enabled */ -static BOOLEAN DoTrace(CODE_STATE *state); - /* Test to see if file is writable */ -#if !(!defined(HAVE_ACCESS) || defined(MSDOS)) -static BOOLEAN Writable(char *pathname); - /* Change file owner and group */ -static void ChangeOwner(char *pathname); - /* Allocate memory for runtime support */ -#endif -static char *DbugMalloc(size_t size); - /* Remove leading pathname components */ -static char *BaseName(const char *pathname); -static void DoPrefix(uint line); +/* + The test below is so we could call functions with DBUG_ENTER before + my_thread_init(). +*/ +#define get_code_state_or_return if (!cs && !((cs=code_state()))) return + + /* Handling lists */ +static struct link *ListAdd(struct link *, const char *, const char *); +static struct link *ListDel(struct link *, const char *, const char *); +static struct link *ListCopy(struct link *); static void FreeList(struct link *linkp); -static void Indent(int indent); + + /* OpenClose debug output stream */ +static void DBUGOpenFile(CODE_STATE *,const char *, const char *, int); +static void DBUGCloseFile(CODE_STATE *cs, FILE *fp); + /* Push current debug settings */ +static void PushState(CODE_STATE *cs); + /* Free memory associated with debug state. */ +static void FreeState (CODE_STATE *cs, struct settings *state, int free_state); + /* Test for tracing enabled */ +static BOOLEAN DoTrace(CODE_STATE *cs); + + /* Test to see if file is writable */ +#if !(!defined(HAVE_ACCESS) || defined(MSDOS)) +static BOOLEAN Writable(const char *pathname); + /* Change file owner and group */ +static void ChangeOwner(CODE_STATE *cs, char *pathname); + /* Allocate memory for runtime support */ +#endif + +static void DoPrefix(CODE_STATE *cs, uint line); + +static char *DbugMalloc(size_t size); +static const char *BaseName(const char *pathname); +static void Indent(CODE_STATE *cs, int indent); static BOOLEAN InList(struct link *linkp,const char *cp); static void dbug_flush(CODE_STATE *); static void DbugExit(const char *why); -static int DelayArg(int value); - /* Supplied in Sys V runtime environ */ - /* Break string into tokens */ -static char *static_strtok(char *s1,pchar chr); +static const char *DbugStrTok(const char *s); + +#ifndef THREAD + /* Open profile output stream */ +static FILE *OpenProfile(CODE_STATE *cs, const char *name); + /* Profile if asked for it */ +static BOOLEAN DoProfile(CODE_STATE *); + /* Return current user time (ms) */ +static unsigned long Clock(void); +#endif /* - * Miscellaneous printf format strings. + * Miscellaneous printf format strings. */ #define ERR_MISSING_RETURN "%s: missing DBUG_RETURN or DBUG_VOID_RETURN macro in function \"%s\"\n" @@ -307,31 +300,19 @@ static char *static_strtok(char *s1,pchar chr); #define ERR_CHOWN "%s: can't change owner/group of \"%s\": " /* - * Macros and defines for testing file accessibility under UNIX and MSDOS. + * Macros and defines for testing file accessibility under UNIX and MSDOS. */ #undef EXISTS #if !defined(HAVE_ACCESS) || defined(MSDOS) -#define EXISTS(pathname) (FALSE) /* Assume no existance */ +#define EXISTS(pathname) (FALSE) /* Assume no existance */ #define Writable(name) (TRUE) #else -#define EXISTS(pathname) (access (pathname, F_OK) == 0) -#define WRITABLE(pathname) (access (pathname, W_OK) == 0) +#define EXISTS(pathname) (access(pathname, F_OK) == 0) +#define WRITABLE(pathname) (access(pathname, W_OK) == 0) #endif #ifndef MSDOS -#define ChangeOwner(name) -#endif - -/* - * Translate some calls among different systems. - */ - -#if defined(unix) || defined(xenix) || defined(VMS) || defined(__NetBSD__) -# define Delay(A) sleep((uint) A) -#elif defined(AMIGA) -IMPORT int Delay (); /* Pause for given number of ticks */ -#else -static int Delay(int ticks); +#define ChangeOwner(cs,name) #endif @@ -343,578 +324,843 @@ static int Delay(int ticks); #include pthread_mutex_t THR_LOCK_dbug; -static void init_dbug_state(void) -{ - pthread_mutex_init(&THR_LOCK_dbug,MY_MUTEX_INIT_FAST); -} - static CODE_STATE *code_state(void) { - CODE_STATE *state=0; - struct st_my_thread_var *tmp=my_thread_var; - if (tmp) + CODE_STATE *cs=0; + struct st_my_thread_var *tmp; + + if (!init_done) { - if (!(state=(CODE_STATE *) tmp->dbug)) + pthread_mutex_init(&THR_LOCK_dbug,MY_MUTEX_INIT_FAST); + bzero(&init_settings, sizeof(init_settings)); + init_settings.out_file=stderr; + init_settings.flags=OPEN_APPEND; + init_done=TRUE; + } + + if ((tmp=my_thread_var)) + { + if (!(cs=(CODE_STATE *) tmp->dbug)) { - state=(CODE_STATE*) DbugMalloc(sizeof(*state)); - bzero((char*) state,sizeof(*state)); - state->func="?func"; - state->file="?file"; - tmp->dbug=(gptr) state; + cs=(CODE_STATE*) DbugMalloc(sizeof(*cs)); + bzero((uchar*) cs,sizeof(*cs)); + cs->process= db_process ? db_process : "dbug"; + cs->func="?func"; + cs->file="?file"; + cs->stack=&init_settings; + tmp->dbug= (void*) cs; } } - return state; + return cs; } #else /* !THREAD */ -#define init_dbug_state() -#define code_state() (&static_code_state) -#define pthread_mutex_lock(A) {} -#define pthread_mutex_unlock(A) {} static CODE_STATE static_code_state= { - "?func", "?file", NULL, NullS, NullS, 0,0,0,0,0,0, NullS + "dbug", "?func", "?file", NULL, &init_settings, + NullS, NullS, 0,0,0,0,0,NullS }; + +static CODE_STATE *code_state(void) +{ + if (!init_done) + { + bzero(&init_settings, sizeof(init_settings)); + init_settings.out_file=stderr; + init_settings.flags=OPEN_APPEND; + init_done=TRUE; + } + return &static_code_state; +} + +#define pthread_mutex_lock(A) {} +#define pthread_mutex_unlock(A) {} #endif +/* + * Translate some calls among different systems. + */ + +#ifdef HAVE_SLEEP +/* sleep() wants seconds */ +#define Delay(A) sleep(((uint) A)/10) +#else +#define Delay(A) (0) +#endif + +/* + * FUNCTION + * + * _db_process_ give the name to the current process/thread + * + * SYNOPSIS + * + * VOID _process_(name) + * char *name; + * + */ + +void _db_process_(const char *name) +{ + CODE_STATE *cs=0; + + if (!db_process) + db_process= name; + + get_code_state_or_return; + cs->process= name; +} + /* * FUNCTION * - * _db_push_ push current debugger state and set up new one - * - * SYNOPSIS - * - * VOID _db_push_ (control) - * char *control; + * DbugParse parse control string and set current debugger setting * * DESCRIPTION * - * Given pointer to a debug control string in "control", pushes - * the current debug state, parses the control string, and sets - * up a new debug state. + * Given pointer to a debug control string in "control", + * parses the control string, and sets + * up a current debug settings. * - * The only attribute of the new state inherited from the previous - * state is the current function nesting level. This can be - * overridden by using the "r" flag in the control string. + * The debug control string is a sequence of colon separated fields + * as follows: * - * The debug control string is a sequence of colon separated fields - * as follows: + * [+]::...: * - * ::...: + * Each field consists of a mandatory flag character followed by + * an optional "," and comma separated list of modifiers: * - * Each field consists of a mandatory flag character followed by - * an optional "," and comma separated list of modifiers: + * [sign]flag[,modifier,modifier,...,modifier] * - * flag[,modifier,modifier,...,modifier] + * See the manual for the list of supported signs, flags, and modifiers * - * The currently recognized flag characters are: - * - * d Enable output from DBUG_ macros for - * for the current state. May be followed - * by a list of keywords which selects output - * only for the DBUG macros with that keyword. - * A null list of keywords implies output for - * all macros. - * - * D Delay after each debugger output line. - * The argument is the number of tenths of seconds - * to delay, subject to machine capabilities. - * I.E. -#D,20 is delay two seconds. - * - * f Limit debugging and/or tracing, and profiling to the - * list of named functions. Note that a null list will - * disable all functions. The appropriate "d" or "t" - * flags must still be given, this flag only limits their - * actions if they are enabled. - * - * F Identify the source file name for each - * line of debug or trace output. - * - * i Identify the process with the pid for each line of - * debug or trace output. - * - * g Enable profiling. Create a file called 'dbugmon.out' - * containing information that can be used to profile - * the program. May be followed by a list of keywords - * that select profiling only for the functions in that - * list. A null list implies that all functions are - * considered. - * - * L Identify the source file line number for - * each line of debug or trace output. - * - * n Print the current function nesting depth for - * each line of debug or trace output. - * - * N Number each line of dbug output. - * - * o Redirect the debugger output stream to the - * specified file. The default output is stderr. - * - * O As O but the file is really flushed between each - * write. When neaded the file is closed and reopened - * between each write. - * - * p Limit debugger actions to specified processes. - * A process must be identified with the - * DBUG_PROCESS macro and match one in the list - * for debugger actions to occur. - * - * P Print the current process name for each - * line of debug or trace output. - * - * r When pushing a new state, do not inherit - * the previous state's function nesting level. - * Useful when the output is to start at the - * left margin. - * - * S Do function _sanity(_file_,_line_) at each - * debugged function until _sanity() returns - * something that differs from 0. - * (Moustly used with safemalloc) - * - * t Enable function call/exit trace lines. - * May be followed by a list (containing only - * one modifier) giving a numeric maximum - * trace level, beyond which no output will - * occur for either debugging or tracing - * macros. The default is a compile time - * option. - * - * Some examples of debug control strings which might appear - * on a shell command line (the "-#" is typically used to - * introduce a control string to an application program) are: - * - * -#d:t - * -#d:f,main,subr1:F:L:t,20 - * -#d,input,output,files:n - * - * For convenience, any leading "-#" is stripped off. + * For convenience, any leading "-#" is stripped off. * */ -void _db_push_ (const char *control) +static void DbugParse(CODE_STATE *cs, const char *control) { - reg1 char *scan; - reg2 struct link *temp; - CODE_STATE *state; - char *new_str; + const char *end; + int rel=0; + struct settings *stack; - if (! _db_fp_) - _db_fp_= stderr; /* Output stream, default stderr */ + get_code_state_or_return; + stack= cs->stack; - if (*control == '-') + if (control[0] == '-' && control[1] == '#') + control+=2; + + rel= control[0] == '+' || control[0] == '-'; + if ((!rel || (!stack->out_file && !stack->next))) { - if (*++control == '#') - control++; + stack->flags= 0; + stack->delay= 0; + stack->maxdepth= 0; + stack->sub_level= 0; + stack->out_file= stderr; + stack->prof_file= NULL; + stack->functions= NULL; + stack->p_functions= NULL; + stack->keywords= NULL; + stack->processes= NULL; + } + else if (!stack->out_file) + { + stack->flags= stack->next->flags; + stack->delay= stack->next->delay; + stack->maxdepth= stack->next->maxdepth; + stack->sub_level= stack->next->sub_level; + strcpy(stack->name, stack->next->name); + stack->out_file= stack->next->out_file; + stack->prof_file= stack->next->prof_file; + if (stack->next == &init_settings) + { + /* never share with the global parent - it can change under your feet */ + stack->functions= ListCopy(init_settings.functions); + stack->p_functions= ListCopy(init_settings.p_functions); + stack->keywords= ListCopy(init_settings.keywords); + stack->processes= ListCopy(init_settings.processes); + } + else + { + stack->functions= stack->next->functions; + stack->p_functions= stack->next->p_functions; + stack->keywords= stack->next->keywords; + stack->processes= stack->next->processes; + } } - if (*control) - _no_db_=0; /* We are using dbug after all */ - new_str = StrDup (control); - PushState (); - state=code_state(); - - scan = static_strtok (new_str, ':'); - for (; scan != NULL; scan = static_strtok ((char *)NULL, ':')) { - switch (*scan++) { + end= DbugStrTok(control); + while (1) + { + int c, sign= (*control == '+') ? 1 : (*control == '-') ? -1 : 0; + if (sign) control++; + if (!rel) sign=0; + c= *control++; + if (*control == ',') control++; + /* XXX when adding new cases here, don't forget _db_explain_ ! */ + switch (c) { case 'd': - _db_on_ = TRUE; - stack -> flags |= DEBUG_ON; - if (*scan++ == ',') { - stack -> keywords = ListParse (scan); + if (sign < 0 && control == end) + { + if (!is_shared(stack, keywords)) + FreeList(stack->keywords); + stack->keywords=NULL; + stack->flags &= ~DEBUG_ON; + break; } + if (rel && is_shared(stack, keywords)) + stack->keywords= ListCopy(stack->keywords); + if (sign < 0) + { + if (DEBUGGING) + stack->keywords= ListDel(stack->keywords, control, end); + break; + } + stack->keywords= ListAdd(stack->keywords, control, end); + stack->flags |= DEBUG_ON; break; case 'D': - stack -> delay = 0; - if (*scan++ == ',') { - temp = ListParse (scan); - stack -> delay = DelayArg (atoi (temp -> str)); - FreeList (temp); - } + stack->delay= atoi(control); break; case 'f': - if (*scan++ == ',') { - stack -> functions = ListParse (scan); + if (sign < 0 && control == end) + { + if (!is_shared(stack,functions)) + FreeList(stack->functions); + stack->functions=NULL; + break; } + if (rel && is_shared(stack,functions)) + stack->functions= ListCopy(stack->functions); + if (sign < 0) + stack->functions= ListDel(stack->functions, control, end); + else + stack->functions= ListAdd(stack->functions, control, end); break; case 'F': - stack -> flags |= FILE_ON; + if (sign < 0) + stack->flags &= ~FILE_ON; + else + stack->flags |= FILE_ON; break; case 'i': - stack -> flags |= PID_ON; + if (sign < 0) + stack->flags &= ~PID_ON; + else + stack->flags |= PID_ON; break; #ifndef THREAD case 'g': - _db_pon_ = TRUE; - if (OpenProfile(PROF_FILE)) + if (OpenProfile(cs, PROF_FILE)) { - stack -> flags |= PROFILE_ON; - if (*scan++ == ',') - stack -> p_functions = ListParse (scan); + stack->flags |= PROFILE_ON; + stack->p_functions= ListAdd(stack->p_functions, control, end); } break; #endif case 'L': - stack -> flags |= LINE_ON; + if (sign < 0) + stack->flags &= ~LINE_ON; + else + stack->flags |= LINE_ON; break; case 'n': - stack -> flags |= DEPTH_ON; + if (sign < 0) + stack->flags &= ~DEPTH_ON; + else + stack->flags |= DEPTH_ON; break; case 'N': - stack -> flags |= NUMBER_ON; + if (sign < 0) + stack->flags &= ~NUMBER_ON; + else + stack->flags |= NUMBER_ON; break; case 'A': case 'O': - stack -> flags |= FLUSH_ON_WRITE; + stack->flags |= FLUSH_ON_WRITE; + /* fall through */ case 'a': case 'o': - if (*scan++ == ',') { - temp = ListParse (scan); - DBUGOpenFile(temp -> str, (int) (scan[-2] == 'A' || scan[-2] == 'a')); - FreeList (temp); - } else { - DBUGOpenFile ("-",0); + if (sign < 0) + { + if (!is_shared(stack, out_file)) + DBUGCloseFile(cs, stack->out_file); + stack->flags &= ~FLUSH_ON_WRITE; + stack->out_file= stderr; + break; } + if (c == 'a' || c == 'A') + stack->flags |= OPEN_APPEND; + else + stack->flags &= ~OPEN_APPEND; + if (control != end) + DBUGOpenFile(cs, control, end, stack->flags & OPEN_APPEND); + else + DBUGOpenFile(cs, "-",0,0); break; case 'p': - if (*scan++ == ',') { - stack -> processes = ListParse (scan); + if (sign < 0 && control == end) + { + if (!is_shared(stack,processes)) + FreeList(stack->processes); + stack->processes=NULL; + break; } + if (rel && is_shared(stack, processes)) + stack->processes= ListCopy(stack->processes); + if (sign < 0) + stack->processes= ListDel(stack->processes, control, end); + else + stack->processes= ListAdd(stack->processes, control, end); break; case 'P': - stack -> flags |= PROCESS_ON; + if (sign < 0) + stack->flags &= ~PROCESS_ON; + else + stack->flags |= PROCESS_ON; break; case 'r': - stack->sub_level= state->level; + stack->sub_level= cs->level; break; case 't': - stack -> flags |= TRACE_ON; - if (*scan++ == ',') { - temp = ListParse (scan); - stack -> maxdepth = atoi (temp -> str); - FreeList (temp); + if (sign < 0) + { + if (control != end) + stack->maxdepth-= atoi(control); + else + stack->maxdepth= 0; } + else + { + if (control != end) + stack->maxdepth+= atoi(control); + else + stack->maxdepth= MAXDEPTH; + } + if (stack->maxdepth > 0) + stack->flags |= TRACE_ON; + else + stack->flags &= ~TRACE_ON; + break; + case 'T': + if (sign < 0) + stack->flags &= ~TIMESTAMP_ON; + else + stack->flags |= TIMESTAMP_ON; break; case 'S': - stack -> flags |= SANITY_CHECK_ON; + if (sign < 0) + stack->flags &= ~SANITY_CHECK_ON; + else + stack->flags |= SANITY_CHECK_ON; break; } + if (!*end) + break; + control=end+1; + end= DbugStrTok(control); } - free (new_str); } /* * FUNCTION * - * _db_pop_ pop the debug stack + * _db_set_ set current debugger settings + * + * SYNOPSIS + * + * VOID _db_set_(control) + * char *control; * * DESCRIPTION * - * Pops the debug stack, returning the debug state to its - * condition prior to the most recent _db_push_ invocation. - * Note that the pop will fail if it would remove the last - * valid state from the stack. This prevents user errors - * in the push/pop sequence from screwing up the debugger. - * Maybe there should be some kind of warning printed if the - * user tries to pop too many states. + * Given pointer to a debug control string in "control", + * parses the control string, and sets up a current debug + * settings. Pushes a new debug settings if the current is + * set to the initial debugger settings. + */ + +void _db_set_(CODE_STATE *cs, const char *control) +{ + get_code_state_or_return; + + if (cs->stack == &init_settings) + PushState(cs); + + DbugParse(cs, control); +} + + +/* + * FUNCTION + * + * _db_push_ push current debugger settings and set up new one + * + * SYNOPSIS + * + * VOID _db_push_(control) + * char *control; + * + * DESCRIPTION + * + * Given pointer to a debug control string in "control", pushes + * the current debug settings, parses the control string, and sets + * up a new debug settings with DbugParse() * */ -void _db_pop_ () +void _db_push_(const char *control) { - reg1 struct state *discard; - discard = stack; - if (discard != NULL && discard -> next_state != NULL) { - stack = discard -> next_state; - _db_fp_ = stack -> out_file; - _db_pfp_ = stack -> prof_file; - FreeState(discard); - if (!(stack->flags & DEBUG_ON)) - _db_on_=0; + CODE_STATE *cs=0; + get_code_state_or_return; + PushState(cs); + DbugParse(cs, control); +} + +/* + * FUNCTION + * + * _db_set_init_ set initial debugger settings + * + * SYNOPSIS + * + * VOID _db_set_init_(control) + * char *control; + * + * DESCRIPTION + * see _db_set_ + * + */ + +void _db_set_init_(const char *control) +{ + CODE_STATE tmp_cs; + bzero((uchar*) &tmp_cs, sizeof(tmp_cs)); + tmp_cs.stack= &init_settings; + DbugParse(&tmp_cs, control); +} + +/* + * FUNCTION + * + * _db_pop_ pop the debug stack + * + * DESCRIPTION + * + * Pops the debug stack, returning the debug settings to its + * condition prior to the most recent _db_push_ invocation. + * Note that the pop will fail if it would remove the last + * valid settings from the stack. This prevents user errors + * in the push/pop sequence from screwing up the debugger. + * Maybe there should be some kind of warning printed if the + * user tries to pop too many states. + * + */ + +void _db_pop_() +{ + struct settings *discard; + CODE_STATE *cs=0; + + get_code_state_or_return; + + discard= cs->stack; + if (discard->next != NULL) + { + cs->stack= discard->next; + FreeState(cs, discard, 1); + } +} + +/* + * FUNCTION + * + * _db_explain_ generates 'control' string for the current settings + * + * RETURN + * 0 - ok + * 1 - buffer too short, output truncated + * + */ + +/* helper macros */ +#define char_to_buf(C) do { \ + *buf++=(C); \ + if (buf >= end) goto overflow; \ + } while (0) +#define str_to_buf(S) do { \ + char_to_buf(','); \ + buf=strnmov(buf, (S), len+1); \ + if (buf >= end) goto overflow; \ + } while (0) +#define list_to_buf(l) do { \ + struct link *listp=(l); \ + while (listp) \ + { \ + str_to_buf(listp->str); \ + listp=listp->next_link; \ + } \ + } while (0) +#define int_to_buf(i) do { \ + char b[50]; \ + int10_to_str((i), b, 10); \ + str_to_buf(b); \ + } while (0) +#define colon_to_buf do { \ + if (buf != start) char_to_buf(':'); \ + } while(0) +#define op_int_to_buf(C, val, def) do { \ + if ((val) != (def)) \ + { \ + colon_to_buf; \ + char_to_buf((C)); \ + int_to_buf(val); \ + } \ + } while (0) +#define op_intf_to_buf(C, val, def, cond) do { \ + if ((cond)) \ + { \ + colon_to_buf; \ + char_to_buf((C)); \ + if ((val) != (def)) int_to_buf(val); \ + } \ + } while (0) +#define op_str_to_buf(C, val, cond) do { \ + if ((cond)) \ + { \ + char *s=(val); \ + colon_to_buf; \ + char_to_buf((C)); \ + if (*s) str_to_buf(s); \ + } \ + } while (0) +#define op_list_to_buf(C, val, cond) do { \ + if ((cond)) \ + { \ + colon_to_buf; \ + char_to_buf((C)); \ + list_to_buf(val); \ + } \ + } while (0) +#define op_bool_to_buf(C, cond) do { \ + if ((cond)) \ + { \ + colon_to_buf; \ + char_to_buf((C)); \ + } \ + } while (0) + +int _db_explain_ (CODE_STATE *cs, char *buf, size_t len) +{ + char *start=buf, *end=buf+len-4; + + get_code_state_or_return *buf=0; + + op_list_to_buf('d', cs->stack->keywords, DEBUGGING); + op_int_to_buf ('D', cs->stack->delay, 0); + op_list_to_buf('f', cs->stack->functions, cs->stack->functions); + op_bool_to_buf('F', cs->stack->flags & FILE_ON); + op_bool_to_buf('i', cs->stack->flags & PID_ON); + op_list_to_buf('g', cs->stack->p_functions, PROFILING); + op_bool_to_buf('L', cs->stack->flags & LINE_ON); + op_bool_to_buf('n', cs->stack->flags & DEPTH_ON); + op_bool_to_buf('N', cs->stack->flags & NUMBER_ON); + op_str_to_buf( + ((cs->stack->flags & FLUSH_ON_WRITE ? 0 : 32) | + (cs->stack->flags & OPEN_APPEND ? 'A' : 'O')), + cs->stack->name, cs->stack->out_file != stderr); + op_list_to_buf('p', cs->stack->processes, cs->stack->processes); + op_bool_to_buf('P', cs->stack->flags & PROCESS_ON); + op_bool_to_buf('r', cs->stack->sub_level != 0); + op_intf_to_buf('t', cs->stack->maxdepth, MAXDEPTH, TRACING); + op_bool_to_buf('T', cs->stack->flags & TIMESTAMP_ON); + op_bool_to_buf('S', cs->stack->flags & SANITY_CHECK_ON); + + *buf= '\0'; + return 0; + +overflow: + *end++= '.'; + *end++= '.'; + *end++= '.'; + *end= '\0'; + return 1; +} + +#undef char_to_buf +#undef str_to_buf +#undef list_to_buf +#undef int_to_buf +#undef colon_to_buf +#undef op_int_to_buf +#undef op_intf_to_buf +#undef op_str_to_buf +#undef op_list_to_buf +#undef op_bool_to_buf + +/* + * FUNCTION + * + * _db_explain_init_ explain initial debugger settings + * + * DESCRIPTION + * see _db_explain_ + */ + +int _db_explain_init_(char *buf, size_t len) +{ + CODE_STATE cs; + bzero((uchar*) &cs,sizeof(cs)); + cs.stack=&init_settings; + return _db_explain_(&cs, buf, len); +} + +/* + * FUNCTION + * + * _db_enter_ process entry point to user function + * + * SYNOPSIS + * + * VOID _db_enter_(_func_, _file_, _line_, + * _sfunc_, _sfile_, _slevel_, _sframep_) + * char *_func_; points to current function name + * char *_file_; points to current file name + * int _line_; called from source line number + * char **_sfunc_; save previous _func_ + * char **_sfile_; save previous _file_ + * int *_slevel_; save previous nesting level + * char ***_sframep_; save previous frame pointer + * + * DESCRIPTION + * + * Called at the beginning of each user function to tell + * the debugger that a new function has been entered. + * Note that the pointers to the previous user function + * name and previous user file name are stored on the + * caller's stack (this is why the ENTER macro must be + * the first "executable" code in a function, since it + * allocates these storage locations). The previous nesting + * level is also stored on the callers stack for internal + * self consistency checks. + * + * Also prints a trace line if tracing is enabled and + * increments the current function nesting depth. + * + * Note that this mechanism allows the debugger to know + * what the current user function is at all times, without + * maintaining an internal stack for the function names. + * + */ + +void _db_enter_(const char *_func_, const char *_file_, + uint _line_, const char **_sfunc_, const char **_sfile_, + uint *_slevel_, char ***_sframep_ __attribute__((unused))) +{ + int save_errno=errno; + CODE_STATE *cs=0; + get_code_state_or_return; + + *_sfunc_= cs->func; + *_sfile_= cs->file; + cs->func= _func_; + cs->file= _file_; + *_slevel_= ++cs->level; +#ifndef THREAD + *_sframep_= cs->framep; + cs->framep= (char **) _sframep_; + if (DoProfile(cs)) + { + long stackused; + if (*cs->framep == NULL) + stackused= 0; + else + { + stackused= ((long)(*cs->framep)) - ((long)(cs->framep)); + stackused= stackused > 0 ? stackused : -stackused; + } + (void) fprintf(cs->stack->prof_file, PROF_EFMT , Clock(), cs->func); +#ifdef AUTOS_REVERSE + (void) fprintf(cs->stack->prof_file, PROF_SFMT, cs->framep, stackused, *_sfunc_); +#else + (void) fprintf(cs->stack->prof_file, PROF_SFMT, (ulong) cs->framep, stackused, + cs->func); +#endif + (void) fflush(cs->stack->prof_file); + } +#endif + if (DoTrace(cs)) + { + if (!cs->locked) + pthread_mutex_lock(&THR_LOCK_dbug); + DoPrefix(cs, _line_); + Indent(cs, cs->level); + (void) fprintf(cs->stack->out_file, ">%s\n", cs->func); + dbug_flush(cs); /* This does a unlock */ + } +#ifdef SAFEMALLOC + if (cs->stack->flags & SANITY_CHECK_ON) + if (_sanity(_file_,_line_)) /* Check of safemalloc */ + cs->stack->flags &= ~SANITY_CHECK_ON; +#endif + errno=save_errno; +} + +/* + * FUNCTION + * + * _db_return_ process exit from user function + * + * SYNOPSIS + * + * VOID _db_return_(_line_, _sfunc_, _sfile_, _slevel_) + * int _line_; current source line number + * char **_sfunc_; where previous _func_ is to be retrieved + * char **_sfile_; where previous _file_ is to be retrieved + * int *_slevel_; where previous level was stashed + * + * DESCRIPTION + * + * Called just before user function executes an explicit or implicit + * return. Prints a trace line if trace is enabled, decrements + * the current nesting level, and restores the current function and + * file names from the defunct function's stack. + * + */ + +/* helper macro */ +void _db_return_(uint _line_, const char **_sfunc_, + const char **_sfile_, uint *_slevel_) +{ + int save_errno=errno; + CODE_STATE *cs=0; + get_code_state_or_return; + + if (cs->level != (int) *_slevel_) + { + if (!cs->locked) + pthread_mutex_lock(&THR_LOCK_dbug); + (void) fprintf(cs->stack->out_file, ERR_MISSING_RETURN, cs->process, + cs->func); + dbug_flush(cs); } else { - _db_on_=0; - } -} - - -/* - * FUNCTION - * - * _db_enter_ process entry point to user function - * - * SYNOPSIS - * - * VOID _db_enter_ (_func_, _file_, _line_, - * _sfunc_, _sfile_, _slevel_, _sframep_) - * char *_func_; points to current function name - * char *_file_; points to current file name - * int _line_; called from source line number - * char **_sfunc_; save previous _func_ - * char **_sfile_; save previous _file_ - * int *_slevel_; save previous nesting level - * char ***_sframep_; save previous frame pointer - * - * DESCRIPTION - * - * Called at the beginning of each user function to tell - * the debugger that a new function has been entered. - * Note that the pointers to the previous user function - * name and previous user file name are stored on the - * caller's stack (this is why the ENTER macro must be - * the first "executable" code in a function, since it - * allocates these storage locations). The previous nesting - * level is also stored on the callers stack for internal - * self consistency checks. - * - * Also prints a trace line if tracing is enabled and - * increments the current function nesting depth. - * - * Note that this mechanism allows the debugger to know - * what the current user function is at all times, without - * maintaining an internal stack for the function names. - * - */ - -void _db_enter_ ( -const char *_func_, -const char *_file_, -uint _line_, -const char **_sfunc_, -const char **_sfile_, -uint *_slevel_, -char ***_sframep_ __attribute__((unused))) -{ - reg1 CODE_STATE *state; - - if (!_no_db_) - { - int save_errno=errno; - /* - Sasha: the test below is so we could call functions with DBUG_ENTER - before my_thread_init(). I needed this because I suspected corruption - of a block allocated by my_thread_init() itself, so I wanted to use - my_malloc()/my_free() in my_thread_init()/my_thread_end() - */ - if (!(state=code_state())) - return; - if (!init_done) - _db_push_ (_DBUG_START_CONDITION_); - - *_sfunc_ = state->func; - *_sfile_ = state->file; - state->func =(char*) _func_; - state->file = (char*) _file_; /* BaseName takes time !! */ - *_slevel_ = ++state->level; -#ifndef THREAD - *_sframep_ = state->framep; - state->framep = (char **) _sframep_; - if (DoProfile ()) - { - long stackused; - if (*state->framep == NULL) - { - stackused = 0; - } - else - { - stackused = ((long)(*state->framep)) - ((long)(state->framep)); - stackused = stackused > 0 ? stackused : -stackused; - } - (void) fprintf (_db_pfp_, PROF_EFMT , Clock (), state->func); -#ifdef AUTOS_REVERSE - (void) fprintf (_db_pfp_, PROF_SFMT, state->framep, stackused, *_sfunc_); -#else - (void) fprintf (_db_pfp_, PROF_SFMT, (ulong) state->framep, stackused, - state->func); -#endif - (void) fflush (_db_pfp_); - } -#endif - if (DoTrace(state)) - { - if (!state->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix (_line_); - Indent (state -> level); - (void) fprintf (_db_fp_, ">%s\n", state->func); - dbug_flush (state); /* This does a unlock */ - } #ifdef SAFEMALLOC - if (stack->flags & SANITY_CHECK_ON && !state->disable_output) - if (_sanity(_file_,_line_)) /* Check of safemalloc */ - stack -> flags &= ~SANITY_CHECK_ON; -#endif - errno=save_errno; - } -} - -/* - * FUNCTION - * - * _db_return_ process exit from user function - * - * SYNOPSIS - * - * VOID _db_return_ (_line_, _sfunc_, _sfile_, _slevel_) - * int _line_; current source line number - * char **_sfunc_; where previous _func_ is to be retrieved - * char **_sfile_; where previous _file_ is to be retrieved - * int *_slevel_; where previous level was stashed - * - * DESCRIPTION - * - * Called just before user function executes an explicit or implicit - * return. Prints a trace line if trace is enabled, decrements - * the current nesting level, and restores the current function and - * file names from the defunct function's stack. - * - */ - -void _db_return_ ( -uint _line_, -const char **_sfunc_, -const char **_sfile_, -uint *_slevel_) -{ - CODE_STATE *state; - - if (!_no_db_) - { - int save_errno=errno; - if (!(state=code_state())) - return; - if (!init_done) - _db_push_ (""); - if (stack->flags & (TRACE_ON | DEBUG_ON | PROFILE_ON)) + if (cs->stack->flags & SANITY_CHECK_ON) { - if (!state->locked) - pthread_mutex_lock(&THR_LOCK_dbug); - if (state->level != (int) *_slevel_) - (void) fprintf (_db_fp_, ERR_MISSING_RETURN, _db_process_, - state->func); - else - { -#ifdef SAFEMALLOC - if (stack->flags & SANITY_CHECK_ON && !state->disable_output) - { - if (_sanity(*_sfile_,_line_)) - stack->flags &= ~SANITY_CHECK_ON; - } -#endif -#ifndef THREAD - if (DoProfile ()) - (void) fprintf (_db_pfp_, PROF_XFMT, Clock(), state->func); -#endif - if (DoTrace (state)) - { - DoPrefix (_line_); - Indent (state->level); - (void) fprintf (_db_fp_, "<%s\n", state->func); - } - } - dbug_flush(state); + if (_sanity(*_sfile_,_line_)) + cs->stack->flags &= ~SANITY_CHECK_ON; } - state->level = *_slevel_-1; - state->func = *_sfunc_; - state->file = *_sfile_; -#ifndef THREAD - if (state->framep != NULL) - state->framep = (char **) *state->framep; #endif - errno=save_errno; +#ifndef THREAD + if (DoProfile(cs)) + (void) fprintf(cs->stack->prof_file, PROF_XFMT, Clock(), cs->func); +#endif + if (DoTrace(cs)) + { + if (!cs->locked) + pthread_mutex_lock(&THR_LOCK_dbug); + DoPrefix(cs, _line_); + Indent(cs, cs->level); + (void) fprintf(cs->stack->out_file, "<%s\n", cs->func); + dbug_flush(cs); + } } + cs->level= *_slevel_-1; + cs->func= *_sfunc_; + cs->file= *_sfile_; +#ifndef THREAD + if (cs->framep != NULL) + cs->framep= (char **) *cs->framep; +#endif + errno=save_errno; } /* * FUNCTION * - * _db_pargs_ log arguments for subsequent use by _db_doprnt_() + * _db_pargs_ log arguments for subsequent use by _db_doprnt_() * * SYNOPSIS * - * VOID _db_pargs_ (_line_, keyword) - * int _line_; - * char *keyword; + * VOID _db_pargs_(_line_, keyword) + * int _line_; + * char *keyword; * * DESCRIPTION * - * The new universal printing macro DBUG_PRINT, which replaces - * all forms of the DBUG_N macros, needs two calls to runtime - * support routines. The first, this function, remembers arguments - * that are used by the subsequent call to _db_doprnt_(). + * The new universal printing macro DBUG_PRINT, which replaces + * all forms of the DBUG_N macros, needs two calls to runtime + * support routines. The first, this function, remembers arguments + * that are used by the subsequent call to _db_doprnt_(). * */ -void _db_pargs_ ( -uint _line_, -const char *keyword) +void _db_pargs_(uint _line_, const char *keyword) { - CODE_STATE *state=code_state(); - /* Sasha: pre-my_thread_init() safety */ - if (!state) - return; - state->u_line = _line_; - state->u_keyword = (char*) keyword; + CODE_STATE *cs=0; + get_code_state_or_return; + cs->u_line= _line_; + cs->u_keyword= keyword; } /* * FUNCTION * - * _db_doprnt_ handle print of debug lines + * _db_doprnt_ handle print of debug lines * * SYNOPSIS * - * VOID _db_doprnt_ (format, va_alist) - * char *format; - * va_dcl; + * VOID _db_doprnt_(format, va_alist) + * char *format; + * va_dcl; * * DESCRIPTION * - * When invoked via one of the DBUG macros, tests the current keyword - * set by calling _db_pargs_() to see if that macro has been selected - * for processing via the debugger control string, and if so, handles - * printing of the arguments via the format string. The line number - * of the DBUG macro in the source is found in u_line. + * When invoked via one of the DBUG macros, tests the current keyword + * set by calling _db_pargs_() to see if that macro has been selected + * for processing via the debugger control string, and if so, handles + * printing of the arguments via the format string. The line number + * of the DBUG macro in the source is found in u_line. * - * Note that the format string SHOULD NOT include a terminating - * newline, this is supplied automatically. + * Note that the format string SHOULD NOT include a terminating + * newline, this is supplied automatically. * */ #include -void _db_doprnt_ (const char *format,...) +void _db_doprnt_(const char *format,...) { va_list args; - CODE_STATE *state; - /* Sasha: pre-my_thread_init() safety */ - if (!(state=code_state())) - return; + + CODE_STATE *cs=0; + get_code_state_or_return; va_start(args,format); - if (_db_keyword_ (state->u_keyword)) { + if (_db_keyword_(cs, cs->u_keyword)) + { int save_errno=errno; - if (!state->locked) + if (!cs->locked) pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix (state->u_line); - if (TRACING) { - Indent (state->level + 1); - } else { - (void) fprintf (_db_fp_, "%s: ", state->func); - } - (void) fprintf (_db_fp_, "%s: ", state->u_keyword); - (void) vfprintf (_db_fp_, format, args); - (void) fputc('\n',_db_fp_); - dbug_flush(state); + DoPrefix(cs, cs->u_line); + if (TRACING) + Indent(cs, cs->level + 1); + else + (void) fprintf(cs->stack->out_file, "%s: ", cs->func); + (void) fprintf(cs->stack->out_file, "%s: ", cs->u_keyword); + (void) vfprintf(cs->stack->out_file, format, args); + (void) fputc('\n',cs->stack->out_file); + dbug_flush(cs); errno=save_errno; } va_end(args); @@ -928,46 +1174,43 @@ void _db_doprnt_ (const char *format,...) * * SYNOPSIS * - * void _db_dump_ (_line_,keyword,memory,length) - * int _line_; current source line number - * char *keyword; - * char *memory; Memory to print - * int length; Bytes to print + * void _db_dump_(_line_,keyword,memory,length) + * int _line_; current source line number + * char *keyword; + * char *memory; Memory to print + * int length; Bytes to print * * DESCRIPTION * Dump N characters in a binary array. * Is used to examine corrputed memory or arrays. */ -void _db_dump_( -uint _line_, -const char *keyword, -const char *memory, -uint length) +void _db_dump_(uint _line_, const char *keyword, + const unsigned char *memory, size_t length) { int pos; char dbuff[90]; - CODE_STATE *state; - if (!(state=code_state())) - return; - if (_db_keyword_ ((char*) keyword)) + CODE_STATE *cs=0; + get_code_state_or_return; + + if (_db_keyword_(cs, keyword)) { - if (!state->locked) + if (!cs->locked) pthread_mutex_lock(&THR_LOCK_dbug); - DoPrefix (_line_); + DoPrefix(cs, _line_); if (TRACING) { - Indent (state->level + 1); - pos= min(max(state->level-stack->sub_level,0)*INDENT,80); + Indent(cs, cs->level + 1); + pos= min(max(cs->level-cs->stack->sub_level,0)*INDENT,80); } else { - fprintf(_db_fp_, "%s: ", state->func); + fprintf(cs->stack->out_file, "%s: ", cs->func); } - sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%d)\n", - keyword,(ulong) memory, length); - (void) fputs(dbuff,_db_fp_); + sprintf(dbuff,"%s: Memory: 0x%lx Bytes: (%ld)\n", + keyword, (ulong) memory, (long) length); + (void) fputs(dbuff,cs->stack->out_file); pos=0; while (length-- > 0) @@ -975,176 +1218,231 @@ uint length) uint tmp= *((unsigned char*) memory++); if ((pos+=3) >= 80) { - fputc('\n',_db_fp_); - pos=3; + fputc('\n',cs->stack->out_file); + pos=3; } - fputc(_dig_vec_upper[((tmp >> 4) & 15)], _db_fp_); - fputc(_dig_vec_upper[tmp & 15], _db_fp_); - fputc(' ',_db_fp_); + fputc(_dig_vec_upper[((tmp >> 4) & 15)], cs->stack->out_file); + fputc(_dig_vec_upper[tmp & 15], cs->stack->out_file); + fputc(' ',cs->stack->out_file); } - (void) fputc('\n',_db_fp_); - dbug_flush(state); + (void) fputc('\n',cs->stack->out_file); + dbug_flush(cs); } } -/* - Enable/Disable output for this thread - - SYNOPSIS - _db_output_() - flag 1 = enable output, 0 = disable_output - -*/ - -void _db_output_(uint flag) -{ - CODE_STATE *state; - if (!(state=code_state())) - return; - state->disable_output= !flag; -} - - /* * FUNCTION * - * ListParse parse list of modifiers in debug control string + * ListAdd add to the list modifiers from debug control string * * SYNOPSIS * - * static struct link *ListParse (ctlp) - * char *ctlp; + * static struct link *ListAdd(listp, ctlp, end) + * struct link *listp; + * char *ctlp; + * char *end; * * DESCRIPTION * - * Given pointer to a comma separated list of strings in "cltp", - * parses the list, building a list and returning a pointer to it. - * The original comma separated list is destroyed in the process of - * building the linked list, thus it had better be a duplicate - * if it is important. + * Given pointer to a comma separated list of strings in "cltp", + * parses the list, and adds it to listp, returning a pointer + * to the new list * - * Note that since each link is added at the head of the list, - * the final list will be in "reverse order", which is not - * significant for our usage here. + * Note that since each link is added at the head of the list, + * the final list will be in "reverse order", which is not + * significant for our usage here. * */ -static struct link *ListParse ( -char *ctlp) +static struct link *ListAdd(struct link *head, + const char *ctlp, const char *end) { - REGISTER char *start; - REGISTER struct link *new_malloc; - REGISTER struct link *head; + const char *start; + struct link *new_malloc; + int len; - head = NULL; - while (*ctlp != EOS) { - start = ctlp; - while (*ctlp != EOS && *ctlp != ',') { + while (ctlp < end) + { + start= ctlp; + while (ctlp < end && *ctlp != ',') ctlp++; - } - if (*ctlp == ',') { - *ctlp++ = EOS; - } - new_malloc = (struct link *) DbugMalloc (sizeof (struct link)); - new_malloc -> str = StrDup (start); - new_malloc -> next_link = head; - head = new_malloc; + len=ctlp-start; + new_malloc= (struct link *) DbugMalloc(sizeof(struct link)+len); + memcpy(new_malloc->str, start, len); + new_malloc->str[len]=0; + new_malloc->next_link= head; + head= new_malloc; + ctlp++; } - return (head); + return head; } /* * FUNCTION * - * InList test a given string for member of a given list + * ListDel remove from the list modifiers in debug control string * * SYNOPSIS * - * static BOOLEAN InList (linkp, cp) - * struct link *linkp; - * char *cp; + * static struct link *ListDel(listp, ctlp, end) + * struct link *listp; + * char *ctlp; + * char *end; * * DESCRIPTION * - * Tests the string pointed to by "cp" to determine if it is in - * the list pointed to by "linkp". Linkp points to the first - * link in the list. If linkp is NULL then the string is treated - * as if it is in the list (I.E all strings are in the null list). - * This may seem rather strange at first but leads to the desired - * operation if no list is given. The net effect is that all - * strings will be accepted when there is no list, and when there - * is a list, only those strings in the list will be accepted. + * Given pointer to a comma separated list of strings in "cltp", + * parses the list, and removes these strings from the listp, + * returning a pointer to the new list. * */ -static BOOLEAN InList ( -struct link *linkp, -const char *cp) +static struct link *ListDel(struct link *head, + const char *ctlp, const char *end) +{ + const char *start; + struct link **cur; + int len; + + while (ctlp < end) + { + start= ctlp; + while (ctlp < end && *ctlp != ',') + ctlp++; + len=ctlp-start; + cur=&head; + do + { + while (*cur && !strncmp((*cur)->str, start, len)) + { + struct link *delme=*cur; + *cur=(*cur)->next_link; + free((void*) delme); + } + } while (*cur && *(cur=&((*cur)->next_link))); + } + return head; +} + +/* + * FUNCTION + * + * ListCopy make a copy of the list + * + * SYNOPSIS + * + * static struct link *ListCopy(orig) + * struct link *orig; + * + * DESCRIPTION + * + * Given pointer to list, which contains a copy of every element from + * the original list. + * + * the orig pointer can be NULL + * + * Note that since each link is added at the head of the list, + * the final list will be in "reverse order", which is not + * significant for our usage here. + * + */ + +static struct link *ListCopy(struct link *orig) +{ + struct link *new_malloc; + struct link *head; + int len; + + head= NULL; + while (orig != NULL) + { + len= strlen(orig->str); + new_malloc= (struct link *) DbugMalloc(sizeof(struct link)+len); + memcpy(new_malloc->str, orig->str, len); + new_malloc->str[len]= 0; + new_malloc->next_link= head; + head= new_malloc; + orig= orig->next_link; + } + return head; +} + +/* + * FUNCTION + * + * InList test a given string for member of a given list + * + * SYNOPSIS + * + * static BOOLEAN InList(linkp, cp) + * struct link *linkp; + * char *cp; + * + * DESCRIPTION + * + * Tests the string pointed to by "cp" to determine if it is in + * the list pointed to by "linkp". Linkp points to the first + * link in the list. If linkp is NULL then the string is treated + * as if it is in the list (I.E all strings are in the null list). + * This may seem rather strange at first but leads to the desired + * operation if no list is given. The net effect is that all + * strings will be accepted when there is no list, and when there + * is a list, only those strings in the list will be accepted. + * + */ + +static BOOLEAN InList(struct link *linkp, const char *cp) { REGISTER struct link *scan; REGISTER BOOLEAN result; - if (linkp == NULL) { - result = TRUE; - } else { - result = FALSE; - for (scan = linkp; scan != NULL; scan = scan -> next_link) { - if (STREQ (scan -> str, cp)) { - result = TRUE; - break; + if (linkp == NULL) + result= TRUE; + else + { + result= FALSE; + for (scan= linkp; scan != NULL; scan= scan->next_link) + { + if (!strcmp(scan->str, cp)) + { + result= TRUE; + break; } } } - return (result); + return result; } /* * FUNCTION * - * PushState push current state onto stack and set up new one + * PushState push current settings onto stack and set up new one * * SYNOPSIS * - * static VOID PushState () + * static VOID PushState() * * DESCRIPTION * - * Pushes the current state on the state stack, and initializes - * a new state. The only parameter inherited from the previous - * state is the function nesting level. This action can be - * inhibited if desired, via the "r" flag. + * Pushes the current settings on the settings stack, and creates + * a new settings. The new settings is NOT initialized * - * The state stack is a linked list of states, with the new - * state added at the head. This allows the stack to grow - * to the limits of memory if necessary. + * The settings stack is a linked list of settings, with the new + * settings added at the head. This allows the stack to grow + * to the limits of memory if necessary. * */ -static void PushState () +static void PushState(CODE_STATE *cs) { - REGISTER struct state *new_malloc; + struct settings *new_malloc; - if (!init_done) - { - init_dbug_state(); - init_done=TRUE; - } - (void) code_state(); /* Alloc memory */ - new_malloc = (struct state *) DbugMalloc(sizeof (struct state)); - new_malloc -> flags = 0; - new_malloc -> delay = 0; - new_malloc -> maxdepth = MAXDEPTH; - new_malloc -> sub_level=0; - new_malloc -> out_file = stderr; - new_malloc -> prof_file = (FILE*) 0; - new_malloc -> functions = NULL; - new_malloc -> p_functions = NULL; - new_malloc -> keywords = NULL; - new_malloc -> processes = NULL; - new_malloc -> next_state = stack; - stack=new_malloc; + new_malloc= (struct settings *) DbugMalloc(sizeof(struct settings)); + new_malloc->next= cs->stack; + new_malloc->out_file= NULL; + cs->stack= new_malloc; } /* @@ -1156,32 +1454,31 @@ static void PushState () * * static void FreeState (state) * struct state *state; + * int free_state; * * DESCRIPTION * * Deallocates the memory allocated for various information in a - * state. + * state. If free_state is set, also free 'state' * */ -static void FreeState ( -struct state *state) +static void FreeState(CODE_STATE *cs, struct settings *state, int free_state) { - if (state -> keywords != NULL) { - FreeList (state -> keywords); - } - if (state -> functions != NULL) { - FreeList (state -> functions); - } - if (state -> processes != NULL) { - FreeList (state -> processes); - } - if (state -> p_functions != NULL) { - FreeList (state -> p_functions); - } - CloseFile (state -> out_file); - if (state -> prof_file) - CloseFile (state -> prof_file); - free ((char *) state); + if (!is_shared(state, keywords)) + FreeList(state->keywords); + if (!is_shared(state, functions)) + FreeList(state->functions); + if (!is_shared(state, processes)) + FreeList(state->processes); + if (!is_shared(state, p_functions)) + FreeList(state->p_functions); + if (!is_shared(state, out_file)) + DBUGCloseFile(cs, state->out_file); + (void) fflush(cs->stack->out_file); + if (state->prof_file) + DBUGCloseFile(cs, state->prof_file); + if (free_state) + free((void*) state); } @@ -1202,85 +1499,104 @@ struct state *state) * To be called at the very end of the program. * */ -void _db_end_ () +void _db_end_() { - reg1 struct state *discard; - while((discard= stack) != NULL) { - stack= discard -> next_state; - FreeState (discard); + struct settings *discard; + static struct settings tmp; + CODE_STATE *cs=0; + + get_code_state_or_return; + + while ((discard= cs->stack)) + { + if (discard == &init_settings) + break; + cs->stack= discard->next; + FreeState(cs, discard, 1); } - _db_on_=0; + tmp= init_settings; + + /* Use mutex lock to make it less likely anyone access out_file */ + pthread_mutex_lock(&THR_LOCK_dbug); + init_settings.flags= OPEN_APPEND; + init_settings.out_file= stderr; + init_settings.prof_file= stderr; + init_settings.maxdepth= 0; + init_settings.delay= 0; + init_settings.sub_level= 0; + init_settings.functions= 0; + init_settings.p_functions= 0; + init_settings.keywords= 0; + init_settings.processes= 0; + pthread_mutex_unlock(&THR_LOCK_dbug); + FreeState(cs, &tmp, 0); } /* * FUNCTION * - * DoTrace check to see if tracing is current enabled + * DoTrace check to see if tracing is current enabled * * SYNOPSIS * - * static BOOLEAN DoTrace (stack) + * static BOOLEAN DoTrace(stack) * * DESCRIPTION * - * Checks to see if tracing is enabled based on whether the - * user has specified tracing, the maximum trace depth has - * not yet been reached, the current function is selected, - * and the current process is selected. Returns TRUE if - * tracing is enabled, FALSE otherwise. + * Checks to see if tracing is enabled based on whether the + * user has specified tracing, the maximum trace depth has + * not yet been reached, the current function is selected, + * and the current process is selected. Returns TRUE if + * tracing is enabled, FALSE otherwise. * */ -static BOOLEAN DoTrace (CODE_STATE *state) +static BOOLEAN DoTrace(CODE_STATE *cs) { - reg2 BOOLEAN trace=FALSE; - - if (TRACING && !state->disable_output && - state->level <= stack -> maxdepth && - InList (stack -> functions, state->func) && - InList (stack -> processes, _db_process_)) - trace = TRUE; - return (trace); + return (TRACING && cs->level <= cs->stack->maxdepth && + InList(cs->stack->functions, cs->func) && + InList(cs->stack->processes, cs->process)); } /* * FUNCTION * - * DoProfile check to see if profiling is current enabled + * DoProfile check to see if profiling is current enabled * * SYNOPSIS * - * static BOOLEAN DoProfile () + * static BOOLEAN DoProfile() * * DESCRIPTION * - * Checks to see if profiling is enabled based on whether the - * user has specified profiling, the maximum trace depth has - * not yet been reached, the current function is selected, - * and the current process is selected. Returns TRUE if - * profiling is enabled, FALSE otherwise. + * Checks to see if profiling is enabled based on whether the + * user has specified profiling, the maximum trace depth has + * not yet been reached, the current function is selected, + * and the current process is selected. Returns TRUE if + * profiling is enabled, FALSE otherwise. * */ #ifndef THREAD -static BOOLEAN DoProfile () +static BOOLEAN DoProfile(CODE_STATE *cs) { - REGISTER BOOLEAN profile; - CODE_STATE *state; - state=code_state(); - - profile = FALSE; - if (PROFILING && !state->disable_output && - state->level <= stack -> maxdepth && - InList (stack -> p_functions, state->func) && - InList (stack -> processes, _db_process_)) - profile = TRUE; - return (profile); + return PROFILING && + cs->level <= cs->stack->maxdepth && + InList(cs->stack->p_functions, cs->func) && + InList(cs->stack->processes, cs->process); } #endif +FILE *_db_fp_(void) +{ + CODE_STATE *cs=0; + get_code_state_or_return NULL; + return cs->stack->out_file; +} + + /* * FUNCTION * @@ -1288,7 +1604,7 @@ static BOOLEAN DoProfile () * * SYNOPSIS * - * BOOLEAN _db_strict_keyword_ (keyword) + * BOOLEAN _db_strict_keyword_(keyword) * char *keyword; * * DESCRIPTION @@ -1301,93 +1617,83 @@ static BOOLEAN DoProfile () * */ -BOOLEAN _db_strict_keyword_ ( -const char *keyword) +BOOLEAN _db_strict_keyword_(const char *keyword) { - if (stack -> keywords == NULL) + CODE_STATE *cs=0; + get_code_state_or_return FALSE; + if (!DEBUGGING || cs->stack->keywords == NULL) return FALSE; - return _db_keyword_ (keyword); + return _db_keyword_(cs, keyword); } /* * FUNCTION * - * _db_keyword_ test keyword for member of keyword list + * _db_keyword_ test keyword for member of keyword list * * SYNOPSIS * - * BOOLEAN _db_keyword_ (keyword) - * char *keyword; + * BOOLEAN _db_keyword_(keyword) + * char *keyword; * * DESCRIPTION * - * Test a keyword to determine if it is in the currently active - * keyword list. As with the function list, a keyword is accepted - * if the list is null, otherwise it must match one of the list - * members. When debugging is not on, no keywords are accepted. - * After the maximum trace level is exceeded, no keywords are - * accepted (this behavior subject to change). Additionally, - * the current function and process must be accepted based on - * their respective lists. + * Test a keyword to determine if it is in the currently active + * keyword list. As with the function list, a keyword is accepted + * if the list is null, otherwise it must match one of the list + * members. When debugging is not on, no keywords are accepted. + * After the maximum trace level is exceeded, no keywords are + * accepted (this behavior subject to change). Additionally, + * the current function and process must be accepted based on + * their respective lists. * - * Returns TRUE if keyword accepted, FALSE otherwise. + * Returns TRUE if keyword accepted, FALSE otherwise. * */ -BOOLEAN _db_keyword_ ( -const char *keyword) +BOOLEAN _db_keyword_(CODE_STATE *cs, const char *keyword) { - REGISTER BOOLEAN result; - CODE_STATE *state; + get_code_state_or_return FALSE; - if (!init_done) - _db_push_ (""); - /* Sasha: pre-my_thread_init() safety */ - if (!(state=code_state())) - return FALSE; - result = FALSE; - if (DEBUGGING && !state->disable_output && - state->level <= stack -> maxdepth && - InList (stack -> functions, state->func) && - InList (stack -> keywords, keyword) && - InList (stack -> processes, _db_process_)) - result = TRUE; - return (result); + return (DEBUGGING && + (!TRACING || cs->level <= cs->stack->maxdepth) && + InList(cs->stack->functions, cs->func) && + InList(cs->stack->keywords, keyword) && + InList(cs->stack->processes, cs->process)); } /* * FUNCTION * - * Indent indent a line to the given indentation level + * Indent indent a line to the given indentation level * * SYNOPSIS * - * static VOID Indent (indent) - * int indent; + * static VOID Indent(indent) + * int indent; * * DESCRIPTION * - * Indent a line to the given level. Note that this is - * a simple minded but portable implementation. - * There are better ways. + * Indent a line to the given level. Note that this is + * a simple minded but portable implementation. + * There are better ways. * - * Also, the indent must be scaled by the compile time option - * of character positions per nesting level. + * Also, the indent must be scaled by the compile time option + * of character positions per nesting level. * */ -static void Indent ( -int indent) +static void Indent(CODE_STATE *cs, int indent) { REGISTER int count; - indent= max(indent-1-stack->sub_level,0)*INDENT; - for (count = 0; count < indent ; count++) + indent= max(indent-1-cs->stack->sub_level,0)*INDENT; + for (count= 0; count < indent ; count++) { if ((count % INDENT) == 0) - fputc('|',_db_fp_); + fputc('|',cs->stack->out_file); else - fputc(' ',_db_fp_); + fputc(' ',cs->stack->out_file); } } @@ -1395,32 +1701,29 @@ int indent) /* * FUNCTION * - * FreeList free all memory associated with a linked list + * FreeList free all memory associated with a linked list * * SYNOPSIS * - * static VOID FreeList (linkp) - * struct link *linkp; + * static VOID FreeList(linkp) + * struct link *linkp; * * DESCRIPTION * - * Given pointer to the head of a linked list, frees all - * memory held by the list and the members of the list. + * Given pointer to the head of a linked list, frees all + * memory held by the list and the members of the list. * */ -static void FreeList ( -struct link *linkp) +static void FreeList(struct link *linkp) { REGISTER struct link *old; - while (linkp != NULL) { - old = linkp; - linkp = linkp -> next_link; - if (old -> str != NULL) { - free (old -> str); - } - free ((char *) old); + while (linkp != NULL) + { + old= linkp; + linkp= linkp->next_link; + free((void*) old); } } @@ -1428,139 +1731,140 @@ struct link *linkp) /* * FUNCTION * - * StrDup make a duplicate of a string in new memory + * DoPrefix print debugger line prefix prior to indentation * * SYNOPSIS * - * static char *StrDup (my_string) - * char *string; + * static VOID DoPrefix(_line_) + * int _line_; * * DESCRIPTION * - * Given pointer to a string, allocates sufficient memory to make - * a duplicate copy, and copies the string to the newly allocated - * memory. Failure to allocated sufficient memory is immediately - * fatal. + * Print prefix common to all debugger output lines, prior to + * doing indentation if necessary. Print such information as + * current process name, current source file name and line number, + * and current function nesting depth. * */ - -static char *StrDup (const char *str) +static void DoPrefix(CODE_STATE *cs, uint _line_) { - reg1 char *new_malloc; - new_malloc = DbugMalloc((size_t) strlen (str) + 1); - (void) strcpy (new_malloc, str); - return (new_malloc); -} - - -/* - * FUNCTION - * - * DoPrefix print debugger line prefix prior to indentation - * - * SYNOPSIS - * - * static VOID DoPrefix (_line_) - * int _line_; - * - * DESCRIPTION - * - * Print prefix common to all debugger output lines, prior to - * doing indentation if necessary. Print such information as - * current process name, current source file name and line number, - * and current function nesting depth. - * - */ - -static void DoPrefix ( -uint _line_) -{ - CODE_STATE *state; - state=code_state(); - - state->lineno++; - if (stack -> flags & PID_ON) { + cs->lineno++; + if (cs->stack->flags & PID_ON) + { #ifdef THREAD - (void) fprintf (_db_fp_, "%-7s: ", my_thread_name()); + (void) fprintf(cs->stack->out_file, "%-7s: ", my_thread_name()); #else - (void) fprintf (_db_fp_, "%5d: ", (int) getpid ()); + (void) fprintf(cs->stack->out_file, "%5d: ", (int) getpid()); #endif } - if (stack -> flags & NUMBER_ON) { - (void) fprintf (_db_fp_, "%5d: ", state->lineno); - } - if (stack -> flags & PROCESS_ON) { - (void) fprintf (_db_fp_, "%s: ", _db_process_); - } - if (stack -> flags & FILE_ON) { - (void) fprintf (_db_fp_, "%14s: ", BaseName(state->file)); - } - if (stack -> flags & LINE_ON) { - (void) fprintf (_db_fp_, "%5d: ", _line_); - } - if (stack -> flags & DEPTH_ON) { - (void) fprintf (_db_fp_, "%4d: ", state->level); + if (cs->stack->flags & NUMBER_ON) + (void) fprintf(cs->stack->out_file, "%5d: ", cs->lineno); + if (cs->stack->flags & TIMESTAMP_ON) + { +#ifdef __WIN__ + /* FIXME This doesn't give microseconds as in Unix case, and the resolution is + in system ticks, 10 ms intervals. See my_getsystime.c for high res */ + SYSTEMTIME loc_t; + GetLocalTime(&loc_t); + (void) fprintf (cs->stack->out_file, + /* "%04d-%02d-%02d " */ + "%02d:%02d:%02d.%06d ", + /*tm_p->tm_year + 1900, tm_p->tm_mon + 1, tm_p->tm_mday,*/ + loc_t.wHour, loc_t.wMinute, loc_t.wSecond, loc_t.wMilliseconds); +#else + struct timeval tv; + struct tm *tm_p; + if (gettimeofday(&tv, NULL) != -1) + { + if ((tm_p= localtime((const time_t *)&tv.tv_sec))) + { + (void) fprintf (cs->stack->out_file, + /* "%04d-%02d-%02d " */ + "%02d:%02d:%02d.%06d ", + /*tm_p->tm_year + 1900, tm_p->tm_mon + 1, tm_p->tm_mday,*/ + tm_p->tm_hour, tm_p->tm_min, tm_p->tm_sec, + (int) (tv.tv_usec)); + } + } +#endif } + if (cs->stack->flags & PROCESS_ON) + (void) fprintf(cs->stack->out_file, "%s: ", cs->process); + if (cs->stack->flags & FILE_ON) + (void) fprintf(cs->stack->out_file, "%14s: ", BaseName(cs->file)); + if (cs->stack->flags & LINE_ON) + (void) fprintf(cs->stack->out_file, "%5d: ", _line_); + if (cs->stack->flags & DEPTH_ON) + (void) fprintf(cs->stack->out_file, "%4d: ", cs->level); } /* * FUNCTION * - * DBUGOpenFile open new output stream for debugger output + * DBUGOpenFile open new output stream for debugger output * * SYNOPSIS * - * static VOID DBUGOpenFile (name) - * char *name; + * static VOID DBUGOpenFile(name) + * char *name; * * DESCRIPTION * - * Given name of a new file (or "-" for stdout) opens the file - * and sets the output stream to the new file. + * Given name of a new file (or "-" for stdout) opens the file + * and sets the output stream to the new file. * */ -static void DBUGOpenFile (const char *name,int append) +static void DBUGOpenFile(CODE_STATE *cs, + const char *name,const char *end,int append) { REGISTER FILE *fp; REGISTER BOOLEAN newfile; if (name != NULL) { - strmov(stack->name,name); - if (strcmp (name, "-") == 0) + if (end) { - _db_fp_ = stdout; - stack -> out_file = _db_fp_; - stack -> flags |= FLUSH_ON_WRITE; + int len=end-name; + memcpy(cs->stack->name, name, len); + cs->stack->name[len]=0; + } + else + strmov(cs->stack->name,name); + name=cs->stack->name; + if (strcmp(name, "-") == 0) + { + cs->stack->out_file= stdout; + cs->stack->flags |= FLUSH_ON_WRITE; + cs->stack->name[0]=0; } else { - if (!Writable((char*)name)) + if (!Writable(name)) { - (void) fprintf (stderr, ERR_OPEN, _db_process_, name); - perror (""); - fflush(stderr); + (void) fprintf(stderr, ERR_OPEN, cs->process, name); + perror(""); + fflush(stderr); } else { - newfile= !EXISTS (name); - if (!(fp = fopen(name, append ? "a+" : "w"))) - { - (void) fprintf (stderr, ERR_OPEN, _db_process_, name); - perror (""); - fflush(stderr); - } - else - { - _db_fp_ = fp; - stack -> out_file = fp; - if (newfile) { - ChangeOwner (name); - } - } + newfile= !EXISTS(name); + if (!(fp= fopen(name, append ? "a+" : "w"))) + { + (void) fprintf(stderr, ERR_OPEN, cs->process, name); + perror(""); + fflush(stderr); + } + else + { + cs->stack->out_file= fp; + if (newfile) + { + ChangeOwner(cs, name); + } + } } } } @@ -1570,59 +1874,56 @@ static void DBUGOpenFile (const char *name,int append) /* * FUNCTION * - * OpenProfile open new output stream for profiler output + * OpenProfile open new output stream for profiler output * * SYNOPSIS * - * static FILE *OpenProfile (name) - * char *name; + * static FILE *OpenProfile(name) + * char *name; * * DESCRIPTION * - * Given name of a new file, opens the file - * and sets the profiler output stream to the new file. + * Given name of a new file, opens the file + * and sets the profiler output stream to the new file. * - * It is currently unclear whether the prefered behavior is - * to truncate any existing file, or simply append to it. - * The latter behavior would be desirable for collecting - * accumulated runtime history over a number of separate - * runs. It might take some changes to the analyzer program - * though, and the notes that Binayak sent with the profiling - * diffs indicated that append was the normal mode, but this - * does not appear to agree with the actual code. I haven't - * investigated at this time [fnf; 24-Jul-87]. + * It is currently unclear whether the prefered behavior is + * to truncate any existing file, or simply append to it. + * The latter behavior would be desirable for collecting + * accumulated runtime history over a number of separate + * runs. It might take some changes to the analyzer program + * though, and the notes that Binayak sent with the profiling + * diffs indicated that append was the normal mode, but this + * does not appear to agree with the actual code. I haven't + * investigated at this time [fnf; 24-Jul-87]. */ #ifndef THREAD -static FILE *OpenProfile (const char *name) +static FILE *OpenProfile(CODE_STATE *cs, const char *name) { REGISTER FILE *fp; REGISTER BOOLEAN newfile; fp=0; - if (!Writable (name)) + if (!Writable(name)) { - (void) fprintf (_db_fp_, ERR_OPEN, _db_process_, name); - perror (""); - dbug_flush(0); - (void) Delay (stack -> delay); + (void) fprintf(cs->stack->out_file, ERR_OPEN, cs->process, name); + perror(""); + (void) Delay(cs->stack->delay); } else { - newfile= !EXISTS (name); - if (!(fp = fopen (name, "w"))) + newfile= !EXISTS(name); + if (!(fp= fopen(name, "w"))) { - (void) fprintf (_db_fp_, ERR_OPEN, _db_process_, name); - perror (""); - dbug_flush(0); + (void) fprintf(cs->stack->out_file, ERR_OPEN, cs->process, name); + perror(""); } else { - _db_pfp_ = fp; - stack -> prof_file = fp; + cs->stack->prof_file= fp; if (newfile) { - ChangeOwner (name); + ChangeOwner(cs, name); } } } @@ -1633,30 +1934,28 @@ static FILE *OpenProfile (const char *name) /* * FUNCTION * - * CloseFile close the debug output stream + * DBUGCloseFile close the debug output stream * * SYNOPSIS * - * static VOID CloseFile (fp) - * FILE *fp; + * static VOID DBUGCloseFile(fp) + * FILE *fp; * * DESCRIPTION * - * Closes the debug output stream unless it is standard output - * or standard error. + * Closes the debug output stream unless it is standard output + * or standard error. * */ -static void CloseFile ( -FILE *fp) +static void DBUGCloseFile(CODE_STATE *cs, FILE *fp) { - if (fp != stderr && fp != stdout) { - if (fclose (fp) == EOF) { - pthread_mutex_lock(&THR_LOCK_dbug); - (void) fprintf (_db_fp_, ERR_CLOSE, _db_process_); - perror (""); - dbug_flush(0); - } + if (fp != stderr && fp != stdout && fclose(fp) == EOF) + { + pthread_mutex_lock(&THR_LOCK_dbug); + (void) fprintf(cs->stack->out_file, ERR_CLOSE, cs->process); + perror(""); + dbug_flush(cs); } } @@ -1664,176 +1963,154 @@ FILE *fp) /* * FUNCTION * - * DbugExit print error message and exit + * DbugExit print error message and exit * * SYNOPSIS * - * static VOID DbugExit (why) - * char *why; + * static VOID DbugExit(why) + * char *why; * * DESCRIPTION * - * Prints error message using current process name, the reason for - * aborting (typically out of memory), and exits with status 1. - * This should probably be changed to use a status code - * defined in the user's debugger include file. + * Prints error message using current process name, the reason for + * aborting (typically out of memory), and exits with status 1. + * This should probably be changed to use a status code + * defined in the user's debugger include file. * */ -static void DbugExit (const char *why) +static void DbugExit(const char *why) { - (void) fprintf (stderr, ERR_ABORT, _db_process_, why); - (void) fflush (stderr); - exit (1); + CODE_STATE *cs=code_state(); + (void) fprintf(stderr, ERR_ABORT, cs ? cs->process : "(null)", why); + (void) fflush(stderr); + exit(1); } /* * FUNCTION * - * DbugMalloc allocate memory for debugger runtime support + * DbugMalloc allocate memory for debugger runtime support * * SYNOPSIS * - * static long *DbugMalloc (size) - * int size; + * static long *DbugMalloc(size) + * int size; * * DESCRIPTION * - * Allocate more memory for debugger runtime support functions. - * Failure to to allocate the requested number of bytes is - * immediately fatal to the current process. This may be - * rather unfriendly behavior. It might be better to simply - * print a warning message, freeze the current debugger state, - * and continue execution. + * Allocate more memory for debugger runtime support functions. + * Failure to to allocate the requested number of bytes is + * immediately fatal to the current process. This may be + * rather unfriendly behavior. It might be better to simply + * print a warning message, freeze the current debugger cs, + * and continue execution. * */ -static char *DbugMalloc (size_t size) +static char *DbugMalloc(size_t size) { register char *new_malloc; - if (!(new_malloc = (char*) malloc((size_t) size))) - DbugExit ("out of memory"); - return (new_malloc); + if (!(new_malloc= (char*) malloc(size))) + DbugExit("out of memory"); + return new_malloc; } /* - * As strtok but two separators in a row are changed to one - * separator (to allow directory-paths in dos). + * strtok lookalike - splits on ':', magically handles ::, :\ and :/ */ -static char *static_strtok (char *s1, pchar separator) +static const char *DbugStrTok(const char *s) { - static char *end = NULL; - reg1 char *rtnval,*cpy; - - rtnval = NULL; - if (s1 != NULL) - end = s1; - if (end != NULL && *end != EOS) - { - rtnval=cpy=end; - do - { - if ((*cpy++ = *end++) == separator) - { - if (*end != separator) - { - cpy--; /* Point at separator */ - break; - } - end++; /* Two separators in a row, skip one */ - } - } while (*end != EOS); - *cpy=EOS; /* Replace last separator */ - } - return (rtnval); + while (s[0] && (s[0] != ':' || + (s[1] == '\\' || s[1] == '/' || (s[1] == ':' && s++)))) + s++; + return s; } /* * FUNCTION * - * BaseName strip leading pathname components from name + * BaseName strip leading pathname components from name * * SYNOPSIS * - * static char *BaseName (pathname) - * char *pathname; + * static char *BaseName(pathname) + * char *pathname; * * DESCRIPTION * - * Given pointer to a complete pathname, locates the base file - * name at the end of the pathname and returns a pointer to - * it. + * Given pointer to a complete pathname, locates the base file + * name at the end of the pathname and returns a pointer to + * it. * */ -static char *BaseName (const char *pathname) +static const char *BaseName(const char *pathname) { register const char *base; - base = strrchr (pathname, FN_LIBCHAR); + base= strrchr(pathname, FN_LIBCHAR); if (base++ == NullS) - base = pathname; - return ((char*) base); + base= pathname; + return base; } /* * FUNCTION * - * Writable test to see if a pathname is writable/creatable + * Writable test to see if a pathname is writable/creatable * * SYNOPSIS * - * static BOOLEAN Writable (pathname) - * char *pathname; + * static BOOLEAN Writable(pathname) + * char *pathname; * * DESCRIPTION * - * Because the debugger might be linked in with a program that - * runs with the set-uid-bit (suid) set, we have to be careful - * about opening a user named file for debug output. This consists - * of checking the file for write access with the real user id, - * or checking the directory where the file will be created. + * Because the debugger might be linked in with a program that + * runs with the set-uid-bit (suid) set, we have to be careful + * about opening a user named file for debug output. This consists + * of checking the file for write access with the real user id, + * or checking the directory where the file will be created. * - * Returns TRUE if the user would normally be allowed write or - * create access to the named file. Returns FALSE otherwise. + * Returns TRUE if the user would normally be allowed write or + * create access to the named file. Returns FALSE otherwise. * */ #ifndef Writable -static BOOLEAN Writable ( -char *pathname) +static BOOLEAN Writable(const char *pathname) { REGISTER BOOLEAN granted; REGISTER char *lastslash; - granted = FALSE; - if (EXISTS (pathname)) { - if (WRITABLE (pathname)) { - granted = TRUE; - } - } else { - lastslash = strrchr (pathname, '/'); - if (lastslash != NULL) { - *lastslash = EOS; - } else { - pathname = "."; - } - if (WRITABLE (pathname)) { - granted = TRUE; - } - if (lastslash != NULL) { - *lastslash = '/'; - } + granted= FALSE; + if (EXISTS(pathname)) + { + if (WRITABLE(pathname)) + granted= TRUE; } - return (granted); + else + { + lastslash= strrchr(pathname, '/'); + if (lastslash != NULL) + *lastslash= '\0'; + else + pathname= "."; + if (WRITABLE(pathname)) + granted= TRUE; + if (lastslash != NULL) + *lastslash= '/'; + } + return granted; } #endif @@ -1841,35 +2118,34 @@ char *pathname) /* * FUNCTION * - * ChangeOwner change owner to real user for suid programs + * ChangeOwner change owner to real user for suid programs * * SYNOPSIS * - * static VOID ChangeOwner (pathname) + * static VOID ChangeOwner(pathname) * * DESCRIPTION * - * For unix systems, change the owner of the newly created debug - * file to the real owner. This is strictly for the benefit of - * programs that are running with the set-user-id bit set. + * For unix systems, change the owner of the newly created debug + * file to the real owner. This is strictly for the benefit of + * programs that are running with the set-user-id bit set. * - * Note that at this point, the fact that pathname represents - * a newly created file has already been established. If the - * program that the debugger is linked to is not running with - * the suid bit set, then this operation is redundant (but - * harmless). + * Note that at this point, the fact that pathname represents + * a newly created file has already been established. If the + * program that the debugger is linked to is not running with + * the suid bit set, then this operation is redundant (but + * harmless). * */ #ifndef ChangeOwner -static void ChangeOwner ( -char *pathname) +static void ChangeOwner(CODE_STATE *cs, char *pathname) { - if (chown (pathname, getuid (), getgid ()) == -1) + if (chown(pathname, getuid(), getgid()) == -1) { - (void) fprintf (stderr, ERR_CHOWN, _db_process_, pathname); - perror (""); - (void) fflush (stderr); + (void) fprintf(stderr, ERR_CHOWN, cs->process, pathname); + perror(""); + (void) fflush(stderr); } } #endif @@ -1878,205 +2154,130 @@ char *pathname) /* * FUNCTION * - * _db_setjmp_ save debugger environment + * _db_setjmp_ save debugger environment * * SYNOPSIS * - * VOID _db_setjmp_ () + * VOID _db_setjmp_() * * DESCRIPTION * - * Invoked as part of the user's DBUG_SETJMP macro to save - * the debugger environment in parallel with saving the user's - * environment. + * Invoked as part of the user's DBUG_SETJMP macro to save + * the debugger environment in parallel with saving the user's + * environment. * */ #ifdef HAVE_LONGJMP -EXPORT void _db_setjmp_ () +EXPORT void _db_setjmp_() { - CODE_STATE *state; - state=code_state(); + CODE_STATE *cs=0; + get_code_state_or_return; - state->jmplevel = state->level; - state->jmpfunc = state->func; - state->jmpfile = state->file; + cs->jmplevel= cs->level; + cs->jmpfunc= cs->func; + cs->jmpfile= cs->file; } /* * FUNCTION * - * _db_longjmp_ restore previously saved debugger environment + * _db_longjmp_ restore previously saved debugger environment * * SYNOPSIS * - * VOID _db_longjmp_ () + * VOID _db_longjmp_() * * DESCRIPTION * - * Invoked as part of the user's DBUG_LONGJMP macro to restore - * the debugger environment in parallel with restoring the user's - * previously saved environment. + * Invoked as part of the user's DBUG_LONGJMP macro to restore + * the debugger environment in parallel with restoring the user's + * previously saved environment. * */ -EXPORT void _db_longjmp_ () +EXPORT void _db_longjmp_() { - CODE_STATE *state; - state=code_state(); + CODE_STATE *cs=0; + get_code_state_or_return; - state->level = state->jmplevel; - if (state->jmpfunc) { - state->func = state->jmpfunc; - } - if (state->jmpfile) { - state->file = state->jmpfile; - } + cs->level= cs->jmplevel; + if (cs->jmpfunc) + cs->func= cs->jmpfunc; + if (cs->jmpfile) + cs->file= cs->jmpfile; } #endif /* * FUNCTION * - * DelayArg convert D flag argument to appropriate value + * perror perror simulation for systems that don't have it * * SYNOPSIS * - * static int DelayArg (value) - * int value; + * static VOID perror(s) + * char *s; * * DESCRIPTION * - * Converts delay argument, given in tenths of a second, to the - * appropriate numerical argument used by the system to delay - * that that many tenths of a second. For example, on the - * amiga, there is a system call "Delay()" which takes an - * argument in ticks (50 per second). On unix, the sleep - * command takes seconds. Thus a value of "10", for one - * second of delay, gets converted to 50 on the amiga, and 1 - * on unix. Other systems will need to use a timing loop. + * Perror produces a message on the standard error stream which + * provides more information about the library or system error + * just encountered. The argument string s is printed, followed + * by a ':', a blank, and then a message and a newline. * - */ - -#ifdef AMIGA -#define HZ (50) /* Probably in some header somewhere */ -#endif - -static int DelayArg ( -int value) -{ - uint delayarg = 0; - -#if (unix || xenix) - delayarg = value / 10; /* Delay is in seconds for sleep () */ -#endif -#ifdef AMIGA - delayarg = (HZ * value) / 10; /* Delay in ticks for Delay () */ -#endif - return (delayarg); -} - - -/* - * A dummy delay stub for systems that do not support delays. - * With a little work, this can be turned into a timing loop. - */ - -#if ! defined(Delay) && ! defined(AMIGA) -static int Delay ( -int ticks) -{ - return ticks; -} -#endif - - -/* - * FUNCTION + * An undocumented feature of the unix perror is that if the string + * 's' is a null string (NOT a NULL pointer!), then the ':' and + * blank are not printed. * - * perror perror simulation for systems that don't have it - * - * SYNOPSIS - * - * static VOID perror (s) - * char *s; - * - * DESCRIPTION - * - * Perror produces a message on the standard error stream which - * provides more information about the library or system error - * just encountered. The argument string s is printed, followed - * by a ':', a blank, and then a message and a newline. - * - * An undocumented feature of the unix perror is that if the string - * 's' is a null string (NOT a NULL pointer!), then the ':' and - * blank are not printed. - * - * This version just complains about an "unknown system error". + * This version just complains about an "unknown system error". * */ #ifndef HAVE_PERROR -static void perror (s) +static void perror(s) char *s; { - if (s && *s != EOS) { - (void) fprintf (stderr, "%s: ", s); - } - (void) fprintf (stderr, "\n"); + if (s && *s != '\0') + (void) fprintf(stderr, "%s: ", s); + (void) fprintf(stderr, "\n"); } #endif /* HAVE_PERROR */ - /* flush dbug-stream, free mutex lock & wait delay */ - /* This is because some systems (MSDOS!!) dosn't flush fileheader */ - /* and dbug-file isn't readable after a system crash !! */ + /* flush dbug-stream, free mutex lock & wait delay */ + /* This is because some systems (MSDOS!!) dosn't flush fileheader */ + /* and dbug-file isn't readable after a system crash !! */ -static void dbug_flush(CODE_STATE *state) +static void dbug_flush(CODE_STATE *cs) { #ifndef THREAD - if (stack->flags & FLUSH_ON_WRITE) + if (cs->stack->flags & FLUSH_ON_WRITE) #endif { -#if defined(MSDOS) || defined(__WIN__) - if (_db_fp_ != stdout && _db_fp_ != stderr) - { - if (!(freopen(stack->name,"a",_db_fp_))) - { - (void) fprintf(stderr, ERR_OPEN, _db_process_, stack->name); - fflush(stderr); - _db_fp_ = stdout; - stack -> out_file = _db_fp_; - stack -> flags|=FLUSH_ON_WRITE; - } - } - else -#endif - { - (void) fflush (_db_fp_); - if (stack->delay) - (void) Delay (stack->delay); - } + (void) fflush(cs->stack->out_file); + if (cs->stack->delay) + (void) Delay(cs->stack->delay); } - if (!state || !state->locked) + if (!cs->locked) pthread_mutex_unlock(&THR_LOCK_dbug); } /* dbug_flush */ -void _db_lock_file() +void _db_lock_file_() { - CODE_STATE *state; - state=code_state(); + CODE_STATE *cs=0; + get_code_state_or_return; pthread_mutex_lock(&THR_LOCK_dbug); - state->locked=1; + cs->locked=1; } -void _db_unlock_file() +void _db_unlock_file_() { - CODE_STATE *state; - state=code_state(); - state->locked=0; + CODE_STATE *cs=0; + get_code_state_or_return; + cs->locked=0; pthread_mutex_unlock(&THR_LOCK_dbug); } @@ -2098,57 +2299,59 @@ void _db_unlock_file() * far. */ -static unsigned long Clock () +static unsigned long Clock() { struct rusage ru; - (void) getrusage (RUSAGE_SELF, &ru); - return ((ru.ru_utime.tv_sec * 1000) + (ru.ru_utime.tv_usec / 1000)); + (void) getrusage(RUSAGE_SELF, &ru); + return ru.ru_utime.tv_sec*1000 + ru.ru_utime.tv_usec/1000; } -#elif defined(MSDOS) || defined(__WIN__) || defined(OS2) +#elif defined(MSDOS) || defined(__WIN__) static ulong Clock() { return clock()*(1000/CLOCKS_PER_SEC); } -#elif defined (amiga) +#elif defined(amiga) -struct DateStamp { /* Yes, this is a hack, but doing it right */ - long ds_Days; /* is incredibly ugly without splitting this */ - long ds_Minute; /* off into a separate file */ - long ds_Tick; +struct DateStamp { /* Yes, this is a hack, but doing it right */ + long ds_Days; /* is incredibly ugly without splitting this */ + long ds_Minute; /* off into a separate file */ + long ds_Tick; }; -static int first_clock = TRUE; +static int first_clock= TRUE; static struct DateStamp begin; static struct DateStamp elapsed; -static unsigned long Clock () +static unsigned long Clock() { register struct DateStamp *now; - register unsigned long millisec = 0; - extern VOID *AllocMem (); + register unsigned long millisec= 0; + extern VOID *AllocMem(); - now = (struct DateStamp *) AllocMem ((long) sizeof (struct DateStamp), 0L); - if (now != NULL) { - if (first_clock == TRUE) { - first_clock = FALSE; - (void) DateStamp (now); - begin = *now; - } - (void) DateStamp (now); - millisec = 24 * 3600 * (1000 / HZ) * (now -> ds_Days - begin.ds_Days); - millisec += 60 * (1000 / HZ) * (now -> ds_Minute - begin.ds_Minute); - millisec += (1000 / HZ) * (now -> ds_Tick - begin.ds_Tick); - (void) FreeMem (now, (long) sizeof (struct DateStamp)); + now= (struct DateStamp *) AllocMem((long) sizeof(struct DateStamp), 0L); + if (now != NULL) + { + if (first_clock == TRUE) + { + first_clock= FALSE; + (void) DateStamp(now); + begin= *now; + } + (void) DateStamp(now); + millisec= 24 * 3600 * (1000 / HZ) * (now->ds_Days - begin.ds_Days); + millisec += 60 * (1000 / HZ) * (now->ds_Minute - begin.ds_Minute); + millisec += (1000 / HZ) * (now->ds_Tick - begin.ds_Tick); + (void) FreeMem(now, (long) sizeof(struct DateStamp)); } - return (millisec); + return millisec; } #else -static unsigned long Clock () +static unsigned long Clock() { - return (0); + return 0; } #endif /* RUSAGE */ #endif /* THREADS */ @@ -2156,11 +2359,11 @@ static unsigned long Clock () #ifdef NO_VARARGS /* - * Fake vfprintf for systems that don't support it. If this - * doesn't work, you are probably SOL... + * Fake vfprintf for systems that don't support it. If this + * doesn't work, you are probably SOL... */ -static int vfprintf (stream, format, ap) +static int vfprintf(stream, format, ap) FILE *stream; char *format; va_list ap; @@ -2168,18 +2371,34 @@ va_list ap; int rtnval; ARGS_DCL; - ARG0 = va_arg (ap, ARGS_TYPE); - ARG1 = va_arg (ap, ARGS_TYPE); - ARG2 = va_arg (ap, ARGS_TYPE); - ARG3 = va_arg (ap, ARGS_TYPE); - ARG4 = va_arg (ap, ARGS_TYPE); - ARG5 = va_arg (ap, ARGS_TYPE); - ARG6 = va_arg (ap, ARGS_TYPE); - ARG7 = va_arg (ap, ARGS_TYPE); - ARG8 = va_arg (ap, ARGS_TYPE); - ARG9 = va_arg (ap, ARGS_TYPE); - rtnval = fprintf (stream, format, ARGS_LIST); - return (rtnval); + ARG0= va_arg(ap, ARGS_TYPE); + ARG1= va_arg(ap, ARGS_TYPE); + ARG2= va_arg(ap, ARGS_TYPE); + ARG3= va_arg(ap, ARGS_TYPE); + ARG4= va_arg(ap, ARGS_TYPE); + ARG5= va_arg(ap, ARGS_TYPE); + ARG6= va_arg(ap, ARGS_TYPE); + ARG7= va_arg(ap, ARGS_TYPE); + ARG8= va_arg(ap, ARGS_TYPE); + ARG9= va_arg(ap, ARGS_TYPE); + rtnval= fprintf(stream, format, ARGS_LIST); + return rtnval; } -#endif /* NO_VARARGS */ +#endif /* NO_VARARGS */ + +#else + +/* + * Dummy function, workaround for MySQL bug#14420 related + * build failure on a platform where linking with an empty + * archive fails. + * + * This block can be removed as soon as a fix for bug#14420 + * is implemented. + */ +int i_am_a_dummy_function() { + return 0; +} + +#endif diff --git a/dbug/factorial.c b/dbug/factorial.c index 56197aef29e..7b190ea8d8e 100644 --- a/dbug/factorial.c +++ b/dbug/factorial.c @@ -1,6 +1,13 @@ #ifdef DBUG_OFF /* We are testing dbug */ -#undef DBUG_OFF -#endif + +int factorial(register int value) { + if(value > 1) { + value *= factorial(value-1); + } + return value; +} + +#else #include @@ -15,3 +22,6 @@ register int value) DBUG_PRINT ("result", ("result is %d", value)); DBUG_RETURN (value); } + +#endif + diff --git a/dbug/user.r b/dbug/user.r index 198f88cf272..19de840d0ad 100644 --- a/dbug/user.r +++ b/dbug/user.r @@ -672,52 +672,26 @@ from the standard include directory. .SP 2 .BL 20 .LI DBUG_ENTER\ -Used to tell the runtime support module the name of the function -being entered. -The argument must be of type "pointer to character". -The -DBUG_ENTER -macro must precede all executable lines in the -function just entered, and must come after all local declarations. -Each -DBUG_ENTER -macro must have a matching -DBUG_RETURN -or -DBUG_VOID_RETURN -macro -at the function exit points. -DBUG_ENTER -macros used without a matching -DBUG_RETURN -or -DBUG_VOID_RETURN -macro -will cause warning messages from the +Used to tell the runtime support module the name of the function being +entered. The argument must be of type "pointer to character". The +DBUG_ENTER macro must precede all executable lines in the function +just entered, and must come after all local declarations. Each +DBUG_ENTER macro must have a matching DBUG_RETURN or DBUG_VOID_RETURN +macro at the function exit points. DBUG_ENTER macros used without a +matching DBUG_RETURN or DBUG_VOID_RETURN macro will cause warning +messages from the .I dbug package runtime support module. .SP 1 EX:\ \fCDBUG_ENTER\ ("main");\fR .SP 1 .LI DBUG_RETURN\ -Used at each exit point of a function containing a -DBUG_ENTER -macro -at the entry point. -The argument is the value to return. -Functions which return no value (void) should use the -DBUG_VOID_RETURN -macro. -It -is an error to have a -DBUG_RETURN -or -DBUG_VOID_RETURN -macro in a function -which has no matching -DBUG_ENTER -macro, and the compiler will complain -if the macros are actually used (expanded). +Used at each exit point of a function containing a DBUG_ENTER macro at +the entry point. The argument is the value to return. Functions +which return no value (void) should use the DBUG_VOID_RETURN macro. +It is an error to have a DBUG_RETURN or DBUG_VOID_RETURN macro in a +function which has no matching DBUG_ENTER macro, and the compiler will +complain if the macros are actually used (expanded). .SP 1 EX:\ \fCDBUG_RETURN\ (value);\fR .br @@ -727,24 +701,20 @@ EX:\ \fCDBUG_VOID_RETURN;\fR Used to name the current process being executed. A typical argument for this macro is "argv[0]", though it will be perfectly happy with any other string. +Im multi-threaded environment threads may have different names. .SP 1 EX:\ \fCDBUG_PROCESS\ (argv[0]);\fR .SP 1 .LI DBUG_PUSH\ Sets a new debugger state by pushing the current .B dbug -state onto an -internal stack and setting up the new state using the debug control -string passed as the macro argument. -The most common usage is to set the state specified by a debug -control string retrieved from the argument list. -Note that the leading "-#" in a debug control string specified -as a command line argument must -.B not -be passed as part of the macro argument. -The proper usage is to pass a pointer to the first character -.B after -the "-#" string. +state onto an internal stack and setting up the new state using the +debug control string passed as the macro argument. The most common +usage is to set the state specified by a debug control string +retrieved from the argument list. If the control string is +.I incremental, +the new state is a copy of the old state, modified by the control +string. .SP 1 EX:\ \fCDBUG_PUSH\ (\&(argv[i][2]));\fR .br @@ -755,32 +725,38 @@ EX:\ \fCDBUG_PUSH\ ("");\fR .LI DBUG_POP\ Restores the previous debugger state by popping the state stack. Attempting to pop more states than pushed will be ignored and no -warning will be given. -The -DBUG_POP -macro has no arguments. +warning will be given. The DBUG_POP macro has no arguments. .SP 1 EX:\ \fCDBUG_POP\ ();\fR .SP 1 +.LI DBUG_SET\ +Modifies the current debugger state on top of the stack or pushes +a new state if the current is set to the initial settings, using +the debug control string passed as the macro argument. Unless +.I incremental +control string is used (see below), it's equivalent to a combination of +DBUG_POP and DBUG_PUSH. +.SP 1 +EX:\ \fCDBUG_SET\ ("d:t");\fR +.br +EX:\ \fCDBUG_SET\ ("+d,info");\fR +.br +EX:\ \fCDBUG_SET\ ("+t:-d");\fR +.SP 1 .LI DBUG_FILE\ -The -DBUG_FILE -macro is used to do explicit I/O on the debug output -stream. -It is used in the same manner as the symbols "stdout" and "stderr" -in the standard I/O package. +The DBUG_FILE macro is used to do explicit I/O on the debug output +stream. It is used in the same manner as the symbols "stdout" and +"stderr" in the standard I/O package. .SP 1 EX:\ \fCfprintf\ (DBUG_FILE,\ "Doing\ my\ own\ I/O!\\n");\fR .SP 1 .LI DBUG_EXECUTE\ -The DBUG_EXECUTE macro is used to execute any arbitrary C code. -The first argument is the debug keyword, used to trigger execution -of the code specified as the second argument. -This macro must be used cautiously because, like the -DBUG_PRINT -macro, -it is automatically selected by default whenever the 'd' flag has -no argument list (i.e., a "-#d:t" control string). +The DBUG_EXECUTE macro is used to execute any arbitrary C code. The +first argument is the debug keyword, used to trigger execution of the +code specified as the second argument. This macro must be used +cautiously because, like the DBUG_PRINT macro, it is automatically +selected by default whenever the 'd' flag has no argument list (i.e., +a "-#d:t" control string). .SP 1 EX:\ \fCDBUG_EXECUTE\ ("status",\ print_status\ ());\fR .SP 1 @@ -794,17 +770,40 @@ artificial delay checking for race conditions. .SP 1 EX:\ \fCDBUG_EXECUTE_IF\ ("crashme",\ abort\ ());\fR .SP 1 -.LI DBUG_N\ -These macros, where N is in the range 2-5, are currently obsolete -and will be removed in a future release. -Use the new DBUG_PRINT macro. +.LI DBUG_EVALUATE\ +The DBUG_EVALUATE macro is similar to DBUG_EXECUTE, but it can be used in +the expression context. The first argument is the debug keyword that is used to +choose whether the second (keyword is enabled) or the third (keyword is not +enabled) argument is evaluated. When +.B dbug +is compiled off, the third argument is evaluated. +.SP 1 +EX:\fC +.br + printf("Info-debug is %s", +.br + DBUG_EVALUATE\ ("info", "ON", "OFF"));\fR +.SP 1 +.LI DBUG_EVALUATE_IF\ +Works like DBUG_EVALUATE macro, but the second argument is +.B not +evaluated, if the keyword is not explicitly listed in +the 'd' flag. Like DBUG_EXECUTE_IF this could be used to conditionally execute +"dangerous" actions. +.SP 1 +EX:\fC +.br + if (prepare_transaction () || +.br + DBUG_EVALUATE ("crashme", (abort (), 0), 0) || +.br + commit_transaction () )\fR +.SP 1 .LI DBUG_PRINT\ -Used to do printing via the "fprintf" library function on the -current debug stream, -DBUG_FILE. -The first argument is a debug keyword, the second is a format string -and the corresponding argument list. -Note that the format string and argument list are all one macro argument +Used to do printing via the "fprintf" library function on the current +debug stream, DBUG_FILE. The first argument is a debug keyword, the +second is a format string and the corresponding argument list. Note +that the format string and argument list are all one macro argument and .B must be enclosed in parentheses. @@ -816,10 +815,10 @@ EX:\ \fCDBUG_PRINT\ ("type",\ ("type\ is\ %x", type));\fR EX:\ \fCDBUG_PRINT\ ("stp",\ ("%x\ ->\ %s", stp, stp\ ->\ name));\fR .SP 1 .LI DBUG_DUMP\ -Used to dump a memory block in hex via the "fprintf" library function on the -current debug stream, DBUG_FILE. -The first argument is a debug keyword, the second is a pointer to -a memory to dump, the third is a number of bytes to dump. +Used to dump a memory block in hex via the "fprintf" library function +on the current debug stream, DBUG_FILE. The first argument is a debug +keyword, the second is a pointer to a memory to dump, the third is a +number of bytes to dump. .SP 1 EX: \fCDBUG_DBUG\ ("net",\ packet,\ len);\fR .SP 1 @@ -875,13 +874,28 @@ library. So there will be no need to disable asserts separately with NDEBUG. .SP 1 EX:\ \fCDBUG_ASSERT(\ a\ >\ 0\ );\fR .SP 1 -.LI DBUG_OUTPUT\ -In multi-threaded environment disables (or enables) any -.I dbug -output from the current thread. +.LI DBUG_EXPLAIN\ +Generates control string corresponding to the current debug state. +The macro takes two arguments - a buffer to store the result string +into and its length. The macro (which could be used as a function) +returns 1 if the control string didn't fit into the buffer and was +truncated and 0 otherwise. .SP 1 -EX:\ \fCDBUG_OUTPUT(\ 0\ );\fR +EX:\fC +.br + char buf[256]; +.br + DBUG_EXPLAIN( buf, sizeof(buf) );\fR .SP 1 +.LI DBUG_SET_INITIAL\ +.LI DBUG_EXPLAIN_INITIAL\ +.br +These two macros are identical to DBUG_SET and DBUG_EXPLAIN, but they +operate on the debug state that any new thread starts from. +Modifying +.I initial +value does not affect threads that are already running. Obviously, +these macros are only useful in the multi-threaded environment. .LE .SK @@ -893,42 +907,51 @@ DEBUG CONTROL STRING The debug control string is used to set the state of the debugger via the .B DBUG_PUSH -macro. -This section summarizes the currently available debugger options -and the flag characters which enable or disable them. -Argument lists enclosed in '[' and ']' are optional. +or +.B DBUG_SET +macros. Control string consists of colon separate flags. Colons +that are part of ':\\', ':/', or '::' are not considered flag +separators. A flag may take an argument or a list of arguments. +If a control string starts from a '+' sign it works +.I incrementally, +that is, it can modify existing state without overriding it. In such a +string every flag may be preceded by a '+' or '-' to enable or disable +a corresponding option in the debugger state. This section summarizes +the currently available debugger options and the flag characters which +enable or disable them. Argument lists enclosed in '[' and ']' are +optional. .SP 2 .BL 22 .LI a[,file] -Redirect the debugger output stream and append it to the specified file. -The default output stream is stderr. -A null argument list causes output to be redirected to stdout. -Double the colon, if you want it in the path +Redirect the debugger output stream and append it to the specified +file. The default output stream is stderr. A null argument list +causes output to be redirected to stdout. .SP 1 -EX: \fCa,C::\\tmp\\log\fR +EX: \fCa,C:\\tmp\\log\fR .LI A[,file] Like 'a[,file]' but ensure that data are written after each write (this typically implies flush or close/reopen). It helps to get -a complete log file in case of crashes. This mode is implied in +a complete log file in case of crashes. This mode is implicit in multi-threaded environment. .LI d[,keywords] Enable output from macros with specified keywords. -A null list of keywords implies that all keywords are selected. +An empty list of keywords implies that all keywords are selected. .LI D[,time] Delay for specified time after each output line, to let output drain. Time is given in tenths of a second (value of 10 is one second). Default is zero. .LI f[,functions] Limit debugger actions to the specified list of functions. -A null list of functions implies that all functions are selected. +An empty list of functions implies that all functions are selected. .LI F Mark each debugger output line with the name of the source file containing the macro causing the output. .LI i -Mark each debugger output line with the PID of the current process. +Mark each debugger output line with the PID (or thread ID) of the +current process. .LI g,[functions] Enable profiling for the specified list of functions. -By default profiling is enabled for all functions. +An empty list of functions enables profiling for all functions. See .B PROFILING\ WITH\ DBUG below. @@ -946,20 +969,18 @@ Like 'a[,file]' but overwrite old file, do not append. .LI O[,file] Like 'A[,file]' but overwrite old file, do not append. .LI p[,processes] -Limit debugger actions to the specified processes. -A null list implies all processes. -This is useful for processes which run child processes. -Note that each debugger output line can be marked with the name of -the current process via the 'P' flag. -The process name must match the argument passed to the +Limit debugger actions to the specified processes. An empty list +implies all processes. This is useful for processes which run child +processes. Note that each debugger output line can be marked with the +name of the current process via the 'P' flag. The process name must +match the argument passed to the .B DBUG_PROCESS macro. .LI P Mark each debugger output line with the name of the current process. Most useful when used with a process which runs child processes that -are also being debugged. -Note that the parent process must arrange for the debugger control -string to be passed to the child processes. +are also being debugged. Note that the parent process must arrange +for the debugger control string to be passed to the child processes. .LI r Used in conjunction with the .B DBUG_PUSH @@ -981,7 +1002,59 @@ and Enable function control flow tracing. The maximum nesting depth is specified by N, and defaults to 200. +.LI T +Mark each debugger output line with the current timestamp. +The value is printed with microsecond resolution, as returned by +.I gettimeofday() +system call. The actual resolution is OS- and hardware-dependent. .LE + +.SK +.B +MULTI-THREADED DEBUGGING +.R + +.P +When +.I dbug +is used in a multi-threaded environment there are few differences from a single-threaded +case to keep in mind. This section tries to summarize them. +.SP 2 +.BL 5 +.LI +Every thread has its own stack of debugger states. +.B DBUG_PUSH +and +.B DBUG_POP +affect only the thread that executed them. +.LI +At the bottom of the stack for all threads there is the common +.I initial +state. Changes to this state (for example, with +.B DBUG_SET_INITIAL +macro) affect all new threads and all running threads that didn't +.B DBUG_PUSH +yet. +.LI +Every thread can have its own name, that can be set with +.B DBUG_PROCESS +macro. Thus, "-#p,name1,name2" can be used to limit the output to specific threads. +.LI +When printing directly to +.B DBUG_FILE +it may be necessary to prevent other threads from writing something between two parts +of logically indivisible output. It is done with +.B DBUG_LOCK_FILE +and +.B DBUG_UNLOCK_FILE +macors. See the appropriate section for examples. +.LI +"-#o,file" and "-#O,file" are treated as "-#a,file" and "-#A,file" respectively. That is +all writes to a file are always followed by a flush. +.LI +"-#i" prints not a PID but a thread id in the form of "T@nnn" +.LE + .SK .B PROFILING WITH DBUG diff --git a/include/my_dbug.h b/include/my_dbug.h index 31fd507ec73..514cd17099b 100644 --- a/include/my_dbug.h +++ b/include/my_dbug.h @@ -20,15 +20,18 @@ extern "C" { #endif #if !defined(DBUG_OFF) && !defined(_lint) -extern int _db_on_,_no_db_; -extern FILE *_db_fp_; -extern char *_db_process_; -extern int _db_keyword_(const char *keyword); +struct _db_code_state_; +extern int _db_keyword_(struct _db_code_state_ *cs, const char *keyword); extern int _db_strict_keyword_(const char *keyword); +extern int _db_explain_(struct _db_code_state_ *cs, char *buf, size_t len); +extern int _db_explain_init_(char *buf, size_t len); extern void _db_setjmp_(void); extern void _db_longjmp_(void); +extern void _db_process_(const char *name); extern void _db_push_(const char *control); extern void _db_pop_(void); +extern void _db_set_(struct _db_code_state_ *cs, const char *control); +extern void _db_set_init_(const char *control); extern void _db_enter_(const char *_func_,const char *_file_,uint _line_, const char **_sfunc_,const char **_sfile_, uint *_slevel_, char ***); @@ -37,68 +40,73 @@ extern void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_, extern void _db_pargs_(uint _line_,const char *keyword); extern void _db_doprnt_ _VARARGS((const char *format,...)) ATTRIBUTE_FORMAT(printf, 1, 2); -extern void _db_dump_(uint _line_,const char *keyword,const char *memory, - uint length); -extern void _db_output_(uint flag); +extern void _db_dump_(uint _line_,const char *keyword, + const unsigned char *memory, size_t length); extern void _db_end_(void); -extern void _db_lock_file(void); -extern void _db_unlock_file(void); +extern void _db_lock_file_(void); +extern void _db_unlock_file_(void); +extern FILE *_db_fp_(void); #define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \ char **_db_framep_; \ _db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \ &_db_framep_) #define DBUG_LEAVE \ - (_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_)) -#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);} -#define DBUG_VOID_RETURN {DBUG_LEAVE; return;} + _db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_) +#define DBUG_RETURN(a1) do {DBUG_LEAVE; return(a1);} while(0) +#define DBUG_VOID_RETURN do {DBUG_LEAVE; return;} while(0) #define DBUG_EXECUTE(keyword,a1) \ - {if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}} + do {if (_db_keyword_(0, (keyword))) { a1 }} while(0) +#define DBUG_EXECUTE_IF(keyword,a1) \ + do {if (_db_strict_keyword_ (keyword)) { a1 } } while(0) +#define DBUG_EVALUATE(keyword,a1,a2) \ + (_db_keyword_(0,(keyword)) ? (a1) : (a2)) +#define DBUG_EVALUATE_IF(keyword,a1,a2) \ + (_db_strict_keyword_((keyword)) ? (a1) : (a2)) #define DBUG_PRINT(keyword,arglist) \ - {if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}} + do {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;} while(0) #define DBUG_PUSH(a1) _db_push_ (a1) #define DBUG_POP() _db_pop_ () -#define DBUG_PROCESS(a1) (_db_process_ = a1) -#define DBUG_FILE (_db_fp_) +#define DBUG_SET(a1) _db_set_ (0, (a1)) +#define DBUG_SET_INITIAL(a1) _db_set_init_ (a1) +#define DBUG_PROCESS(a1) _db_process_(a1) +#define DBUG_FILE _db_fp_() #define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1)) #define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2)) -#define DBUG_DUMP(keyword,a1,a2)\ - {if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}} -#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr) -#define DEBUGGER_OFF _no_db_=1;_db_on_=0; -#define DEBUGGER_ON _no_db_=0 +#define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2) #define DBUG_END() _db_end_ () -#define DBUG_LOCK_FILE { _db_lock_file(); } -#define DBUG_UNLOCK_FILE { _db_unlock_file(); } -#define DBUG_OUTPUT(A) { _db_output_(A); } +#define DBUG_LOCK_FILE _db_lock_file_() +#define DBUG_UNLOCK_FILE _db_unlock_file_() #define DBUG_ASSERT(A) assert(A) -#define DBUG_EXECUTE_IF(keyword,a1) \ - {if (_db_on_) {if (_db_strict_keyword_ (keyword)) { a1 }}} +#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) +#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) #define IF_DBUG(A) A #else /* No debugger */ #define DBUG_ENTER(a1) -#define DBUG_RETURN(a1) return(a1) -#define DBUG_VOID_RETURN return -#define DBUG_EXECUTE(keyword,a1) {} -#define DBUG_EXECUTE_IF(keyword,a1) {} -#define DBUG_PRINT(keyword,arglist) {} -#define DBUG_PUSH(a1) {} -#define DBUG_POP() {} -#define DBUG_PROCESS(a1) {} -#define DBUG_FILE (stderr) -#define DBUG_SETJMP setjmp -#define DBUG_LONGJMP longjmp -#define DBUG_DUMP(keyword,a1,a2) {} -#define DBUG_IN_USE 0 -#define DEBUGGER_OFF -#define DEBUGGER_ON -#define DBUG_END() -#define DBUG_LOCK_FILE -#define DBUG_UNLOCK_FILE -#define DBUG_OUTPUT(A) -#define DBUG_ASSERT(A) {} #define DBUG_LEAVE +#define DBUG_RETURN(a1) do { return(a1); } while(0) +#define DBUG_VOID_RETURN do { return; } while(0) +#define DBUG_EXECUTE(keyword,a1) do { } while(0) +#define DBUG_EXECUTE_IF(keyword,a1) do { } while(0) +#define DBUG_EVALUATE(keyword,a1,a2) (a2) +#define DBUG_EVALUATE_IF(keyword,a1,a2) (a2) +#define DBUG_PRINT(keyword,arglist) do { } while(0) +#define DBUG_PUSH(a1) +#define DBUG_SET(a1) +#define DBUG_SET_INITIAL(a1) +#define DBUG_POP() +#define DBUG_PROCESS(a1) +#define DBUG_SETJMP(a1) setjmp(a1) +#define DBUG_LONGJMP(a1) longjmp(a1) +#define DBUG_DUMP(keyword,a1,a2) +#define DBUG_END() +#define DBUG_ASSERT(A) +#define DBUG_LOCK_FILE +#define DBUG_FILE (stderr) +#define DBUG_UNLOCK_FILE +#define DBUG_EXPLAIN(buf,len) +#define DBUG_EXPLAIN_INITIAL(buf,len) #define IF_DBUG(A) #endif #ifdef __cplusplus diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 0320126a522..affb5462eff 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -298,16 +298,12 @@ mysql_debug(const char *debug __attribute__((unused))) { #ifndef DBUG_OFF char *env; - if (_db_on_) - return; /* Already using debugging */ if (debug) { - DEBUGGER_ON; DBUG_PUSH(debug); } else if ((env = getenv("MYSQL_DEBUG"))) { - DEBUGGER_ON; DBUG_PUSH(env); #if !defined(_WINVER) && !defined(WINVER) puts("\n-------------------------------------------------------"); diff --git a/myisam/mi_open.c b/myisam/mi_open.c index ec169ac8785..172f282e049 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -196,7 +196,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) if (len != MI_BASE_INFO_SIZE) { DBUG_PRINT("warning",("saved_base_info_length: %d base_info_length: %d", - len,MI_BASE_INFO_SIZE)) + len,MI_BASE_INFO_SIZE)); } disk_pos= (char*) my_n_base_info_read((uchar*) disk_cache + base_pos, &share->base); diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index ac1e0962ffb..35648ea19c7 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -1088,7 +1088,7 @@ bool ha_federated::create_where_from_key(String *to, uint store_length= key_part->store_length; uint part_length= min(store_length, length); needs_quotes= 1; - DBUG_DUMP("key, start of loop", (char *) ptr, length); + DBUG_DUMP("key, start of loop", ptr, length); if (key_part->null_bit) { diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 2d2007c8fdd..a2de8ea1d0b 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4250,7 +4250,7 @@ ha_innobase::rnd_pos( int error; uint keynr = active_index; DBUG_ENTER("rnd_pos"); - DBUG_DUMP("key", (char*) pos, ref_length); + DBUG_DUMP("key", pos, ref_length); statistic_increment(current_thd->status_var.ha_read_rnd_count, &LOCK_status); diff --git a/sql/ha_myisammrg.cc b/sql/ha_myisammrg.cc index 78492d2843d..02d0eaf2af3 100644 --- a/sql/ha_myisammrg.cc +++ b/sql/ha_myisammrg.cc @@ -126,7 +126,7 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked) DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno)); return (my_errno ? my_errno : -1); } - DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc...")) + DBUG_PRINT("info", ("ha_myisammrg::open myrg_extrafunc...")); myrg_extrafunc(file, query_cache_invalidate_by_MyISAM_filename_ref); if (!(test_if_locked == HA_OPEN_WAIT_IF_LOCKED || test_if_locked == HA_OPEN_ABORT_IF_LOCKED)) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 17345e76bba..16f3e51d615 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -4130,7 +4130,7 @@ longlong Item_is_not_null_test::val_int() } if (args[0]->is_null()) { - DBUG_PRINT("info", ("null")) + DBUG_PRINT("info", ("null")); owner->was_null|= 1; DBUG_RETURN(0); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b8df51e9e58..b8f675ff696 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1071,12 +1071,9 @@ pthread_handler_t kill_server_thread(void *arg __attribute__((unused))) extern "C" sig_handler print_signal_warning(int sig) { - if (!DBUG_IN_USE) - { - if (global_system_variables.log_warnings) - sql_print_warning("Got signal %d from thread %ld", - sig, my_thread_id()); - } + if (global_system_variables.log_warnings) + sql_print_warning("Got signal %d from thread %ld", + sig, my_thread_id()); #ifdef DONT_REMEMBER_SIGNAL my_sigset(sig,print_signal_warning); /* int. thread system calls */ #endif @@ -1718,7 +1715,7 @@ void end_thread(THD *thd, bool put_in_cache) ! abort_loop && !kill_cached_threads) { /* Don't kill the thread, just put it in cache for reuse */ - DBUG_PRINT("info", ("Adding thread to cache")) + DBUG_PRINT("info", ("Adding thread to cache")); cached_thread_count++; while (!abort_loop && ! wake_thread && ! kill_cached_threads) (void) pthread_cond_wait(&COND_thread_cache, &LOCK_thread_count); @@ -3623,8 +3620,6 @@ int main(int argc, char **argv) MY_INIT(argv[0]); // init my_sys library & pthreads /* ^^^ Nothing should be before this line! */ - DEBUGGER_OFF; - /* Set signal used to kill MySQL */ #if defined(SIGUSR2) thr_kill_signal= thd_lib_detected == THD_LIB_LT ? SIGINT : SIGUSR2; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 017a2eb9ecd..a40764577fd 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -394,7 +394,7 @@ my_net_write(NET *net,const char *packet,ulong len) if (net_write_buff(net,(char*) buff,NET_HEADER_SIZE)) return 1; #ifndef DEBUG_DATA_PACKETS - DBUG_DUMP("packet_header",(char*) buff,NET_HEADER_SIZE); + DBUG_DUMP("packet_header", buff, NET_HEADER_SIZE); #endif return test(net_write_buff(net,packet,len)); } @@ -892,7 +892,7 @@ my_real_read(NET *net, ulong *complen) if (i == 0) { /* First parts is packet length */ ulong helping; - DBUG_DUMP("packet_header",(char*) net->buff+net->where_b, + DBUG_DUMP("packet_header", net->buff+net->where_b, NET_HEADER_SIZE); if (net->buff[net->where_b + 3] != (uchar) net->pkt_nr) { diff --git a/sql/opt_range.cc b/sql/opt_range.cc index c3eddbd0abf..17a4701b515 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -9570,8 +9570,6 @@ static void print_sel_tree(PARAM *param, SEL_TREE *tree, key_map *tree_map, int idx; char buff[1024]; DBUG_ENTER("print_sel_tree"); - if (! _db_on_) - DBUG_VOID_RETURN; String tmp(buff,sizeof(buff),&my_charset_bin); tmp.length(0); @@ -9601,8 +9599,6 @@ static void print_ror_scans_arr(TABLE *table, const char *msg, struct st_ror_scan_info **end) { DBUG_ENTER("print_ror_scans"); - if (! _db_on_) - DBUG_VOID_RETURN; char buff[1024]; String tmp(buff,sizeof(buff),&my_charset_bin); @@ -9665,7 +9661,7 @@ static void print_quick(QUICK_SELECT_I *quick, const key_map *needed_reg) { char buf[MAX_KEY/8+1]; DBUG_ENTER("print_quick"); - if (! _db_on_ || !quick) + if (!quick) DBUG_VOID_RETURN; DBUG_LOCK_FILE; diff --git a/sql/set_var.cc b/sql/set_var.cc index a99b063a97e..84766e511ca 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1990,7 +1990,7 @@ void sys_var_thd_date_time_format::update2(THD *thd, enum_var_type type, { DATE_TIME_FORMAT *old; DBUG_ENTER("sys_var_date_time_format::update2"); - DBUG_DUMP("positions",(char*) new_value->positions, + DBUG_DUMP("positions", new_value->positions, sizeof(new_value->positions)); if (type == OPT_GLOBAL) diff --git a/sql/slave.cc b/sql/slave.cc index 8a3620080f2..2cd4b00cca9 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3339,7 +3339,7 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli) } DBUG_PRINT("info", ("thd->options: %s", - (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : "")) + (thd->options & OPTION_BEGIN) ? "OPTION_BEGIN" : "")); /* Protect against common user error of setting the counter to 1 diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 8c868971911..f8906a17c12 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -315,13 +315,13 @@ TODO list: #define MUTEX_UNLOCK(M) {DBUG_PRINT("lock", ("mutex unlock 0x%lx",\ (ulong)(M))); pthread_mutex_unlock(M);} #define RW_WLOCK(M) {DBUG_PRINT("lock", ("rwlock wlock 0x%lx",(ulong)(M))); \ - if (!rw_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")) \ + if (!rw_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")); \ else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); } #define RW_RLOCK(M) {DBUG_PRINT("lock", ("rwlock rlock 0x%lx", (ulong)(M))); \ - if (!rw_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")) \ + if (!rw_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")); \ else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); } #define RW_UNLOCK(M) {DBUG_PRINT("lock", ("rwlock unlock 0x%lx",(ulong)(M))); \ - if (!rw_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")) \ + if (!rw_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")); \ else DBUG_PRINT("lock", ("rwlock unlock FAILED %d", errno)); } #define STRUCT_LOCK(M) {DBUG_PRINT("lock", ("%d struct lock...",__LINE__)); \ pthread_mutex_lock(M);DBUG_PRINT("lock", ("struct lock OK"));} diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 6392f7c4299..ef3abb06b1e 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -14470,7 +14470,7 @@ change_to_use_tmp_fields(THD *thd, Item **ref_pointer_array, ifield->db_name= iref->db_name; } #ifndef DBUG_OFF - if (_db_on_ && !item_field->name) + if (!item_field->name) { char buff[256]; String str(buff,sizeof(buff),&my_charset_bin); diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index dbe22f2a9e4..ee5c01a8272 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16673,7 +16673,6 @@ int main(int argc, char **argv) { struct my_tests_st *fptr; - DEBUGGER_OFF; MY_INIT(argv[0]); load_defaults("my", client_test_load_default_groups, &argc, &argv); From e44403fe31963ef9fe8a574f0e159b9b0b67e196 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 19:57:39 +0100 Subject: [PATCH 511/527] Fixes to eliminate compiler warnings. sql/log.cc: Reordering initialalizer list to eliminate compiler warnings. --- sql/log.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/log.cc b/sql/log.cc index fa59b837abc..fcb81e05ab3 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -153,7 +153,7 @@ private: class binlog_trx_data { public: binlog_trx_data() - : m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF), at_least_one_stmt(0) + : at_least_one_stmt(0), m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF) { trans_log.end_of_file= max_binlog_cache_size; } From f6bdf9815629f056f3bff5a56e16fd5a24803da2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 21:11:07 +0200 Subject: [PATCH 512/527] Makefile.am: added my_handler_errors.h mysys/Makefile.am: added my_handler_errors.h --- mysys/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/Makefile.am b/mysys/Makefile.am index f06d81da849..1c50160c3f4 100644 --- a/mysys/Makefile.am +++ b/mysys/Makefile.am @@ -20,7 +20,7 @@ INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \ -I$(top_srcdir)/include -I$(srcdir) pkglib_LIBRARIES = libmysys.a LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a -noinst_HEADERS = mysys_priv.h my_static.h +noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.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 \ From f5f7a59ff8fa886fcc55366df97c339320dc456a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 21:59:20 +0200 Subject: [PATCH 513/527] perror.c: fixed warning in 5.1-marvel in fix for bug 25177 extra/perror.c: fixed warning in 5.1-marvel in fix for bug 25177 --- extra/perror.c | 1 + 1 file changed, 1 insertion(+) diff --git a/extra/perror.c b/extra/perror.c index 612456eaff3..237b2582d43 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -32,6 +32,7 @@ static my_bool verbose, print_all_codes; #include "../include/my_base.h" #include "../mysys/my_handler_errors.h" +#include "../include/my_handler.h" #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE static my_bool ndb_code; From 7021064aaee66583e8fb2775a335739d6c66fbe5 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 28 Mar 2008 23:39:47 +0300 Subject: [PATCH 514/527] Fix tree: 1. Use 'dat' extension, because it is handled in Makefile.am; 2. Fix typo: the bug id is 35469, not 35649. mysql-test/std_data/bug35469.dat: Rename: mysql-test/std_data/bug35649.data -> mysql-test/std_data/bug35469.dat mysql-test/r/loaddata.result: Update result file. mysql-test/t/loaddata.test: 1. Use 'dat' extension, because it is handled in Makefile.am; 2. Fix typo: the bug id is 35469, not 35649. --- mysql-test/r/loaddata.result | 8 ++++---- mysql-test/std_data/{bug35649.data => bug35469.dat} | 0 mysql-test/t/loaddata.test | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) rename mysql-test/std_data/{bug35649.data => bug35469.dat} (100%) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 156a78eb627..18b0d84a296 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -268,7 +268,7 @@ CREATE VIEW v1 AS SELECT * FROM t1; CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v1 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v1 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' @@ -288,7 +288,7 @@ c1 c2 DELETE FROM t1; -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' @@ -308,14 +308,14 @@ c0 c1 c2 DELETE FROM t1; -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n' (c0, c2); ERROR HY000: Invalid column reference (v2.c0) in LOAD DATA -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v3 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v3 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' diff --git a/mysql-test/std_data/bug35649.data b/mysql-test/std_data/bug35469.dat similarity index 100% rename from mysql-test/std_data/bug35649.data rename to mysql-test/std_data/bug35469.dat diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 68cf84b7fac..e9da2bbadc5 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -260,7 +260,7 @@ CREATE VIEW v2 AS SELECT 1 + 2 AS c0, c1, c2 FROM t1; CREATE VIEW v3 AS SELECT 1 AS d1, 2 AS d2; --echo -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v1 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v1 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' @@ -276,7 +276,7 @@ SELECT * FROM v1; DELETE FROM t1; --echo -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' @@ -293,7 +293,7 @@ DELETE FROM t1; --echo --error ER_LOAD_DATA_INVALID_COLUMN -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v2 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' @@ -301,7 +301,7 @@ LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v2 --echo --error ER_NON_UPDATABLE_TABLE -LOAD DATA INFILE '../std_data_ln/bug35649.data' INTO TABLE v3 +LOAD DATA INFILE '../std_data_ln/bug35469.dat' INTO TABLE v3 FIELDS ESCAPED BY '\\' TERMINATED BY ',' ENCLOSED BY '"' From 49384c0bf058937e07dd56f574634da92fb273db Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 00:05:20 +0300 Subject: [PATCH 515/527] Fix manual merge. --- mysql-test/r/loaddata.result | 54 ++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index 0ceef10ec5d..3a23d9de6b3 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -261,33 +261,6 @@ SELECT * FROM t1; c1 c2 c3 c4 10 1970-02-01 01:02:03 1.1e-100 1.1e+100 DROP TABLE t1; -CREATE TABLE t1 (a int); -INSERT INTO t1 VALUES (1); -SET NAMES latin1; -SET character_set_filesystem=filename; -select @@character_set_filesystem; -@@character_set_filesystem -filename -SELECT * INTO OUTFILE 't-1' FROM t1; -DELETE FROM t1; -LOAD DATA INFILE 't-1' INTO TABLE t1; -SELECT * FROM t1; -a -1 -DELETE FROM t1; -SET character_set_filesystem=latin1; -select @@character_set_filesystem; -@@character_set_filesystem -latin1 -LOAD DATA INFILE 't@002d1' INTO TABLE t1; -SELECT * FROM t1; -a -1 -DROP TABLE t1; -SET character_set_filesystem=default; -select @@character_set_filesystem; -@@character_set_filesystem -binary # -- # -- Bug#35469: server crash with LOAD DATA INFILE to a VIEW. @@ -364,3 +337,30 @@ DROP VIEW v2; DROP VIEW v3; # -- End of Bug#35469. +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (1); +SET NAMES latin1; +SET character_set_filesystem=filename; +select @@character_set_filesystem; +@@character_set_filesystem +filename +SELECT * INTO OUTFILE 't-1' FROM t1; +DELETE FROM t1; +LOAD DATA INFILE 't-1' INTO TABLE t1; +SELECT * FROM t1; +a +1 +DELETE FROM t1; +SET character_set_filesystem=latin1; +select @@character_set_filesystem; +@@character_set_filesystem +latin1 +LOAD DATA INFILE 't@002d1' INTO TABLE t1; +SELECT * FROM t1; +a +1 +DROP TABLE t1; +SET character_set_filesystem=default; +select @@character_set_filesystem; +@@character_set_filesystem +binary From 18a01ce9246616e2a3f131d69c132109335c9359 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 09:52:16 +0200 Subject: [PATCH 516/527] fixed warnings and compile errors from the fix for bug 26243 --- configure.in | 3 +++ heap/hp_test2.c | 2 -- libmysql/libmysql.c | 2 +- myisam/mi_check.c | 20 ++++++++-------- myisam/mi_delete.c | 22 ++++++++--------- myisam/mi_dynrec.c | 6 ++--- myisam/mi_key.c | 2 +- myisam/mi_open.c | 2 +- myisam/mi_packrec.c | 2 +- myisam/mi_page.c | 4 ++-- myisam/mi_search.c | 8 +++---- myisam/mi_statrec.c | 4 ++-- myisam/mi_test1.c | 1 - myisam/mi_test2.c | 6 ++--- myisam/mi_test3.c | 2 -- myisam/mi_write.c | 8 +++---- myisammrg/myrg_rkey.c | 2 +- ndb/src/ndbapi/DictCache.cpp | 2 +- ndb/src/ndbapi/NdbBlob.cpp | 8 ++++--- ndb/src/ndbapi/NdbOperationDefine.cpp | 2 +- ndb/src/ndbapi/NdbOperationInt.cpp | 2 +- ndb/src/ndbapi/NdbOperationSearch.cpp | 2 +- sql-common/client.c | 2 +- sql/ha_federated.cc | 2 +- sql/ha_innodb.cc | 2 +- sql/ha_ndbcluster.cc | 34 +++++++++++++-------------- sql/ha_ndbcluster_cond.cc | 2 +- 27 files changed, 75 insertions(+), 79 deletions(-) diff --git a/configure.in b/configure.in index fdec3bb3a6c..9c35dbcc7c7 100644 --- a/configure.in +++ b/configure.in @@ -1763,15 +1763,18 @@ AC_ARG_WITH(debug, if test "$with_debug" = "yes" then # Medium debug. + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS" CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DDBUG_ON -DSAFE_MUTEX $CXXFLAGS" elif test "$with_debug" = "full" then # Full debug. Very slow in some cases + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" else # Optimized version. No debug + AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug]) CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS" CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS" fi diff --git a/heap/hp_test2.c b/heap/hp_test2.c index 7b756ae10a4..73cad6c2043 100644 --- a/heap/hp_test2.c +++ b/heap/hp_test2.c @@ -617,7 +617,6 @@ err: static int get_options(int argc,char *argv[]) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -646,7 +645,6 @@ static int get_options(int argc,char *argv[]) printf("Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n",progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; } diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index bcbaf9f1822..dd66a325169 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2444,7 +2444,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) my_bool res; DBUG_ENTER("execute"); - DBUG_DUMP("packet", packet, length); + DBUG_DUMP("packet", (uchar*)packet, length); mysql->last_used_con= mysql; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 4407a787950..7ed4f3a9f03 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -741,7 +741,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, char llbuff[22]; uint diff_pos[2]; DBUG_ENTER("chk_index"); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); /* TODO: implement appropriate check for RTree keys */ if (keyinfo->flag & HA_SPATIAL) @@ -799,9 +799,9 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, (flag=ha_key_cmp(keyinfo->seg,info->lastkey,key,key_length, comp_flag, diff_pos)) >=0) { - DBUG_DUMP("old",(byte*) info->lastkey, info->lastkey_length); - DBUG_DUMP("new",(byte*) key, key_length); - DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos)); + DBUG_DUMP("old",(uchar*) info->lastkey, info->lastkey_length); + DBUG_DUMP("new",(uchar*) key, key_length); + DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos)); if (comp_flag & SEARCH_FIND && flag == 0) mi_check_print_error(param,"Found duplicated key at page %s",llstr(page,llbuff)); @@ -870,8 +870,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, DBUG_PRINT("test",("page: %s record: %s filelength: %s", llstr(page,llbuff),llstr(record,llbuff2), llstr(info->state->data_file_length,llbuff3))); - DBUG_DUMP("key",(byte*) key,key_length); - DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos)); + DBUG_DUMP("key",(uchar*) key,key_length); + DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos)); goto err; } param->record_checksum+=(ha_checksum) record; @@ -1631,7 +1631,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, { if (my_errno != HA_ERR_FOUND_DUPP_KEY) goto err; - DBUG_DUMP("record",(byte*) sort_param.record,share->base.pack_reclength); + DBUG_DUMP("record",(uchar*) sort_param.record,share->base.pack_reclength); mi_check_print_info(param,"Duplicate key %2d for record at %10s against new record at %10s", info->errkey+1, llstr(sort_param.start_recpos,llbuff), @@ -2062,7 +2062,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); - DBUG_DUMP("buff",(byte*) buff,used_length); + DBUG_DUMP("buff",(uchar*) buff,used_length); goto err; } } @@ -4024,7 +4024,7 @@ static int sort_insert_key(MI_SORT_PARAM *sort_param, else if (my_pwrite(info->s->kfile,(byte*) anc_buff, (uint) keyinfo->block_length,filepos, param->myf_rw)) DBUG_RETURN(1); - DBUG_DUMP("buff",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("buff",(uchar*) anc_buff,mi_getint(anc_buff)); /* Write separator-key to block in next level */ if (sort_insert_key(sort_param,key_block+1,key_block->lastkey,filepos)) @@ -4129,7 +4129,7 @@ int flush_pending_blocks(MI_SORT_PARAM *sort_param) else if (my_pwrite(info->s->kfile,(byte*) key_block->buff, (uint) keyinfo->block_length,filepos, myf_rw)) DBUG_RETURN(1); - DBUG_DUMP("buff",(byte*) key_block->buff,length); + DBUG_DUMP("buff",(uchar*) key_block->buff,length); nod_flag=1; } info->s->state.key_root[sort_param->key]=filepos; /* Last is root for tree */ diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c index 409930ff7fb..ca8a537b322 100644 --- a/myisam/mi_delete.c +++ b/myisam/mi_delete.c @@ -223,7 +223,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, my_off_t leaf_page,next_block; uchar lastkey[MI_MAX_KEY_BUFF]; DBUG_ENTER("d_search"); - DBUG_DUMP("page",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("page",(uchar*) anc_buff,mi_getint(anc_buff)); search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY; flag=(*keyinfo->bin_search)(info,keyinfo,anc_buff,key, search_key_length, @@ -381,7 +381,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, ret_value|=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,anc_buff); else { - DBUG_DUMP("page",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("page",(uchar*) anc_buff,mi_getint(anc_buff)); } my_afree((byte*) leaf_buff); DBUG_PRINT("exit",("Return: %d",ret_value)); @@ -411,7 +411,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, DBUG_ENTER("del"); DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", (long) leaf_page, (ulong) keypos)); - DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff)); + DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff)); endpos=leaf_buff+mi_getint(leaf_buff); if (!(key_start=_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos, @@ -428,7 +428,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, ret_value= -1; else { - DBUG_DUMP("next_page",(byte*) next_buff,mi_getint(next_buff)); + DBUG_DUMP("next_page",(uchar*) next_buff,mi_getint(next_buff)); if ((ret_value=del(info,keyinfo,key,anc_buff,next_page,next_buff, keypos,next_block,ret_key)) >0) { @@ -517,8 +517,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_ENTER("underflow"); DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",(long) leaf_page, (ulong) keypos)); - DBUG_DUMP("anc_buff",(byte*) anc_buff,mi_getint(anc_buff)); - DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff)); + DBUG_DUMP("anc_buff",(uchar*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff)); buff=info->buff; info->buff_used=1; @@ -554,7 +554,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,buff,0)) goto err; buff_length=mi_getint(buff); - DBUG_DUMP("next",(byte*) buff,buff_length); + DBUG_DUMP("next",(uchar*) buff,buff_length); /* find keys to make a big key-page */ bmove((byte*) next_keypos-key_reflength,(byte*) buff+2, @@ -659,7 +659,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, goto err; buff_length=mi_getint(buff); endpos=buff+buff_length; - DBUG_DUMP("prev",(byte*) buff,buff_length); + DBUG_DUMP("prev",(uchar*) buff,buff_length); /* find keys to make a big key-page */ bmove((byte*) next_keypos - key_reflength,(byte*) leaf_buff+2, @@ -715,8 +715,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, goto err; _mi_kpointer(info,leaf_key+key_length,leaf_page); /* Save key in anc_buff */ - DBUG_DUMP("anc_buff",(byte*) anc_buff,anc_length); - DBUG_DUMP("key_to_anc",(byte*) leaf_key,key_length); + DBUG_DUMP("anc_buff",(uchar*) anc_buff,anc_length); + DBUG_DUMP("key_to_anc",(uchar*) leaf_key,key_length); temp_pos=anc_buff+anc_length; t_length=(*keyinfo->pack_key)(keyinfo,key_reflength, @@ -737,7 +737,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, bmove((byte*) leaf_buff+2,(byte*) half_pos-nod_flag,(size_t) nod_flag); if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&half_pos,leaf_key))) goto err; - DBUG_DUMP("key_to_leaf",(byte*) leaf_key,length); + DBUG_DUMP("key_to_leaf",(uchar*) leaf_key,length); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag, (uchar*) 0, (uchar*) 0, (uchar*) 0, leaf_key, &s_temp); length=(uint) ((buff+buff_length)-half_pos); diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 67d40ec50bf..3542a82be59 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -509,7 +509,7 @@ int _mi_write_part_record(MI_INFO *info, } length= *reclength+head_length; /* Write only what is needed */ } - DBUG_DUMP("header",(byte*) temp,head_length); + DBUG_DUMP("header",(uchar*) temp,head_length); /* Make a long block for one write */ record_end= *record+length-head_length; @@ -1137,7 +1137,7 @@ err: my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx", (long) to, (long) to_end, (long) from, (long) from_end)); - DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length); + DBUG_DUMP("from",(uchar*) info->rec_buff,info->s->base.min_pack_length); DBUG_RETURN(MY_FILE_ERROR); } /* _mi_rec_unpack */ @@ -1698,7 +1698,7 @@ uint _mi_get_block_info(MI_BLOCK_INFO *info, File file, my_off_t filepos) sizeof(info->header)) goto err; } - DBUG_DUMP("header",(byte*) header,MI_BLOCK_INFO_HEADER_LENGTH); + DBUG_DUMP("header",(uchar*) header,MI_BLOCK_INFO_HEADER_LENGTH); if (info->second_read) { if (info->header[0] <= 6 || info->header[0] == 13) diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 377972b5a5f..90bd6f5a717 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -189,7 +189,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, } _mi_dpointer(info,key,filepos); DBUG_PRINT("exit",("keynr: %d",keynr)); - DBUG_DUMP("key",(byte*) start,(uint) (key-start)+keyseg->length); + DBUG_DUMP("key",(uchar*) start,(uint) (key-start)+keyseg->length); DBUG_EXECUTE("key", _mi_print_key(DBUG_FILE,info->s->keyinfo[keynr].seg,start, (uint) (key-start));); diff --git a/myisam/mi_open.c b/myisam/mi_open.c index c014b45cec5..6865708a941 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -130,7 +130,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) (byte*) myisam_file_magic, 4)) { DBUG_PRINT("error",("Wrong header in %s",name_buff)); - DBUG_DUMP("error_dump",(char*) share->state.header.file_version, + DBUG_DUMP("error_dump",(uchar*) share->state.header.file_version, head_length); my_errno=HA_ERR_NOT_A_TABLE; goto err; diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 81fc4d046e7..63d624a1445 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -1368,7 +1368,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0))); if (my_read(file,(char*) header,ref_length,MYF(MY_NABP))) return BLOCK_FATAL_ERROR; - DBUG_DUMP("header",(byte*) header,ref_length); + DBUG_DUMP("header",(uchar*) header,ref_length); } head_length= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); diff --git a/myisam/mi_page.c b/myisam/mi_page.c index eb26cf52ed2..27cddaefb1e 100644 --- a/myisam/mi_page.c +++ b/myisam/mi_page.c @@ -49,7 +49,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo, { DBUG_PRINT("error",("page %lu had wrong page length: %u", (ulong) page, page_size)); - DBUG_DUMP("page", (char*) tmp, keyinfo->block_length); + DBUG_DUMP("page", (uchar*) tmp, keyinfo->block_length); info->last_keypage = HA_OFFSET_ERROR; mi_print_error(info->s, HA_ERR_CRASHED); my_errno = HA_ERR_CRASHED; @@ -80,7 +80,7 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_RETURN((-1)); } DBUG_PRINT("page",("write page at: %lu",(long) page)); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); #endif if ((length=keyinfo->block_length) > IO_SIZE*2 && diff --git a/myisam/mi_search.c b/myisam/mi_search.c index 7016a3a6876..530be5e042f 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -78,7 +78,7 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, test(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; - DBUG_DUMP("page",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("page",(uchar*) buff,mi_getint(buff)); flag=(*keyinfo->bin_search)(info,keyinfo,buff,key,key_len,nextflag, &keypos,lastkey, &last_key); @@ -814,7 +814,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, DBUG_PRINT("error", ("Found too long null packed key: %u of %u at %lx", length, keyseg->length, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; @@ -871,7 +871,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, { DBUG_PRINT("error",("Found too long packed key: %u of %u at %lx", length, keyseg->length, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Error */ @@ -942,7 +942,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, { DBUG_PRINT("error",("Found too long binary packed key: %u of %u at %lx", length, keyinfo->maxlength, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); /* Wrong key */ diff --git a/myisam/mi_statrec.c b/myisam/mi_statrec.c index f88e5b02bcf..70a09895a3f 100644 --- a/myisam/mi_statrec.c +++ b/myisam/mi_statrec.c @@ -137,8 +137,8 @@ int _mi_cmp_static_record(register MI_INFO *info, register const byte *old) if (memcmp((byte*) info->rec_buff, (byte*) old, (uint) info->s->base.reclength)) { - DBUG_DUMP("read",old,info->s->base.reclength); - DBUG_DUMP("disk",info->rec_buff,info->s->base.reclength); + DBUG_DUMP("read",(uchar *)old,info->s->base.reclength); + DBUG_DUMP("disk",(uchar *)info->rec_buff,info->s->base.reclength); my_errno=HA_ERR_RECORD_CHANGED; /* Record have changed */ DBUG_RETURN(1); } diff --git a/myisam/mi_test1.c b/myisam/mi_test1.c index 3540ac0f580..380f9f412b7 100644 --- a/myisam/mi_test1.c +++ b/myisam/mi_test1.c @@ -647,7 +647,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), printf("test1 Ver 1.2 \n"); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (argument); break; case '?': diff --git a/myisam/mi_test2.c b/myisam/mi_test2.c index 5aa9250cf18..3c88ffce2db 100644 --- a/myisam/mi_test2.c +++ b/myisam/mi_test2.c @@ -449,8 +449,8 @@ int main(int argc, char *argv[]) bcmp(read_record2,read_record3,reclength)) { printf("Can't find last record\n"); - DBUG_DUMP("record2",(byte*) read_record2,reclength); - DBUG_DUMP("record3",(byte*) read_record3,reclength); + DBUG_DUMP("record2",(uchar*) read_record2,reclength); + DBUG_DUMP("record3",(uchar*) read_record3,reclength); goto end; } ant=1; @@ -863,7 +863,6 @@ err: static void get_options(int argc, char **argv) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -976,7 +975,6 @@ static void get_options(int argc, char **argv) progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; default: diff --git a/myisam/mi_test3.c b/myisam/mi_test3.c index dd798f1a161..cc86f21a28e 100644 --- a/myisam/mi_test3.c +++ b/myisam/mi_test3.c @@ -119,7 +119,6 @@ int main(int argc,char **argv) static void get_options(int argc, char **argv) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -149,7 +148,6 @@ static void get_options(int argc, char **argv) printf("Usage: %s [-?lKA] [-f#] [-t#]\n",progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; default: diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 967fbdc2330..4f11fc78ccf 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -476,7 +476,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (key_pos != anc_buff+2+nod_flag && (keyinfo->flag & (HA_BINARY_PACK_KEY | HA_PACK_KEY))) { - DBUG_DUMP("prev_key",(byte*) key_buff,_mi_keylength(keyinfo,key_buff)); + DBUG_DUMP("prev_key",(uchar*) key_buff,_mi_keylength(keyinfo,key_buff)); } if (keyinfo->flag & HA_PACK_KEY) { @@ -583,7 +583,7 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); LINT_INIT(after_key); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ @@ -630,7 +630,7 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); - DBUG_DUMP("key",(byte*) key,_mi_keylength(keyinfo,key)); + DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ } /* _mi_split_page */ @@ -784,7 +784,7 @@ static int _mi_balance_page(register MI_INFO *info, MI_KEYDEF *keyinfo, if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,info->buff,0)) goto err; - DBUG_DUMP("next",(byte*) info->buff,mi_getint(info->buff)); + DBUG_DUMP("next",(uchar*) info->buff,mi_getint(info->buff)); /* Test if there is room to share keys */ diff --git a/myisammrg/myrg_rkey.c b/myisammrg/myrg_rkey.c index 0f9e9a9b822..627839331c6 100644 --- a/myisammrg/myrg_rkey.c +++ b/myisammrg/myrg_rkey.c @@ -92,6 +92,6 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key, mi->once_flags|= RRND_PRESERVE_LASTINX; DBUG_PRINT("info", ("using table no: %d", (int) (info->current_table - info->open_tables + 1))); - DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length); + DBUG_DUMP("result key", (uchar*) mi->lastkey, mi->lastkey_length); DBUG_RETURN(_myrg_mi_read_record(mi,buf)); } diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 9234b6b5219..7a528c9e74a 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -294,7 +294,7 @@ GlobalDictCache::drop(NdbTableImpl * tab) ver.m_refCount--; ver.m_status = DROPPED; if(ver.m_refCount == 0){ - DBUG_PRINT("info", ("refCount is zero, deleting m_impl")) + DBUG_PRINT("info", ("refCount is zero, deleting m_impl")); delete ver.m_impl; vers->erase(i); } diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp index 611d0396f96..8a854bf9a42 100644 --- a/ndb/src/ndbapi/NdbBlob.cpp +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -338,7 +338,7 @@ int NdbBlob::setTableKeyValue(NdbOperation* anOp) { DBUG_ENTER("NdbBlob::setTableKeyValue"); - DBUG_DUMP("info", theKeyBuf.data, 4 * theTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar*)theKeyBuf.data, 4 * theTable->m_keyLenInWords); const Uint32* data = (const Uint32*)theKeyBuf.data; const unsigned columns = theTable->m_columns.size(); unsigned pos = 0; @@ -362,7 +362,8 @@ int NdbBlob::setAccessKeyValue(NdbOperation* anOp) { DBUG_ENTER("NdbBlob::setAccessKeyValue"); - DBUG_DUMP("info", theAccessKeyBuf.data, 4 * theAccessTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar*)theAccessKeyBuf.data, + 4 * theAccessTable->m_keyLenInWords); const Uint32* data = (const Uint32*)theAccessKeyBuf.data; const unsigned columns = theAccessTable->m_columns.size(); unsigned pos = 0; @@ -387,7 +388,8 @@ NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part) { DBUG_ENTER("NdbBlob::setPartKeyValue"); DBUG_PRINT("info", ("dist=%u part=%u key=", getDistKey(part), part)); - DBUG_DUMP("info", theKeyBuf.data, 4 * theTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar *)theKeyBuf.data, + 4 * theTable->m_keyLenInWords); // TODO use attr ids after compatibility with 4.1.7 not needed if (anOp->equal("PK", theKeyBuf.data) == -1 || anOp->equal("DIST", getDistKey(part)) == -1 || diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp index cd357bb44c1..5db0d9f098e 100644 --- a/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -440,7 +440,7 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, theOperationType, (long) aValuePassed, len)); if (aValuePassed != NULL) - DBUG_DUMP("value", (char*)aValuePassed, len); + DBUG_DUMP("value", (uchar*)aValuePassed, len); int tReturnCode; Uint32 tAttrId; diff --git a/ndb/src/ndbapi/NdbOperationInt.cpp b/ndb/src/ndbapi/NdbOperationInt.cpp index 24e77363fb5..624b15b46f3 100644 --- a/ndb/src/ndbapi/NdbOperationInt.cpp +++ b/ndb/src/ndbapi/NdbOperationInt.cpp @@ -1017,7 +1017,7 @@ NdbOperation::branch_col(Uint32 type, DBUG_PRINT("enter", ("type: %u col:%u val: 0x%lx len: %u label: %u", type, ColId, (long) val, len, Label)); if (val != NULL) - DBUG_DUMP("value", (char*)val, len); + DBUG_DUMP("value", (uchar*)val, len); if (initial_interpreterCheck() == -1) DBUG_RETURN(-1); diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp index 7f8659916dc..4bdbf135396 100644 --- a/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -62,7 +62,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, theOperationType, (long) aValuePassed, aVariableKeyLen)); if (aValuePassed != NULL) - DBUG_DUMP("value", (char*)aValuePassed, aVariableKeyLen); + DBUG_DUMP("value", (uchar*)aValuePassed, aVariableKeyLen); register Uint32 tAttrId; diff --git a/sql-common/client.c b/sql-common/client.c index 88774ce61e1..519deac2bc5 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2113,7 +2113,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, /* Check if version of protocol matches current one */ mysql->protocol_version= net->read_pos[0]; - DBUG_DUMP("packet",(char*) net->read_pos,10); + DBUG_DUMP("packet",(uchar*) net->read_pos,10); DBUG_PRINT("info",("mysql protocol version %d, server=%d", PROTOCOL_VERSION, mysql->protocol_version)); if (mysql->protocol_version != PROTOCOL_VERSION) diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index 7a7d65a3d34..2ccfeba74cb 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -1095,7 +1095,7 @@ bool ha_federated::create_where_from_key(String *to, uint store_length= key_part->store_length; uint part_length= min(store_length, length); needs_quotes= 1; - DBUG_DUMP("key, start of loop", ptr, length); + DBUG_DUMP("key, start of loop", (uchar *)ptr, length); if (key_part->null_bit) { diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index a2de8ea1d0b..1be6137460b 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4250,7 +4250,7 @@ ha_innobase::rnd_pos( int error; uint keynr = active_index; DBUG_ENTER("rnd_pos"); - DBUG_DUMP("key", pos, ref_length); + DBUG_DUMP("key", (uchar *)pos, ref_length); statistic_increment(current_thd->status_var.ha_read_rnd_count, &LOCK_status); diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index e3ab2b67e26..0a75b328ca0 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -677,7 +677,7 @@ int ha_ndbcluster::set_ndb_key(NdbOperation *ndb_op, Field *field, DBUG_PRINT("enter", ("%d: %s, ndb_type: %u, len=%d", fieldnr, field->field_name, field->type(), pack_len)); - DBUG_DUMP("key", (char*)field_ptr, pack_len); + DBUG_DUMP("key", (uchar*)field_ptr, pack_len); DBUG_ASSERT(ndb_supported_type(field->type())); DBUG_ASSERT(! (field->flags & BLOB_FLAG)); @@ -699,7 +699,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, DBUG_PRINT("enter", ("%d: %s, type: %u, len=%d, is_null=%s", fieldnr, field->field_name, field->type(), pack_len, field->is_null()?"Y":"N")); - DBUG_DUMP("value", (char*) field_ptr, pack_len); + DBUG_DUMP("value", (uchar*) field_ptr, pack_len); DBUG_ASSERT(ndb_supported_type(field->type())); { @@ -737,7 +737,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, // Set value to NULL DBUG_RETURN((ndb_op->setValue(fieldnr, (char*)NULL, pack_len) != 0)); DBUG_PRINT("info", ("bit field")); - DBUG_DUMP("value", (char*)&bits, pack_len); + DBUG_DUMP("value", (uchar*)&bits, pack_len); #ifdef WORDS_BIGENDIAN /* store lsw first */ bits = ((bits >> 32) & 0x00000000FFFFFFFFLL) @@ -768,7 +768,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, DBUG_PRINT("value", ("set blob ptr: %p len: %u", blob_ptr, blob_len)); - DBUG_DUMP("value", (char*)blob_ptr, min(blob_len, 26)); + DBUG_DUMP("value", (uchar*)blob_ptr, min(blob_len, 26)); if (set_blob_value) *set_blob_value= TRUE; @@ -1007,8 +1007,8 @@ int ha_ndbcluster::get_metadata(const char *path) ("metadata, pack_length: %d getFrmLength: %d memcmp: %d", pack_length, tab->getFrmLength(), memcmp(pack_data, tab->getFrmData(), pack_length))); - DBUG_DUMP("pack_data", (char*)pack_data, pack_length); - DBUG_DUMP("frm", (char*)tab->getFrmData(), tab->getFrmLength()); + DBUG_DUMP("pack_data", (uchar*)pack_data, pack_length); + DBUG_DUMP("frm", (uchar*)tab->getFrmData(), tab->getFrmLength()); error= 3; invalidating_ndb_table= FALSE; } @@ -1502,7 +1502,7 @@ int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf) int res; DBUG_ENTER("pk_read"); DBUG_PRINT("enter", ("key_len: %u", key_len)); - DBUG_DUMP("key", (char*)key, key_len); + DBUG_DUMP("key", (uchar*)key, key_len); NdbOperation::LockMode lm= (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type); @@ -1514,7 +1514,7 @@ int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf) { // This table has no primary key, use "hidden" primary key DBUG_PRINT("info", ("Using hidden key")); - DBUG_DUMP("key", (char*)key, 8); + DBUG_DUMP("key", (uchar*)key, 8); if (set_hidden_key(op, no_fields, key)) ERR_RETURN(trans->getNdbError()); @@ -1797,7 +1797,7 @@ int ha_ndbcluster::unique_index_read(const byte *key, NdbIndexOperation *op; DBUG_ENTER("ha_ndbcluster::unique_index_read"); DBUG_PRINT("enter", ("key_len: %u, index: %u", key_len, active_index)); - DBUG_DUMP("key", (char*)key, key_len); + DBUG_DUMP("key", (uchar*)key, key_len); NdbOperation::LockMode lm= (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type); @@ -2126,7 +2126,7 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op, { DBUG_PRINT("info", ("key %d:%d offset=%d length=%d last=%d bound=%d", j, i, tot_len, part_len, p.part_last, p.bound_type)); - DBUG_DUMP("info", (const char*)p.part_ptr, part_store_len); + DBUG_DUMP("info", (const uchar*)p.part_ptr, part_store_len); // Set bound if not cancelled via type -1 if (p.bound_type != -1) @@ -2644,7 +2644,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) // Require that the PK for this record has previously been // read into m_ref - DBUG_DUMP("key", m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH); + DBUG_DUMP("key", (uchar *)m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH); if (set_hidden_key(op, table->s->fields, m_ref)) ERR_RETURN(op->getNdbError()); @@ -2864,8 +2864,6 @@ void ha_ndbcluster::print_results() DBUG_ENTER("print_results"); #ifndef DBUG_OFF - if (!_db_on_) - DBUG_VOID_RETURN; char buf_type[MAX_FIELD_WIDTH], buf_val[MAX_FIELD_WIDTH]; String type(buf_type, sizeof(buf_type), &my_charset_bin); @@ -3341,7 +3339,7 @@ void ha_ndbcluster::position(const byte *record) memcpy(ref, m_ref, ref_length); } - DBUG_DUMP("ref", (char*)ref, ref_length); + DBUG_DUMP("ref", (uchar*)ref, ref_length); DBUG_VOID_RETURN; } @@ -6132,14 +6130,14 @@ ha_ndbcluster::register_query_cache_table(THD *thd, if (!is_autocommit) { - DBUG_PRINT("exit", ("Can't register table during transaction")) + DBUG_PRINT("exit", ("Can't register table during transaction")); DBUG_RETURN(FALSE); } if (ndb_get_commitcount(thd, m_dbname, m_tabname, &commit_count)) { *engine_data= 0; - DBUG_PRINT("exit", ("Error, could not get commitcount")) + DBUG_PRINT("exit", ("Error, could not get commitcount")); DBUG_RETURN(FALSE); } *engine_data= commit_count; @@ -6263,7 +6261,7 @@ static int packfrm(const void *data, uint len, } DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", org_len, comp_len)); - DBUG_DUMP("compressed", (char*)data, org_len); + DBUG_DUMP("compressed", (uchar*)data, org_len); error= 2; blob_len= sizeof(frm_blob_struct::frm_blob_header)+org_len; @@ -6307,7 +6305,7 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len, DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu", ver,complen,orglen)); - DBUG_DUMP("blob->data", (char*) blob->data, complen); + DBUG_DUMP("blob->data", (uchar*) blob->data, complen); if (ver != 1) { diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index f5b41959b40..37e710acff4 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -1419,7 +1419,7 @@ int ha_ndbcluster_cond::generate_scan_filter_from_key(NdbScanOperation *op, uint32 pack_len= field->pack_length(); const byte* ptr= key; DBUG_PRINT("info", ("Filtering value for %s", field->field_name)); - DBUG_DUMP("key", (char*)ptr, pack_len); + DBUG_DUMP("key", (uchar*)ptr, pack_len); if (key_part->null_bit) { DBUG_PRINT("info", ("Generating ISNULL filter")); From fdb9d02945e4e867bc3e862e41b9f2a5522ba76c Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 14:01:56 +0200 Subject: [PATCH 517/527] Fixing rpl suite disabled.def: rpl_stm_extraColmaster_ndb does not exist in the suite. mysql-test/suite/rpl/t/disabled.def: removing the line because there is no such test in the suite anymore. --- mysql-test/suite/rpl/t/disabled.def | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/rpl/t/disabled.def b/mysql-test/suite/rpl/t/disabled.def index 20c3ccf0486..4375a2a8aa5 100644 --- a/mysql-test/suite/rpl/t/disabled.def +++ b/mysql-test/suite/rpl/t/disabled.def @@ -11,7 +11,6 @@ ############################################################################## rpl_ddl : BUG#26418 2007-03-01 mleich Slave out of sync after CREATE/DROP TEMPORARY TABLE + ROLLBACK on master -rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported. rpl_innodb_bug28430 : Bug #32247 2007-11-27 mats Test reports wrong value of "AUTO_INCREMENT" (on a partitioned InnoDB table) rpl_view : Bug#32654: rpl_view.test fails randomly rpl_ndb_multi : Bug#30751: rpl_ndb_multi missing row in output From 8ae5aa3bd81124ed4d3c7e74139b028fd091cefc Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 16:12:23 +0200 Subject: [PATCH 518/527] fixes for warnings and compile errors for the fix of bug 26243 --- extra/charset2html.c | 2 ++ sql/ha_berkeley.cc | 8 ++++---- sql/mysqld.cc | 2 +- sql/sql_union.cc | 2 ++ 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extra/charset2html.c b/extra/charset2html.c index 8795c82bc34..8dcfa0c8990 100644 --- a/extra/charset2html.c +++ b/extra/charset2html.c @@ -153,7 +153,9 @@ int main(int argc, char **argv) { my_init(); if (argc > argcnt && argv[argcnt][0] == '-' && argv[argcnt][1] == '#') + { DBUG_PUSH(argv[argcnt++]+2); + } if (argc > argcnt) the_set = argv[argcnt++]; diff --git a/sql/ha_berkeley.cc b/sql/ha_berkeley.cc index fbfd5031656..1de40db2724 100644 --- a/sql/ha_berkeley.cc +++ b/sql/ha_berkeley.cc @@ -467,7 +467,7 @@ berkeley_cmp_packed_key(DB *file, const DBT *new_key, const DBT *saved_key) KEY_PART_INFO *key_part= key->key_part, *end=key_part+key->key_parts; uint key_length=new_key->size; - DBUG_DUMP("key_in_index", saved_key_ptr, saved_key->size); + DBUG_DUMP("key_in_index", (uchar *)saved_key_ptr, saved_key->size); for (; key_part != end && (int) key_length > 0; key_part++) { int cmp; @@ -903,7 +903,7 @@ DBT *ha_berkeley::create_key(DBT *key, uint keynr, char *buff, key_length-=key_part->length; } key->size= (u_int32_t) (buff - (char*) key->data); - DBUG_DUMP("key",(char*) key->data, key->size); + DBUG_DUMP("key",(uchar*) key->data, key->size); DBUG_RETURN(key); } @@ -947,7 +947,7 @@ DBT *ha_berkeley::pack_key(DBT *key, uint keynr, char *buff, key_length-=key_part->store_length; } key->size= (u_int32_t) (buff - (char*) key->data); - DBUG_DUMP("key",(char*) key->data, key->size); + DBUG_DUMP("key",(uchar*) key->data, key->size); DBUG_RETURN(key); } @@ -1705,7 +1705,7 @@ DBT *ha_berkeley::get_pos(DBT *to, byte *pos) pos+=key_part->field->packed_col_length((char*) pos,key_part->length); to->size= (uint) (pos- (byte*) to->data); } - DBUG_DUMP("key", (char*) to->data, to->size); + DBUG_DUMP("key", (uchar*) to->data, to->size); return to; } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b8f675ff696..c239530f2fc 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6943,7 +6943,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), switch(optid) { case '#': #ifndef DBUG_OFF - DBUG_PUSH(argument ? argument : default_dbug_option); + DBUG_SET_INITIAL(argument ? argument : default_dbug_option); #endif opt_endinfo=1; /* unireg: memory allocation */ break; diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 25a0540e4dd..da5e118b069 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -444,7 +444,9 @@ bool st_select_lex_unit::exec() } /* re-enabling indexes for next subselect iteration */ if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL)) + { DBUG_ASSERT(0); + } } for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select()) { From 11714e6842f906901ac8e3ff9ac003ae0058fce7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 29 Mar 2008 17:50:46 +0200 Subject: [PATCH 519/527] fixed warnings from the fix of 26243 --- myisam/mi_check.c | 2 +- myisam/mi_keycache.c | 1 + mysys/mf_keycache.c | 2 +- sql/examples/ha_tina.cc | 2 +- sql/item_func.cc | 2 +- sql/lock.cc | 2 +- sql/sql_analyse.cc | 24 ++++++++++++------------ 7 files changed, 18 insertions(+), 17 deletions(-) diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 7ed4f3a9f03..daa5886f3ba 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1935,7 +1935,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name) for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ; key++,keyinfo++) if (keyinfo->key_alg == HA_KEY_ALG_RTREE) - return 0; + DBUG_RETURN(0); if (!(param->testflag & T_SILENT)) printf("- Sorting index for MyISAM-table '%s'\n",name); diff --git a/myisam/mi_keycache.c b/myisam/mi_keycache.c index bb465dbecce..6694893e9c3 100644 --- a/myisam/mi_keycache.c +++ b/myisam/mi_keycache.c @@ -158,4 +158,5 @@ void mi_change_key_cache(KEY_CACHE *old_key_cache, */ multi_key_cache_change(old_key_cache, new_key_cache); pthread_mutex_unlock(&THR_LOCK_myisam); + DBUG_VOID_RETURN; } diff --git a/mysys/mf_keycache.c b/mysys/mf_keycache.c index baf3bffccb8..f27ade7bfc0 100644 --- a/mysys/mf_keycache.c +++ b/mysys/mf_keycache.c @@ -551,7 +551,7 @@ finish: } #endif keycache_pthread_mutex_unlock(&keycache->cache_lock); - return blocks; + DBUG_RETURN(blocks); } diff --git a/sql/examples/ha_tina.cc b/sql/examples/ha_tina.cc index 0d1d821cf17..0b57fe86e62 100644 --- a/sql/examples/ha_tina.cc +++ b/sql/examples/ha_tina.cc @@ -883,7 +883,7 @@ int ha_tina::delete_all_rows() DBUG_ENTER("ha_tina::delete_all_rows"); if (!records_is_known) - return (my_errno=HA_ERR_WRONG_COMMAND); + DBUG_RETURN(my_errno=HA_ERR_WRONG_COMMAND); /* Invalidate all cached mmap pages */ if (free_mmap(share)) diff --git a/sql/item_func.cc b/sql/item_func.cc index a6fb8a94b69..7416471d630 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5115,7 +5115,7 @@ double Item_func_match::val_real() DBUG_RETURN(-1.0); if (key != NO_SUCH_KEY && table->null_row) /* NULL row from an outer join */ - return 0.0; + DBUG_RETURN(0.0); if (join_key) { diff --git a/sql/lock.cc b/sql/lock.cc index cf06be5f95f..47458702033 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -703,7 +703,7 @@ static MYSQL_LOCK *get_lock_data(THD *thd, TABLE **table_ptr, uint count, { my_error(ER_WRONG_LOCK_OF_SYSTEM_TABLE, MYF(0), table_ptr[i]->s->db, table_ptr[i]->s->table_name); - return 0; + DBUG_RETURN(0); } } diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 2e90d00f8aa..4b3264069b5 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -195,13 +195,13 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) */ for (; str != end && my_isspace(system_charset_info, *str); str++) ; if (str == end) - return 0; + DBUG_RETURN(0); if (*str == '-') { info->negative = 1; if (++str == end || *str == '0') // converting -0 to a number - return 0; // might lose information + DBUG_RETURN(0); // might lose information } else info->negative = 0; @@ -219,33 +219,33 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) int error; info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); if (info->integers == 1) - return 0; // a single number can't be zerofill + DBUG_RETURN(0); // a single number can't be zerofill info->maybe_zerofill = 1; - return 1; // a zerofill number, or an integer + DBUG_RETURN(1); // a zerofill number, or an integer } if (*str == '.' || *str == 'e' || *str == 'E') { if (info->zerofill) // can't be zerofill anymore - return 0; + DBUG_RETURN(0); if ((str + 1) == end) // number was something like '123[.eE]' { char *endpos= (char*) str; int error; info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); - return 1; + DBUG_RETURN(1); } if (*str == 'e' || *str == 'E') // number may be something like '1e+50' { str++; if (*str != '-' && *str != '+') - return 0; + DBUG_RETURN(0); for (str++; str != end && my_isdigit(system_charset_info,*str); str++) ; if (str == end) { info->is_float = 1; // we can't use variable decimals here - return 1; + DBUG_RETURN(1); } - return 0; + DBUG_RETURN(0); } for (str++; *(end - 1) == '0'; end--); // jump over zeros at the end if (str == end) // number was something like '123.000' @@ -253,17 +253,17 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) char *endpos= (char*) str; int error; info->ullval= (ulonglong) my_strtoll10(begin, &endpos, &error); - return 1; + DBUG_RETURN(1); } for (; str != end && my_isdigit(system_charset_info,*str); str++) info->decimals++; if (str == end) { info->dval = my_atof(begin); - return 1; + DBUG_RETURN(1); } } - return 0; + DBUG_RETURN(0); } From 2a001d5389241f0f3cd3debe295ec3ed3c0eea3c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 30 Mar 2008 00:54:08 +0200 Subject: [PATCH 520/527] Bug #35675 reset master finds assert if a binlog file can not be deleted If a binlog file is manually replaced with a namesake directory the internal purging did not handle the error of deleting the file so that eventually a post-execution guards fires an assert. Fixed with reusing a snippet of code for bug@18199 to tolerate lack of the file but no other error at an attempt to delete it. The same applied to the index file deletion. The cset carries pieces of manual merging. mysql-test/r/binlog_index.result: new results mysql-test/r/ctype_big5.result: results changed mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result: new results mysql-test/suite/binlog/r/binlog_stm_blackhole.result: new results mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test: cleanup. still todo: to let the test run multiple times w/o restarting the server (just ./mtr test) mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result: results changed mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test: guarding the test with statement format condition as the logics of the test requires sql/log.cc: two changes. One for the bug, other manual merge. The bug change needs MYF(0) to pass to my_delete because not all error out of the function are critical. The finer check is done on the caller of my_delete similarly how it was implemented for bug@18199 fixes. Non-existance of a file is not a critical error. sql/sql_class.cc: manual merge, removing extra automatically brought hunk. --- mysql-test/r/binlog_index.result | 4 +- mysql-test/r/ctype_big5.result | 4 +- .../r/binlog_auto_increment_bug33029.result | 1 + .../binlog/r/binlog_stm_blackhole.result | 7 ++ .../t/binlog_auto_increment_bug33029.test | 7 ++ .../r/rpl_stm_auto_increment_bug33029.result} | 4 + .../t/rpl_stm_auto_increment_bug33029.test} | 1 + sql/log.cc | 74 ++++++++++++++----- sql/sql_class.cc | 13 ---- 9 files changed, 81 insertions(+), 34 deletions(-) rename mysql-test/{r/rpl_auto_increment_bug33029.result => suite/rpl/r/rpl_stm_auto_increment_bug33029.result} (95%) rename mysql-test/{t/rpl_auto_increment_bug33029.test => suite/rpl/t/rpl_stm_auto_increment_bug33029.test} (98%) diff --git a/mysql-test/r/binlog_index.result b/mysql-test/r/binlog_index.result index 9c22a33435a..90a29f616e0 100644 --- a/mysql-test/r/binlog_index.result +++ b/mysql-test/r/binlog_index.result @@ -9,7 +9,7 @@ master-bin.000003 # master-bin.000004 # purge binary logs TO 'master-bin.000004'; Warnings: -Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1611 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show a list starting from the 'TO' argument of PURGE *** show binary logs; Log_name File_size @@ -20,7 +20,7 @@ flush logs; flush logs; *** must be a warning master-bin.000001 was not found *** Warnings: -Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1611 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show one record, of the active binlog, left in the index file after PURGE *** show binary logs; Log_name File_size diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result index b88ea14b559..2c8059a8afc 100644 --- a/mysql-test/r/ctype_big5.result +++ b/mysql-test/r/ctype_big5.result @@ -78,8 +78,8 @@ level smallint unsigned); show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `name` varchar(10) default NULL, - `level` smallint(5) unsigned default NULL + `name` varchar(10) DEFAULT NULL, + `level` smallint(5) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=big5 insert into t1 values ('string',1); select concat(name,space(level)), concat(name, repeat(' ',level)) from t1; diff --git a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result index 6fbadf68721..68f1f0b2566 100644 --- a/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result +++ b/mysql-test/suite/binlog/r/binlog_auto_increment_bug33029.result @@ -36,3 +36,4 @@ DROP PROCEDURE IF EXISTS p1; DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; +stop slave sql_thread; diff --git a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result index cef1d2f94c8..619fd39a2a9 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_blackhole.result +++ b/mysql-test/suite/binlog/r/binlog_stm_blackhole.result @@ -172,6 +172,7 @@ master-bin.000001 # Query # # use `test`; BEGIN master-bin.000001 # Query # # use `test`; insert into t1 values(1) master-bin.000001 # Query # # use `test`; COMMIT drop table if exists t1; +reset master; create table t1 (a int auto_increment, primary key (a)) engine=blackhole; insert into t1 values (11), (NULL), (NULL), (NULL); set insert_id= 3; @@ -181,10 +182,16 @@ insert into t1 values (55), (NULL); show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Query 1 # use `test`; create table t1 (a int auto_increment, primary key (a)) engine=blackhole +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=1 master-bin.000001 # Query 1 # use `test`; insert into t1 values (11), (NULL), (NULL), (NULL) +master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=3 master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL), (33), (NULL) +master-bin.000001 # Query 1 # use `test`; COMMIT +master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Intvar 1 # INSERT_ID=5 master-bin.000001 # Query 1 # use `test`; insert into t1 values (55), (NULL) +master-bin.000001 # Query 1 # use `test`; COMMIT drop table t1; diff --git a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test index 83c5b9513c4..e77c9398c59 100644 --- a/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test +++ b/mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test @@ -45,3 +45,10 @@ DROP PROCEDURE IF EXISTS p2; DROP FUNCTION IF EXISTS f1; DROP TRIGGER IF EXISTS tr1; enable_warnings; + +remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.000001; +remove_file $MYSQLTEST_VARDIR/master-data/slave-relay-bin.index; +stop slave sql_thread; +let $keep_connection=1; +source include/wait_for_slave_sql_to_stop.inc; + diff --git a/mysql-test/r/rpl_auto_increment_bug33029.result b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result similarity index 95% rename from mysql-test/r/rpl_auto_increment_bug33029.result rename to mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result index fb17553f5a0..2f6e98d5eec 100644 --- a/mysql-test/r/rpl_auto_increment_bug33029.result +++ b/mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result @@ -64,7 +64,9 @@ master-bin.000001 # Intvar # # INSERT_ID=9 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) master-bin.000001 # Intvar # # INSERT_ID=10 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=1 master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 1 +master-bin.000001 # Intvar # # INSERT_ID=2 master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = 2 master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 1 master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 2 @@ -100,7 +102,9 @@ show binlog events from ; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 # Intvar # # INSERT_ID=11 master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (NULL) +master-bin.000001 # Intvar # # INSERT_ID=3 master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(3) +master-bin.000001 # Intvar # # INSERT_ID=12 master-bin.000001 # Query # # use `test`; DELETE FROM t1 WHERE id = f1(4) master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 3 master-bin.000001 # Query # # use `test`; DELETE FROM t2 WHERE id = 4 diff --git a/mysql-test/t/rpl_auto_increment_bug33029.test b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test similarity index 98% rename from mysql-test/t/rpl_auto_increment_bug33029.test rename to mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test index db548945c7f..a8139bbbcd2 100644 --- a/mysql-test/t/rpl_auto_increment_bug33029.test +++ b/mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test @@ -8,6 +8,7 @@ # value might be associated with these statement, which could cause # duplicate entry error and stop the slave. +source include/have_binlog_format_statement.inc; source include/master-slave.inc; --disable_warnings diff --git a/sql/log.cc b/sql/log.cc index 8789dce4cd4..6e6a29c59b7 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2746,14 +2746,62 @@ bool MYSQL_BIN_LOG::reset_logs(THD* thd) for (;;) { - my_delete_allow_opened(linfo.log_file_name, MYF(MY_WME)); + if ((error= my_delete_allow_opened(linfo.log_file_name, MYF(0))) != 0) + { + if (my_errno == ENOENT) + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + linfo.log_file_name); + sql_print_information("Failed to delete file '%s'", + linfo.log_file_name); + my_errno= 0; + error= 0; + } + else + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with deleting %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + linfo.log_file_name); + error= 1; + goto err; + } + } if (find_next_log(&linfo, 0)) break; } /* Start logging with a new file */ close(LOG_CLOSE_INDEX); - my_delete_allow_opened(index_file_name, MYF(MY_WME)); // Reset (open will update) + if ((error= my_delete_allow_opened(index_file_name, MYF(0)))) // Reset (open will update) + { + if (my_errno == ENOENT) + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_LOG_PURGE_NO_FILE, ER(ER_LOG_PURGE_NO_FILE), + index_file_name); + sql_print_information("Failed to delete file '%s'", + index_file_name); + my_errno= 0; + error= 0; + } + else + { + push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_ERROR, + ER_BINLOG_PURGE_FATAL_ERR, + "a problem with deleting %s; " + "consider examining correspondence " + "of your binlog index file " + "to the actual binlog files", + index_file_name); + error= 1; + goto err; + } + } if (!thd->slave_thread) need_start_event=1; if (!open_index_file(index_file_name, 0)) @@ -2913,6 +2961,7 @@ int MYSQL_BIN_LOG::update_log_index(LOG_INFO* log_info, bool need_update_threads 0 ok @retval LOG_INFO_EOF to_log not found + LOG_INFO_EMFILE too many files opened LOG_INFO_FATAL if any other than ENOENT error from my_stat() or my_delete() */ @@ -3004,28 +3053,19 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log, "of your binlog index file " "to the actual binlog files", log_info.log_file_name); + if (my_errno == EMFILE) + { + DBUG_PRINT("info", + ("my_errno: %d, set ret = LOG_INFO_EMFILE", my_errno)); + error= LOG_INFO_EMFILE; + } error= LOG_INFO_FATAL; goto err; } } } - /* - It's not fatal if we can't delete a log file ; - if we could delete it, take its size into account - */ - DBUG_PRINT("info",("purging %s",log_info.log_file_name)); - if (!my_delete(log_info.log_file_name, MYF(0)) && decrease_log_space) - *decrease_log_space-= file_size; ha_binlog_index_purge_file(current_thd, log_info.log_file_name); - if (current_thd->is_slave_error) { - DBUG_PRINT("info",("slave error: %d", current_thd->is_slave_error)); - if (my_errno == EMFILE) { - DBUG_PRINT("info",("my_errno: %d, set ret = LOG_INFO_EMFILE", my_errno)); - ret = LOG_INFO_EMFILE; - break; - } - } if (find_next_log(&log_info, 0) || exit_loop) break; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 247cccfa838..48ab3ea64c1 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1069,19 +1069,6 @@ bool THD::store_globals() void THD::cleanup_after_query() { - last_insert_id_used= FALSE; - if (clear_next_insert_id) - { - clear_next_insert_id= 0; - next_insert_id= 0; - - /* - BUG#33029, if one statement in a SP set this member to 1, all - statment after this statement in the SP would be considered used - INSERT_ID value, reset this member after each query to fix this. - */ - insert_id_used= 0; - } /* Reset rand_used so that detection of calls to rand() will save random seeds if needed by the slave. From 6edab4bc081b29894f3eaf70468d989ea956ff18 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 30 Mar 2008 15:46:37 -0400 Subject: [PATCH 521/527] Bug#26243 - Cleanup Valgrind error --- sql/tztime.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/tztime.cc b/sql/tztime.cc index bedbf921cae..b7381e2ed95 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2278,7 +2278,7 @@ my_tz_find(const String * name, TABLE_LIST *tz_tables) DBUG_ENTER("my_tz_find"); DBUG_PRINT("enter", ("time zone name='%s'", - name ? ((String *)name)->c_ptr() : "NULL")); + name ? ((String *)name)->c_ptr_safe() : "NULL")); DBUG_ASSERT(!time_zone_tables_exist || tz_tables || current_thd->slave_thread); From 600a664a5a220f056b61139a761093cd1aed6355 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Mar 2008 11:29:03 +0200 Subject: [PATCH 522/527] Updating commit.inc since the number of commits done for non-transactional tables is not zero any more. For row-based logging, there is an extra commit for sending rows changed by the statement to the binary log. mysql-test/include/commit.inc: For row-based logging, an extra commit is done for each statement to commit non-transactional changes to the binary log. mysql-test/r/commit_1innodb.result: Result change. --- mysql-test/include/commit.inc | 16 ++++++++++++---- mysql-test/r/commit_1innodb.result | 16 ++++++++++++---- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc index 5c1baa562c5..98f9c93b25a 100644 --- a/mysql-test/include/commit.inc +++ b/mysql-test/include/commit.inc @@ -542,17 +542,25 @@ call p_verify_status_increment(0, 0, 0, 0); --echo # 16. A function changes non-trans-table. --echo # +--echo # For row-based logging, there is an extra commit for the +--echo # non-transactional changes saved in the transaction cache to +--echo # the binary log. +--echo # select f1(); -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(0, 0, 1, 0); commit; -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(0, 0, 1, 0); --echo # 17. Read-only statement, a function changes non-trans-table. --echo # +--echo # For row-based logging, there is an extra commit for the +--echo # non-transactional changes saved in the transaction cache to +--echo # the binary log. +--echo # select f1() from t1; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(1, 0, 2, 0); commit; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(1, 0, 2, 0); --echo # 18. Read-write statement: UPDATE, change 0 (transactional) rows. --echo # diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result index ed0034cfc99..a2c1eb9a82e 100644 --- a/mysql-test/r/commit_1innodb.result +++ b/mysql-test/r/commit_1innodb.result @@ -571,27 +571,35 @@ SUCCESS # 16. A function changes non-trans-table. # +# For row-based logging, there is an extra commit for the +# non-transactional changes saved in the transaction cache to +# the binary log. +# select f1(); f1() 2 -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(0, 0, 1, 0); SUCCESS commit; -call p_verify_status_increment(0, 0, 0, 0); +call p_verify_status_increment(0, 0, 1, 0); SUCCESS # 17. Read-only statement, a function changes non-trans-table. # +# For row-based logging, there is an extra commit for the +# non-transactional changes saved in the transaction cache to +# the binary log. +# select f1() from t1; f1() 2 2 -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(1, 0, 2, 0); SUCCESS commit; -call p_verify_status_increment(1, 0, 1, 0); +call p_verify_status_increment(1, 0, 2, 0); SUCCESS # 18. Read-write statement: UPDATE, change 0 (transactional) rows. From 02c00f95bf86a108d9fdb163fe7cde45af4b8257 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Mar 2008 14:13:42 +0300 Subject: [PATCH 523/527] merge 5.1-main to 5.1-bugteam --- mysql-test/r/binlog_index.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/binlog_index.result b/mysql-test/r/binlog_index.result index 90a29f616e0..9f3c3746bd4 100644 --- a/mysql-test/r/binlog_index.result +++ b/mysql-test/r/binlog_index.result @@ -9,7 +9,7 @@ master-bin.000003 # master-bin.000004 # purge binary logs TO 'master-bin.000004'; Warnings: -Warning 1611 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show a list starting from the 'TO' argument of PURGE *** show binary logs; Log_name File_size @@ -20,7 +20,7 @@ flush logs; flush logs; *** must be a warning master-bin.000001 was not found *** Warnings: -Warning 1611 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1612 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show one record, of the active binlog, left in the index file after PURGE *** show binary logs; Log_name File_size From a49184af502604008a8dad84a870af1c715defcd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Mar 2008 16:32:45 +0200 Subject: [PATCH 524/527] Removing race conditions from rpl_packet causing test to fail. mysql-test/r/rpl_packet.result: Result change. mysql-test/t/rpl_packet.test: Setting net_buffer_length correctly for the test instead of relying on it being set correctly. Waiting for slave to stop after issuing a SLAVE STOP and waiting for slave to start when issuing a SLAVE START to prevent race conditions causing test failure. --- mysql-test/r/rpl_packet.result | 4 ++++ mysql-test/t/rpl_packet.test | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result index 9425724b434..88c63994fff 100644 --- a/mysql-test/r/rpl_packet.result +++ b/mysql-test/r/rpl_packet.result @@ -6,6 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; +SET @@global.max_allowed_packet=1024; +SET @@global.net_buffer_length=1024; +STOP SLAVE; +START SLAVE; select @@net_buffer_length, @@max_allowed_packet; @@net_buffer_length @@max_allowed_packet 1024 1024 diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test index 84bc5d908bf..a3efdf24bce 100644 --- a/mysql-test/t/rpl_packet.test +++ b/mysql-test/t/rpl_packet.test @@ -13,13 +13,25 @@ enable_warnings; eval create database $db; connection master; -select @@net_buffer_length, @@max_allowed_packet; +SET @@global.max_allowed_packet=1024; +SET @@global.net_buffer_length=1024; + +# Restart slave for setting to take effect +connection slave; +STOP SLAVE; +source include/wait_for_slave_to_stop.inc; +START SLAVE; +source include/wait_for_slave_to_start.inc; + +# Reconnect to master for new setting to take effect disconnect master; # alas, can't use eval here; if db name changed apply the change here connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________); connection master; +select @@net_buffer_length, @@max_allowed_packet; + create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); @@ -52,7 +64,9 @@ SET @@global.net_buffer_length=4096; # Restart slave for new setting to take effect connection slave; STOP SLAVE; +source include/wait_for_slave_to_stop.inc; START SLAVE; +source include/wait_for_slave_to_start.inc; # Reconnect to master for new setting to take effect disconnect master; From 91b3983e50a47ba7132e28821fa8fee4a0aeb3ea Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 31 Mar 2008 19:05:18 +0200 Subject: [PATCH 525/527] Raise version number after cloning 5.1.24-rc --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 026380f25b4..de98b73369f 100644 --- a/configure.in +++ b/configure.in @@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM # # When changing major version number please also check switch statement # in mysqlbinlog::check_master_version(). -AM_INIT_AUTOMAKE(mysql, 5.1.24-rc) +AM_INIT_AUTOMAKE(mysql, 5.1.25-rc) AM_CONFIG_HEADER([include/config.h:config.h.in]) PROTOCOL_VERSION=10 From edcf2742f82d56eddc54011e8e4075dfc4dab54e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Apr 2008 12:29:53 +0200 Subject: [PATCH 526/527] Post-merge fixes. mysql-test/r/binlog_index.result: Result set change. --- mysql-test/r/binlog_index.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/binlog_index.result b/mysql-test/r/binlog_index.result index 9c22a33435a..82fc26092f4 100644 --- a/mysql-test/r/binlog_index.result +++ b/mysql-test/r/binlog_index.result @@ -9,7 +9,7 @@ master-bin.000003 # master-bin.000004 # purge binary logs TO 'master-bin.000004'; Warnings: -Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1477 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show a list starting from the 'TO' argument of PURGE *** show binary logs; Log_name File_size @@ -20,7 +20,7 @@ flush logs; flush logs; *** must be a warning master-bin.000001 was not found *** Warnings: -Warning 1476 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found +Warning 1477 Being purged log MYSQLTEST_VARDIR/log/master-bin.000001 was not found *** must show one record, of the active binlog, left in the index file after PURGE *** show binary logs; Log_name File_size From c481f6b3cf80f471321d2ef4e7c68fe9e6e5d0ca Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 1 Apr 2008 18:50:35 +0200 Subject: [PATCH 527/527] Post-merge fixes. sql/share/errmsg.txt: Reverting error message to before merge. --- sql/share/errmsg.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 1dbba191f09..894e2094968 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5522,8 +5522,8 @@ ER_M_BIGGER_THAN_D 42000 S1009 eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')." ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')" ER_WRONG_LOCK_OF_SYSTEM_TABLE - eng "You can't combine write-locking of system '%-.64s.%-.64s' table with other tables" - ger "Sie können Schreibsperren auf der Systemtabelle '%-.64s.%-.64s' nicht mit anderen Tabellen kombinieren" + eng "You can't combine write-locking of system tables with other tables or lock types" + ger "Sie können Schreibsperren auf der Systemtabelle nicht mit anderen Tabellen kombinieren" ER_CONNECT_TO_FOREIGN_DATA_SOURCE eng "Unable to connect to foreign data source: %.64s" ger "Kann nicht mit Fremddatenquelle verbinden: %.64s"